From e8786ca118fa8fddd2ddd6588ebb2fe5b706340c Mon Sep 17 00:00:00 2001 From: Gaudenz Alder <gaudenz@jgraph.com> Date: Wed, 25 Mar 2020 18:42:17 +0100 Subject: [PATCH] 12.9.3 release --- ChangeLog | 6 + VERSION | 2 +- .../mxgraph/online/MSGraphAuthServlet.java | 3 +- src/main/webapp/js/app.min.js | 2038 +++++++++-------- src/main/webapp/js/diagramly/App.js | 8 +- src/main/webapp/js/diagramly/Editor.js | 13 +- src/main/webapp/js/diagramly/EditorUi.js | 31 +- src/main/webapp/js/diagramly/Extensions.js | 75 +- src/main/webapp/js/diagramly/Init.js | 3 +- src/main/webapp/js/diagramly/Trees.js | 23 +- src/main/webapp/js/extensions.min.js | 432 ++-- src/main/webapp/js/mxgraph/Editor.js | 6 + src/main/webapp/js/mxgraph/Graph.js | 259 ++- src/main/webapp/js/mxgraph/Toolbar.js | 4 +- src/main/webapp/js/viewer.min.js | 1615 ++++++------- src/main/webapp/package.json | 4 +- src/main/webapp/service-worker.js | 20 +- 17 files changed, 2348 insertions(+), 2194 deletions(-) diff --git a/ChangeLog b/ChangeLog index f175aa6c5..b2ed61ba4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +25-MAR:2020: 12.9.3 + +- Fixes update of filename placeholder +- Improvements for Lucidchart import +- Fixes minor issues with layouts + 24-MAR:2020: 12.9.2 - Adds filename placeholder diff --git a/VERSION b/VERSION index b825d6d03..3d2ea1fb1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.9.2 \ No newline at end of file +12.9.3 \ No newline at end of file diff --git a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java index eefe2b5d0..5325f2856 100644 --- a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java +++ b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java @@ -85,7 +85,8 @@ public class MSGraphAuthServlet extends AbsAuthServlet res.append("{"); res.append(" window.opener.onOneDriveCallback(authInfo, window);"); res.append("} else {"); - res.append(" Office.initialize = function () { Office.context.ui.messageParent(JSON.stringify(authInfo));}"); + res.append(" var authInfoStr = JSON.stringify(authInfo);"); + res.append(" Office.initialize = function () { Office.context.ui.messageParent(authInfoStr);}"); res.append("}"); res.append("</script></head><body></body></html>"); } diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 8645988a9..d7b5cfe58 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -131,11 +131,11 @@ d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports&&"string"!=typeof exports.nodeName?module.exports=t():e.Croppie=t()}("undefined"!=typeof self?self:this,function(){"function"!=typeof Promise&&function(e){function n(e,t){return function(){e.apply(t,arguments)}}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],u(e,n(i,this),n(o,this))}function a(n){var i=this;return null===this._state?void this._deferreds.push(n):void c(function(){var e=i._state?n.onFulfilled:n.onRejected;if(null!==e){var t;try{t=e(i._value)}catch(e){return void n.reject(e)}n.resolve(t)}else(i._state?n.resolve:n.reject)(i._value)})}function i(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void u(n(t,e),n(i,this),n(o,this))}this._state=!0,this._value=e,s.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;e<t;e++)a.call(this,this._deferreds[e]);this._deferreds=null}function l(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function u(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(e){if(i)return;i=!0,n(e)}}var t=setTimeout,c="function"==typeof setImmediate&&setImmediate||function(e){t(e,1)},h=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(n,i){var o=this;return new r(function(e,t){a.call(o,new l(n,i,e,t))})},r.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&h(arguments[0])?arguments[0]:arguments);return new r(function(i,o){function r(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){r(t,e)},o)}s[t]=e,0==--a&&i(s)}catch(e){o(e)}}if(0===s.length)return i([]);for(var a=s.length,e=0;e<s.length;e++)r(e,s[e])})},r.resolve=function(t){return t&&"object"==typeof t&&t.constructor===r?t:new r(function(e){e(t)})},r.reject=function(n){return new r(function(e,t){t(n)})},r.race=function(o){return new r(function(e,t){for(var n=0,i=o.length;n<i;n++)o[n].then(e,t)})},r._setImmediateFn=function(e){c=e},"undefined"!=typeof module&&module.exports?module.exports=r:e.Promise||(e.Promise=r)}(this),"function"!=typeof window.CustomEvent&&function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,n){for(var i=atob(this.toDataURL(t,n).split(",")[1]),o=i.length,r=new Uint8Array(o),a=0;a<o;a++)r[a]=i.charCodeAt(a);e(new Blob([r],{type:t||"image/png"}))}});var v,g,w,i=["Webkit","Moz","ms"],o=document.createElement("div").style,l=[1,8,3,6],u=[2,7,4,5];function e(e){if(e in o)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=i.length;n--;)if((e=i[n]+t)in o)return e}function p(e,t){for(var n in e=e||{},t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},p(e[n],t[n])):e[n]=t[n];return e}function d(e){return p({},e)}function y(e){if("createEvent"in document){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),e.dispatchEvent(t)}else e.fireEvent("onchange")}function b(e,t,n){if("string"==typeof t){var i=t;(t={})[i]=n}for(var o in t)e.style[o]=t[o]}function x(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function c(e,t){for(var n in t)e.setAttribute(n,t[n])}function C(e){return parseInt(e,10)}function m(e,t){var n=e.naturalWidth,i=e.naturalHeight,o=t||f(e);if(o&&5<=o){var r=n;n=i,i=r}return{width:n,height:i}}g=e("transform"),v=e("transformOrigin"),w=e("userSelect");var t={translate3d:{suffix:", 0px"},translate:{suffix:""}},E=function(e,t,n){this.x=parseFloat(e),this.y=parseFloat(t),this.scale=parseFloat(n)};E.parse=function(e){return e.style?E.parse(e.style[g]):-1<e.indexOf("matrix")||-1<e.indexOf("none")?E.fromMatrix(e):E.fromString(e)},E.fromMatrix=function(e){var t=e.substring(7).split(",");return t.length&&"none"!==e||(t=[1,0,0,1,0,0]),new E(C(t[4]),C(t[5]),parseFloat(t[0]))},E.fromString=function(e){var t=e.split(") "),n=t[0].substring(T.globals.translate.length+1).split(","),i=1<t.length?t[1].substring(6):1,o=1<n.length?n[0]:0,r=1<n.length?n[1]:0;return new E(o,r,i)},E.prototype.toString=function(){var e=t[T.globals.translate].suffix||"";return T.globals.translate+"("+this.x+"px, "+this.y+"px"+e+") scale("+this.scale+")"};var L=function(e){if(!e||!e.style[v])return this.x=0,void(this.y=0);var t=e.style[v].split(" ");this.x=parseFloat(t[0]),this.y=parseFloat(t[1])};function f(e){return e.exifdata&&e.exifdata.Orientation?C(e.exifdata.Orientation):1}function _(e,t,n){var i=t.width,o=t.height,r=e.getContext("2d");switch(e.width=t.width,e.height=t.height,r.save(),n){case 2:r.translate(i,0),r.scale(-1,1);break;case 3:r.translate(i,o),r.rotate(180*Math.PI/180);break;case 4:r.translate(0,o),r.scale(1,-1);break;case 5:e.width=o,e.height=i,r.rotate(90*Math.PI/180),r.scale(1,-1);break;case 6:e.width=o,e.height=i,r.rotate(90*Math.PI/180),r.translate(0,-o);break;case 7:e.width=o,e.height=i,r.rotate(-90*Math.PI/180),r.translate(-i,o),r.scale(1,-1);break;case 8:e.width=o,e.height=i,r.translate(0,i),r.rotate(-90*Math.PI/180)}r.drawImage(t,0,0,i,o),r.restore()}function r(){var e,t,n,i,o,r,a=this,s=a.options.viewport.type?"cr-vp-"+a.options.viewport.type:null;a.options.useCanvas=a.options.enableOrientation||R.call(a),a.data={},a.elements={},e=a.elements.boundary=document.createElement("div"),n=a.elements.viewport=document.createElement("div"),t=a.elements.img=document.createElement("img"),i=a.elements.overlay=document.createElement("div"),a.options.useCanvas?(a.elements.canvas=document.createElement("canvas"),a.elements.preview=a.elements.canvas):a.elements.preview=t,x(e,"cr-boundary"),e.setAttribute("aria-dropeffect","none"),o=a.options.boundary.width,r=a.options.boundary.height,b(e,{width:o+(isNaN(o)?"":"px"),height:r+(isNaN(r)?"":"px")}),x(n,"cr-viewport"),s&&x(n,s),b(n,{width:a.options.viewport.width+"px",height:a.options.viewport.height+"px"}),n.setAttribute("tabindex",0),x(a.elements.preview,"cr-image"),c(a.elements.preview,{alt:"preview","aria-grabbed":"false"}),x(i,"cr-overlay"),a.element.appendChild(e),e.appendChild(a.elements.preview),e.appendChild(n),e.appendChild(i),x(a.element,"croppie-container"),a.options.customClass&&x(a.element,a.options.customClass),function(){var h,p,d,l,m,f=this,n=!1;function v(e,t){var n=f.elements.preview.getBoundingClientRect(),i=m.y+t,o=m.x+e;f.options.enforceBoundary?(l.top>n.top+t&&l.bottom<n.bottom+t&&(m.y=i),l.left>n.left+e&&l.right<n.right+e&&(m.x=o)):(m.y=i,m.x=o)}function i(e){f.elements.preview.setAttribute("aria-grabbed",e),f.elements.boundary.setAttribute("aria-dropeffect",e?"move":"none")}function e(e){if((void 0===e.button||0===e.button)&&(e.preventDefault(),!n)){if(n=!0,h=e.pageX,p=e.pageY,e.touches){var t=e.touches[0];h=t.pageX,p=t.pageY}i(n),m=E.parse(f.elements.preview),window.addEventListener("mousemove",o),window.addEventListener("touchmove",o),window.addEventListener("mouseup",r),window.addEventListener("touchend",r),document.body.style[w]="none",l=f.elements.viewport.getBoundingClientRect()}}function o(e){e.preventDefault();var t=e.pageX,n=e.pageY;if(e.touches){var i=e.touches[0];t=i.pageX,n=i.pageY}var o=t-h,r=n-p,a={};if("touchmove"===e.type&&1<e.touches.length){var s=e.touches[0],l=e.touches[1],u=Math.sqrt((s.pageX-l.pageX)*(s.pageX-l.pageX)+(s.pageY-l.pageY)*(s.pageY-l.pageY));d||(d=u/f._currentZoom);var c=u/d;return B.call(f,c),void y(f.elements.zoomer)}v(o,r),a[g]=m.toString(),b(f.elements.preview,a),z.call(f),p=n,h=t}function r(){i(n=!1),window.removeEventListener("mousemove",o),window.removeEventListener("touchmove",o),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),document.body.style[w]="",Z.call(f),F.call(f),d=0}f.elements.overlay.addEventListener("mousedown",e),f.elements.viewport.addEventListener("keydown",function(e){if(!e.shiftKey||38!==e.keyCode&&40!==e.keyCode){if(f.options.enableKeyMovement&&37<=e.keyCode&&e.keyCode<=40){e.preventDefault();var t=s(e.keyCode);m=E.parse(f.elements.preview),document.body.style[w]="none",l=f.elements.viewport.getBoundingClientRect(),o=(i=t)[0],r=i[1],a={},v(o,r),a[g]=m.toString(),b(f.elements.preview,a),z.call(f),document.body.style[w]="",Z.call(f),F.call(f),d=0}}else{var n;n=38===e.keyCode?parseFloat(f.elements.zoomer.value)+parseFloat(f.elements.zoomer.step):parseFloat(f.elements.zoomer.value)-parseFloat(f.elements.zoomer.step),f.setZoom(n)}var i,o,r,a;function s(e){switch(e){case 37:return[1,0];case 38:return[0,1];case 39:return[-1,0];case 40:return[0,-1]}}}),f.elements.overlay.addEventListener("touchstart",e)}.call(this),a.options.enableZoom&&function(){var i=this,e=i.elements.zoomerWrap=document.createElement("div"),t=i.elements.zoomer=document.createElement("input");function o(){(function(e){var t=this,n=e?e.transform:E.parse(t.elements.preview),i=e?e.viewportRect:t.elements.viewport.getBoundingClientRect(),o=e?e.origin:new L(t.elements.preview);function r(){var e={};e[g]=n.toString(),e[v]=o.toString(),b(t.elements.preview,e)}if(t._currentZoom=e?e.value:t._currentZoom,n.scale=t._currentZoom,t.elements.zoomer.setAttribute("aria-valuenow",t._currentZoom),r(),t.options.enforceBoundary){var a=function(e){var t=this._currentZoom,n=e.width,i=e.height,o=this.elements.boundary.clientWidth/2,r=this.elements.boundary.clientHeight/2,a=this.elements.preview.getBoundingClientRect(),s=a.width,l=a.height,u=n/2,c=i/2,h=-1*(u/t-o),p=-1*(c/t-r),d=1/t*u,m=1/t*c;return{translate:{maxX:h,minX:h-(s*(1/t)-n*(1/t)),maxY:p,minY:p-(l*(1/t)-i*(1/t))},origin:{maxX:s*(1/t)-d,minX:d,maxY:l*(1/t)-m,minY:m}}}.call(t,i),s=a.translate,l=a.origin;n.x>=s.maxX&&(o.x=l.minX,n.x=s.maxX),n.x<=s.minX&&(o.x=l.maxX,n.x=s.minX),n.y>=s.maxY&&(o.y=l.minY,n.y=s.maxY),n.y<=s.minY&&(o.y=l.maxY,n.y=s.minY)}r(),I.call(t),F.call(t)}).call(i,{value:parseFloat(t.value),origin:new L(i.elements.preview),viewportRect:i.elements.viewport.getBoundingClientRect(),transform:E.parse(i.elements.preview)})}function n(e){var t,n;if("ctrl"===i.options.mouseWheelZoom&&!0!==e.ctrlKey)return 0;t=e.wheelDelta?e.wheelDelta/1200:e.deltaY?e.deltaY/1060:e.detail?e.detail/-60:0,n=i._currentZoom+t*i._currentZoom,e.preventDefault(),B.call(i,n),o.call(i)}x(e,"cr-slider-wrap"),x(t,"cr-slider"),t.type="range",t.step="0.0001",t.value="1",t.style.display=i.options.showZoomer?"":"none",t.setAttribute("aria-label","zoom"),i.element.appendChild(e),e.appendChild(t),i._currentZoom=1,i.elements.zoomer.addEventListener("input",o),i.elements.zoomer.addEventListener("change",o),i.options.mouseWheelZoom&&(i.elements.boundary.addEventListener("mousewheel",n),i.elements.boundary.addEventListener("DOMMouseScroll",n))}.call(a),a.options.enableResize&&function(){var l,u,c,h,p,e,t,d=this,m=document.createElement("div"),i=!1,f=50;x(m,"cr-resizer"),b(m,{width:this.options.viewport.width+"px",height:this.options.viewport.height+"px"}),this.options.resizeControls.height&&(x(e=document.createElement("div"),"cr-resizer-vertical"),m.appendChild(e));this.options.resizeControls.width&&(x(t=document.createElement("div"),"cr-resizer-horisontal"),m.appendChild(t));function n(e){if((void 0===e.button||0===e.button)&&(e.preventDefault(),!i)){var t=d.elements.overlay.getBoundingClientRect();if(i=!0,u=e.pageX,c=e.pageY,l=-1!==e.currentTarget.className.indexOf("vertical")?"v":"h",h=t.width,p=t.height,e.touches){var n=e.touches[0];u=n.pageX,c=n.pageY}window.addEventListener("mousemove",o),window.addEventListener("touchmove",o),window.addEventListener("mouseup",r),window.addEventListener("touchend",r),document.body.style[w]="none"}}function o(e){var t=e.pageX,n=e.pageY;if(e.preventDefault(),e.touches){var i=e.touches[0];t=i.pageX,n=i.pageY}var o=t-u,r=n-c,a=d.options.viewport.height+r,s=d.options.viewport.width+o;"v"===l&&f<=a&&a<=p?(b(m,{height:a+"px"}),d.options.boundary.height+=r,b(d.elements.boundary,{height:d.options.boundary.height+"px"}),d.options.viewport.height+=r,b(d.elements.viewport,{height:d.options.viewport.height+"px"})):"h"===l&&f<=s&&s<=h&&(b(m,{width:s+"px"}),d.options.boundary.width+=o,b(d.elements.boundary,{width:d.options.boundary.width+"px"}),d.options.viewport.width+=o,b(d.elements.viewport,{width:d.options.viewport.width+"px"})),z.call(d),W.call(d),Z.call(d),F.call(d),c=n,u=t}function r(){i=!1,window.removeEventListener("mousemove",o),window.removeEventListener("touchmove",o),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r),document.body.style[w]=""}e&&(e.addEventListener("mousedown",n),e.addEventListener("touchstart",n));t&&(t.addEventListener("mousedown",n),t.addEventListener("touchstart",n));this.elements.boundary.appendChild(m)}.call(a)}function R(){return this.options.enableExif&&window.EXIF}function B(e){if(this.options.enableZoom){var t=this.elements.zoomer,n=A(e,4);t.value=Math.max(parseFloat(t.min),Math.min(parseFloat(t.max),n)).toString()}}function Z(e){var t=this,n=t._currentZoom,i=t.elements.preview.getBoundingClientRect(),o=t.elements.viewport.getBoundingClientRect(),r=E.parse(t.elements.preview.style[g]),a=new L(t.elements.preview),s=o.top-i.top+o.height/2,l=o.left-i.left+o.width/2,u={},c={};if(e){var h=a.x,p=a.y,d=r.x,m=r.y;u.y=h,u.x=p,r.y=d,r.x=m}else u.y=s/n,u.x=l/n,c.y=(u.y-a.y)*(1-n),c.x=(u.x-a.x)*(1-n),r.x-=c.x,r.y-=c.y;var f={};f[v]=u.x+"px "+u.y+"px",f[g]=r.toString(),b(t.elements.preview,f)}function z(){if(this.elements){var e=this.elements.boundary.getBoundingClientRect(),t=this.elements.preview.getBoundingClientRect();b(this.elements.overlay,{width:t.width+"px",height:t.height+"px",top:t.top-e.top+"px",left:t.left-e.left+"px"})}}L.prototype.toString=function(){return this.x+"px "+this.y+"px"};var a,s,h,M,I=(a=z,s=500,function(){var e=this,t=arguments,n=h&&!M;clearTimeout(M),M=setTimeout(function(){M=null,h||a.apply(e,t)},s),n&&a.apply(e,t)});function F(){var e,t=this,n=t.get();X.call(t)&&(t.options.update.call(t,n),t.$&&"undefined"==typeof Prototype?t.$(t.element).trigger("update.croppie",n):(window.CustomEvent?e=new CustomEvent("update",{detail:n}):(e=document.createEvent("CustomEvent")).initCustomEvent("update",!0,!0,n),t.element.dispatchEvent(e)))}function X(){return 0<this.elements.preview.offsetHeight&&0<this.elements.preview.offsetWidth}function Y(){var e,t=this,n={},i=t.elements.preview,o=new E(0,0,1),r=new L;X.call(t)&&!t.data.bound&&(t.data.bound=!0,n[g]=o.toString(),n[v]=r.toString(),n.opacity=1,b(i,n),e=t.elements.preview.getBoundingClientRect(),t._originalImageWidth=e.width,t._originalImageHeight=e.height,t.data.orientation=f(t.elements.img),t.options.enableZoom?W.call(t,!0):t._currentZoom=1,o.scale=t._currentZoom,n[g]=o.toString(),b(i,n),t.data.points.length?function(e){if(4!==e.length)throw"Croppie - Invalid number of points supplied: "+e;var t=this,n=e[2]-e[0],i=t.elements.viewport.getBoundingClientRect(),o=t.elements.boundary.getBoundingClientRect(),r={left:i.left-o.left,top:i.top-o.top},a=i.width/n,s=e[1],l=e[0],u=-1*e[1]+r.top,c=-1*e[0]+r.left,h={};h[v]=l+"px "+s+"px",h[g]=new E(c,u,a).toString(),b(t.elements.preview,h),B.call(t,a),t._currentZoom=a}.call(t,t.data.points):function(){var e=this,t=e.elements.preview.getBoundingClientRect(),n=e.elements.viewport.getBoundingClientRect(),i=e.elements.boundary.getBoundingClientRect(),o=n.left-i.left,r=n.top-i.top,a=o-(t.width-n.width)/2,s=r-(t.height-n.height)/2,l=new E(a,s,e._currentZoom);b(e.elements.preview,g,l.toString())}.call(t),Z.call(t),z.call(t))}function W(e){var t,n,i,o,r=this,a=Math.max(r.options.minZoom,0)||0,s=r.options.maxZoom||1.5,l=r.elements.zoomer,u=parseFloat(l.value),c=r.elements.boundary.getBoundingClientRect(),h=m(r.elements.img,r.data.orientation),p=r.elements.viewport.getBoundingClientRect();r.options.enforceBoundary&&(i=p.width/h.width,o=p.height/h.height,a=Math.max(i,o)),s<=a&&(s=a+1),l.min=A(a,4),l.max=A(s,4),!e&&(u<l.min||u>l.max)?B.call(r,u<l.min?l.min:l.max):e&&(n=Math.max(c.width/h.width,c.height/h.height),t=null!==r.data.boundZoom?r.data.boundZoom:n,B.call(r,t)),y(l)}function O(e){var t=e.points,n=C(t[0]),i=C(t[1]),o=C(t[2])-n,r=C(t[3])-i,a=e.circle,s=document.createElement("canvas"),l=s.getContext("2d"),u=e.outputWidth||o,c=e.outputHeight||r;s.width=u,s.height=c,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,u,c));var h=n,p=i,d=o,m=r,f=0,v=0,g=u,w=c;return n<0&&(h=0,f=Math.abs(n)/o*u),d+h>this._originalImageWidth&&(g=(d=this._originalImageWidth-h)/o*u),i<0&&(p=0,v=Math.abs(i)/r*c),m+p>this._originalImageHeight&&(w=(m=this._originalImageHeight-p)/r*c),l.drawImage(this.elements.preview,h,p,d,m,f,v,g,w),a&&(l.fillStyle="#fff",l.globalCompositeOperation="destination-in",l.beginPath(),l.arc(s.width/2,s.height/2,s.width/2,0,2*Math.PI,!0),l.closePath(),l.fill()),s}function k(c,h){var e,i,o,r,p=this,d=[],t=null,n=R.call(p);if("string"==typeof c)e=c,c={};else if(Array.isArray(c))d=c.slice();else{if(void 0===c&&p.data.url)return Y.call(p),F.call(p),null;e=c.url,d=c.points||[],t=void 0===c.zoom?null:c.zoom}return p.data.bound=!1,p.data.url=e||p.data.url,p.data.boundZoom=t,(i=e,o=n,r=new Image,r.style.opacity="0",new Promise(function(e,t){function n(){r.style.opacity="1",setTimeout(function(){e(r)},1)}r.removeAttribute("crossOrigin"),i.match(/^https?:\/\/|^\/\//)&&r.setAttribute("crossOrigin","anonymous"),r.onload=function(){o?EXIF.getData(r,function(){n()}):n()},r.onerror=function(e){r.style.opacity=1,setTimeout(function(){t(e)},1)},r.src=i})).then(function(e){if(function(t){this.elements.img.parentNode&&(Array.prototype.forEach.call(this.elements.img.classList,function(e){t.classList.add(e)}),this.elements.img.parentNode.replaceChild(t,this.elements.img),this.elements.preview=t),this.elements.img=t}.call(p,e),d.length)p.options.relative&&(d=[d[0]*e.naturalWidth/100,d[1]*e.naturalHeight/100,d[2]*e.naturalWidth/100,d[3]*e.naturalHeight/100]);else{var t,n,i=m(e),o=p.elements.viewport.getBoundingClientRect(),r=o.width/o.height;r<i.width/i.height?t=(n=i.height)*r:(t=i.width,n=i.height/r);var a=(i.width-t)/2,s=(i.height-n)/2,l=a+t,u=s+n;p.data.points=[a,s,l,u]}p.data.points=d.map(function(e){return parseFloat(e)}),p.options.useCanvas&&function(e){var t=this.elements.canvas,n=this.elements.img;t.getContext("2d").clearRect(0,0,t.width,t.height),t.width=n.width,t.height=n.height,_(t,n,this.options.enableOrientation&&e||f(n))}.call(p,c.orientation),Y.call(p),F.call(p),h&&h()})}function A(e,t){return parseFloat(e).toFixed(t||0)}function j(){var e=this,t=e.elements.preview.getBoundingClientRect(),n=e.elements.viewport.getBoundingClientRect(),i=n.left-t.left,o=n.top-t.top,r=(n.width-e.elements.viewport.offsetWidth)/2,a=(n.height-e.elements.viewport.offsetHeight)/2,s=i+e.elements.viewport.offsetWidth+r,l=o+e.elements.viewport.offsetHeight+a,u=e._currentZoom;(u===1/0||isNaN(u))&&(u=1);var c=e.options.enforceBoundary?0:Number.NEGATIVE_INFINITY;return i=Math.max(c,i/u),o=Math.max(c,o/u),s=Math.max(c,s/u),l=Math.max(c,l/u),{points:[A(i),A(o),A(s),A(l)],zoom:u,orientation:e.data.orientation}}var H={type:"canvas",format:"png",quality:1},N=["jpeg","webp","png"];function n(e){var t=this,n=j.call(t),i=p(d(H),d(e)),o="string"==typeof e?e:i.type||"base64",r=i.size||"viewport",a=i.format,s=i.quality,l=i.backgroundColor,u="boolean"==typeof i.circle?i.circle:"circle"===t.options.viewport.type,c=t.elements.viewport.getBoundingClientRect(),h=c.width/c.height;return"viewport"===r?(n.outputWidth=c.width,n.outputHeight=c.height):"object"==typeof r&&(r.width&&r.height?(n.outputWidth=r.width,n.outputHeight=r.height):r.width?(n.outputWidth=r.width,n.outputHeight=r.width/h):r.height&&(n.outputWidth=r.height*h,n.outputHeight=r.height)),-1<N.indexOf(a)&&(n.format="image/"+a,n.quality=s),n.circle=u,n.url=t.data.url,n.backgroundColor=l,new Promise(function(e){switch(o.toLowerCase()){case"rawcanvas":e(O.call(t,n));break;case"canvas":case"base64":e(function(e){return O.call(this,e).toDataURL(e.format,e.quality)}.call(t,n));break;case"blob":(function(e){var n=this;return new Promise(function(t){O.call(n,e).toBlob(function(e){t(e)},e.format,e.quality)})}).call(t,n).then(e);break;default:e(function(e){var t=e.points,n=document.createElement("div"),i=document.createElement("img"),o=t[2]-t[0],r=t[3]-t[1];return x(n,"croppie-result"),n.appendChild(i),b(i,{left:-1*t[0]+"px",top:-1*t[1]+"px"}),i.src=e.url,b(n,{width:o+"px",height:r+"px"}),n}.call(t,n))}})}function S(e){if(!this.options.useCanvas||!this.options.enableOrientation)throw"Croppie: Cannot rotate without enableOrientation && EXIF.js included";var t,n,i,o,r,a=this,s=a.elements.canvas;a.data.orientation=(t=a.data.orientation,n=e,i=-1<l.indexOf(t)?l:u,o=i.indexOf(t),r=n/90%i.length,i[(i.length+o+r%i.length)%i.length]),_(s,a.elements.img,a.data.orientation),Z.call(a,!0),W.call(a)}if(window.jQuery){var P=window.jQuery;P.fn.croppie=function(n){if("string"!==typeof n)return this.each(function(){var e=new T(this,n);(e.$=P)(this).data("croppie",e)});var i=Array.prototype.slice.call(arguments,1),e=P(this).data("croppie");return"get"===n?e.get():"result"===n?e.result.apply(e,i):"bind"===n?e.bind.apply(e,i):this.each(function(){var e=P(this).data("croppie");if(e){var t=e[n];if(!P.isFunction(t))throw"Croppie "+n+" method not found";t.apply(e,i),"destroy"===n&&P(this).removeData("croppie")}})}}function T(e,t){if(-1<e.className.indexOf("croppie-container"))throw new Error("Croppie: Can't initialize croppie more than once");if(this.element=e,this.options=p(d(T.defaults),t),"img"===this.element.tagName.toLowerCase()){var n=this.element;x(n,"cr-original-image"),c(n,{"aria-hidden":"true",alt:""});var i=document.createElement("div");this.element.parentNode.appendChild(i),i.appendChild(n),this.element=i,this.options.url=this.options.url||n.src}if(r.call(this),this.options.url){var o={url:this.options.url,points:this.options.points};delete this.options.url,delete this.options.points,k.call(this,o)}}return T.defaults={viewport:{width:100,height:100,type:"square"},boundary:{},orientationControls:{enabled:!0,leftClass:"",rightClass:""},resizeControls:{width:!0,height:!0},customClass:"",showZoomer:!0,enableZoom:!0,enableResize:!1,mouseWheelZoom:!0,enableExif:!1,enforceBoundary:!0,enableOrientation:!1,enableKeyMovement:!0,update:function(){}},T.globals={translate:"translate3d"},p(T.prototype,{bind:function(e,t){return k.call(this,e,t)},get:function(){var e=j.call(this),t=e.points;return this.options.relative&&(t[0]/=this.elements.img.naturalWidth/100,t[1]/=this.elements.img.naturalHeight/100,t[2]/=this.elements.img.naturalWidth/100,t[3]/=this.elements.img.naturalHeight/100),e},result:function(e){return n.call(this,e)},refresh:function(){return function(){Y.call(this)}.call(this)},setZoom:function(e){B.call(this,e),y(this.elements.zoomer)},rotate:function(e){S.call(this,e)},destroy:function(){return function(){var e,t,n=this;n.element.removeChild(n.elements.boundary),e=n.element,t="croppie-container",e.classList?e.classList.remove(t):e.className=e.className.replace(t,""),n.options.enableZoom&&n.element.removeChild(n.elements.zoomerWrap),delete n.elements}.call(this)}}),T}); var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+= -String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||"https://app.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2"; -window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44"; -window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; -window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); +String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export"; +window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com"; +window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; +window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia"; +window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català ",cs:"ÄŒeÅ¡tina",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"РуÑÑкий",sr:"СрпÑки",uk:"УкраїнÑька",he:"עברית",ar:"العربية", th:"ไทย",ko:"í•œêµì–´",ja:"日本語",zh:"简体ä¸æ–‡","zh-tw":"ç¹é«”ä¸æ–‡"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)} window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)} @@ -2041,8 +2041,9 @@ y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor. Editor=function(a,c,d,b,f){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=b||this.createGraph(c,d);this.editable=null!=f?f:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; -Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+ -"/help.png"; +Editor.moveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png"; +Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+": +IMAGE_PATH+"/help.png"; Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ "/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC"; @@ -2151,11 +2152,11 @@ c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=v.toolbar) b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{w.apply(this,arguments),u()}catch(H){v.handleError(H)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(G){}var t=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod= mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d= a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(M){this.handleError(M)}}; -this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var C=["fontFamily","fontSize","fontColor"],B="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),E=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], -["fillColor","gradientColor"],C,["opacity"],["align"],["html"]];for(a=0;a<E.length;a++)for(c=0;c<E[a].length;c++)y.push(E[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var z=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),u=mxUtils.indexOf(g, -p);0<=u&&g.splice(u,1);for(var A=0;A<E.length;A++){var O=E[A];if(0<=mxUtils.indexOf(O,p))for(var P=0;P<O.length;P++){var W=mxUtils.indexOf(g,O[P]);0<=W&&g.splice(W,1)}}}}}for(var R=d.isEdge(f),r=R?b.currentEdgeStyle:b.currentVertexStyle,q=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],v=r[p];null==v||"shape"==p&&!R||R&&!(0>mxUtils.indexOf(x,p))||(q=mxUtils.setStyle(q,p,v))}d.setStyle(f,q)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){z(b.getProperty("cells"))});b.addListener("textInserted", -function(a,b){z(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));z(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"), -g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(C,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(x,d[g]))f||0<=mxUtils.indexOf(B,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(y,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(y,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(B,d[g]))null== +this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],B="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], +["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)y.push(D[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var A=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),u=mxUtils.indexOf(g, +p);0<=u&&g.splice(u,1);for(var r=0;r<D.length;r++){var z=D[r];if(0<=mxUtils.indexOf(z,p))for(var N=0;N<z.length;N++){var Q=mxUtils.indexOf(g,z[N]);0<=Q&&g.splice(Q,1)}}}}}for(var R=d.isEdge(f),X=R?b.currentEdgeStyle:b.currentVertexStyle,ba=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],q=X[p];null==q||"shape"==p&&!R||R&&!(0>mxUtils.indexOf(x,p))||(ba=mxUtils.setStyle(ba,p,q))}d.setStyle(f,ba)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});b.addListener("textInserted", +function(a,b){A(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),e=!1,f=!1;if(0<d.length)for(var g=0;g<d.length&&(e=b.getModel().isVertex(d[g])||e,!(f=b.getModel().isEdge(d[g])||f)||!e);g++);else f=e=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"), +g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(E,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(x,d[g]))f||0<=mxUtils.indexOf(B,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:e&&0<=mxUtils.indexOf(y,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(y,d[g])){if(e||k)null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g];if(f||k||0<=mxUtils.indexOf(B,d[g]))null== h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle|| "none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"), null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",b.currentEdgeStyle.shape,b.currentEdgeStyle[mxConstants.STYLE_STARTARROW], @@ -2180,8 +2181,8 @@ EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipb var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width, this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(f); -l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,A=a.container.scrollLeft,m=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)m+=3;var n=a.container.offsetWidth-m,m=a.container.offsetHeight-m;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var p=0==this.lightboxVerticalDivider?0:(m-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),p=Math.max(p,0));if(g||f.width<n||f.height<m)a.view.scaleAndTranslate(b, -Math.floor(c-l.x),Math.floor(p-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=A*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView", +l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,z=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)z+=3;var n=a.container.offsetWidth-z,z=a.container.offsetHeight-z;b=b?Math.max(.3,Math.min(c||1,n/l.width)):k;c=(n-b*l.width)/2/b;var Q=0==this.lightboxVerticalDivider?0:(z-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),Q=Math.max(Q,0));if(g||f.width<n||f.height<z)a.view.scaleAndTranslate(b, +Math.floor(c-l.x),Math.floor(Q-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/k),Math.floor(f.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var b=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",b);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",b)});this.editor.addListener("resetGraphView", mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(b){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(b){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var f=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden"; this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var e=mxUtils.bind(this,function(){var b= mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var h=0,e=mxUtils.bind(this,function(a,b,c){h++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title", @@ -2198,16 +2199,16 @@ window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResourc function(a){"1"==urlParams.close||f.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)|| v(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| v(30)}));var y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<y&&Math.abs(this.scrollTop-a.container.scrollTop)<y&&Math.abs(this.startX-c.getGraphX())<y&&Math.abs(this.startY-c.getGraphY())< -y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange= -function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0= -b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var B=a.view.getBackgroundPane(),E=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,G=null,J=null,H=null,K=function(b){null!=z&&window.clearTimeout(z);window.setTimeout(function(){a.isMouseDown||(z=window.setTimeout(mxUtils.bind(this, -function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),E.style.transformOrigin="",B.style.transformOrigin="",mxClient.IS_SF?(E.style.transform="scale(1)",B.style.transform="scale(1)",window.setTimeout(function(){E.style.transform="";B.style.transform=""},0)):(E.style.transform= +y&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange= +function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0= +b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var B=a.view.getBackgroundPane(),D=a.view.getDrawPane();a.cumulativeZoomFactor=1;var A=null,G=null,J=null,H=null,K=function(b){null!=A&&window.clearTimeout(A);window.setTimeout(function(){a.isMouseDown||(A=window.setTimeout(mxUtils.bind(this, +function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),D.style.transformOrigin="",B.style.transformOrigin="",mxClient.IS_SF?(D.style.transform="scale(1)",B.style.transform="scale(1)",window.setTimeout(function(){D.style.transform="";B.style.transform=""},0)):(D.style.transform= "",B.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var b=new mxPoint(a.container.scrollLeft,a.container.scrollTop),e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,h=0;null!=G&&(g=a.container.offsetWidth/2-G.x+e.x,h=a.container.offsetHeight/2-G.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=J&&(g+=b.x-J.x,h+=b.y-J.y),null!=c&&d.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),h*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)|| -0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=H&&E.setAttribute("filter",H);a.cumulativeZoomFactor=1;H=G=J=z=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(G=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= +0==g&&0==h||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=h*(a.cumulativeZoomFactor-1)));null!=H&&D.setAttribute("filter",H);a.cumulativeZoomFactor=1;H=G=J=A=null}),null!=b?b:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay))},0)};a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(G=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale* -this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==H&&""!=E.getAttribute("filter")&&(H=E.getAttribute("filter"),E.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:G.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:G.y+a.container.scrollTop-a.container.offsetTop;E.style.transformOrigin=b+"px "+f+"px";E.style.transform="scale("+ +this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==H&&""!=D.getAttribute("filter")&&(H=D.getAttribute("filter"),D.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:G.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:G.y+a.container.scrollTop-a.container.offsetTop;D.style.transformOrigin=b+"px "+f+"px";D.style.transform="scale("+ this.cumulativeZoomFactor+")";B.style.transformOrigin=b+"px "+f+"px";B.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(b=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(b.style,"transform-origin",(c?a.container.clientWidth/2+a.container.scrollLeft-b.offsetLeft+"px":G.x+a.container.scrollLeft-b.offsetLeft-a.container.offsetLeft+"px")+" "+(c?a.container.clientHeight/2+a.container.scrollTop-b.offsetTop+"px":G.y+ -a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}K(e)};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&K(0)});mxEvent.addListener(a.container,"scroll",function(){z&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&& +a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}K(e)};mxEvent.addGestureListeners(a.container,function(a){null!=A&&window.clearTimeout(A)},null,function(b){1!=a.cumulativeZoomFactor&&K(0)});mxEvent.addListener(a.container,"scroll",function(){A&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&& K(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(b)){d=a.view.getTranslate();var e=40/a.view.scale;mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e))}else if(d||a.isZoomWheelEvent(b))for(d=mxEvent.getSource(b);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),G=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),a.lazyZoom(c), mxEvent.consume(b),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; @@ -2442,34 +2443,34 @@ m&&0<m.length&&(f.scrollCellToVisible(m[0]),f.setSelectionCells(m));f.editAfterI Sidebar.prototype.dropAndConnect=function(a,c,d,b,f){var e=this.getDropAndConnectGeometry(a,c[b],d,c),h=[];if(null!=e){var g=this.editorUi.editor.graph,k=null;g.model.beginUpdate();try{var l=g.getCellGeometry(a),m=g.getCellGeometry(c[b]),n=g.model.getParent(a),p=!0;if(null!=g.layoutManager){var r=g.layoutManager.getLayout(n);if(null!=r&&r.constructor==mxStackLayout&&(p=!1,h=g.view.getState(n),null!=h)){var u=new mxPoint(h.x/g.view.scale-g.view.translate.x,h.y/g.view.scale-g.view.translate.y);e.x+= u.x;e.y+=u.y;var v=e.getTerminalPoint(!1);null!=v&&(v.x+=u.x,v.y+=u.y)}}var q=m.x,w=m.y;g.model.isEdge(c[b])&&(w=q=0);var t=g.model.isEdge(a)||null!=l&&!l.relative&&p,h=c=g.importCells(c,e.x-(t?q:0),e.y-(t?w:0),t?n:null);if(g.model.isEdge(a))g.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(g.model.isEdge(c[b])){g.model.setTerminal(c[b],a,!0);var y=g.getCellGeometry(c[b]);y.points=null;if(null!=y.getTerminalPoint(!1))y.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(t&&g.model.isVertex(n)){var x= g.view.getState(n),u=x.cell!=g.view.currentRoot?new mxPoint(x.x/g.view.scale-g.view.translate.x,x.y/g.view.scale-g.view.translate.y):new mxPoint(0,0);g.cellsMoved(c,u.x,u.y,null,null,!0)}}else m=g.getCellGeometry(c[b]),q=e.x-Math.round(m.x),w=e.y-Math.round(m.y),e.x=Math.round(m.x),e.y=Math.round(m.y),g.model.setGeometry(c[b],e),g.cellsMoved(c,q,w,null,null,!0),h=c.slice(),k=1==h.length?h[0]:null,c.push(g.insertEdge(null,null,"",a,c[b],g.createCurrentEdgeStyle()));null!=f&&mxEvent.isShiftDown(f)|| -g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(C){this.editorUi.handleError(C)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h}; +g.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(E){this.editorUi.handleError(E)}finally{g.model.endUpdate()}g.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=k&&window.setTimeout(function(){g.startEditing(k)},0)}return h}; Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var f=this.editorUi.editor.graph,e=f.view,h=1<b.length,g=f.getCellGeometry(a);b=f.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),f.model.isEdge(a)?(a=f.view.getState(a),g=a.absolutePoints,c=g[0],f=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/e.scale-e.translate.x-b.width/2,b.y=c.y/e.scale-e.translate.y-b.height/2):(b.x=f.x/e.scale-e.translate.x-b.width/2,b.y=f.y/e.scale-e.translate.y-b.height/2)):(g.relative&&(a=f.view.getState(a), g=g.clone(),g.x=(a.x-e.translate.x)/e.scale,g.y=(a.y-e.translate.y)/e.scale),e=f.defaultEdgeLength,f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),f=b.getTerminalPoint(!1),e=f.x-c.x,c=f.y-c.y,e=Math.sqrt(e*e+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=e,b.y=g.y-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=e,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+ b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=e,b.y=g.y+g.height,b.setTerminalPoint(new mxPoint(b.x,b.y+b.height),!1)):d==mxConstants.DIRECTION_WEST&&(b.width=e,b.x=g.x-e,b.setTerminalPoint(new mxPoint(b.x,b.y),!1))):(!h&&45<b.width&&45<b.height&&45<g.width&&45<g.height&&(b.width*=g.height/b.height,b.height=g.height),b.x=g.x+g.width/2-b.width/2,b.y=g.y+g.height/2-b.height/2,d==mxConstants.DIRECTION_NORTH?b.y=b.y-g.height/2-b.height/2-e:d==mxConstants.DIRECTION_EAST?b.x=b.x+g.width/2+ b.width/2+e:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+e:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-e),f.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=f.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/ 2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};Sidebar.prototype.isDropStyleEnabled=function(a,c){var d=!0;if(null!=c&&1==a.length){var b=this.graph.getCellStyle(a[c]);null!=b&&(d=mxUtils.getValue(b,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(b,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return d};Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)}; Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==z?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])? -m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var r=this.isDropStyleEnabled(b,m),u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&F==z){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!= -b&&null!=F&&null!=q&&F!=z?(h=a.model.isEdge(q.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(q.cell,b,K,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var v=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var q=null,w= -null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),E=e(this.triangleLeft,mxResources.get("connect")),z=e(this.refreshTarget,mxResources.get("replace")),G=null,J=e(this.roundDrop),H=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,F=null,Q=u.createPreviewElement;u.createPreviewElement=function(a){var b=Q.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth= -b.style.width;this.previewElementHeight=b.style.height;return b};var S=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");S.apply(this,arguments)};var T=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");T.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&F==z)this.previewElement.style.display= -a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=q&&null!=F){var e=a.model.isEdge(q.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(q.cell,b[e],K,b),h=a.model.isEdge(q.cell)?null:a.getCellGeometry(q.cell),k=a.getCellGeometry(b[e]),A=a.model.getParent(q.cell),p=d.translate.x*d.scale,r=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(A)&& -A!=d.currentRoot&&(r=d.getState(A),p=r.x,r=r.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+p+"px";this.previewElement.style.top=(g.y-k)*d.scale+r+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)- -f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var L=(new Date).getTime(),I=0,M=null,Z=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f= -this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=F=null;M!=k?(M=k,L=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(M=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-L;if(r&&2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= +"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),F=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])? +m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var r=this.isDropStyleEnabled(b,m),u=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&F==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!= +b&&null!=F&&null!=q&&F!=A?(h=a.model.isEdge(q.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(q.cell,b,K,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var v=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),v.apply(this,arguments))};var q=null,w= +null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),E=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),G=null,J=e(this.roundDrop),H=e(this.roundDrop),K=mxConstants.DIRECTION_NORTH,F=null,P=u.createPreviewElement;u.createPreviewElement=function(a){var b=P.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth= +b.style.width;this.previewElementHeight=b.style.height;return b};var S=u.dragEnter;u.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");S.apply(this,arguments)};var T=u.dragExit;u.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");T.apply(this,arguments)};u.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=F&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&F==A)this.previewElement.style.display= +a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=q&&null!=F){var e=a.model.isEdge(q.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(q.cell,b[e],K,b),h=a.model.isEdge(q.cell)?null:a.getCellGeometry(q.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(q.cell),r=d.translate.x*d.scale,v=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&& +p!=d.currentRoot&&(v=d.getState(p),r=v.x,v=v.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+r+"px";this.previewElement.style.top=(g.y-k)*d.scale+v+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)- +f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var L=(new Date).getTime(),I=0,M=null,Z=this.editorUi.editor.graph.getCellStyle(b[0]);u.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var f=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=f&&!this.graph.isCellConnectable(f)){var g= +this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var k=a.view.getState(f),g=F=null;M!=k?(M=k,L=(new Date).getTime(),I=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==F&&(M=k,u.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):I=(new Date).getTime()-L;if(r&&2500>I&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!= mxUtils.getValue(Z,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(Z,mxConstants.STYLE_SHAPE)||1500<I||a.model.isEdge(k.cell))&&I>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!= -m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){t=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);z.style.left=Math.floor(l.x)+"px";z.style.top=Math.floor(l.y)+"px";null==G&&(a.container.appendChild(z),G=z.parentNode);h(c,d,l,z)}else null==t||!mxUtils.contains(t,c,d)||1500<I&&!mxEvent.isShiftDown(e)?(t=null,null!=G&&(z.parentNode.removeChild(z), -G=null)):null!=t&&null!=G&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,z));if(y&&null!=q&&!mxEvent.isAltDown(e)&&null==F){f=mxRectangle.fromRectangle(q);if(a.model.isEdge(q.cell)){var A=q.absolutePoints;null!=J.parentNode&&(l=A[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width, -this.roundDrop.height),J)));null!=H.parentNode&&(A=A[A.length-1],f.add(h(c,d,new mxRectangle(A.x-this.roundDrop.width/2,A.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else l=mxRectangle.fromRectangle(q),null!=q.shape&&null!=q.shape.boundingBox&&(l=mxRectangle.fromRectangle(q.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),A=this.graph.selectionCellsHandler.getHandler(q.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/ -2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),f.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),f.add(h(c,d,new mxRectangle(l.x+l.width,q.getCenterY()-this.triangleRight.height/2,this.triangleRight.width, -this.triangleRight.height),C)),f.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),f.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,q.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),E));null!=f&&f.grow(10)}K=mxConstants.DIRECTION_NORTH;F==C?K=mxConstants.DIRECTION_EAST:F==B||F==H?K=mxConstants.DIRECTION_SOUTH:F==E&&(K=mxConstants.DIRECTION_WEST);null!=t&&F==z&&(k=t); -l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(g)&&null!=m||a.model.isVertex(g)&&a.isCellConnectable(g));if(null!=q&&5E3<=I||q!=k&&(null==f||!mxUtils.contains(f,c,d)||500<I&&null==F&&l))if(y=!1,q=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(g)?k:null,null!=q&&l){f=[J,H,x,C,B,E];for(l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);a.model.isEdge(g)?(A=k.absolutePoints,null!=A&&(l=A[0],A=A[A.length-1],f=a.tolerance,new mxRectangle(c-f,d-f,2*f,2*f),J.style.left=Math.floor(l.x- -this.roundDrop.width/2)+"px",J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(A.x-this.roundDrop.width/2)+"px",H.style.top=Math.floor(A.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(g,!0)&&a.container.appendChild(J),null==a.model.getTerminal(g,!1)&&a.container.appendChild(H))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing), -A=this.graph.selectionCellsHandler.getHandler(k.cell),null!=A&&(l.x-=A.horizontalOffset/2,l.y-=A.verticalOffset/2,l.width+=A.horizontalOffset,l.height+=A.verticalOffset,null!=A.rotationShape&&null!=A.rotationShape.node&&"hidden"!=A.rotationShape.node.style.visibility&&"none"!=A.rotationShape.node.style.display&&null!=A.rotationShape.boundingBox&&l.add(A.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+ -"px",C.style.left=Math.floor(l.x+l.width)+"px",C.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",B.style.left=x.style.left,B.style.top=Math.floor(l.y+l.height)+"px",E.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",E.style.top=C.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(B)),a.container.appendChild(C),a.container.appendChild(E));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&& -w.setHandlesVisible(!1));y=!0}else for(f=[J,H,x,C,B,E],l=0;l<f.length;l++)null!=f[l].parentNode&&f[l].parentNode.removeChild(f[l]);y||null==w||w.setHandlesVisible(!0);g=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=t&&F==z?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);f=a.getModel();if(null!=g&&(null!=F||!a.isSplitTarget(g,b,e))){for(;null!=g&&!a.isValidDropTarget(g,b,e)&&f.isVertex(f.getParent(g));)g=f.getParent(g);null!=g&&(a.view.currentRoot==g||!a.isValidRoot(g)&&0==a.getModel().getChildCount(g)|| -a.isCellLocked(g)||f.isEdge(g)||!a.isValidDropTarget(g,b,e))&&(g=null)}return g});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,H,z,x,C,B,E],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=q&&null!=w&&w.reset();F=G=t=q=w=null};return u}; +m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){t=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==G&&(a.container.appendChild(A),G=A.parentNode);h(c,d,l,A)}else null==t||!mxUtils.contains(t,c,d)||1500<I&&!mxEvent.isShiftDown(e)?(t=null,null!=G&&(A.parentNode.removeChild(A), +G=null)):null!=t&&null!=G&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=q&&!mxEvent.isAltDown(e)&&null==F){g=mxRectangle.fromRectangle(q);if(a.model.isEdge(q.cell)){var z=q.absolutePoints;null!=J.parentNode&&(l=z[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width, +this.roundDrop.height),J)));null!=H.parentNode&&(z=z[z.length-1],g.add(h(c,d,new mxRectangle(z.x-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),H)))}else l=mxRectangle.fromRectangle(q),null!=q.shape&&null!=q.shape.boundingBox&&(l=mxRectangle.fromRectangle(q.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(q.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/ +2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),x)),g.add(h(c,d,new mxRectangle(l.x+l.width,q.getCenterY()-this.triangleRight.height/2,this.triangleRight.width, +this.triangleRight.height),E)),g.add(h(c,d,new mxRectangle(q.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,q.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),D));null!=g&&g.grow(10)}K=mxConstants.DIRECTION_NORTH;F==E?K=mxConstants.DIRECTION_EAST:F==B||F==H?K=mxConstants.DIRECTION_SOUTH:F==D&&(K=mxConstants.DIRECTION_WEST);null!=t&&F==A&&(k=t); +l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=q&&5E3<=I||q!=k&&(null==g||!mxUtils.contains(g,c,d)||500<I&&null==F&&l))if(y=!1,q=5E3>I&&I>this.dropTargetDelay||a.model.isEdge(f)?k:null,null!=q&&l){g=[J,H,x,E,B,D];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),J.style.left=Math.floor(l.x- +this.roundDrop.width/2)+"px",J.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",H.style.left=Math.floor(z.x-this.roundDrop.width/2)+"px",H.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(J),null==a.model.getTerminal(f,!1)&&a.container.appendChild(H))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing), +z=this.graph.selectionCellsHandler.getHandler(k.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),x.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",x.style.top=Math.floor(l.y-this.triangleUp.height)+ +"px",E.style.left=Math.floor(l.x+l.width)+"px",E.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/2)+"px",B.style.left=x.style.left,B.style.top=Math.floor(l.y+l.height)+"px",D.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",D.style.top=E.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(x),a.container.appendChild(B)),a.container.appendChild(E),a.container.appendChild(D));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&& +w.setHandlesVisible(!1));y=!0}else for(g=[J,H,x,E,B,D],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);y||null==w||w.setHandlesVisible(!0);f=mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)||null!=t&&F==A?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=F||!a.isSplitTarget(f,b,e))){for(;null!=f&&!a.isValidDropTarget(f,b,e)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)|| +a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,b,e))&&(f=null)}return f});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var a=[J,H,A,x,E,B,D],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=q&&null!=w&&w.reset();F=G=t=q=w=null};return u}; Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;b.container.focus();if(mxEvent.isAltDown(d)&&1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var f=0;f<a.length&&null==c;f++)b.model.isVertex(a[f])&&(c=f);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST: mxConstants.DIRECTION_SOUTH,c,d)),b.scrollCellToVisible(b.getSelectionCell()))}else mxEvent.isShiftDown(d)&&!b.isSelectionEmpty()?(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=mxEvent.isAltDown(d)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry(a,!0)),c.drop(b,d,null,a.x,a.y,!0))}; Sidebar.prototype.addClickHandler=function(a,c,d){var b=c.mouseDown,f=c.mouseMove,e=c.mouseUp,h=this.editorUi.editor.graph.tolerance,g=null,k=this;c.mouseDown=function(c){b.apply(this,arguments);g=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=g&&(Math.abs(g.x-mxEvent.getClientX(b))>h||Math.abs(g.y-mxEvent.getClientY(b))> @@ -2504,19 +2505,19 @@ null;d=c.absolutePoints;if(null!=d)if(f=new mxRectangle(b.getGraphX(),b.getGraph this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==b&&this.loadStylesheet();var n=this.graphHandler.getGuideStates; this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),h=0;h<g.width;h++)b.push(new mxRectangle(((g.x+h)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(h=1;h<g.height;h++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+h)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex= mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]), -e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};var r=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=this.graph.view.getState(a);null!=e&&mxUtils.getValue(e.style,"part",!1)&&(a=this.graph.model.getParent(a));r.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b), -c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var v=(new Date).getTime(),q=0,w=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),q=0): -q=(new Date).getTime()-v};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=u.isForceRubberbandEvent;u.isForceRubberbandEvent= -function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(C=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=C)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!b||a.isConsumed())return B.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)? -this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())};var E=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer"; -if(this.isCellLocked(a))return"default"}return E.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var A=g.getChildAt(e,m),n=this.view.getState(A);if(null!=n&&this.isCellVisible(A)&&"1"!=mxUtils.getValue(n.style, -"locked","0")){var P=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=P&&(n=mxUtils.getBoundingBox(n,P));(g.isEdge(A)||g.isVertex(A))&&n.x>=a&&n.y+n.height<=k&&n.y>=b&&n.x+n.width<=h&&f.push(A);this.getAllCells(a,b,c,d,A,f)}}}return f};var z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:z.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, -"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();G=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell"); -null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),u.start(c.x,c.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);G=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this, -function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)}; -Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1"; -Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.handlePadding={}; +e=null!=e?e.style:this.graph.getCellStyle(b[d]);if("1"==mxUtils.getValue(e,"part","0")){var f=b[d];do f=this.graph.model.getParent(f),e=this.graph.view.getState(f),e=null!=e?e.style:this.graph.getCellStyle(f);while(null!=f&&"1"==mxUtils.getValue(e,"part","0"));this.graph.model.isVertex(f)&&0>mxUtils.indexOf(b,f)&&c.push(f)}else c.push(b[d])}return c};var r=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=this.graph.view.getState(a);null!=e&&mxUtils.getValue(e.style,"part",!1)&& +(a=this.graph.model.getParent(a));r.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var v=(new Date).getTime(),q=0,w=this.connectionHandler.mouseMove; +this.connectionHandler.mouseMove=function(){var a=this.currentState;w.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),q=0):q=(new Date).getTime()-v};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent= +function(a){return y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(E=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=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var B=this.click;this.click=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!b||a.isConsumed())return B.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var b=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(b?a.sourceState.cell:a.getCell())}; +var D=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return D.apply(this,arguments)};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e= +g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=g.getChildAt(e,m),z=this.view.getState(n);if(null!=z&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var N=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=N&&(z=mxUtils.getBoundingBox(z,N));(g.isEdge(n)||g.isVertex(n))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();G=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null: +this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),u.start(c.x,c.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);G=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b|| +a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this, +arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; +Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.handlePadding={}; Graph.createSvgImage=function(a,c,d,b,f){d=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=b&&null!=f?'viewBox="0 0 '+b+" "+f+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,c)}; Graph.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&65535!=b&&65534!=b&&c.push(a.charAt(d))}return c.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};Graph.compressNode=function(a,c){var d=mxUtils.getXml(a);return Graph.compress(c?d:Graph.zapGremlins(d))}; Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=c?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(d):Base64.encode(d,!0)};Graph.decompress=function(a,c,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?c:Graph.zapGremlins(c)}; @@ -2537,11 +2538,11 @@ Graph.prototype.labelLinkClicked=function(a,c,d){c=c.getAttribute("href");if(nul Graph.prototype.openLink=function(a,c,d){var b=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else b=window.open(a,null!=c?c:"_blank"),null==b||d||(b.opener=null)}catch(e){}return b}; Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)}; Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a}; -Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new mxFastOrganicLayout(this),c=new mxStackLayout(this,!0),d=new mxCompactTreeLayout(this),b=new mxCircleLayout(this),f=new TableRowLayout(this),e=new TableLayout(this);this.layoutManager.getLayout=function(h,g){if(g!=mxEvent.BEGIN_UPDATE){var k=this.graph.getCellStyle(h);if(null!=k){if("stackLayout"==k.childLayout)return c.resizeParentMax="1"==mxUtils.getValue(k,"resizeParentMax","1"),c.horizontal="1"== -mxUtils.getValue(k,"horizontalStack","1"),c.resizeParent="1"==mxUtils.getValue(k,"resizeParent","1"),c.resizeLast="1"==mxUtils.getValue(k,"resizeLast","0"),c.spacing=k.stackSpacing||c.spacing,c.border=k.stackBorder||c.border,c.marginLeft=k.marginLeft||0,c.marginRight=k.marginRight||0,c.marginTop=k.marginTop||0,c.marginBottom=k.marginBottom||0,c.fill=!0,c;if("treeLayout"==k.childLayout)return d.horizontal="1"==mxUtils.getValue(k,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(k,"resizeParent", -"1"),d.groupPadding=mxUtils.getValue(k,"parentPadding",20),d.levelDistance=mxUtils.getValue(k,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==k.childLayout){var l=new mxHierarchicalLayout(this.graph,mxUtils.getValue(k,"flowOrientation",mxConstants.DIRECTION_EAST));l.resizeParent="1"==mxUtils.getValue(k,"resizeParent","1");l.parentBorder=mxUtils.getValue(k,"parentPadding",20);l.maintainParentLocation=!0;l.intraCellSpacing=mxUtils.getValue(k,"intraCellSpacing", -mxHierarchicalLayout.prototype.intraCellSpacing);l.interRankCellSpacing=mxUtils.getValue(k,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing);l.interHierarchySpacing=mxUtils.getValue(k,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing);l.parallelEdgeSpacing=mxUtils.getValue(k,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing);return l}if("circleLayout"==k.childLayout)return b;if("organicLayout"==k.childLayout)return a;if(this.graph.isTableRow(h))return f; -if(this.graph.isTable(h))return e}}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; +Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new TableRowLayout(this),c=new TableLayout(this);this.layoutManager.getLayout=function(d,b){if(b!=mxEvent.BEGIN_UPDATE){var f=this.graph.getCellStyle(d);if(null!=f){if("stackLayout"==f.childLayout){var e=new mxStackLayout(this.graph,!0);e.resizeParentMax="1"==mxUtils.getValue(f,"resizeParentMax","1");e.horizontal="1"==mxUtils.getValue(f,"horizontalStack","1");e.resizeParent="1"==mxUtils.getValue(f,"resizeParent", +"1");e.resizeLast="1"==mxUtils.getValue(f,"resizeLast","0");e.spacing=f.stackSpacing||e.spacing;e.border=f.stackBorder||e.border;e.marginLeft=f.marginLeft||0;e.marginRight=f.marginRight||0;e.marginTop=f.marginTop||0;e.marginBottom=f.marginBottom||0;e.fill=!0;return e}if("treeLayout"==f.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(f,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(f,"resizeParent","1"),e.groupPadding=mxUtils.getValue(f,"parentPadding", +20),e.levelDistance=mxUtils.getValue(f,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==f.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(f,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(f,"resizeParent","1"),e.parentBorder=mxUtils.getValue(f,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(f,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing), +e.interRankCellSpacing=mxUtils.getValue(f,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(f,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(f,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==f.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==f.childLayout)return new mxFastOrganicLayout(this.graph); +if(this.graph.isTableRow(d)||this.graph.isTableCell(d))return a;if(this.graph.isTable(d))return c}}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var d=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/a.width),b=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,b,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/a.height)- b)};Graph.prototype.sanitizeHtml=function(a,c){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var d=this.model.cells[c];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")}; Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)}; @@ -2616,31 +2617,32 @@ HoverIcons.prototype.update=function(a,c,d){if(!this.graph.connectionArrowsEnabl this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,c,d))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,d)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==c||null==d||!mxUtils.contains(this.bbox, c,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,d){a=this.cloneCell(a);for(var b=0;b<d;b++)a.insert(this.cloneCell(c));return a}; -Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];"),this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;"),c),a)}; -Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var f=this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;"),e=this.createVertex(null,null,"",0,0,c*d,b,"swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;");f.insert(this.createParent(e,this.createVertex(null,null,"",0,0,d,b,"swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;"), -c));return 1<a?this.createParent(f,this.createParent(e,this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;"),c),a-1):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout}; +Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"html=1;whiteSpace=wrap;container=1;collapsible=0;points=[[0,0.5],[1,0.5]];part=1;"),this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;part=1;"),c),a)}; +Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var f=this.createVertex(null,null,"",0,0,c*d,a*b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;childLayout=tableLayout;"),e=this.createVertex(null,null,"",0,0,c*d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;");f.insert(this.createParent(e,this.createVertex(null,null,"",0,0,d, +b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),c));return 1<a?this.createParent(f,this.createParent(e,this.createVertex(null,null,"",0,0,d,b,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),c),a-1):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))}; +Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout}; Graph.prototype.getActualStartSize=function(a,c){var d=new mxRectangle;if(this.isSwimlane(a)){var b=c?null:this.view.getState(a),f=null!=b?b.style:this.getCellStyle(a);if(null!=f){var e=parseInt(mxUtils.getValue(f,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),b=1==mxUtils.getValue(f,mxConstants.STYLE_FLIPH,0),h=1==mxUtils.getValue(f,mxConstants.STYLE_FLIPV,0),g=0;mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)||g++;f=mxUtils.getValue(f,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST); f==mxConstants.DIRECTION_NORTH?g++:f==mxConstants.DIRECTION_WEST?g+=2:f==mxConstants.DIRECTION_SOUTH&&(g+=3);g=mxUtils.mod(g,4);0==g?d.y=e:1==g?d.x=e:2==g?d.height=e:3==g&&(d.width=e);h&&(e=d.y,d.y=d.height,d.height=e);b&&(e=d.x,d.x=d.width,d.width=e)}}return d}; -Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var c=this.getModel(),d=c.getChildCount(a),b=this.getCellGeometry(a);if(null!=b&&0<d)for(var f=this.getActualStartSize(a),e=f.y,h=0;h<d;h++){var g=c.getChildAt(a,h);if(null!=g){var k=this.getCellGeometry(g);if(null!=k){if(h==d-1){var l=k.clone();l.width=b.width-f.x;e<b.height?l.height=b.height-e:e>b.height&&(b.height=e+Graph.minTableRowHeight,l.height=Graph.minTableRowHeight);c.setGeometry(g,l);this.tableRowResized(g, -l,k)}e+=k.height}}}};Graph.prototype.setRowHeight=function(a,c){var d=this.getModel();d.beginUpdate();try{for(var b=0;b<d.getChildCount(a);b++){var f=d.getChildAt(a,b),e=this.getCellGeometry(f);null!=e&&(e=e.clone(),e.height=c,d.setGeometry(f,e))}}finally{d.endUpdate()}}; -Graph.prototype.tableRowResized=function(a,c,d){console.log("tableLayout.tableRowResized",a);var b=this.getModel(),f=this.getCellGeometry(a),e=b.getChildCount(a);if(null!=f&&0<e)for(var h=this.getActualStartSize(a),g=h.x,k=0;k<e;k++){var l=b.getChildAt(a,k);if(null!=l){var m=this.getCellGeometry(l);if(null!=m){var n=m.clone();n.height=f.height-h.y;b.setGeometry(l,n);k==e-1&&(g<f.width?n.width=f.width-g:g>f.width&&(f.width=g+Graph.minTableColumnWidth,n.width=Graph.minTableColumnWidth),this.tableCellResized(l, -n,m));g+=m.width}}}f=b.getParent(a);a=f.getIndex(a);c.y!=d.y&&0<a&&(a=b.getChildAt(f,a-1),f=this.getCellGeometry(a),null!=f&&(f=f.clone(),f.height-=d.y-c.y,b.setGeometry(a,f)))}; -Graph.prototype.tableCellResized=function(a,c,d){console.log("tableLayout.tableCellResized",a,c,d);var b=this.getCellGeometry(a);if(null!=b){var f=this.getModel(),e=f.getParent(a),h=f.getParent(e),g=e.getIndex(a);c.height!=d.height&&this.setRowHeight(e,b.height);for(var k=null,l=0;l<f.getChildCount(h);l++){var m=f.getChildAt(h,l),n=f.getChildAt(m,g);if(a!=n){var p=this.getCellGeometry(n);null!=p&&(p=p.clone(),p.width=b.width,f.setGeometry(n,p))}c.y!=d.y&&m==e&&null!=k&&(n=this.getCellGeometry(k), -null!=n&&this.setRowHeight(k,n.height-d.y+c.y));k=m}c.x!=d.x&&0<g&&(n=f.getChildAt(e,g-1),p=this.getCellGeometry(n),null!=p&&(a=p.clone(),a.width-=d.x-c.x,f.setGeometry(n,a),this.tableCellResized(n,a,p)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,c,d){console.log("tableLayout.moveCell",a,c,d)}; +Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var c=this.getModel(),d=c.getChildCount(a),b=this.getCellGeometry(a);if(null!=b&&0<d)for(var f=this.getActualStartSize(a),e=f.y,h=0;h<d;h++){var g=c.getChildAt(a,h);if(null!=g&&c.isVertex(g)){var k=this.getCellGeometry(g);if(null!=k){if(h==d-1){var l=k.clone();l.width=b.width-f.x;e<b.height?l.height=b.height-e:e>b.height&&(b.height=e+Graph.minTableRowHeight,l.height=Graph.minTableRowHeight);c.setGeometry(g,l);this.tableRowResized(g, +l,k)}e+=k.height}}}};Graph.prototype.setRowHeight=function(a,c){var d=this.getModel();d.beginUpdate();try{for(var b=0;b<d.getChildCount(a);b++){var f=d.getChildAt(a,b);if(d.isVertex(f)){var e=this.getCellGeometry(f);null!=e&&(e=e.clone(),e.height=c,d.setGeometry(f,e))}}}finally{d.endUpdate()}}; +Graph.prototype.tableRowResized=function(a,c,d){console.log("tableLayout.tableRowResized",a);var b=this.getModel(),f=this.getCellGeometry(a),e=b.getChildCount(a);if(null!=f&&0<e)for(var h=this.getActualStartSize(a),g=h.x,k=0;k<e;k++){var l=b.getChildAt(a,k);if(null!=l&&b.isVertex(l)){var m=this.getCellGeometry(l);if(null!=m){var n=m.clone();n.height=f.height-h.y;b.setGeometry(l,n);k==e-1&&(g<f.width?n.width=f.width-g:g>f.width&&(f.width=g+Graph.minTableColumnWidth,n.width=Graph.minTableColumnWidth), +this.tableCellResized(l,n,m));g+=m.width}}}f=b.getParent(a);a=f.getIndex(a);c.y!=d.y&&0<a&&(a=b.getChildAt(f,a-1),f=this.getCellGeometry(a),null!=f&&(f=f.clone(),f.height-=d.y-c.y,b.setGeometry(a,f)))}; +Graph.prototype.tableCellResized=function(a,c,d){console.log("tableLayout.tableCellResized",a,c,d);var b=this.getCellGeometry(a);if(null!=b){var f=this.getModel(),e=f.getParent(a),h=f.getParent(e),g=e.getIndex(a);c.height!=d.height&&this.setRowHeight(e,b.height);for(var k=null,l=0;l<f.getChildCount(h);l++){var m=f.getChildAt(h,l);if(f.isVertex(m)){var n=f.getChildAt(m,g);if(a!=n){var p=this.getCellGeometry(n);null!=p&&(p=p.clone(),p.width=b.width,f.setGeometry(n,p))}c.y!=d.y&&m==e&&null!=k&&(n=this.getCellGeometry(k), +null!=n&&this.setRowHeight(k,n.height-d.y+c.y));k=m}}c.x!=d.x&&0<g&&(n=f.getChildAt(e,g-1),p=this.getCellGeometry(n),null!=p&&(a=p.clone(),a.width-=d.x-c.x,f.setGeometry(n,a),this.tableCellResized(n,a,p)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,c,d){console.log("tableLayout.moveCell",a,c,d)}; TableLayout.prototype.resizeCell=function(a,c,d){this.graph.isTable(a)?this.graph.tableResized(a,c,d):this.graph.isTableRow(a)?this.graph.tableRowResized(a,c,d):this.graph.isTableCell(a)&&this.graph.tableCellResized(a,c,d)}; -TableLayout.prototype.execute=function(a){var c=this.graph.getActualStartSize(a,!0),d=this.graph.getModel(),b=c.y,f=[],e=0,h=0;console.log("tableLayout.execute",a,c);for(var g=0;g<d.getChildCount(a);g++){var k=d.getChildAt(a,g);if(null!=k){var l=this.graph.getCellGeometry(k);if(null!=l){for(var l=l.clone(),m=this.graph.getActualStartSize(k,!0),n=d.getChildCount(k),h=m.x,p=0;p<n;p++){var r=d.getChildAt(k,p);if(null!=r){var u=this.graph.getCellGeometry(r);null!=u&&(u=u.clone(),l.height=u.height+m.y+ -m.height,u.x=h,u.y=m.y,d.setGeometry(r,u),h+=u.width,p==n-1&&(f.push([u,l,m]),e=Math.max(h,e)))}}l.width=h+m.width;l.y=b;l.x=c.x;d.setGeometry(k,l);b+=l.height}}}g=this.graph.getCellGeometry(a);if(null!=g)for(g=g.clone(),g.width=h+c.x+c.width,g.height=b+c.height,d.setGeometry(a,g),g=0;g<f.length;g++)f[g][1].width<e&&(f[g][0].width+=e-f[g][1].width,f[g][1].width+=e-f[g][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout; +TableLayout.prototype.execute=function(a){var c=this.graph.getActualStartSize(a,!0),d=this.graph.getModel(),b=c.y,f=[],e=0,h=0;console.log("tableLayout.execute",a,c);for(var g=0;g<d.getChildCount(a);g++){var k=d.getChildAt(a,g);if(null!=k&&d.isVertex(k)){var l=this.graph.getCellGeometry(k);if(null!=l){for(var l=l.clone(),m=this.graph.getActualStartSize(k,!0),n=d.getChildCount(k),h=m.x,p=0;p<n;p++){var r=d.getChildAt(k,p);if(null!=r){var u=this.graph.getCellGeometry(r);null!=u&&(u=u.clone(),l.height= +u.height+m.y+m.height,u.x=h,u.y=m.y,d.setGeometry(r,u),h+=u.width,p==n-1&&(f.push([u,l,m]),e=Math.max(h,e)))}}l.width=h+m.width;l.y=b;l.x=c.x;d.setGeometry(k,l);b+=l.height}}}g=this.graph.getCellGeometry(a);if(null!=g)for(g=g.clone(),g.width=h+c.x+c.width,g.height=b+c.height,d.setGeometry(a,g),g=0;g<f.length;g++)f[g][1].width<e&&(f[g][0].width+=e-f[g][1].width,f[g][1].width+=e-f[g][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout; TableRowLayout.prototype.constructor=TableRowLayout;TableRowLayout.prototype.moveCell=function(a,c,d){console.log("TableRowLayout.moveCell",a,c,d)}; -TableRowLayout.prototype.execute=function(a){var c=this.graph.getActualStartSize(a,!0),d=this.graph.getActualStartSize(a),b=this.graph.getCellStyle(a),f=this.graph.getModel(),e=f.getParent(a);console.log("tableRowLayout.execute",a,c,d);if(null!=b&&null!=e){b=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));f.beginUpdate();try{if(c.width!=d.width||c.x!=d.x){var h=f.getChildAt(a,f.getChildCount(a)-1),g=this.graph.getCellGeometry(h);null!=g&&(g=g.clone(),g.width+= -d.width-c.width-c.x-d.x,g.width=Math.max(Graph.minTableColumnWidth,g.width),f.setGeometry(h,g))}for(d=0;d<f.getChildCount(e);d++){var k=f.getChildAt(e,d);if(k!=a){var l=this.graph.getActualStartSize(k);(0<c.x&&0<l.x||0<c.y&&0<l.y||0<c.width&&0<l.width||0<c.height&&0<l.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,b,[k])}}}finally{f.endUpdate()}}}; +TableRowLayout.prototype.execute=function(a){var c=this.graph.getActualStartSize(a,!0),d=this.graph.getActualStartSize(a),b=this.graph.getCellStyle(a),f=this.graph.getModel(),e=f.getParent(a);console.log("tableRowLayout.execute",a,c,d);if(null!=b&&null!=e){b=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));f.beginUpdate();try{if(this.graph.isTableRow(a)&&(c.width!=d.width||c.x!=d.x)){var h=f.getChildAt(a,f.getChildCount(a)-1),g=this.graph.getCellGeometry(h); +null!=g&&(g=g.clone(),g.width+=d.width-c.width-c.x-d.x,g.width=Math.max(Graph.minTableColumnWidth,g.width),f.setGeometry(h,g))}for(d=0;d<f.getChildCount(e);d++){var k=f.getChildAt(e,d);if(k!=a){var l=this.graph.getActualStartSize(k);(0<c.x&&0<l.x||0<c.y&&0<l.y||0<c.width&&0<l.width||0<c.height&&0<l.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,b,[k])}}}finally{f.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this, arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&& 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h= -b[g+1],k=b[g],w=[],t=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,t.x,t.y,h.x,h.y)<1*this.scale*this.scale;)h=t,g++,t=b[g+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<C.length-1;x++){for(var B=C[x+1],E=C[x],t=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(E.x,E.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=t,x++,t=C[x+2];t=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,B.x, -B.y);if(null!=t&&(Math.abs(t.x-k.x)>f||Math.abs(t.y-k.y)>f)&&(Math.abs(t.x-h.x)>f||Math.abs(t.y-h.y)>f)&&(Math.abs(t.x-E.x)>f||Math.abs(t.y-E.y)>f)&&(Math.abs(t.x-B.x)>f||Math.abs(t.y-B.y)>f)){B=t.x-k.x;E=t.y-k.y;t={distSq:B*B+E*E,x:t.x,y:t.y};for(B=0;B<w.length;B++)if(w[B].distSq>t.distSq){w.splice(B,0,t);t=null;break}null==t||0!=w.length&&w[w.length-1].x===t.x&&w[w.length-1].y===t.y||w.push(t)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}t=b[b.length-1];c=e(0,t.x,t.y)||c}a.routedPoints=d;return c}return!1}; +b[g+1],k=b[g],w=[],t=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,t.x,t.y,h.x,h.y)<1*this.scale*this.scale;)h=t,g++,t=b[g+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var x=this.validEdges[y],E=x.absolutePoints;if(null!=E&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<E.length-1;x++){for(var B=E[x+1],D=E[x],t=E[x+2];x<E.length-2&&mxUtils.ptSegDistSq(D.x,D.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=t,x++,t=E[x+2];t=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,B.x, +B.y);if(null!=t&&(Math.abs(t.x-k.x)>f||Math.abs(t.y-k.y)>f)&&(Math.abs(t.x-h.x)>f||Math.abs(t.y-h.y)>f)&&(Math.abs(t.x-D.x)>f||Math.abs(t.y-D.y)>f)&&(Math.abs(t.x-B.x)>f||Math.abs(t.y-B.y)>f)){B=t.x-k.x;D=t.y-k.y;t={distSq:B*B+D*D,x:t.x,y:t.y};for(B=0;B<w.length;B++)if(w[B].distSq>t.distSq){w.splice(B,0,t);t=null;break}null==t||0!=w.length&&w[w.length-1].x===t.x&&w[w.length-1].y===t.y||w.push(t)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}t=b[b.length-1];c=e(0,t.x,t.y)||c}a.routedPoints=d;return c}return!1}; var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style, -"jumpStyle","none"),h=!0,k=null,l=null,m=[],t=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],C=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?C=b[0]:y==this.state.routedPoints.length-1&&(C=b[b.length-1]);var B=!1;if(null!=k&&1==x.type){var E=this.state.routedPoints[y+1],x=E.x/this.scale-C.x,E=E.y/this.scale-C.y,x=x*x+E*E;null==t&&(t=new mxPoint(C.x-k.x,C.y-k.y),l=Math.sqrt(t.x*t.x+t.y*t.y),0<l?(t.x=t.x*e/l,t.y=t.y*e/l):t=null);x>e*e&&0<l&&(x=k.x- -C.x,E=k.y-C.y,x=x*x+E*E,x>e*e&&(B=new mxPoint(C.x-t.x,C.y-t.y),x=new mxPoint(C.x+t.x,C.y+t.y),m.push(B),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(B.x-t.y*m,B.y+t.x*m),a.lineTo(x.x-t.y*m,x.y+t.x*m),a.lineTo(x.x,x.y)):"arc"==g?(m*=1.3,a.curveTo(B.x-t.y*m,B.y+t.x*m,x.x-t.y*m,x.y+t.x*m,x.x,x.y)):(a.moveTo(x.x,x.y),h=!0),m=[x],B=!0))}else t=null;B||(m.push(C),k=C)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint; +"jumpStyle","none"),h=!0,k=null,l=null,m=[],t=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var x=this.state.routedPoints[y],E=new mxPoint(x.x/this.scale,x.y/this.scale);0==y?E=b[0]:y==this.state.routedPoints.length-1&&(E=b[b.length-1]);var B=!1;if(null!=k&&1==x.type){var D=this.state.routedPoints[y+1],x=D.x/this.scale-E.x,D=D.y/this.scale-E.y,x=x*x+D*D;null==t&&(t=new mxPoint(E.x-k.x,E.y-k.y),l=Math.sqrt(t.x*t.x+t.y*t.y),0<l?(t.x=t.x*e/l,t.y=t.y*e/l):t=null);x>e*e&&0<l&&(x=k.x- +E.x,D=k.y-E.y,x=x*x+D*D,x>e*e&&(B=new mxPoint(E.x-t.x,E.y-t.y),x=new mxPoint(E.x+t.x,E.y+t.y),m.push(B),this.addPoints(a,m,c,d,!1,null,h),m=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,h=!1,"sharp"==g?(a.lineTo(B.x-t.y*m,B.y+t.x*m),a.lineTo(x.x-t.y*m,x.y+t.x*m),a.lineTo(x.x,x.y)):"arc"==g?(m*=1.3,a.curveTo(B.x-t.y*m,B.y+t.x*m,x.x-t.y*m,x.y+t.x*m,x.x,x.y)):(a.moveTo(x.x,x.y),h=!0),m=[x],B=!0))}else t=null;B||(m.push(E),k=E)}this.addPoints(a,m,c,d,!1,null,h);a.stroke()}};var e=mxGraphView.prototype.updateFloatingTerminalPoint; mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)e.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var f=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),f=mxUtils.getRotatedPoint(f,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| 0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),f=mxUtils.getRotatedPoint(f,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b, a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b= @@ -2662,132 +2664,135 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+ "/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var c=0;c<a.length;c++){var d=a[c];b[mxObjectIdentity.get(d)]=d.getId();for(var e=this.model.getChildCount(d),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(d,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,c){c=null!=c?c:{};for(var d in a){var e=b[d];null==c[e]&&(c[e]=a[d].getId()||"")}return c}; Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),f=new mxGraphModel;e.decode(a,f);a=[];var e={},g={},h=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=h){var k=this.createCellLookup([f.root]),h=h.slice();this.model.beginUpdate();try{if(1!=h.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<h.length;f++){var l=this.model.getChildren(this.moveCells([h[f]],b,c,!1,this.model.getRoot())[0]);null!=l&& -(a=a.concat(l))}else a=this.moveCells(f.getChildren(h[0]),b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(e,k,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var A=this.getBoundingBoxFromGeometry(a,!0);null!=A&&this.moveCells(a,b-A.x,c-A.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary, +(a=a.concat(l))}else a=this.moveCells(f.getChildren(h[0]),b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(e,k,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var z=this.getBoundingBoxFromGeometry(a,!0);null!=z&&this.moveCells(a,b-z.x,c-z.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary, e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++){var f=this.view.getState(a[e]);if(null!=f){var g=this.getCellGeometry(c[e]);null==g||!g.relative||this.model.isEdge(a[e])||d.get(this.model.getParent(a[e]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}d=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(e=0;e<c.length;e++)f.add(g,c[e]);this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),c);return d.encode(f)}; var e=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,f,g,h){h=null!=h?h:{};var k=e.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(h,this.createCellLookup(a)),k);return k};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style, -"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(ja){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!= +"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(ca){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!= a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot= -function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell= -function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),A=k.getTerminalPoint(!1); -k.setTerminalPoint(l,!1);k.setTerminalPoint(A,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),O=this.view.getState(h);if(null!=m){var p=null!=n?this.getConnectionConstraint(m,n,!0):null,r=null!=O?this.getConnectionConstraint(m,O,!1):null;this.setConnectionConstraint(f,g,!0,r);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),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; +function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))}; +Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),z=k.getTerminalPoint(!1); +k.setTerminalPoint(l,!1);k.setTerminalPoint(z,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),N=this.view.getState(h);if(null!=m){var p=null!=n?this.getConnectionConstraint(m,n,!0):null,r=null!=N?this.getConnectionConstraint(m,N,!1):null;this.setConnectionConstraint(f,g,!0,r);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),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;c.setGeometry(f,k);var q=this.view.getState(f);if(null!=q){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],v=mxUtils.getValue(q.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,v)+(b?-1:1),t.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a= -a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++){var d=this.view.getState(b[c]);null!=d&&null!=d.shape&&null!=d.shape.stencil&&this.stencilHasPlaceholders(d.shape.stencil)? -this.removeStateForCell(b[c]):this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements= -function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&& -null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0); -for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=!0,g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f=!1);f&&a.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup= -function(a){for(var b=[],c=0;c<a.length;c++)this.isCellDeletable(a[c])&&this.isTransparentState(this.view.getState(a[c]))&&b.push(a[c]);a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell=function(a,b,c){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b):null; -return null!=a?a:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null; -return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!= -e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(c.x,c.y))),b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this, -a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x, -b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale- -this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c&&this.model.isEdge(c.cell)){d.style+= -"labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x-(null!=c?c.origin.x:0),d.geometry.y=Math.round(b/ -this.view.scale)-e.y-(null!=c?c.origin.y:0),d.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("rel", -this.linkRelation),a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b=a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(), -null,null,null,function(a,b,c){return null==g.getLinkForCell(a.cell)}),b=g.view.getState(a);b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)}, -mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(b,!0,this.currentState),(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState, -b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink), -"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell)); -null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells(); -b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]); -document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink", -!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style: -this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a? -b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent= -function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};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,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{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 n=f||d? -this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var A=this.view.scale,p=mxUtils.createXmlDocument(),r=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=r.style?r.style.backgroundColor=a:r.setAttribute("style","background-color:"+a));null==p.createElementNS?(r.setAttribute("xmlns",mxConstants.NS_SVG),r.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):r.setAttributeNS("http://www.w3.org/2000/xmlns/", -"xmlns:xlink",mxConstants.NS_XLINK);a=b/A;var u=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),O=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);r.setAttribute("version","1.1");r.setAttribute("width",u+"px");r.setAttribute("height",O+"px");r.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+u+" "+O);p.appendChild(r);var P=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");r.appendChild(P);var q=this.createSvgCanvas(P);q.foOffset=e?-.5:0;q.textOffset=e?-.5:0;q.imageOffset= -e?-.5:0;q.translate(Math.floor((c/b-n.x)/A),Math.floor((c/b-n.y)/A));var t=document.createElement("div"),v=q.getAlternateText;q.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,A){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(t.innerHTML=f,f=mxUtils.extractTextWithWhitespace(t.childNodes));for(var p=Math.ceil(2*d/this.state.fontSize),r=[],u=0,O=0;(0==p||u<p)&&O<f.length;){var P=f.charCodeAt(O);if(10==P||13==P){if(0<u)break}else r.push(f.charAt(O)),255>P&&u++;O++}r.length< -f.length&&1<f.length-r.length&&(f=mxUtils.trim(r.join(""))+"...");return f}catch(N){return v.apply(this,arguments)}else return v.apply(this,arguments)};var x=this.backgroundImage;if(null!=x){b=A/b;var C=this.view.translate,R=new mxRectangle(C.x*b,C.y*b,x.width*b,x.height*b);mxUtils.intersects(n,R)&&q.image(C.x,C.y,x.width,x.height,x.src,!0)}q.scale(a);q.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var w=h.drawCellState,B=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=B.apply(this, -arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&w.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);this.updateSvgLinks(r,k,!0);this.addForeignObjectWarning(q,r);return r}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= -function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href", -Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href"); -null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return 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.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&& -"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertTableColumn=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=f.getIndex(a);else this.isTableRow(a)&&(d=c.getParent(a)),b||(e=c.getChildCount(c.getChildAt(d,0))-1);for(var g=0;g<c.getChildCount(d);g++){var f=c.getChildAt(d,g),h=c.getChildAt(f,e),k=c.cloneCell(h),l=this.getCellGeometry(k); -k.value=null;if(null!=l){l.width=Graph.minTableColumnWidth;var m=this.getCellGeometry(f);null!=m&&(l.height=m.height)}c.add(f,k,e+(b?0:1))}var n=this.getCellGeometry(d);null!=n&&(n=n.clone(),n.width+=Graph.minTableColumnWidth,c.setGeometry(d,n))}finally{c.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=d.getIndex(f);else this.isTableRow(a)?(d=c.getParent(a),e=d.getIndex(a)): -b||(e=c.getChildCount(d)-1);f=c.cloneCell(c.getChildAt(d,e));f.value=null;var g=this.getCellGeometry(f);if(null!=g){g.height=Graph.minTableRowHeight;for(var h=0;h<c.getChildCount(f);h++){a=c.getChildAt(f,h);a.value=null;var k=this.getCellGeometry(a);null!=k&&(k.height=g.height)}c.add(d,f,e+(b?0:1));var l=this.getCellGeometry(d);null!=l&&(l=l.clone(),l.height+=g.height,c.setGeometry(d,l))}}finally{c.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=this.getModel();b.beginUpdate();try{var c= -a,d=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),d=e.getIndex(a);else this.isTableRow(a)?(c=b.getParent(a),d=b.getChildCount(a)-1):this.isTable(a)&&(d=b.getChildCount(b.getChildAt(a,0))-1);for(var f=a=0;f<b.getChildCount(c);f++){var e=b.getChildAt(c,f),g=b.getChildAt(e,d);b.remove(g);var h=this.getCellGeometry(g);null!=h&&(a=Math.max(a,h.width))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width-=a,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.deleteTableRow= -function(a){var b=this.getModel();b.beginUpdate();try{var c=a;this.isTableCell(a)?c=b.getParent(a):this.isTable(a)&&(c=b.getChildAt(a,b.getChildCount(a)-1));var d=b.getParent(c);b.remove(c);a=0;var e=this.getCellGeometry(c);null!=e&&(a=e.height);var f=this.getCellGeometry(d);null!=f&&(f=f.clone(),f.height-=a,b.setGeometry(d,f))}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,f=0;f<d.length;f++)var g=d[f].getAttribute("colspan"),e=e+(null!= -g?parseInt(g):1);c=c.insertRow(b);for(f=0;f<e;f++)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.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target", -this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};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.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea, -function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}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(W){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var g=mxConstraintHandler.prototype.update; -mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?g.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.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 l=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b= -a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}l.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(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell); -if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=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(b?k.replace(/\n/g,"<br/>"):k,!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,h=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&h.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");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=h.join(" ");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!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>")); -k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily= -mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var m=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="",m.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue= -function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML, -!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(A){}};var p=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, -b){this.graph.getModel().beginUpdate();try{p.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,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 r=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);r.apply(this,arguments)};mxGraphView.prototype.formatUnitText= -function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){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);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+ -Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+ -a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};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 u=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);(this.graph.cellEditor.getEditingCell()==this.state.cell||Graph.handlePadding[c])&&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=u.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}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+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var v=mxEdgeHandler.prototype.mouseMove; -mxEdgeHandler.prototype.mouseMove=function(a,b){v.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};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,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+ -"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+ -'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5, -5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage= -HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop); -mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src, -(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled= -!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH|| -0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)|| -mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var w=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){w.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null== -a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled= -!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&& -this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c], -l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null== -this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)), -this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+ -"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!= -this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var y=(new Date).getTime(),x=0,C=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){C.apply(this,arguments);c!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=c};var B=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!= -this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&B.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor== -mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; -var E=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return E.apply(this,arguments)};var z=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&& -null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return z.apply(this,arguments)};var G=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=G.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds= -function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):J.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell), -e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick= -function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; -var K=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){K.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&& -(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var Q=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Q.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&& -this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED, -this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= -"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px"; -d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px"; -e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(f)}}}catch(ba){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint; -var S=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){S.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"": -"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()}; -var T=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){T.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE? -"none":"");L.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height; -null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px"}};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){I.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler), -this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var M=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(M.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left= -Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Z=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Z.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null); -null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" "); +a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c= +this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements= +function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged= +function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}}; +Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=!0,g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f= +!1);f&&a.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)this.isCellDeletable(a[c])&&this.isTransparentState(this.view.getState(a[c]))&&b.push(a[c]);a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell= +function(a,b,c){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b):null;return null!=a?a:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null; +for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)? +this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(c.x, +c.y))),b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view, +b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/ +2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; +d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c&&this.model.isEdge(c.cell)){d.style+="labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else e=this.view.translate,d.geometry.width=40,d.geometry.height= +20,d.geometry.x=Math.round(a/this.view.scale)-e.x-(null!=c?c.origin.x:0),d.geometry.y=Math.round(b/this.view.scale)-e.y-(null!=c?c.origin.y:0),d.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!= +a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("rel",this.linkRelation),a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b= +a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,b,c){return null==g.getLinkForCell(a.cell)}),b=g.view.getState(a);b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&& +"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(b,!0,this.currentState),(null== +this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&& +!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY- +d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document, +"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!= +a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b= +this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable= +function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX(): +g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/ +2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};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,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1, +this.view.revalidate(),this.sizeDidChange());try{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 n=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var z=this.view.scale,p=mxUtils.createXmlDocument(),r=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=r.style?r.style.backgroundColor=a:r.setAttribute("style","background-color:"+a));null== +p.createElementNS?(r.setAttribute("xmlns",mxConstants.NS_SVG),r.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/z;var u=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),N=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);r.setAttribute("version","1.1");r.setAttribute("width",u+"px");r.setAttribute("height",N+"px");r.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+u+" "+N);p.appendChild(r);var Q=null!=p.createElementNS? +p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g");r.appendChild(Q);var q=this.createSvgCanvas(Q);q.foOffset=e?-.5:0;q.textOffset=e?-.5:0;q.imageOffset=e?-.5:0;q.translate(Math.floor((c/b-n.x)/z),Math.floor((c/b-n.y)/z));var t=document.createElement("div"),v=q.getAlternateText;q.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,z){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(t.innerHTML=f,f=mxUtils.extractTextWithWhitespace(t.childNodes));for(var p=Math.ceil(2* +d/this.state.fontSize),r=[],u=0,N=0;(0==p||u<p)&&N<f.length;){var Q=f.charCodeAt(N);if(10==Q||13==Q){if(0<u)break}else r.push(f.charAt(N)),255>Q&&u++;N++}r.length<f.length&&1<f.length-r.length&&(f=mxUtils.trim(r.join(""))+"...");return f}catch(sa){return v.apply(this,arguments)}else return v.apply(this,arguments)};var x=this.backgroundImage;if(null!=x){b=z/b;var R=this.view.translate,E=new mxRectangle(R.x*b,R.y*b,x.width*b,x.height*b);mxUtils.intersects(n,E)&&q.image(R.x,R.y,x.width,x.height,x.src, +!0)}q.scale(a);q.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var w=h.drawCellState,B=h.getLinkForCellState;h.getLinkForCellState=function(a,b){var c=B.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&w.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),q);this.updateSvgLinks(r, +k,!0);this.addForeignObjectWarning(q,r);return r}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&& +null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f); +c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return 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.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode= +function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertTableColumn=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=f.getIndex(a); +else this.isTableRow(a)&&(d=c.getParent(a)),b||(e=c.getChildCount(c.getChildAt(d,0))-1);for(var g=0;g<c.getChildCount(d);g++){var f=c.getChildAt(d,g),h=c.getChildAt(f,e),k=c.cloneCell(h),l=this.getCellGeometry(k);k.value=null;if(null!=l){l.width=Graph.minTableColumnWidth;var m=this.getCellGeometry(f);null!=m&&(l.height=m.height)}c.add(f,k,e+(b?0:1))}var n=this.getCellGeometry(d);null!=n&&(n=n.clone(),n.width+=Graph.minTableColumnWidth,c.setGeometry(d,n))}finally{c.endUpdate()}};Graph.prototype.insertTableRow= +function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=d.getIndex(f);else this.isTableRow(a)?(d=c.getParent(a),e=d.getIndex(a)):b||(e=c.getChildCount(d)-1);f=c.cloneCell(c.getChildAt(d,e));f.value=null;var g=this.getCellGeometry(f);if(null!=g){g.height=Graph.minTableRowHeight;for(var h=0;h<c.getChildCount(f);h++){a=c.getChildAt(f,h);a.value=null;var k=this.getCellGeometry(a);null!=k&&(k.height=g.height)}c.add(d,f,e+(b?0:1)); +var l=this.getCellGeometry(d);null!=l&&(l=l.clone(),l.height+=g.height,c.setGeometry(d,l))}}finally{c.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=this.getModel();b.beginUpdate();try{var c=a,d=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),d=e.getIndex(a);else this.isTableRow(a)?(c=b.getParent(a),d=b.getChildCount(a)-1):this.isTable(a)&&(d=b.getChildCount(b.getChildAt(a,0))-1);for(var f=a=0;f<b.getChildCount(c);f++){var e=b.getChildAt(c,f),g=b.getChildAt(e,d); +b.remove(g);var h=this.getCellGeometry(g);null!=h&&(a=Math.max(a,h.width))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width-=a,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var c=a;this.isTableCell(a)?c=b.getParent(a):this.isTable(a)&&(c=b.getChildAt(a,b.getChildCount(a)-1));var d=b.getParent(c);b.remove(c);a=0;var e=this.getCellGeometry(c);null!=e&&(a=e.height);var f=this.getCellGeometry(d);null!=f&&(f= +f.clone(),f.height-=a,b.setGeometry(d,f))}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,f=0;f<d.length;f++)var g=d[f].getAttribute("colspan"),e=e+(null!=g?parseInt(g):1);c=c.insertRow(b);for(f=0;f<e;f++)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.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel", +this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};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.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE", +this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a= +window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}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(R){}};var h=mxCellRenderer.prototype.initializeLabel; +mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var g=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?g.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing= +!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.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 l=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c} +function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"), +a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}l.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(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")|| +0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&c(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=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(b?k.replace(/\n/g,"<br/>"):k,!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,h=[]; +(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&h.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");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=h.join(" "); +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!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange= +!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize= +Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var m=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= +"",m.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= +function(){try{this.graph.container.focus()}catch(z){}};var p=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();try{p.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, +null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,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 r=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells= +function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);r.apply(this,arguments)};mxGraphView.prototype.formatUnitText=function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){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);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition= +function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};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 u=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);(this.graph.cellEditor.getEditingCell()==this.state.cell||Graph.handlePadding[c])&& +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=u.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML= +c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}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+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this, +arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var v=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){v.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&& +(this.linkHint.style.display="")};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,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus? +(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= +mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ +HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG? +Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+ +"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= +HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget, +Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, +(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled= +!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null== +a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var w=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){w.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&& +(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp= +function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&& +(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]); +null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y- +c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x< +this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)), +this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var t=mxRubberband.prototype.reset; +mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);t.apply(this,arguments)};var y=(new Date).getTime(),x=0,E=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){E.apply(this,arguments);c!=this.currentTerminalState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y;this.currentTerminalState=c};var B=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent= +function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&B.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length- +1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR, +mxConstants.HANDLE_STROKECOLOR)};var D=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return D.apply(this,arguments)};var A=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]); +if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return A.apply(this,arguments)};var G=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=G.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var J=mxVertexHandler.prototype.getSelectionBounds; +mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):J.apply(this,arguments)};var H=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a, +b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()< +mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION, +a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var K=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){K.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var F=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= +function(a,b){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var P=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){P.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState= +null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor="pointer",this.rowMoveHandle.style.width="18px",this.rowMoveHandle.style.height="18px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle, +mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()}); +this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d= +this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){S.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.display=a?"":"none")};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), +this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title", +mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); +e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d]))); +this.linkHint.appendChild(f)}}}catch(ba){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var T=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){T.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= +this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state); +if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var L=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){L.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=this.rowState.x+this.rowState.width+ +"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");I.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+ +22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px"}}; +var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null); +null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Z=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Z.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/ +2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var aa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var fa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){fa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), +this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" "); Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()})); this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c}; Format.prototype.initSelectionState=function(){return{vertices:[],edges:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,comic:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0}}; @@ -2888,50 +2893,50 @@ TextFormatPanel.prototype.addFont=function(a){function c(a,b){mxClient.IS_IE&&(m [mxConstants.ALIGN_LEFT])),n),u=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(a){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT])),n);this.styleButtons([r,u,v]);if(b.cellEditor.isContentEditing()){var q=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},g);this.styleButtons([q]);q.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)"; q.firstChild.style.backgroundPosition="2px 2px";q.firstChild.style.backgroundSize="18px 18px";this.styleButtons([q])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),t=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),y=this.editorUi.toolbar.addButton("geSprite-bottom", -mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,t,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,C,B,E,z,G,J;b.cellEditor.isContentEditing()?(w.style.display="none",t.style.display="none",y.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==B.style.opacity&&document.execCommand("justifyfull", -!1,null)},n),B.style.marginRight="9px",B.style.opacity=1,this.styleButtons([B,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),C=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist", +mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([w,t,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var x,E,B,D,A,G,J;b.cellEditor.isContentEditing()?(w.style.display="none",t.style.display="none",y.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==B.style.opacity&&document.execCommand("justifyfull", +!1,null)},n),B.style.marginRight="9px",B.style.opacity=1,this.styleButtons([B,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),E=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),x.style.marginLeft="9px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist", mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent", !1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),p.style.height="40"),a.appendChild(p)):(l[2].style.marginRight="9px",v.style.marginRight="9px");n=e.cloneNode(!1);n.style.marginLeft= "0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var H=document.createElement("select");H.style.position="absolute";H.style.right="20px";H.style.width="97px";H.style.marginTop="-2px";for(var q="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),K={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP, mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<q.length;p++){var F=document.createElement("option");F.setAttribute("value",q[p]);mxUtils.write(F,mxResources.get(q[p]));H.appendChild(F)}n.appendChild(H);q=e.cloneNode(!1);q.style.marginLeft="0px";q.style.paddingTop= -"4px";q.style.paddingBottom="4px";q.style.fontWeight="normal";mxUtils.write(q,mxResources.get("writingDirection"));var Q=document.createElement("select");Q.style.position="absolute";Q.style.right="20px";Q.style.width="97px";Q.style.marginTop="-2px";for(var F=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<F.length;p++){var T=document.createElement("option");T.setAttribute("value",F[p]);mxUtils.write(T, -mxResources.get(F[p]));Q.appendChild(T)}q.appendChild(Q);b.isEditing()||(a.appendChild(n),mxEvent.addListener(H,"change",function(a){b.getModel().beginUpdate();try{var c=K[H.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}), -a.appendChild(q),mxEvent.addListener(Q,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[Q.value],b.getSelectionCells());mxEvent.consume(a)}));var L=document.createElement("input");L.style.textAlign="right";L.style.marginTop="4px";mxClient.IS_QUIRKS||(L.style.position="absolute",L.style.right="32px");L.style.width="46px";L.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(L);var I=null,n=this.installInputHandler(L,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize, +"4px";q.style.paddingBottom="4px";q.style.fontWeight="normal";mxUtils.write(q,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 F=["automatic","leftToRight","rightToLeft"],S={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<F.length;p++){var T=document.createElement("option");T.setAttribute("value",F[p]);mxUtils.write(T, +mxResources.get(F[p]));P.appendChild(T)}q.appendChild(P);b.isEditing()||(a.appendChild(n),mxEvent.addListener(H,"change",function(a){b.getModel().beginUpdate();try{var c=K[H.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}), +a.appendChild(q),mxEvent.addListener(P,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,S[P.value],b.getSelectionCells());mxEvent.consume(a)}));var L=document.createElement("input");L.style.textAlign="right";L.style.marginTop="4px";mxClient.IS_QUIRKS||(L.style.position="absolute",L.style.right="32px");L.style.width="46px";L.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(L);var I=null,n=this.installInputHandler(L,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize, 1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer: b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}L.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement(): (d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(I=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=I+"px";window.setTimeout(function(){L.value=I+" pt";I=null},0);break}},!0),n=this.createStepper(L,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=L.style.display;n.style.marginTop= -"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,Z="#ffffff",aa=null,A="#000000",O=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"), -mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});O.style.fontWeight="bold";var P=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");P.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return A},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"), +"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,Z="#ffffff",aa=null,fa="#000000",z=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return Z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"), +mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});z.style.fontWeight="bold";var N=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");N.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return fa},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"), d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var f=c.nextSibling;a[e].appendChild(c); -c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){aa=a},destroy:function(){aa=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){O.style.display=null==a||a==mxConstants.NONE?"none":"";P.style.display=O.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL, -null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(O);b.cellEditor.isContentEditing()||h.appendChild(P);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize|| -0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var W,R,ba, -ja,ca,U=this.addUnitInput(g,"pt",91,44,function(){W.apply(this,arguments)}),fa=this.addUnitInput(g,"pt",20,44,function(){R.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var da=this.addUnitInput(g,"pt",162,44,function(){ba.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),ha=this.addUnitInput(g,"pt",20,44,function(){ca.apply(this,arguments)});mxUtils.br(g); +c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){aa=a},destroy:function(){aa=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){z.style.display=null==a||a==mxConstants.NONE?"none":"";N.style.display=z.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL, +null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(z);b.cellEditor.isContentEditing()||h.appendChild(N);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize|| +0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var Q,R,X,ba, +ca,U=this.addUnitInput(g,"pt",91,44,function(){Q.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",20,44,function(){R.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var da=this.addUnitInput(g,"pt",162,44,function(){X.apply(this,arguments)}),ha=this.addUnitInput(g,"pt",91,44,function(){ba.apply(this,arguments)}),ia=this.addUnitInput(g,"pt",20,44,function(){ca.apply(this,arguments)});mxUtils.br(g); this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var Y=null,ea=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=Y&&(b.cellEditor.restoreSelection(Y),Y=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode; null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){ea=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(Y=b.cellEditor.saveSelection())}); mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(Y=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"), !1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!= -z&&b.insertColumn(z,null!=G?G.cellIndex:0)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&b.insertColumn(z,null!=G?G.cellIndex+1:-1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=G&&b.deleteColumn(z,G.cellIndex)}catch(V){this.editorUi.handleError(V)}}), -g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&b.insertRow(z,J.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=J&&b.insertRow(z,J.sectionRowIndex+1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), -mxUtils.bind(this,function(){try{null!=z&&null!=J&&b.deleteRow(z,J.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"), -mxUtils.bind(this,function(a){if(null!=z){var c=z.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?z:G;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse= -""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=z){var c=z.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c, -function(c){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?z:G;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=z){var a=z.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?z.setAttribute("cellPadding",a):z.removeAttribute("cellPadding")}),mxResources.get("spacing")); -d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=z&&z.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=z&&z.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=z&&z.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&& -(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);E=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var X=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE); +A&&b.insertColumn(A,null!=G?G.cellIndex:0)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=G?G.cellIndex+1:-1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=G&&b.deleteColumn(A,G.cellIndex)}catch(V){this.editorUi.handleError(V)}}), +g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.insertRow(A,J.sectionRowIndex+1)}catch(V){this.editorUi.handleError(V)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"), +mxUtils.bind(this,function(){try{null!=A&&null!=J&&b.deleteRow(A,J.sectionRowIndex)}catch(V){this.editorUi.handleError(V)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"), +mxUtils.bind(this,function(a){if(null!=A){var c=A.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?A:G;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse= +""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c, +function(c){var d=null==G||null!=a&&mxEvent.isShiftDown(a)?A:G;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=A){var a=A.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?A.setAttribute("cellPadding",a):A.removeAttribute("cellPadding")}),mxResources.get("spacing")); +d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=A&&A.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=A&&A.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=A&&A.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&& +(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var W=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE); k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=L)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),L.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_LEFT);c(u,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT); a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(t,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);H.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&& -b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?Q.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR? -Q.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(Q.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),U.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ha.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= -ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),da.value=isNaN(a)?"":a+" pt"});R=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");W=this.installInputHandler(U,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ca=this.installInputHandler(ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(ga, -mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ba=this.installInputHandler(da,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(L,X);this.addKeyHandler(fa,X);this.addKeyHandler(U,X);this.addKeyHandler(ha,X);this.addKeyHandler(ga,X);this.addKeyHandler(da,X);b.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){b.getModel().removeListener(X)}});X();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a= +b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR? +P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.value="automatic");if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),U.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ia)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ia.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= +ha)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ha.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),da.value=isNaN(a)?"":a+" pt"});R=this.installInputHandler(ga,mxConstants.STYLE_SPACING,2,-999,999," pt");Q=this.installInputHandler(U,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ca=this.installInputHandler(ia,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ba=this.installInputHandler(ha, +mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");X=this.installInputHandler(da,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(L,W);this.addKeyHandler(ga,W);this.addKeyHandler(U,W);this.addKeyHandler(ia,W);this.addKeyHandler(ha,W);this.addKeyHandler(da,W);b.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){b.getModel().removeListener(W)}});W();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a= b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length- 2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a), -n=g(m),p=h(n,m,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<q.length;w++)if(t.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),y=h(n,temp,q[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B, -d(m.textAlign,"justify")),c(r,d(m.textAlign,"left")),c(u,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(r,!1),c(u,!1),c(v,!1)):(c(B,!1),c(r,e==mxConstants.ALIGN_LEFT),c(u,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),z=b.getParentByName(a,"TABLE",b.cellEditor.textarea),J=null==z?null:b.getParentByName(a,"TR",z),G=null== -z?null:b.getParentByNames(a,["TD","TH"],z),E.style.display=null!=z?"":"none",document.activeElement!=L&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=I?(a.removeAttribute("size"),a.style.fontSize=I+" pt",I=null):L.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ea.value="100 %":ea.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+ -("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=aa&&(A="#"==d.charAt(0)?d:"#000000",aa(A,!0)),null!=M&&(Z="#"==n.charAt(0)?n:null,M(Z,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'== +n=g(m),p=h(n,m,a),q=a.getElementsByTagName("*");if(0<q.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<q.length;w++)if(t.containsNode(q[w],!0)){temp=mxUtils.getCurrentStyle(q[w]);var n=Math.max(g(temp),n),y=h(n,temp,q[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(E,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B, +d(m.textAlign,"justify")),c(r,d(m.textAlign,"left")),c(u,d(m.textAlign,"center")),c(v,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(r,!1),c(u,!1),c(v,!1)):(c(B,!1),c(r,e==mxConstants.ALIGN_LEFT),c(u,e==mxConstants.ALIGN_CENTER),c(v,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),J=null==A?null:b.getParentByName(a,"TR",A),G=null== +A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=L&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=I?(a.removeAttribute("size"),a.style.fontSize=I+" pt",I=null):L.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?ea.value="100 %":ea.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+ +("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=aa&&(fa="#"==d.charAt(0)?d:"#000000",aa(fa,!0)),null!=M&&(Z="#"==n.charAt(0)?n:null,M(Z,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'== m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}ka=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}}); e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black"; StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())), @@ -2965,7 +2970,7 @@ t.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.he mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a, "",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title", mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null, -!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML= +!0).setAttribute("title",mxResources.get("entityRelation")))})),E=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML= '<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==e.style.shape||"filledEdge"==e.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-startblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],"geIcon geSprite geSprite-startasync", @@ -2987,20 +2992,20 @@ mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstant 0],"geIcon geSprite geSprite-enddiamondtrans",null,!1).setAttribute("title",mxResources.get("diamond")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],"geIcon geSprite geSprite-endthindiamondtrans",null,!1).setAttribute("title",mxResources.get("diamondThin")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a, "",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone", null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW, -"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(x);this.addArrow(C);this.addArrow(B);t=this.addArrow(l, -9);t.className="geIcon";t.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var E=document.createElement("div");E.style.width="85px";E.style.height="1px";E.style.borderBottom="1px solid "+this.defaultStrokeColor;E.style.marginBottom="9px";t.appendChild(E);var z=document.createElement("div");z.style.width="23px";z.style.height="1px";z.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.marginBottom="9px";y.appendChild(z);l.style.height="15px";m.style.height= -"15px";v.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend")); -l.appendChild(m);var G,J,H=this.addUnitInput(l,"pt",74,33,function(){G.apply(this,arguments)}),K=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var F,Q,S=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),T=this.addUnitInput(l,"pt",20,33,function(){Q.apply(this,arguments)});mxUtils.br(l);this.addLabel(l, +"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(v,8);this.addArrow(x);this.addArrow(E);this.addArrow(B);t=this.addArrow(l, +9);t.className="geIcon";t.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";t.appendChild(D);var A=document.createElement("div");A.style.width="23px";A.style.height="1px";A.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.marginBottom="9px";y.appendChild(A);l.style.height="15px";m.style.height= +"15px";v.style.height="15px";x.style.height="17px";E.style.marginLeft="3px";E.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend")); +l.appendChild(m);var G,J,H=this.addUnitInput(l,"pt",74,33,function(){G.apply(this,arguments)}),K=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var F,P,S=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),T=this.addUnitInput(l,"pt",20,33,function(){P.apply(this,arguments)});mxUtils.br(l);this.addLabel(l, mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m, mxResources.get("perimeter"));h.appendChild(m);var L,I=this.addUnitInput(h,"pt",20,41,function(){L.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"== d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=q)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!= -w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?E.style.borderBottom="1px dashed "+ -this.defaultStrokeColor:E.style.borderBottom="1px dotted "+this.defaultStrokeColor:E.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.borderBottom=E.style.borderBottom;a=x.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|| +w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+ +this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c|| "none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";v.getElementsByTagName("div")[0].className="link"== -e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");c=h(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(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!= +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==f.getSelectionCount()?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),E,"start");c=h(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(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(B,30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!= T)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),T.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=K)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),K.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING, -0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt"});Q=this.installInputHandler(T,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(K,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");G=this.installInputHandler(H,mxConstants.STYLE_TARGET_PERIMETER_SPACING, +0)),H.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=I)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),I.value=isNaN(a)?"":a+" pt"});P=this.installInputHandler(T,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(S,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=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");L=this.installInputHandler(I,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(q,M);this.addKeyHandler(T,M);this.addKeyHandler(S,M);this.addKeyHandler(K,M);this.addKeyHandler(H,M);this.addKeyHandler(I,M);f.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){f.getModel().removeListener(M)}});M();return a}; StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px"; e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}); @@ -3028,15 +3033,15 @@ function(){b.set(d.pageFormat)});var f=function(){b.set(d.pageFormat)};c.addList DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="202px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()})); c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function u(a,b){this.canvas= a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function q(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function E(){mxShape.call(this)}function z(){mxShape.call(this)} -function G(){mxEllipse.call(this)}function J(){mxShape.call(this)}function H(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function F(){mxShape.call(this)}function Q(){mxShape.call(this)}function S(){mxShape.call(this)}function T(){mxShape.call(this)}function L(){mxShape.call(this)}function I(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function Z(){mxRectangleShape.call(this)}function aa(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function O(){mxArrowConnector.call(this); -this.spacing=0}function P(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function U(){mxActor.call(this)}function fa(){mxActor.call(this)}function da(){mxActor.call(this)}function ga(){mxActor.call(this)}function ha(){mxActor.call(this)}function Y(){mxActor.call(this)}function ea(){mxActor.call(this)}function X(){mxEllipse.call(this)} -function ka(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function va(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Ha(a,b,c,d,e,f,g,h,k,l){g+=k;var D=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(D.x- -e-g,D.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),D=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); -a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=D&&(a.setFillAlpha(Math.abs(D)),a.setFillColor(0>D?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f), -a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),na=(.5-Da)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d, -e/Da);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Da));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na), -a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0, +this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function q(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)} +function G(){mxEllipse.call(this)}function J(){mxShape.call(this)}function H(){mxShape.call(this)}function K(){mxRectangleShape.call(this)}function F(){mxShape.call(this)}function P(){mxShape.call(this)}function S(){mxShape.call(this)}function T(){mxShape.call(this)}function L(){mxShape.call(this)}function I(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function Z(){mxRectangleShape.call(this)}function aa(){mxDoubleEllipse.call(this)}function fa(){mxDoubleEllipse.call(this)}function z(){mxArrowConnector.call(this); +this.spacing=0}function N(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function ca(){mxActor.call(this)}function U(){mxActor.call(this)}function ga(){mxActor.call(this)}function da(){mxActor.call(this)}function ha(){mxActor.call(this)}function ia(){mxActor.call(this)}function Y(){mxActor.call(this)}function ea(){mxActor.call(this)}function W(){mxEllipse.call(this)} +function ka(){mxEllipse.call(this)}function V(){mxEllipse.call(this)}function Aa(){mxRhombus.call(this)}function Ba(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ha(a,b,c,d,e,f,g,h,k,l){g+=k;var C=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(C.x- +e-g,C.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),C=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); +a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=C&&(a.setFillAlpha(Math.abs(C)),a.setFillColor(0>C?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f), +a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ea=Math.tan(mxUtils.toRadians(30)),ma=(.5-Ea)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d, +e/Ea);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ea));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma), +a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0, 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d, Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()), a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0, @@ -3050,8 +3055,8 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo 2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b, e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(r,mxActor);r.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",r);u.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas, arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};u.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};u.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};u.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f}; -u.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};u.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),D=this.defaultVariation;5>g&&(g=5,D/=3);for(var h=c(a-this.lastX)* -d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*D;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo; +u.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};u.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),C=this.defaultVariation;5>g&&(g=5,C/=3);for(var h=c(a-this.lastX)* +d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*C;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo; this.canvas.arcTo=this.originalArcTo};var Ma=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new u(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ma.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Na=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed= function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Na.apply(this,arguments)};var Oa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Oa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!= mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b, @@ -3064,12 +3069,12 @@ this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoi "size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath= function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",y);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a, b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ia=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ -b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ia.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ia.apply(this,[a,b,c,d,e]))}};mxUtils.extend(C,mxRectangleShape);C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2, -this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};C.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+ -f]];if(null!=g){var h=this.style["symbol"+f+"Align"],D=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],wa=this.style["symbol"+f+"Spacing"]||0,Ga=this.style["symbol"+f+"VSpacing"]||wa,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),wa+=m,Ga+=m);var m=b,sa=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-wa):m+wa,sa=D==mxConstants.ALIGN_MIDDLE?sa+(e-l)/2:D== -mxConstants.ALIGN_BOTTOM?sa+(e-l-Ga):sa+Ga;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,m,sa,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message", -B);mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",E);mxUtils.extend(z,mxShape);z.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};z.prototype.paintBackground= -function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",z);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", +b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ia.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ia.apply(this,[a,b,c,d,e]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2, +this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};E.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+ +f]];if(null!=g){var h=this.style["symbol"+f+"Align"],C=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],xa=this.style["symbol"+f+"Spacing"]||0,Ga=this.style["symbol"+f+"VSpacing"]||xa,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),xa+=m,Ga+=m);var m=b,ta=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-xa):m+xa,ta=C==mxConstants.ALIGN_MIDDLE?ta+(e-l)/2:C== +mxConstants.ALIGN_BOTTOM?ta+(e-l-Ga):ta+Ga;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,m,ta,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message", +B);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground= +function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", G);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(H,mxShape);H.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};H.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0, e/8,d,7*e/8);a.fillAndStroke()};H.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",H);mxUtils.extend(K,mxRectangleShape);K.prototype.size=40;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};K.prototype.paintBackground= function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=K&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};K.prototype.paintForeground= @@ -3083,128 +3088,128 @@ null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.he g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0, Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?t.prototype.fixedSize:t.prototype.size;null!=b&&(f=mxUtils.getValue(b.style, -"size",f));var g=a.x,h=a.y,k=a.width,D=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+D),new mxPoint(g,h+D),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0, -Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+D),new mxPoint(g+e,h+D),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(D,f)):D*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+D),new mxPoint(l,h+D-e),new mxPoint(g,h+D),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(D,f)):D*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(l,h+e),new mxPoint(g+ -k,h),new mxPoint(g+k,h+D-e),new mxPoint(l,h+D),new mxPoint(g,h+D-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,D=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(D,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(D,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(D,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);D=new mxPoint(D,a);d&&(c.x<f||c.x>f+ -h?D.y=c.y:D.x=c.x);return mxUtils.getPerimeterPoint(g,D,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",Q);mxUtils.extend(S,mxShape);S.prototype.size= +"size",f));var g=a.x,h=a.y,k=a.width,C=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(g+k-e,h),new mxPoint(g+k,a),new mxPoint(g+k-e,h+C),new mxPoint(g,h+C),new mxPoint(g+e,a),new mxPoint(g,h)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0, +Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+C),new mxPoint(g+e,h+C),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+C),new mxPoint(l,h+C-e),new mxPoint(g,h+C),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(C,f)):C*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(l,h+e),new mxPoint(g+ +k,h),new mxPoint(g+k,h+C-e),new mxPoint(l,h+C),new mxPoint(g,h+C-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,C=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(C,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(C,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(C,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);C=new mxPoint(C,a);d&&(c.x<f||c.x>f+ +h?C.y=c.y:C.x=c.x);return mxUtils.getPerimeterPoint(g,C,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(S,mxShape);S.prototype.size= 10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(T,mxShape);T.prototype.paintBackground= function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",T);mxUtils.extend(L,mxShape);L.prototype.inset=2;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", L);mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=20;I.prototype.jettyHeight=10;I.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,e-b),k=Math.min(h+2*b,e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d, e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",I);mxUtils.extend(M,mxCylinder);M.prototype.jettyWidth=32;M.prototype.jettyHeight=12;M.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/ 2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",M);mxUtils.extend(Z,mxRectangleShape);Z.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Z);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2* -f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",aa);mxUtils.extend(A,aa);A.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",A);mxUtils.extend(O,mxArrowConnector);O.prototype.defaultWidth=4;O.prototype.isOpenEnded=function(){return!0};O.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};O.prototype.isArrowRounded=function(){return this.isRounded}; -mxCellRenderer.registerShape("link",O);mxUtils.extend(P,mxArrowConnector);P.prototype.defaultWidth=10;P.prototype.defaultArrowWidth=20;P.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};P.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};P.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ -Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",P);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput", -W);mxUtils.extend(R,mxRectangleShape);R.prototype.dx=20;R.prototype.dy=20;R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e, -parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",R);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))); -parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",ba);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d, -e/2);a.end()};mxCellRenderer.registerShape("crossbar",ja);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, -0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth", -U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow", -fa);mxUtils.extend(da,mxActor);da.prototype.size=.1;da.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or", -ga);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ha);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a, -b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke(); -a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c); -a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5); -a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")? -a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+ -d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ua);mxUtils.extend(va,mxActor);va.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",va);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style, -"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c, -0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",pa);mxUtils.extend(ma,mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&& -(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),ma.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",ma);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"}); -return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),D=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-D/2,d.y-D/2+m/2);a.lineTo(d.x+D/2-3*m/2,d.y-3*D/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),D=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-D/2,d.y-D/2+m/2);a.lineTo(d.x+D/2-3*m/2,d.y-3*D/2-m/2);a.moveTo(d.x-m/2+D/2,d.y-D/2-m/2);a.lineTo(d.x-D/2-3*m/2,d.y-3*D/2+m/2);a.stroke()}});mxMarker.addMarker("circle", -Ha);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),D=Ha.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){D.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),D=f*(g+k+1),n=d.clone();d.x-=m;d.y-=D;return function(){a.begin();a.moveTo(n.x-D,n.y+m);a.quadTo(d.x- -D,d.y+m,d.x,d.y);a.quadTo(d.x+D,d.y-m,n.x+D,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var D= -e.clone();return function(){b.begin();b.moveTo(D.x,D.y);k?b.lineTo(D.x-f-g/a,D.y-g+f/a):b.lineTo(D.x+g/a-f,D.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ja=function(a,b,c){return qa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return N(a,b, -function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,D=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,D,h/D,m/D,l,g,d,f)})},la=function(a){return function(b){return[N(b,["arrowWidth", -"arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ea=function(a,b,c){return function(d){var e= -[N(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ia(d));return e}},ta=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[N(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style, -"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ia(f));return g}},Ka=function(a){return function(b){var c= -[N(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ia(b));return c}},ra=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b}},ia=function(a,b){return N(a, -[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)* -e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},N=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])}; -g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},xa={link:function(a){return[Ja(a,!0,10),Ja(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b, -c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale; -a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()- -a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, -Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth= -a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e, -f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< -b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c= -Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- -parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[N(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(), -b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ia(a,c/2))}return b}, -label:ra(),ext:ra(),rectangle:ra(),triangle:ra(),rhombus:ra(),umlLifeline:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var b=Math.max(F.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, -"width",F.prototype.width))),c=Math.max(1.5*F.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",F.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(F.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*F.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[N(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, -"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},cross:function(a){return[N(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width, -a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b= -[N(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},dataStorage:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size)))); -return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[N(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height- -b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, -(b.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))); -this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},internalStorage:function(a){var b=[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",R.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",R.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width, -b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ia(a));return b},module:function(a){return[N(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",I.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",I.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth= -Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy= -Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]}, -singleArrow:la(1),doubleArrow:la(.5),folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width, -b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0, -Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));return new mxPoint(a.getCenterX(), -a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ta(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ta(y.prototype.size,!0,.5,!0),curlyBracket:ta(p.prototype.size,!1),display:ta(pa.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,g.prototype.size,!0),loopLimit:Ea(.5,Y.prototype.size,!0),trapezoid:Ka(.5),parallelogram:Ka(1)};Graph.createHandle=N;Graph.handleFactory=xa;mxVertexHandler.prototype.createCustomHandles= -function(){if(this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=xa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=xa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&& -(a=mxConstants.SHAPE_CONNECTOR);a=xa[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),la=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(la),Math.sin(la)),la=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(la),Math.sin(la));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a, -d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(r=new mxPoint(r.x+k*b,r.y+l*b),e.push(r)),r=new mxPoint(r.x+m*a,r.y+n*a)):(c&&(r=new mxPoint(r.x+m*a,r.y+n*a),e.push(r)),r=new mxPoint(r.x+k*b,r.y+l*b));e.push(r)}; -var r=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Qa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)), -e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a}; -w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25, -0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0), -!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, -.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1, -0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints; -x.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style, -"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5, -1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints= -mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;ua.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;va.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style, -"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,e,c));return a};I.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",I.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",I.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, -.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c- -.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};Y.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), -new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, -0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, -0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, -1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, -0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, -.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13, -.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, -0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ca.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0, -Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1, -null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0), -!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};ba.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0), -!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};fa.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1, -parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5), -!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, -.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} +f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",aa);mxUtils.extend(fa,aa);fa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",fa);mxUtils.extend(z,mxArrowConnector);z.prototype.defaultWidth=4;z.prototype.isOpenEnded=function(){return!0};z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};z.prototype.isArrowRounded=function(){return this.isRounded}; +mxCellRenderer.registerShape("link",z);mxUtils.extend(N,mxArrowConnector);N.prototype.defaultWidth=10;N.prototype.defaultArrowWidth=20;N.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};N.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};N.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ +Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",N);mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput", +Q);mxUtils.extend(R,mxRectangleShape);R.prototype.dx=20;R.prototype.dy=20;R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e, +parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",R);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=20;X.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style, +"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",X);mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar", +ba);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+ +b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f, +g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",U);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0, +Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ga);mxUtils.extend(da,mxActor);da.prototype.size= +.1;da.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",da);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ha);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath= +function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ia);mxUtils.extend(Y,mxActor);Y.prototype.size=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d- +b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",Y);mxUtils.extend(ea,mxActor);ea.prototype.size=.375;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d, +0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",ea);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this, +arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+ +.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",V);mxUtils.extend(Aa,mxRhombus);Aa.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Aa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke(); +a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension", +Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+ +e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse", +va);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",wa);mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g, +0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",oa);mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()}; +mxCellRenderer.registerShape("display",pa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),na.prototype.origPaintEdgeShape.apply(this, +[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),C=f*(g+k+1);return function(){a.begin(); +a.moveTo(d.x-m/2-C/2,d.y-C/2+m/2);a.lineTo(d.x+C/2-3*m/2,d.y-3*C/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),C=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-C/2,d.y-C/2+m/2);a.lineTo(d.x+C/2-3*m/2,d.y-3*C/2-m/2);a.moveTo(d.x-m/2+C/2,d.y-C/2-m/2);a.lineTo(d.x-C/2-3*m/2,d.y-3*C/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ha);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),C=Ha.apply(this,arguments),n=e*(g+ +2*k),p=f*(g+2*k);return function(){C.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),C=f*(g+k+1),n=d.clone();d.x-=m;d.y-=C;return function(){a.begin();a.moveTo(n.x-C,n.y+m);a.quadTo(d.x-C,d.y+m,d.x,d.y);a.quadTo(d.x+C,d.y-m,n.x+C,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e, +f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var C=e.clone();return function(){b.begin();b.moveTo(C.x,C.y);k?b.lineTo(C.x-f-g/a,C.y-g+f/a):b.lineTo(C.x+g/a-f,C.y- +g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ja=function(a,b,c){return qa(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},qa=function(a,b,c,d,e){return O(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f- +1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,C=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,C,h/C,m/C,l,g,d,f)})},la=function(a){return function(b){return[O(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))), +d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Fa=function(a,b,c){return function(d){var e=[O(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style, +"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ja(d));return e}},ua=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[O(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+ +Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ja(f));return g}},Ka=function(a){return function(b){var c=[O(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style, +"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ja(b));return c}},ra=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(a));return b}},ja=function(a,b){return O(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style, +mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)? +this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},O=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged= +function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},sa={link:function(a){return[Ja(a,!0,10),Ja(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style, +mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]= +a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/ +5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]= +a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(qa(a, +["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]= +Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(qa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE], +!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/ +3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)- +parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[O(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]= +1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ja(a,c/2))}return b},label:ra(),ext:ra(),rectangle:ra(),triangle:ra(),rhombus:ra(),umlLifeline:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height, +parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[O(a,["width","height"],function(a){var b=Math.max(F.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",F.prototype.width))),c=Math.max(1.5*F.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",F.prototype.height))); +return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(F.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*F.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5, +(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(a));return b},cross:function(a){return[O(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]}, +note:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size))); +return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ja(a));return b},dataStorage:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width- +b.x)/a.width))})]},callout:function(a){var b=[O(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height, +a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))), +c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&b.push(ja(a));return b},internalStorage:function(a){var b=[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",R.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",R.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED, +!1)&&b.push(ja(a));return b},module:function(a){return[O(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",I.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",I.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height, +b.y-a.y))/2)})]},corner:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0, +Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:la(1),doubleArrow:la(.5),folder:function(a){return[O(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0, +Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width- +c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1, +parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height- +b.y)/a.height))})]},step:ua(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ua(y.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(pa.prototype.size,!1),cube:Fa(1,a.prototype.size,!1),card:Fa(.5,g.prototype.size,!0),loopLimit:Fa(.5,Y.prototype.size,!0),trapezoid:Ka(.5),parallelogram:Ka(1)};Graph.createHandle=O;Graph.handleFactory=sa;mxVertexHandler.prototype.createCustomHandles=function(){if(this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape; +null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=sa[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=sa[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=sa[a];return null!=a?a(this.state):null}}else Graph.createHandle= +function(){},Graph.handleFactory={};var ya=new mxPoint(1,0),za=new mxPoint(1,0),la=mxUtils.toRadians(-30),ya=mxUtils.getRotatedPoint(ya,Math.cos(la),Math.sin(la)),la=mxUtils.toRadians(-150),za=mxUtils.getRotatedPoint(za,Math.cos(la),Math.sin(la));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null== +g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ya.x,l=ya.y,m=za.x,n=za.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=r.x;var d=b-r.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(r=new mxPoint(r.x+k*b,r.y+l*b),e.push(r)),r=new mxPoint(r.x+m*a,r.y+n*a)):(c&&(r=new mxPoint(r.x+m*a,r.y+n*a),e.push(r)),r=new mxPoint(r.x+k*b,r.y+l*b));e.push(r)};var r=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y, +!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Qa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE, +mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5, +0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0), +new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0, +1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints; +f.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};g.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,.5*(c-d)));return a};h.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, +0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};R.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints; +ka.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};I.prototype.getConstraints= +function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",I.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",I.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, +.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0, +.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};Y.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0, +.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0, +.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1, +.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1, +0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1, +.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0, +.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints= +[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5, +1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1, +.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8, +.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ca.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style, +"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};X.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, +0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1, +1),!1)];U.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ga.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",U.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,e,c));return a};oa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};K.prototype.constraints=null;ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, +.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1, +.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...", function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ ": "+m.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=f;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container, @@ -3325,8 +3330,8 @@ mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);if("1"==urlParams.dev){this.addSeparator();var b=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph,d=c.getSelectionCell();c.isTableCell(d)||c.isTableRow(d)||c.isTable(d)?(b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableColumn(d, !0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableColumn(d,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{c.deleteTableColumn(d)}catch(g){this.editorUi.handleError(g)}}), null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.insertTableRow(d,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title", -mxResources.get("insertRowAfter")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.deleteTableRow(d)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow"))):this.editorUi.menus.addInsertTableItem(a,mxUtils.bind(this,function(a,b,d){b=c.createTable(b,d);a=mxEvent.isAltDown(a)?c.getFreeInsertPoint():c.getCenterInsertPoint(c.getBoundingBoxFromGeometry([b],!0));a=c.importCells([b],a.x,a.y);null!=a&&0<a.length&&(c.scrollCellToVisible(a[0]), -c.setSelectionCells(a))}))}));b.style.position="relative";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;b.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="22px",b.getElementsByTagName("img")[0].style.top="5px")}}; +mxResources.get("insertRowAfter")),b=a.addItem("",null,mxUtils.bind(this,function(){try{c.deleteTableRow(d)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow"))):this.editorUi.menus.addInsertTableItem(a,mxUtils.bind(this,function(a,b,d){b=mxEvent.isShiftDown(a)?c.createCrossFunctionalSwimlane(b,d):c.createTable(b,d);a=mxEvent.isAltDown(a)?c.getFreeInsertPoint():c.getCenterInsertPoint(c.getBoundingBoxFromGeometry([b], +!0));a=c.importCells([b],a.x,a.y);null!=a&&0<a.length&&(c.scrollCellToVisible(a[0]),c.setSelectionCells(a))}))}));b.style.position="relative";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.innerHTML='<div class="geSprite geSprite-table" style="margin-left:-2px;"></div>'+this.dropdownImageHtml;b.style.width=mxClient.IS_QUIRKS?"50px":"30px";EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="22px",b.getElementsByTagName("img")[0].style.top="5px")}}; Toolbar.prototype.addDropDownArrow=function(a,c,d,b,f,e,h,g){f=EditorUi.compactUi?f:g;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.innerHTML='<div class="geSprite '+c+'" style="margin-left:'+f+"px;margin-top:"+e+'px;"></div>'+this.dropdownImageHtml;a.style.width=mxClient.IS_QUIRKS?b+"px":b-(null!=h?h:32)+"px";mxClient.IS_QUIRKS&&(a.style.height=EditorUi.compactUi?"24px":"26px");EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top= "5px",a.style.width=mxClient.IS_QUIRKS?d+"px":d-10+"px")};Toolbar.prototype.setFontName=function(a){null!=this.fontMenu&&(this.fontMenu.innerHTML='<div style="width:60px;overflow:hidden;display:inline-block;">'+mxUtils.htmlEntities(a)+"</div>"+this.dropdownImageHtml)};Toolbar.prototype.setFontSize=function(a){null!=this.sizeMenu&&(this.sizeMenu.innerHTML='<div style="width:24px;overflow:hidden;display:inline-block;">'+a+"</div>"+this.dropdownImageHtml)}; Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style")+this.dropdownImageHtml;EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"), @@ -3400,8 +3405,8 @@ h);r.style.width="180px";k=document.createElement("td");k.appendChild(r);f.appen "checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));f.appendChild(k);l.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");f.appendChild(k);var y=document.createElement("input");y.setAttribute("type","number");y.setAttribute("value",ExportDialog.lastBorderValue);y.style.width="180px"; k=document.createElement("td");k.appendChild(y);f.appendChild(k);l.appendChild(f);e.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){w=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(r.value=Math.floor(h*a),u.value=Math.floor(g*a)):(p.value="100",r.value=h,u.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(g*a)): (p.value="100",r.value=h,u.value=g);d()});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(h*a)):(p.value="100",r.value=h,u.value=g);d()});f=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var x=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c= -m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(q.value));if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});C.className="geBtn";a.editor.cancelFirst?(k.appendChild(C),k.appendChild(x)):(k.appendChild(x), -k.appendChild(C));f.appendChild(k);l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; +m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(y.value)),g=b.background,h=Math.max(1,parseInt(q.value));if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f,h)}}));x.className="geBtn gePrimaryBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});E.className="geBtn";a.editor.cancelFirst?(k.appendChild(E),k.appendChild(x)):(k.appendChild(x), +k.appendChild(E));f.appendChild(k);l.appendChild(f);e.appendChild(l);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,c,d,b,f,e,h){var g=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(g.getSvg(b,f,e)),c,d);else{var k=g.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((e/f-k.x)/g.view.scale),Math.floor((e/f-k.y)/g.view.scale));l.scale(f/g.view.scale);(new mxImageExport).drawState(g.getView().getState(g.model.root), l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(k.width*f/g.view.scale+2*e);f=Math.ceil(k.height*f/g.view.scale+2*e);m.length<=MAX_REQUEST_SIZE&&l*f<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+l+"&h="+f+"&"+m+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}}; ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))}; @@ -3410,7 +3415,7 @@ c):null,r=function(a,b){var c=document.createElement("div");c.style.position="re "0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<l.length;c++){if(l[c]==a){m[c]=null;g.table.deleteRow(b+(null!=p?1:0));break}null!=m[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},h=function(a,b,c){l[a]=b;m[a]=g.addTextarea(l[n]+":",c,2);m[a].style.width="100%";0<c.indexOf("\n")&&m[a].setAttribute("rows","2");r(m[a],b)},u=[],v=f.getModel().getParent(c)== f.getModel().getRoot(),q=0;q<k.length;q++)!v&&"label"==k[q].nodeName||"placeholders"==k[q].nodeName||u.push({name:k[q].nodeName,value:k[q].nodeValue});u.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});null!=p&&(k=document.createElement("div"),k.style.width="100%",k.style.fontSize="11px",k.style.textAlign="center",mxUtils.write(k,p),g.addField(mxResources.get("id")+":",k));for(q=0;q<u.length;q++)h(n,u[q].name,u[q].value),n++;h=document.createElement("div");h.style.cssText="position:absolute;left:30px;right:30px;overflow-y:auto;top:30px;bottom:80px;"; h.appendChild(g.table);u=document.createElement("div");u.style.boxSizing="border-box";u.style.paddingRight="160px";u.style.whiteSpace="nowrap";u.style.marginTop="6px";u.style.width="100%";var w=document.createElement("input");w.setAttribute("placeholder",mxResources.get("enterPropertyName"));w.setAttribute("type","text");w.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");w.style.boxSizing="border-box";w.style.marginLeft="2px";w.style.width="100%";u.appendChild(w);h.appendChild(u);b.appendChild(h); -var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);r(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(E){mxUtils.alert(E)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= +var t=mxUtils.button(mxResources.get("addProperty"),function(){var a=w.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(l,a);if(0<=b&&null!=m[b])m[b].focus();else{e.cloneNode(!1).setAttribute(a,"");0<=b&&(l.splice(b,1),m.splice(b,1));l.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";m.push(c);r(c,a);c.focus()}t.setAttribute("disabled","disabled");w.value=""}catch(D){mxUtils.alert(D)}else mxUtils.alert(mxResources.get("invalidName"))});this.init= function(){0<m.length?m[0].focus():w.focus()};t.setAttribute("title",mxResources.get("addProperty"));t.setAttribute("disabled","disabled");t.style.textOverflow="ellipsis";t.style.position="absolute";t.style.overflow="hidden";t.style.width="144px";t.style.right="0px";t.className="geBtn";u.appendChild(t);h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments); e=e.cloneNode(!0);for(var b=!1,d=0;d<l.length;d++)null==m[d]?e.removeAttribute(l[d]):(e.setAttribute(l[d],m[d].value),b=b||"placeholder"==l[d]&&"1"==e.getAttribute("placeholders"));b&&e.removeAttribute("label");f.getModel().setValue(c,e)}catch(B){mxUtils.alert(B)}});u.className="geBtn gePrimaryBtn";mxEvent.addListener(w,"keyup",d);mxEvent.addListener(w,"change",d);k=document.createElement("div");k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)|| a.editor.graph.getModel().isEdge(c)){v=document.createElement("span");v.style.marginRight="10px";q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="6px";"1"==e.getAttribute("placeholders")&&(q.setAttribute("checked","checked"),q.defaultChecked=!0);mxEvent.addListener(q,"click",function(){"1"==e.getAttribute("placeholders")?e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")});v.appendChild(q);mxUtils.write(v,mxResources.get("placeholders"));if(null!= @@ -8474,9 +8479,9 @@ DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveR DrawioFile.prototype.synchronizeFile=function(a,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,d):this.updateFile(a,d)}; DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=g?this.mergeFile(g,a,d,b):this.reloadFile(a,d))}catch(f){null!=d&&d(f)}}),d))}; DrawioFile.prototype.mergeFile=function(a,d,c,b){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var l=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(l)){var n=this.ui.patchPages(f, -l[0]);b={};var t=this.ui.getHashValueForPages(n,b),f={},e=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",e==t,t);if(null!=t&&t!=e){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,l,"Shadow Details: "+JSON.stringify(b)+ -"\nChecksum: "+t+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=c&&c(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var q=this.getCurrentUser(),z=null!=q?q.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,x)}}catch(C){}}}; +l[0]);b={};var t=this.ui.getHashValueForPages(n,b),f={},e=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",e==t,t);if(null!=t&&t!=e){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),q=this.ui.hashValue(a.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,l,"Shadow Details: "+JSON.stringify(b)+ +"\nChecksum: "+t+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+q+"\nTo: "+u+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); +null!=c&&c(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),z=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),z,y)}}catch(B){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);c.appendChild(g)}return mxUtils.getPrettyXml(c)}; DrawioFile.prototype.compressReportData=function(a,d,c){d=null!=d?d:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a}; DrawioFile.prototype.checksumError=function(a,d,c,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), @@ -8549,23 +8554,23 @@ StorageFile.listFiles=function(a,d,c,b){a.getDatabaseItems(function(a){var b=[]; StorageLibrary.prototype.isRenamable=function(a,d,c){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(a,d,c){DrawioFile.call(this,a,d);this.title=c;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(a,d,c){RemoteFile.call(this,a,d,c.title);this.libObj=c};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(a,d,c){}; RemoteLibrary.prototype.saveAs=function(a,d,c){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(a,d,c){StorageFile.call(this,a,d,c);a=c;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,c){return!1};UrlLibrary.prototype.saveAs=function(a,d,c){};UrlLibrary.prototype.open=function(){};/* mxClient.IS_IOS || */ -var StorageDialog=function(a,d,c){function b(b,p,q,f,g,u){function k(){mxEvent.addListener(B,"click",null!=u?u:function(){q!=App.MODE_GOOGLE||a.isDriveDomain()?q==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,n.checked);d()})):q==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(q,n.checked); -d()})):(a.setMode(q,n.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>c&&(mxUtils.br(e),t=0);var B=document.createElement("a");B.style.overflow="hidden";B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.className="geBaseButton";B.style.boxSizing="border-box";B.style.fontSize="11px";B.style.position="relative";B.style.margin="4px";B.style.marginTop="2px";B.style.padding="8px 10px 12px 10px";B.style.width="88px";B.style.height=StorageDialog.extended?"50px": -"100px";B.style.whiteSpace="nowrap";B.setAttribute("title",p);mxClient.IS_QUIRKS&&(B.style.cssFloat="left",B.style.zoom="1");var A=document.createElement("div");A.style.textOverflow="ellipsis";A.style.overflow="hidden";if(null!=b){var y=document.createElement("img");y.setAttribute("src",b);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width=StorageDialog.extended?"24px":"60px";y.style.height=StorageDialog.extended?"24px":"60px";y.style.paddingBottom=StorageDialog.extended? -"4px":"6px";B.appendChild(y)}else A.style.paddingTop="5px",A.style.whiteSpace="normal",mxClient.IS_IOS?(B.style.padding="0px 10px 20px 10px",B.style.top="6px"):mxClient.IS_FF&&(A.style.paddingTop="0px",A.style.marginTop="-2px");StorageDialog.extended&&(B.style.paddingTop="4px",B.style.marginBottom="0px",A.display="inline-block",2==c&&(y.style.width="38px",y.style.height="38px",B.style.width="80px",B.style.height="68px"));B.appendChild(A);mxUtils.write(A,p);if(null!=g)for(b=0;b<g.length;b++)mxUtils.br(A), -mxUtils.write(A,g[b]);if(null!=f&&null==a[f]){y.style.visibility="hidden";mxUtils.setOpacity(A,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(B);var l=window.setTimeout(function(){null==a[f]&&(v.stop(),B.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,e){null!=a[f]&&e.getProperty("client")==a[f]&&(window.clearTimeout(l),mxUtils.setOpacity(A, -100),y.style.visibility="",v.stop(),k(),"drive"==f&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else k();e.appendChild(B)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=a.addLanguageMenu(g,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title", +var StorageDialog=function(a,d,c){function b(b,p,f,q,v,u){function g(){mxEvent.addListener(C,"click",null!=u?u:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked);d()})):f==App.MODE_ONEDRIVE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.oneDrive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,n.checked); +d()})):(a.setMode(f,n.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}++t>c&&(mxUtils.br(e),t=0);var C=document.createElement("a");C.style.overflow="hidden";C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.className="geBaseButton";C.style.boxSizing="border-box";C.style.fontSize="11px";C.style.position="relative";C.style.margin="4px";C.style.marginTop="2px";C.style.padding="8px 10px 12px 10px";C.style.width="88px";C.style.height=StorageDialog.extended?"50px": +"100px";C.style.whiteSpace="nowrap";C.setAttribute("title",p);mxClient.IS_QUIRKS&&(C.style.cssFloat="left",C.style.zoom="1");var A=document.createElement("div");A.style.textOverflow="ellipsis";A.style.overflow="hidden";if(null!=b){var x=document.createElement("img");x.setAttribute("src",b);x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width=StorageDialog.extended?"24px":"60px";x.style.height=StorageDialog.extended?"24px":"60px";x.style.paddingBottom=StorageDialog.extended? +"4px":"6px";C.appendChild(x)}else A.style.paddingTop="5px",A.style.whiteSpace="normal",mxClient.IS_IOS?(C.style.padding="0px 10px 20px 10px",C.style.top="6px"):mxClient.IS_FF&&(A.style.paddingTop="0px",A.style.marginTop="-2px");StorageDialog.extended&&(C.style.paddingTop="4px",C.style.marginBottom="0px",A.display="inline-block",2==c&&(x.style.width="38px",x.style.height="38px",C.style.width="80px",C.style.height="68px"));C.appendChild(A);mxUtils.write(A,p);if(null!=v)for(b=0;b<v.length;b++)mxUtils.br(A), +mxUtils.write(A,v[b]);if(null!=q&&null==a[q]){x.style.visibility="hidden";mxUtils.setOpacity(A,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(C);var l=window.setTimeout(function(){null==a[q]&&(k.stop(),C.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(b,e){null!=a[q]&&e.getProperty("client")==a[q]&&(window.clearTimeout(l),mxUtils.setOpacity(A, +100),x.style.visibility="",k.stop(),g(),"drive"==q&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else g();e.appendChild(C)}c=null!=c?c:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var f=a.addLanguageMenu(g,!0);null!=f&&(f.style.bottom=parseInt("28px")-3+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title", mxResources.get("help"));f.setAttribute("target","_blank");f.style.position="absolute";f.style.userSelect="none";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var k=document.createElement("img");mxUtils.setOpacity(k,50);k.style.height="16px";k.style.width="16px";k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";f.appendChild(k); mxUtils.write(f,mxResources.get("help"));g.appendChild(f)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";l.style.bottom="28px";l.style.color="gray";l.style.userSelect="none";mxUtils.write(l,mxResources.get("decideLater"));mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");l.style.left="50%";this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};g.appendChild(l); mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=b});f=document.createElement("div");mxClient.IS_QUIRKS&&(f.style.whiteSpace="nowrap",f.style.cssFloat="left");f.style.border="1px solid #d3d3d3";f.style.borderWidth="1px 0px 1px 0px";f.style.padding="12px 0px 12px 0px";var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked= !0;var t=0,e=document.createElement("div");e.style.paddingTop="2px";f.appendChild(e);var m=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop="4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);var p=function(){t=0;"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE, "drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");b(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX, -"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(f);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";if(!a.isOfflineApp()){var v=document.createElement("a");v.style.color="gray";v.style.fontSize="12px";v.style.cursor="pointer"; -v.style.userSelect="none";mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(v);k.appendChild(u);mxEvent.addListener(v,"click",function(a){e.innerHTML="";v.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(v,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var q=document.createElement("span");q.style.color="gray";q.style.fontSize= -"12px";q.style.userSelect="none";mxUtils.write(q," "+mxResources.get("rememberThisSetting"));k.appendChild(q);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.maxWidth="170px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");z.appendChild(x);for(x=0;x<u.length;x++)(function(a){var b= -a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");z.appendChild(e)})(u[x]);k.appendChild(z);mxEvent.addListener(z,"change",function(b){""!=z.value&&a.loadFile(z.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px", -x=document.createElement("a"),x.style.cursor="pointer",x.style.fontSize="12px",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(x,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&& -(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(x),k.appendChild(u),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(q,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&& +"dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(f);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var q=document.createElement("div");q.style.marginBottom="10px";if(!a.isOfflineApp()){var u=document.createElement("a");u.style.color="gray";u.style.fontSize="12px";u.style.cursor="pointer"; +u.style.userSelect="none";mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");q.appendChild(u);k.appendChild(q);mxEvent.addListener(u,"click",function(a){e.innerHTML="";u.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(u,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var v=document.createElement("span");v.style.color="gray";v.style.fontSize= +"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));k.appendChild(v);mxUtils.br(k);q=a.getRecent();if(!a.isOfflineApp()&&null!=q&&0<q.length){var z=document.createElement("select");z.style.marginTop="8px";z.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");z.appendChild(y);for(y=0;y<q.length;y++)(function(a){var b= +a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");z.appendChild(e)})(q[y]);k.appendChild(z);mxEvent.addListener(z,"change",function(b){""!=z.value&&a.loadFile(z.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(q=document.createElement("div"),q.style.marginBottom="10px",q.style.padding="18px 0px 6px 0px", +y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&& +(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),q.appendChild(y),k.appendChild(q),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(v,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&& (m.style.padding="8px",m.style.fontSize="9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g};StorageDialog.extended=!1; var SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";var c=a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px"; c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));d.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img"); @@ -8582,30 +8587,30 @@ mxEvent.addListener(c,"click",function(){a.hideDialog(!1);a.setMode(null);a.clea f.style.color="gray";mxUtils.write(f,a.formatFileSize(d.length));b.appendChild(f);var l=document.createElement("textarea");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument"); b.appendChild(l);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>d.length?(l.value=d,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};f=document.createElement("div");f.style.position="absolute";f.style.bottom="36px";f.style.right="32px";var n=null;!EmbedDialog.showPreviewOption|| mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(n=mxUtils.button(mxResources.get(5E5>d.length?"preview":"openInNewWindow"),function(){var b=5E5>d.length?l.value:d;if(null!=g)g(b);else if(k)try{var e=a.openLink(b);null!=e&&(null==c||0<c)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=b.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}), -c||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",f.appendChild(n));if(!k||7500<d.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog(); +c||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var f=window.open(),f=null!=f?f.document:null;null!=f?(f.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>"),f.close()):a.handleError({message:mxResources.get("errorUpdatingPreview")})}}),n.className="geBtn",f.appendChild(n));if(!k||7500<d.length){var t=mxUtils.button(mxResources.get("download"),function(){a.hideDialog(); a.saveData("embed.txt","txt",d,"text/plain")});t.className="geBtn";f.appendChild(t)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var e=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border", "0");e.appendChild(t);e.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");e.style.verticalAlign="bottom";e.style.paddingTop="4px";e.style.minWidth="46px";e.className="geBtn";f.appendChild(e)}7168>d.length&&(e=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}), t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",e.appendChild(t),e.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",f.appendChild(e))}t=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.appendChild(t);e=mxUtils.button(mxResources.get("copy"), function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>d.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(f.appendChild(e),e.className="geBtn gePrimaryBtn",t.className="geBtn"):(f.appendChild(n),t.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b}; EmbedDialog.showPreviewOption=!0; -var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(A.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(v.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(y.checked?"1":"0"); -b+="&resize="+(C.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!= +var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(A.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<E.length&&(b+="&s="+E);""!=q.value&&"0"!=q.value&&(b+="&border="+q.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(x.checked?"1":"0"); +b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));t.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!= a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(e.value),b+="&height="+a),t.value=b):t.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),k=g.view.scale,l=Math.floor(f.x/k-g.view.translate.x),n=Math.floor(f.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px"; b.appendChild(t);mxUtils.br(b);this.init=function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=l;b.appendChild(e);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type", "text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(f.height/k);b.appendChild(m);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=d||""; -b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);mxUtils.br(b);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";b.appendChild(v);mxUtils.write(b,mxResources.get("pan")+" ");var q=document.createElement("input"); -q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";b.appendChild(q);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);mxUtils.write(b,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b, -mxResources.get("asNew")+" ");mxUtils.br(b);var C=document.createElement("input");C.setAttribute("type","checkbox");C.setAttribute("checked","checked");C.defaultChecked=!0;C.style.marginLeft="16px";b.appendChild(C);mxUtils.write(b,mxResources.get("resize")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft= -"8px";b.appendChild(A);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(v,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(C,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(p,"change",c);c(); +b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","3");q.style.marginBottom="8px";q.style.marginLeft="4px";q.value="0";b.appendChild(q);mxUtils.br(b);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";b.appendChild(u);mxUtils.write(b,mxResources.get("pan")+" ");var v=document.createElement("input"); +v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);b.appendChild(z);mxUtils.write(b,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";b.appendChild(y);mxUtils.write(b, +mxResources.get("asNew")+" ");mxUtils.br(b);var B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";b.appendChild(B);mxUtils.write(b,mxResources.get("resize")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft= +"8px";b.appendChild(A);mxUtils.write(b,mxResources.get("embed")+" ");var E=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(p,"change",c);c(); mxEvent.addListener(t,"click",function(){t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){var b=document.createElement("div");b.style.textAlign= "right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);b.appendChild(d);var f=new Graph(d);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";f.cellRenderer.installCellOverlayListeners= function(a,b,e){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(e.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchstart",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop= !1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),n=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,e){f.connectionHandler.reset();f.clearSelection();var c=f.getCellGeometry(a),d;m(function(){d=f.insertVertex(l,null,"Entry",c.x,c.y,80,30,"rounded=1;");n(d);f.view.refresh(d); f.insertEdge(l,null,"",a,d,k)},function(){f.scrollCellToVisible(d)})});b.addListener("pointerdown",function(a,b){var e=b.getProperty("event"),c=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var d=mxUtils.convertPoint(f.container,mxEvent.getClientX(e),mxEvent.getClientY(e));f.connectionHandler.start(c,d.x,d.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(e);mxEvent.consume(e)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var t;try{t=f.insertVertex(l,null,"Start", 0,0,80,30,"ellipse"),n(t)}finally{f.getModel().endUpdate()}var e;"horizontalTree"==c?(e=new mxCompactTreeLayout(f),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==c?(e=new mxCompactTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==c?(e=new mxRadialTreeLayout(f,!1),e.edgeRouting=!1,e.levelDistance=80):"verticalFlow"==c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"== -c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(e=new mxFastOrganicLayout(f,!1),e.forceConstant=80):"circle"==c&&(e=new mxCircleLayout(f));if(null!=e){var m=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),e.execute(f.getDefaultParent(),t)}catch(C){throw C;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= -function(a,b,e,c,d){p.apply(this,arguments);m()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&b.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays(); -var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(u)};this.container=b}; +c?e=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==c?(e=new mxFastOrganicLayout(f,!1),e.forceConstant=80):"circle"==c&&(e=new mxCircleLayout(f));if(null!=e){var m=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),e.execute(f.getDefaultParent(),t)}catch(B){throw B;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect= +function(a,b,e,c,d){p.apply(this,arguments);m()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var q=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});q.className="geBtn";a.editor.cancelFirst&&b.appendChild(q);var u=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays(); +var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);null!=d.parentNode&&(f.destroy(),d.parentNode.removeChild(d));a.hideDialog()});b.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(q)};this.container=b}; CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==": IMAGE_PATH+"/handle-connect.png",26,26); var BackgroundImageDialog=function(a,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";c.appendChild(b);mxUtils.write(c,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(c);var b=a.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value= @@ -8619,15 +8624,15 @@ e.className="geBtn";b.appendChild(e);null!=a.drive&&"1"==urlParams.photos&&(e=mx e.className="geBtn",b.appendChild(e))}e=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=g.value?new mxImage(mxUtils.trim(g.value),l.value,n.value):null)});e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(t);c.appendChild(b);this.container=c},ParseDialog=function(a,d,c){function b(b,e){var c=b.split("\n");if("plantUmlPng"==e||"plantUmlSvg"==e||"plantUmlTxt"==e){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=a.editor.graph, m="plantUmlTxt"==e?"txt":"plantUmlPng"==e?"png":"svg";a.generatePlantUmlImage(b,m,function(e,c,p){a.spinner.stop();var q=null;d.getModel().beginUpdate();try{q="txt"==m?a.insertAsPreText(e,f.x,f.y):d.insertVertex(null,null,null,f.x,f.y,c,p,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e)+";"),d.setAttributeForCell(q,"plantUmlData",JSON.stringify({data:b,format:m},null,2))}finally{d.getModel().endUpdate()}null!=q&&(d.setSelectionCell(q),d.scrollCellToVisible(q))}, function(b){a.handleError(b)})}}else if("mermaid"==e)a.spinner.spin(document.body,mxResources.get("inserting"))&&(d=a.editor.graph,a.generateMermaidImage(b,m,function(e,c,m){a.spinner.stop();var p=null;d.getModel().beginUpdate();try{p=d.insertVertex(null,null,null,f.x,f.y,c,m,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+e+";"),d.setAttributeForCell(p,"mermaidData",JSON.stringify({data:b,config:EditorUi.defaultMermaidConfig},null,2))}finally{d.getModel().endUpdate()}null!=p&&(d.setSelectionCell(p), -d.scrollCellToVisible(p))},function(b){a.handleError(b)}));else if("table"==e){for(var p=null,g=[],u=0,k=0;k<c.length;k++){var l=mxUtils.trim(c[k]);if("create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),p=new mxCell(l,new mxGeometry(u,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), -p.vertex=!0,g.push(p),l=a.editor.graph.getPreferredSizeForCell(B),null!=l&&(p.geometry.width=l.width+10);else if(null!=p&&")"==l.charAt(0))u+=p.geometry.width+40,p=null;else if("("!=l&&null!=p&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var n=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),B=new mxCell(l,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); -B.vertex=!0;l=sb.cloneCell(B,0<n?"PK":"");l.connectable=!1;l.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";l.geometry.width=30;l.geometry.height=26;B.insert(l);l=a.editor.graph.getPreferredSizeForCell(B);null!=l&&p.geometry.width<l.width+10&&(p.geometry.width=Math.min(220,l.width+10));p.insert(B);p.geometry.height+=26}}0<g.length&&(d=a.editor.graph, -k=d.view,c=d.getGraphBounds(),d.setSelectionCells(d.importCells(g,Math.ceil(Math.max(0,c.x/k.scale-k.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(c.y+c.height)/k.scale-k.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==e){if(0<c.length){d=a.editor.graph;B=null;g=[];for(k=p=0;k<c.length;k++)";"!=c[k].charAt(0)&&(0==c[k].length?B=null:null==B?(B=new mxCell(c[k],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), -B.vertex=!0,g.push(B),l=d.getPreferredSizeForCell(B),null!=l&&B.geometry.width<l.width+10&&(B.geometry.width=l.width+10),p+=B.geometry.width+40):"--"==c[k]?(l=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),l.vertex=!0,B.geometry.height+=l.geometry.height,B.insert(l)):0<c[k].length&&(u=new mxCell(c[k],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -u.vertex=!0,l=d.getPreferredSizeForCell(u),null!=l&&u.geometry.width<l.width&&(u.geometry.width=l.width),B.geometry.width=Math.max(B.geometry.width,u.geometry.width),B.geometry.height+=u.geometry.height,B.insert(u)));if(0<g.length){d.getModel().beginUpdate();try{g=d.importCells(g,f.x,f.y);l=[];for(k=0;k<g.length;k++)l.push(g[k]),l=l.concat(g[k].children);d.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{d.getModel().endUpdate()}d.setSelectionCells(g);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var B= -function(a){var b=G[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,G[a]=b,g.push(b));return b},G={},g=[],k=0;k<c.length;k++)if(";"!=c[k].charAt(0)){var t=c[k].split("->");if(2<=t.length){var n=B(t[0]),H=B(t[t.length-1]),t=new mxCell(2<t.length?t[1]:"",new mxGeometry);t.edge=!0;n.insertEdge(t,!0);H.insertEdge(t,!1);g.push(t)}}if(0<g.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);d=new Graph(c);d.getModel().beginUpdate(); -try{g=d.importCells(g);for(k=0;k<g.length;k++)d.getModel().isVertex(g[k])&&(l=d.getPreferredSizeForCell(g[k]),g[k].geometry.width=Math.max(g[k].geometry.width,l.width),g[k].geometry.height=Math.max(g[k].geometry.height,l.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());u=new mxParallelEdgeLayout(d);u.spacing=20;u.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();l=[];a.editor.graph.getModel().beginUpdate(); -try{l=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",l))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(l);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();c.parentNode.removeChild(c)}}}function g(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String": +d.scrollCellToVisible(p))},function(b){a.handleError(b)}));else if("table"==e){for(var p=null,q=[],g=0,A=0;A<c.length;A++){var k=mxUtils.trim(c[A]);if("create table"==k.substring(0,12).toLowerCase())k=mxUtils.trim(k.substring(12)),"("==k.charAt(k.length-1)&&(k=k.substring(0,k.lastIndexOf(" "))),p=new mxCell(k,new mxGeometry(g,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"), +p.vertex=!0,q.push(p),k=a.editor.graph.getPreferredSizeForCell(C),null!=k&&(p.geometry.width=k.width+10);else if(null!=p&&")"==k.charAt(0))g+=p.geometry.width+40,p=null;else if("("!=k&&null!=p&&(k=k.substring(0,","==k.charAt(k.length-1)?k.length-1:k.length),"primary key"!=k.substring(0,11).toLowerCase())){var l=k.toLowerCase().indexOf("primary key"),k=k.replace(/primary key/i,""),C=new mxCell(k,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;"); +C.vertex=!0;k=sb.cloneCell(C,0<l?"PK":"");k.connectable=!1;k.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";k.geometry.width=30;k.geometry.height=26;C.insert(k);k=a.editor.graph.getPreferredSizeForCell(C);null!=k&&p.geometry.width<k.width+10&&(p.geometry.width=Math.min(220,k.width+10));p.insert(C);p.geometry.height+=26}}0<q.length&&(d=a.editor.graph, +A=d.view,c=d.getGraphBounds(),d.setSelectionCells(d.importCells(q,Math.ceil(Math.max(0,c.x/A.scale-A.translate.x)+4*d.gridSize),Math.ceil(Math.max(0,(c.y+c.height)/A.scale-A.translate.y)+4*d.gridSize))),d.scrollCellToVisible(d.getSelectionCell()))}else if("list"==e){if(0<c.length){d=a.editor.graph;C=null;q=[];for(A=p=0;A<c.length;A++)";"!=c[A].charAt(0)&&(0==c[A].length?C=null:null==C?(C=new mxCell(c[A],new mxGeometry(p,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"), +C.vertex=!0,q.push(C),k=d.getPreferredSizeForCell(C),null!=k&&C.geometry.width<k.width+10&&(C.geometry.width=k.width+10),p+=C.geometry.width+40):"--"==c[A]?(k=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),k.vertex=!0,C.geometry.height+=k.geometry.height,C.insert(k)):0<c[A].length&&(g=new mxCell(c[A],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +g.vertex=!0,k=d.getPreferredSizeForCell(g),null!=k&&g.geometry.width<k.width&&(g.geometry.width=k.width),C.geometry.width=Math.max(C.geometry.width,g.geometry.width),C.geometry.height+=g.geometry.height,C.insert(g)));if(0<q.length){d.getModel().beginUpdate();try{q=d.importCells(q,f.x,f.y);k=[];for(A=0;A<q.length;A++)k.push(q[A]),k=k.concat(q[A].children);d.fireEvent(new mxEventObject("cellsInserted","cells",k))}finally{d.getModel().endUpdate()}d.setSelectionCells(q);d.scrollCellToVisible(d.getSelectionCell())}}}else{for(var C= +function(a){var b=n[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,n[a]=b,q.push(b));return b},n={},q=[],A=0;A<c.length;A++)if(";"!=c[A].charAt(0)){var G=c[A].split("->");if(2<=G.length){var l=C(G[0]),J=C(G[G.length-1]),G=new mxCell(2<G.length?G[1]:"",new mxGeometry);G.edge=!0;l.insertEdge(G,!0);J.insertEdge(G,!1);q.push(G)}}if(0<q.length){c=document.createElement("div");c.style.visibility="hidden";document.body.appendChild(c);d=new Graph(c);d.getModel().beginUpdate(); +try{q=d.importCells(q);for(A=0;A<q.length;A++)d.getModel().isVertex(q[A])&&(k=d.getPreferredSizeForCell(q[A]),q[A].geometry.width=Math.max(q[A].geometry.width,k.width),q[A].geometry.height=Math.max(q[A].geometry.height,k.height));p=new mxFastOrganicLayout(d);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(d.getDefaultParent());g=new mxParallelEdgeLayout(d);g.spacing=20;g.execute(d.getDefaultParent())}finally{d.getModel().endUpdate()}d.clearCellOverlays();k=[];a.editor.graph.getModel().beginUpdate(); +try{k=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",k))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(k);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());d.destroy();c.parentNode.removeChild(c)}}}function g(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String": "mermaid"==l.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==l.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": "plantUmlSvg"==l.value||"plantUmlTxt"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();d=document.createElement("div");d.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height= "354px";k.style.marginBottom="16px";var l=document.createElement("select");if("formatSql"==c||"mermaid"==c)l.style.display="none";var n=document.createElement("option");n.setAttribute("value","list");mxUtils.write(n,mxResources.get("list"));"plantUml"!=c&&l.appendChild(n);null!=c&&"fromText"!=c||n.setAttribute("selected","selected");n=document.createElement("option");n.setAttribute("value","table");mxUtils.write(n,mxResources.get("formatSql"));"formatSql"==c&&(l.appendChild(n),n.setAttribute("selected", @@ -8635,43 +8640,43 @@ try{l=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()), c&&n.setAttribute("selected","selected");var t=document.createElement("option");t.setAttribute("value","plantUmlPng");mxUtils.write(t,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(l.appendChild(n),l.appendChild(t),l.appendChild(e));var m=g();k.value= m;d.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));d.appendChild(l);mxEvent.addListener(l,"change",function(){var a=g();if(0==k.value.length||k.value==m)m=a,k.value=m}); a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);t=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog(); -b(k.value,l.value)});d.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,u,v,q,z){function x(){var a=!0;if(null!=S)for(;H<S.length&&(a||0!=mxUtils.mod(H,30));){var b=S[H++],b=A(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function C(){if(Y)c||a.hideDialog(),u(Y,aa,I.value);else if(b)c||a.hideDialog(),b(fa,I.value); -else{var e=I.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,fa,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function y(a,b,e,c,d,m){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");F.removeAttribute("disabled");fa=b;W=e;ga=m;ba=a;Y=c;aa=d;ba.style.backgroundColor=l;ba.style.border=n}function A(b,e,c,d, -m,p,q,f,g,u,k){var B=document.createElement("div");B.className="geTemplate";B.style.height=Z+"px";B.style.width=da+"px";null!=c?B.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&B.setAttribute("title",d);if(null!=p)B.style.backgroundImage="url("+p+")",B.style.backgroundSize="contain",B.style.backgroundPosition="center center",B.style.backgroundRepeat="no-repeat",mxEvent.addListener(B,"click",function(a){y(B,null,null,b,q,k)}),mxEvent.addListener(B,"dblclick",function(a){C()}); -else if(!u&&null!=b&&0<b.length){d=g||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";B.style.backgroundImage="url("+d+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";null!=c&&(B.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+ -(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var A=!1;mxEvent.addListener(B,"click",function(c){F.setAttribute("disabled","disabled");B.style.backgroundColor="transparent";B.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;J.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){J.stop();200<=a.getStatus()&&299>=a.getStatus()&&(y(B,a.getText(),e,null,null,k),A&&C())}))}); -mxEvent.addListener(B,"dblclick",function(a){A=!0})}else B.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",m&&y(B),null!=f?mxEvent.addListener(B,"click",f):(mxEvent.addListener(B,"click",function(a){y(B,null, -null,b,q)}),mxEvent.addListener(B,"dblclick",function(a){C()}));P.appendChild(B);return B}function E(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e]; -18<b.length&&(b=b.substring(0,18)+"…");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=t&&(c.style.padding=t);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",H=0,S=M[b],N=null,x())})})(e, -c)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ca.appendChild(b)}for(e in Q)c=document.createElement("div"),b=mxResources.get(e),d=Q[e],null==b&&(b=e.substring(0,1).toUpperCase()+e.substring(1)),18<b.length&&(b=b.substring(0,18)+"…"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;", -c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=t&&(c.style.padding=t),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",H=0,S=Q[b],N=null,x())})}(e,c);x()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme? -"1px dotted rgb(235, 242, 249)":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";c&&D.appendChild(B);var G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg": -a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&c&&B.appendChild(G);c&&mxUtils.write(B,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"): -mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var I=document.createElement("input");I.setAttribute("value",a.defaultFilename+ -G);I.style.marginLeft="10px";I.style.width=d?"220px":"430px";this.init=function(){c&&(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?I.select():document.execCommand("selectAll",!1,null))};c&&(B.appendChild(I),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,I,a.editor.fileExtensions),G.style.marginTop="12px",B.appendChild(G)));var B=!1,H=0,J=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1, -hwaccel:!1,top:"40%",zIndex:2E9}),F=mxUtils.button(q||mxResources.get("create"),function(){F.setAttribute("disabled","disabled");C();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||p){var K=[],N=null,R=null,X=null,U=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},B=!0;q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="30px";D.appendChild(q);G=mxUtils.button(mxResources.get("Templates", -null,"Templates"),function(){ca.style.display="";P.style.left="160px";U(0);P.scrollTop=0;P.innerHTML="";H=0;N!=S&&(S=N,Q=R,ea=X,ca.innerHTML="",E(),N=null)});K.push(G);q.appendChild(G);var L=function(a){ca.style.display="none";P.style.left="30px";U(a?-1:1);null==N&&(N=S);P.scrollTop=0;P.innerHTML="";J.spin(P);var b=function(a,b,e){H=0;J.stop();S=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams", -null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;Q={"draw.io":a};for(d in e)Q[d]=e[d];E()}else x()};a?p(V.value,b):m(b)};m&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),q.appendChild(G),K.push(G));if(p){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");q.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px"; -V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});q.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";q.appendChild(G)}U(0)}var W=null,ga=null,fa=null,ba=null,Y=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";B=(c?72:40)+(B?30:0);P.style.top=B+"px";P.style.bottom="68px";P.style.margin= -"6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ca=document.createElement("div");ca.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Z=140,da=140,Q={},M={},ea=0,T=!0;Q.basic=[{title:"blankDiagram",select:!0}];var S=Q.basic;if(!d){var ha=function(){mxUtils.get(O,function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"== -a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],m=0;m<c.length;m++)d.push(encodeURIComponent(mxUtils.getTextContent(c[m])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else e=a.getAttribute("url"),null!=e&&(c=a.getAttribute("section"),null==c&&(c=e.indexOf("/"),c=e.substring(0,c)),e=Q[c],null==e&&(e=[],Q[c]=e),c=a.getAttribute("clibs"),null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"), -preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}J.stop();E()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,O=e;/^https?:\/\//.test(O)&&!a.editor.isCorsEnabledForUrl(O)&&(O=PROXY_URL+"?url="+encodeURIComponent(O));J.spin(P);null!=z?z(function(a,b){M=a;X=ea=b;ha()},ha):ha();R=Q}mxEvent.addListener(I,"keypress",function(b){a.dialog.container.firstChild==D&&13==b.keyCode&&C()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position= +b(k.value,l.value)});d.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,q,u,v,z){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));){var b=S[J++],b=A(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function B(){if(X)c||a.hideDialog(),q(X,aa,G.value);else if(b)c||a.hideDialog(),b(fa,G.value); +else{var e=G.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,fa,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function x(a,b,e,c,d,m){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");F.removeAttribute("disabled");fa=b;W=e;ga=m;ba=a;X=c;aa=d;ba.style.backgroundColor=l;ba.style.border=n}function A(b,e,c,d, +m,p,f,q,g,u,C){var k=document.createElement("div");k.className="geTemplate";k.style.height=Z+"px";k.style.width=da+"px";null!=c?k.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&k.setAttribute("title",d);if(null!=p)k.style.backgroundImage="url("+p+")",k.style.backgroundSize="contain",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",mxEvent.addListener(k,"click",function(a){x(k,null,null,b,f,C)}),mxEvent.addListener(k,"dblclick",function(a){B()}); +else if(!u&&null!=b&&0<b.length){d=g||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";k.style.backgroundImage="url("+d+")";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";null!=c&&(k.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+ +(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var v=!1;mxEvent.addListener(k,"click",function(c){F.setAttribute("disabled","disabled");k.style.backgroundColor="transparent";k.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;I.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(x(k,a.getText(),e,null,null,C),v&&B())}))}); +mxEvent.addListener(k,"dblclick",function(a){v=!0})}else k.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",m&&x(k),null!=q?mxEvent.addListener(k,"click",q):(mxEvent.addListener(k,"click",function(a){x(k,null, +null,b,f)}),mxEvent.addListener(k,"dblclick",function(a){B()}));P.appendChild(k);return k}function E(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e]; +18<b.length&&(b=b.substring(0,18)+"…");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=t&&(c.style.padding=t);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=M[b],O=null,y())})})(e, +c)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ca.appendChild(b)}for(e in R)c=document.createElement("div"),b=mxResources.get(e),d=R[e],null==b&&(b=e.substring(0,1).toUpperCase()+e.substring(1)),18<b.length&&(b=b.substring(0,18)+"…"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;", +c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=t&&(c.style.padding=t),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],O=null,y())})}(e,c);y()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme? +"1px dotted rgb(235, 242, 249)":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";c&&D.appendChild(C);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg": +a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&c&&C.appendChild(H);c&&mxUtils.write(C,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"): +mxResources.get("filename"))+":");H=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?H=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?H=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?H=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?H=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?H=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(H=a.trello.extension);var G=document.createElement("input");G.setAttribute("value",a.defaultFilename+ +H);G.style.marginLeft="10px";G.style.width=d?"220px":"430px";this.init=function(){c&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};c&&(C.appendChild(G),null!=a.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(a,G,a.editor.fileExtensions),H.style.marginTop="12px",C.appendChild(H)));var C=!1,J=0,I=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1, +hwaccel:!1,top:"40%",zIndex:2E9}),F=mxUtils.button(v||mxResources.get("create"),function(){F.setAttribute("disabled","disabled");B();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||p){var K=[],O=null,Q=null,Y=null,U=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},C=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);H=mxUtils.button(mxResources.get("Templates", +null,"Templates"),function(){ca.style.display="";P.style.left="160px";U(0);P.scrollTop=0;P.innerHTML="";J=0;O!=S&&(S=O,R=Q,ea=Y,ca.innerHTML="",E(),O=null)});K.push(H);v.appendChild(H);var L=function(a){ca.style.display="none";P.style.left="30px";U(a?-1:1);null==O&&(O=S);P.scrollTop=0;P.innerHTML="";I.spin(P);var b=function(a,b,e){J=0;I.stop();S=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams", +null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;R={"draw.io":a};for(d in e)R[d]=e[d];E()}else y()};a?p(V.value,b):m(b)};m&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),v.appendChild(H),K.push(H));if(p){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(H);var V=document.createElement("input");V.style.marginRight="10px"; +V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});v.appendChild(V);H=mxUtils.button(mxResources.get("search"),function(){L(!0)});H.className="geBtn";v.appendChild(H)}U(0)}var W=null,ga=null,fa=null,ba=null,X=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";P.style.position="absolute";P.style.left="160px";P.style.right="34px";C=(c?72:40)+(C?30:0);P.style.top=C+"px";P.style.bottom="68px";P.style.margin= +"6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ca=document.createElement("div");ca.style.cssText="position:absolute;left:30px;width:128px;top:"+C+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Z=140,da=140,R={},M={},ea=0,T=!0;R.basic=[{title:"blankDiagram",select:!0}];var S=R.basic;if(!d){var ha=function(){mxUtils.get(N,function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"== +a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],m=0;m<c.length;m++)d.push(encodeURIComponent(mxUtils.getTextContent(c[m])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else e=a.getAttribute("url"),null!=e&&(c=a.getAttribute("section"),null==c&&(c=e.indexOf("/"),c=e.substring(0,c)),e=R[c],null==e&&(e=[],R[c]=e),c=a.getAttribute("clibs"),null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"), +preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();E()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,N=e;/^https?:\/\//.test(N)&&!a.editor.isCorsEnabledForUrl(N)&&(N=PROXY_URL+"?url="+encodeURIComponent(N));I.spin(P);null!=z?z(function(a,b){M=a;Y=ea=b;ha()},ha):ha();Q=R}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==D&&13==b.keyCode&&B()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position= "absolute";e.style.left="40px";e.style.bottom="24px";e.style.right="40px";d||a.isOffline()||!c||null!=b||g||(z=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),z.className="geBtn",e.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});z.className="geBtn";!a.editor.cancelFirst||g&&null==f||e.appendChild(z);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"), -function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(I.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),d.className="geBtn",e.appendChild(d));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b= -document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),v.className="geBtn",e.appendChild(v));e.appendChild(F);a.editor.cancelFirst||null!=b||g&&null==f||e.appendChild(z);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,u,v,q,z){function x(b, -e,c,p){function q(){mxEvent.addListener(f,"click",function(){var b=c;if(k){var e=A.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:B.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(e=e.substring(0,m));A.value=e+p}}C(c)})}var f= -document.createElement("a");f.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";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(g);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom= -"1");f.style.color="gray";f.style.fontSize="11px";var u=document.createElement("div");f.appendChild(u);mxUtils.write(u,e);if(null!=p&&null==a[p]){g.style.visibility="hidden";mxUtils.setOpacity(u,10);var y=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});y.spin(f);var v=window.setTimeout(function(){null==a[p]&&(y.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!= -a[p]&&(window.clearTimeout(v),mxUtils.setOpacity(u,100),g.style.visibility="",y.stop(),q())}))}else q();E.appendChild(f);++D==m&&(mxUtils.br(E),D=0)}function C(b){var e=A.value;if(null==b||null!=e&&0<e.length)z&&a.hideDialog(),c(e,b,A)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var y=document.createElement("h2");mxUtils.write(y,g||mxResources.get("create"));y.style.marginTop="0px";y.style.marginBottom= -"24px";f.appendChild(y);mxUtils.write(f,mxResources.get("filename")+":");var A=document.createElement("input");A.setAttribute("value",d);A.style.width="280px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",!1,null)};f.appendChild(A);null!=q&&f.appendChild(FilenameDialog.createTypeHint(a,A,q));null==p||null==u||"image/"!= -u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(A.style.width="160px",g=document.createElement("img"),p=v?p:btoa(unescape(encodeURIComponent(p))),g.setAttribute("src","data:"+u+";base64,"+p),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),f.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null, -null,function(){C("_blank")})));mxUtils.br(f);var E=document.createElement("div");E.style.textAlign="center";var D=0;E.style.marginTop="6px";f.appendChild(E);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),B.appendChild(u),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"), -App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),B.appendChild(u),a.mode==App.MODE_ONEDRIVE&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u, -mxResources.get("dropbox")),B.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),B.appendChild(u),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value", -App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),B.appendChild(u),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),B.appendChild(u),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()|| -(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),B.appendChild(u),a.mode!=App.MODE_DEVICE&&l||u.setAttribute("selected","selected"),e&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),B.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected", -"selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e); -null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){C(null)}),u.className="geBtn",l.appendChild(u));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){C("_blank")}),n.className="geBtn",l.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){C("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(A,"keypress",function(b){13==b.keyCode?C(App.MODE_DEVICE): +function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),d.className="geBtn",e.appendChild(d));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b= +document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),u.className="geBtn",e.appendChild(u));e.appendChild(F);a.editor.cancelFirst||null!=b||g&&null==f||e.appendChild(z);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,t,e,m,p,q,u,v,z){function y(b, +e,c,p){function f(){mxEvent.addListener(q,"click",function(){var b=c;if(k){var e=A.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:C.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(e=e.substring(0,m));A.value=e+p}}B(c)})}var q= +document.createElement("a");q.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";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 8px 10px 8px";q.style.whiteSpace="nowrap";q.appendChild(g);mxClient.IS_QUIRKS&&(q.style.cssFloat="left",q.style.zoom= +"1");q.style.color="gray";q.style.fontSize="11px";var u=document.createElement("div");q.appendChild(u);mxUtils.write(u,e);if(null!=p&&null==a[p]){g.style.visibility="hidden";mxUtils.setOpacity(u,10);var v=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});v.spin(q);var x=window.setTimeout(function(){null==a[p]&&(v.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!= +a[p]&&(window.clearTimeout(x),mxUtils.setOpacity(u,100),g.style.visibility="",v.stop(),f())}))}else f();E.appendChild(q);++D==m&&(mxUtils.br(E),D=0)}function B(b){var e=A.value;if(null==b||null!=e&&0<e.length)z&&a.hideDialog(),c(e,b,A)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;z=null!=z?z:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var x=document.createElement("h2");mxUtils.write(x,g||mxResources.get("create"));x.style.marginTop="0px";x.style.marginBottom= +"24px";f.appendChild(x);mxUtils.write(f,mxResources.get("filename")+":");var A=document.createElement("input");A.setAttribute("value",d);A.style.width="280px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?A.select():document.execCommand("selectAll",!1,null)};f.appendChild(A);null!=v&&f.appendChild(FilenameDialog.createTypeHint(a,A,v));null==p||null==q||"image/"!= +q.substring(0,6)||"image/svg"==q.substring(0,9)&&!mxClient.IS_SVG||(A.style.width="160px",g=document.createElement("img"),p=u?p:btoa(unescape(encodeURIComponent(p))),g.setAttribute("src","data:"+q+";base64,"+p),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),f.appendChild(g),n&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null, +null,function(){B("_blank")})));mxUtils.br(f);var E=document.createElement("div");E.style.textAlign="center";var D=0;E.style.marginTop="6px";f.appendChild(E);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),C.appendChild(q),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"), +App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),C.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q, +mxResources.get("dropbox")),C.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),C.appendChild(q),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(q=document.createElement("option"),q.setAttribute("value", +App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),C.appendChild(q),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),C.appendChild(q),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()|| +(q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),C.appendChild(q),a.mode!=App.MODE_DEVICE&&l||q.setAttribute("selected","selected"),e&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE));l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),mxUtils.write(l,mxResources.get("browser")),C.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected", +"selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(t)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e); +null==b&&(q=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),q.className="geBtn",l.appendChild(q));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),n.className="geBtn",l.appendChild(n));CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){B("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(A,"keypress",function(b){13==b.keyCode?B(App.MODE_DEVICE): 27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(l);this.container=f};CreateDialog.showDownloadButton=!0; var PopupDialog=function(a,d,c,b,g){g=null!=g?g:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";f.appendChild(k);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=c&&c();a.openLink(d, null,!0)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,d,c,b,g,f){f=null!=f?f:!0;var k=a.editor.graph,l=document.createElement("div");mxUtils.write(l,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor= @@ -8690,18 +8695,18 @@ a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.ph b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);z.appendChild(e)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var n=document.createElement("input"); n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var t=document.createElement("div");t.setAttribute("title",mxResources.get("reset"));t.style.position="relative";t.style.left="-16px";t.style.width="12px";t.style.height= "14px";t.style.cursor="pointer";t.style.display=mxClient.IS_VML?"inline":"inline-block";t.style.top=(mxClient.IS_VML?0:3)+"px";t.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(t,"click",function(){n.value="";n.focus()});var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","current-linkdialog");var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;"; -m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);l.appendChild(e);l.appendChild(n);l.appendChild(t);mxUtils.br(l);l.appendChild(m);g=!1;for(t=0;t<a.pages.length;t++){var u=document.createElement("option"); -mxUtils.write(u,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));u.setAttribute("value","data:page/id,"+a.pages[t].getId());d==u.getAttribute("value")&&(u.setAttribute("selected","selected"),g=!0);p.appendChild(u)}if(!g&&m.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,"change",function(){null== -v.parentNode||v.selected||v.parentNode.removeChild(v)})}l.appendChild(p)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(t);k.appendChild(l);var q=mxUtils.button(c,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:d:n.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){m.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll", +m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);l.appendChild(e);l.appendChild(n);l.appendChild(t);mxUtils.br(l);l.appendChild(m);g=!1;for(t=0;t<a.pages.length;t++){var q=document.createElement("option"); +mxUtils.write(q,a.pages[t].getName()||mxResources.get("pageWithNumber",[t+1]));q.setAttribute("value","data:page/id,"+a.pages[t].getId());d==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);p.appendChild(q)}if(!g&&m.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");p.appendChild(u);mxEvent.addListener(p,"change",function(){null== +u.parentNode||u.selected||u.parentNode.removeChild(u)})}l.appendChild(p)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(t);k.appendChild(l);var v=mxUtils.button(c,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:d:n.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){m.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll", !1,null));mxEvent.addListener(p,"focus",function(){e.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null== -c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),e.setAttribute("checked","checked"),e.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop= +c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),e.setAttribute("checked","checked"),e.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");z.style.marginTop= "20px";z.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";z.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign="middle";c.className="geBtn";a.editor.cancelFirst&&z.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action== google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&& f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0), b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(b).addView(e).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))}); "undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;n.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!= a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(e){13==e.keyCode&&(a.hideDialog(),b(m.checked? -p.value:n.value,LinkDialog.selectedDocs))});z.appendChild(q);a.editor.cancelFirst||z.appendChild(c);k.appendChild(z);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f); +p.value:n.value,LinkDialog.selectedDocs))});z.appendChild(v);a.editor.cancelFirst||z.appendChild(c);k.appendChild(z);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f); var k=document.createElement("input");k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="600px";var l=mxUtils.button(mxResources.get("sendMessage"),function(){var c=e.value+(t.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl: "/email","email="+encodeURIComponent(k.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+c),function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});l.className="geBtn gePrimaryBtn";if(!c){l.setAttribute("disabled", "disabled");var n=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(k,"change",function(){0<k.value.length&&0<n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")});mxEvent.addListener(k,"keyup",function(){0<k.value.length&&n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")})}g.appendChild(k);this.init=function(){k.focus()}; @@ -8710,44 +8715,44 @@ var e=document.createElement("textarea");e.style.resize="none";e.style.width="60 g};FeedbackDialog.maxAttachmentSize=1E6; var RevisionDialog=function(a,d,c){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height= "376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.appendChild(k);var l=new Graph(k);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var n=0,t=null,e=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[e]?t[e].getAttribute("name"):"pagenumber"==a?e+1:"pagecount"==a?null!=t?t.length:1:m.apply(this,arguments)};l.getLinkForCell= -function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),v=null,q=null,z=null,x=null,C=mxUtils.button("",function(){null!=z&&l.zoomIn()});C.className="geSprite geSprite-zoomin"; -C.setAttribute("title",mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var y=mxUtils.button("",function(){null!=z&&l.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var A=mxUtils.button("",function(){null!=z&& +function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),q=a.getCurrentFile(),u=null,v=null,z=null,y=null,B=mxUtils.button("",function(){null!=z&&l.zoomIn()});B.className="geSprite geSprite-zoomin"; +B.setAttribute("title",mxResources.get("zoomIn"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var x=mxUtils.button("",function(){null!=z&&l.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var A=mxUtils.button("",function(){null!=z&& (l.maxFitScale=8,l.fit(8),l.center())});A.className="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 E=mxUtils.button("",function(){null!=z&&(l.zoomActual(),l.center())});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled", -"disabled");mxUtils.setOpacity(E,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!=z){var b=mxUtils.getXml(z.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b= -"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(x):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop(); -a.replaceFileData(x);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var I=document.createElement("select");I.setAttribute("disabled","disabled");I.style.maxWidth="80px";I.style.position="relative";I.style.top="-2px";I.style.verticalAlign="bottom";I.style.marginRight="6px";I.style.display="none";var H=null;mxEvent.addListener(I,"change",function(a){null!= -H&&(H(a),mxEvent.consume(a))});var J=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});J.className="geBtn";J.setAttribute("disabled","disabled");null!=c&&(J.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=q&&a.openLink(q.getUrl(I.selectedIndex))});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled", -"disabled");null!=c&&(F.style.display="none",G.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.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 N=null;if(null!=d&&0<d.length){k.style.cursor="move";var R=document.createElement("table");R.style.border= -"1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%";var X=document.createElement("tbody"),U=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=d.length-1;0<=L;L--){var V=function(b){var c=new Date(b.modifiedDate),m=null;if(0<=c.getTime()){var f=function(d){p.stop();var f=mxUtils.parseXml(d),q=a.editor.extractGraphModel(f.documentElement,!0);if(null!=q){var g=function(a){null!=a&&(a= -v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};I.style.display="none";I.innerHTML="";z=f;x=d;t=parseSelectFunction=null;e=0;if("mxfile"==q.nodeName){f=q.getElementsByTagName("diagram");t=[];for(d=0;d<f.length;d++)t.push(f[d]);e=Math.min(n, -t.length-1);0<t.length&&g(t[e]);if(1<t.length)for(I.removeAttribute("disabled"),I.style.display="",d=0;d<t.length;d++)f=document.createElement("option"),mxUtils.write(f,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==e&&f.setAttribute("selected","selected"),I.appendChild(f);H=function(){try{var b=parseInt(I.value);e=n=b;g(t[b])}catch(M){I.value=n,a.handleError(M)}}}else v(q);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"..."); -D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",m.getAttribute("title"));C.removeAttribute("disabled");y.removeAttribute("disabled");A.removeAttribute("disabled");E.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),B.removeAttribute("disabled"),F.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(y,60);mxUtils.setOpacity(A, -60);mxUtils.setOpacity(E,60)}else I.style.display="none",I.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))},m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===U?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+ -" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){q!=b&&(p.stop(),null!=v&&(v.style.backgroundColor=""),q=b,v=m,v.style.backgroundColor="#ebf2f9",x=z=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor= -"#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(y,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(E,20),p.spin(k),b.getXml(function(a){if(q== -b)try{f(a)}catch(ca){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ca.message)}},function(a){p.stop();I.style.display="none";I.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);X.appendChild(m)}return m}(d[L]);null!=V&&L==d.length-1&&(N=V)}R.appendChild(X); -f.appendChild(R)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";K.appendChild(I);K.appendChild(C);K.appendChild(y); -K.appendChild(E);K.appendChild(A);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(B),g.appendChild(J),g.appendChild(G),g.appendChild(F)):(g.appendChild(B),g.appendChild(J),g.appendChild(G),g.appendChild(F),g.appendChild(f));b.appendChild(g);b.appendChild(K);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,k,l,n){var t=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight= -"normal";mxUtils.write(e,d);t.appendChild(e);var m=document.createElement("select"),p=mxUtils.bind(this,function(){C=mxUtils.parseXml(n[m.value].data);y=a.editor.extractGraphModel(C.documentElement,!0);A=0;this.init()});if(null!=n){m.style.marginLeft="4px";for(d=0;d<n.length;d++){var u=document.createElement("option");u.setAttribute("value",d);var v=new Date(n[d].created),q=new Date(n[d].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),q.toDateString(), -q.toLocaleDateString())+" "+q.toLocaleTimeString());m.appendChild(u)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.width="640px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);t.appendChild(z);var x=new Graph(z);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning= -!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var C=mxUtils.parseXml(c),y=a.editor.extractGraphModel(C.documentElement,!0),A=0,E=null,D=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=E&&null!=E[A]?E[A].getAttribute("name"):"pagenumber"==a?A+1:"pagecount"==a?null!=E?E.length:1:D.apply(this,arguments)};x.getLinkForCell=function(){return null};c=mxUtils.button("",function(){x.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);e=mxUtils.button("",function(){x.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border= -"none";d.style.margin="2px";mxUtils.setOpacity(d,60);u=mxUtils.button("",function(){x.zoomActual();x.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]), -0<m.options.length?(m.value=m.options[0].value,p()):a.hideDialog(!0))})])});k.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[m.value])});f.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.width="640px"; -v.style.textAlign="right";q=document.createElement("div");q.className="geToolbarContainer";q.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";z.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement)); -return b}mxEvent.addListener(B,"change",function(a){A=parseInt(B.value);b(E[A]);mxEvent.consume(a)});if("mxfile"==y.nodeName){var e=y.getElementsByTagName("diagram");E=[];for(var c=0;c<e.length;c++)E.push(e[c]);0<E.length&&b(E[A]);B.innerHTML="";if(1<E.length)for(B.style.display="",c=0;c<E.length;c++)e=document.createElement("option"),mxUtils.write(e,E[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==A&&e.setAttribute("selected","selected"),B.appendChild(e); -else B.style.display="none"}else a(y)};q.appendChild(B);q.appendChild(c);q.appendChild(e);q.appendChild(u);q.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(v.appendChild(c),null!=l&&v.appendChild(l),v.appendChild(k),v.appendChild(f)):(v.appendChild(f),v.appendChild(k),null!=l&&v.appendChild(l),v.appendChild(c));t.appendChild(v); -t.appendChild(q);this.container=t},FindWindow=function(a,d,c,b,g){function f(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function k(b){var c=n.model.getDescendants(n.model.getRoot()),d=u.value.toLowerCase(),p=v.checked?new RegExp(d):null, -q=null;t!=d&&(t=d,e=null,m=!1);var g=null==e;if(0<d.length){if(m){m=!1;for(var l,y=0;y<a.pages.length;y++)if(a.currentPage==a.pages[y]){l=y;break}b=(l+1)%a.pages.length;e=null;do m=!1,c=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(c),n.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!k(!0)&&b!=l);e&&(e=null,a.selectPage(c));m=!1;n=a.editor.graph;return k(!0)}for(y=0;y<c.length;y++){l=n.view.getState(c[y]);if(null!=l&&null!=l.cell.value&&(g||null==q)&&(n.model.isVertex(l.cell)|| -n.model.isEdge(l.cell))&&(n.isHtmlLabel(l.cell)?(x.innerHTML=n.getLabel(l.cell),label=mxUtils.extractTextWithWhitespace([x])):label=n.getLabel(l.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,l.cell,d))||null!=p&&(p.test(label)||f(p,l.cell,d))))if(g){q=l;break}else null==q&&(q=l);g=g||l==e}}if(null!=q){if(y==c.length&&z.checked)return e=null,m=!0,k(!0);e=q;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell): -n.highlightCell(e.cell)}else{if(!b&&z.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=q}var l=a.actions.get("find"),n=a.editor.graph,t=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width= -"200px";u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";p.appendChild(u);mxUtils.br(p);var v=document.createElement("input");v.setAttribute("id","geFindWinRegExChck");v.setAttribute("type","checkbox");v.style.marginRight="4px";p.appendChild(v);var q=document.createElement("label");q.setAttribute("for","geFindWinRegExChck");p.appendChild(q);mxUtils.write(q,mxResources.get("regularExpression"));p.appendChild(q);q=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250"); -q.style.position="relative";q.style.marginLeft="6px";q.style.top="-1px";p.appendChild(q);mxUtils.br(p);var z=document.createElement("input");z.setAttribute("id","geFindWinAllPagesChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";p.appendChild(z);q=document.createElement("label");q.setAttribute("for","geFindWinAllPagesChck");p.appendChild(q);mxUtils.write(q,mxResources.get("allPages"));p.appendChild(q);var x=document.createElement("div");mxUtils.br(p);q=mxUtils.button(mxResources.get("reset"), -function(){u.value="";u.style.backgroundColor="";t=e=null;m=!1;u.focus()});q.setAttribute("title",mxResources.get("reset"));q.style.marginTop="6px";q.style.marginRight="4px";q.style.marginLeft=(b-20-156)/2+"px";q.className="geBtn";p.appendChild(q);q=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});q.setAttribute("title",mxResources.get("find")+" (Enter)");q.style.marginTop="6px";q.className="geBtn gePrimaryBtn";p.appendChild(q); -mxEvent.addListener(u,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(t!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(p,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),p,d,c,b,g,!0,!0);this.window.destroyOnClose= -!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?z.removeAttribute("disabled"):(z.checked=!1,z.setAttribute("disabled","disabled"))):n.container.focus()}));this.window.setLocation=function(a, -b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var C=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window, -"resize",C);this.destroy=function(){mxEvent.removeListener(window,"resize",C);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight= +"disabled");mxUtils.setOpacity(E,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 C=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=mxUtils.getXml(z.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b= +"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop(); +a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});H.className="geBtn";H.setAttribute("disabled","disabled");var G=document.createElement("select");G.setAttribute("disabled","disabled");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";G.style.display="none";var J=null;mxEvent.addListener(G,"change",function(a){null!= +J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var F=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(G.selectedIndex))});F.className="geBtn gePrimaryBtn";F.setAttribute("disabled", +"disabled");null!=c&&(F.style.display="none",H.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.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 O=null;if(null!=d&&0<d.length){k.style.cursor="move";var Q=document.createElement("table");Q.style.border= +"1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),U=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=d.length-1;0<=L;L--){var V=function(b){var c=new Date(b.modifiedDate),m=null;if(0<=c.getTime()){var f=function(d){p.stop();var f=mxUtils.parseXml(d),g=a.editor.extractGraphModel(f.documentElement,!0);if(null!=g){var u=function(a){null!=a&&(a= +v(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},v=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};G.style.display="none";G.innerHTML="";z=f;y=d;t=parseSelectFunction=null;e=0;if("mxfile"==g.nodeName){f=g.getElementsByTagName("diagram");t=[];for(d=0;d<f.length;d++)t.push(f[d]);e=Math.min(n, +t.length-1);0<t.length&&u(t[e]);if(1<t.length)for(G.removeAttribute("disabled"),G.style.display="",d=0;d<t.length;d++)f=document.createElement("option"),mxUtils.write(f,t[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==e&&f.setAttribute("selected","selected"),G.appendChild(f);J=function(){try{var b=parseInt(G.value);e=n=b;u(t[b])}catch(M){G.value=n,a.handleError(M)}}}else v(g);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"..."); +D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",m.getAttribute("title"));B.removeAttribute("disabled");x.removeAttribute("disabled");A.removeAttribute("disabled");E.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&H.removeAttribute("disabled"),C.removeAttribute("disabled"),F.removeAttribute("disabled"),I.removeAttribute("disabled"));mxUtils.setOpacity(B,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(A, +60);mxUtils.setOpacity(E,60)}else G.style.display="none",G.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))},m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===U?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+ +" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){v!=b&&(p.stop(),null!=u&&(u.style.backgroundColor=""),v=b,u=m,u.style.backgroundColor="#ebf2f9",y=z=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor= +"#ffffff",l.getModel().clear(),H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),mxUtils.setOpacity(B,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(E,20),p.spin(k),b.getXml(function(a){if(v== +b)try{f(a)}catch(ca){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ca.message)}},function(a){p.stop();G.style.display="none";G.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){F.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(m)}return m}(d[L]);null!=V&&L==d.length-1&&(O=V)}Q.appendChild(Y); +f.appendChild(Q)}else null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";K.appendChild(G);K.appendChild(B);K.appendChild(x); +K.appendChild(E);K.appendChild(A);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(C),g.appendChild(I),g.appendChild(H),g.appendChild(F)):(g.appendChild(C),g.appendChild(I),g.appendChild(H),g.appendChild(F),g.appendChild(f));b.appendChild(g);b.appendChild(K);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,k,l,n){var t=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight= +"normal";mxUtils.write(e,d);t.appendChild(e);var m=document.createElement("select"),p=mxUtils.bind(this,function(){B=mxUtils.parseXml(n[m.value].data);x=a.editor.extractGraphModel(B.documentElement,!0);A=0;this.init()});if(null!=n){m.style.marginLeft="4px";for(d=0;d<n.length;d++){var q=document.createElement("option");q.setAttribute("value",d);var u=new Date(n[d].created),v=new Date(n[d].modified);mxUtils.write(q,u.toLocaleDateString()+" "+u.toLocaleTimeString()+" - "+(u.toDateString(),v.toDateString(), +v.toLocaleDateString())+" "+v.toLocaleTimeString());m.appendChild(q)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var z=document.createElement("div");z.style.position="absolute";z.style.border="1px solid lightGray";z.style.marginTop="10px";z.style.width="640px";z.style.top="46px";z.style.bottom="74px";z.style.overflow="hidden";mxEvent.disableContextMenu(z);t.appendChild(z);var y=new Graph(z);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning= +!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=mxUtils.parseXml(c),x=a.editor.extractGraphModel(B.documentElement,!0),A=0,E=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=E&&null!=E[A]?E[A].getAttribute("name"):"pagenumber"==a?A+1:"pagecount"==a?null!=E?E.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.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);e=mxUtils.button("",function(){y.zoomOut()});e.className="geSprite geSprite-zoomout";e.setAttribute("title",mxResources.get("zoomOut"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border= +"none";d.style.margin="2px";mxUtils.setOpacity(d,60);q=mxUtils.button("",function(){y.zoomActual();y.center()});q.className="geSprite geSprite-actualsize";q.setAttribute("title",mxResources.get("actualSize"));q.style.outline="none";q.style.border="none";q.style.margin="2px";mxUtils.setOpacity(q,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]), +0<m.options.length?(m.value=m.options[0].value,p()):a.hideDialog(!0))})])});k.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[m.value])});f.className="geBtn gePrimaryBtn";u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.width="640px"; +u.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";z.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}}function b(b){null!=b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement)); +return b}mxEvent.addListener(C,"change",function(a){A=parseInt(C.value);b(E[A]);mxEvent.consume(a)});if("mxfile"==x.nodeName){var e=x.getElementsByTagName("diagram");E=[];for(var c=0;c<e.length;c++)E.push(e[c]);0<E.length&&b(E[A]);C.innerHTML="";if(1<E.length)for(C.style.display="",c=0;c<E.length;c++)e=document.createElement("option"),mxUtils.write(e,E[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==A&&e.setAttribute("selected","selected"),C.appendChild(e); +else C.style.display="none"}else a(x)};v.appendChild(C);v.appendChild(c);v.appendChild(e);v.appendChild(q);v.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(u.appendChild(c),null!=l&&u.appendChild(l),u.appendChild(k),u.appendChild(f)):(u.appendChild(f),u.appendChild(k),null!=l&&u.appendChild(l),u.appendChild(c));t.appendChild(u); +t.appendChild(v);this.container=t},FindWindow=function(a,d,c,b,g){function f(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function k(b){var c=n.model.getDescendants(n.model.getRoot()),d=q.value.toLowerCase(),p=u.checked?new RegExp(d):null, +g=null;t!=d&&(t=d,e=null,m=!1);var v=null==e;if(0<d.length){if(m){m=!1;for(var x,l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){x=l;break}b=(x+1)%a.pages.length;e=null;do m=!1,c=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(c),n.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!k(!0)&&b!=x);e&&(e=null,a.selectPage(c));m=!1;n=a.editor.graph;return k(!0)}for(l=0;l<c.length;l++){x=n.view.getState(c[l]);if(null!=x&&null!=x.cell.value&&(v||null==g)&&(n.model.isVertex(x.cell)|| +n.model.isEdge(x.cell))&&(n.isHtmlLabel(x.cell)?(y.innerHTML=n.getLabel(x.cell),label=mxUtils.extractTextWithWhitespace([y])):label=n.getLabel(x.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,x.cell,d))||null!=p&&(p.test(label)||f(p,x.cell,d))))if(v){g=x;break}else null==g&&(g=x);v=v||x==e}}if(null!=g){if(l==c.length&&z.checked)return e=null,m=!0,k(!0);e=g;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell): +n.highlightCell(e.cell)}else{if(!b&&z.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=g}var l=a.actions.get("find"),n=a.editor.graph,t=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width= +"200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";p.appendChild(q);mxUtils.br(p);var u=document.createElement("input");u.setAttribute("id","geFindWinRegExChck");u.setAttribute("type","checkbox");u.style.marginRight="4px";p.appendChild(u);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");p.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));p.appendChild(v);v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250"); +v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";p.appendChild(v);mxUtils.br(p);var z=document.createElement("input");z.setAttribute("id","geFindWinAllPagesChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";p.appendChild(z);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");p.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));p.appendChild(v);var y=document.createElement("div");mxUtils.br(p);v=mxUtils.button(mxResources.get("reset"), +function(){q.value="";q.style.backgroundColor="";t=e=null;m=!1;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";p.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){a.handleError(x)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";p.appendChild(v); +mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(t!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(p,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),p,d,c,b,g,!0,!0);this.window.destroyOnClose= +!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?z.removeAttribute("disabled"):(z.checked=!1,z.setAttribute("disabled","disabled"))):n.container.focus()}));this.window.setLocation=function(a, +b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var B=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window, +"resize",B);this.destroy=function(){mxEvent.removeListener(window,"resize",B);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight= "4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var l=k.cloneNode(!1);mxUtils.write(l,mxResources.get("stopDrawing"));l.setAttribute("title",mxResources.get("stopDrawing"));l.style.marginTop="4px";mxEvent.addListener(l,"click",function(){f.freehand.stopDrawing()});a.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),a,d,c,b,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!1);this.window.setClosable(!0);f.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.className="geBtn"+(f.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){f.freehand.isDrawing()&&f.freehand.stopDrawing()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight; a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",n);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy()}}, @@ -8762,18 +8767,18 @@ b){var e=window.innerHeight||document.body.clientHeight||document.documentElemen l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var n=document.createElement("input");n.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){b(n.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";k.style.fontSize="18px";k.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(k);c&&(c=document.createElement("p"),c.style.marginTop= "20px",c.appendChild(n),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),c.appendChild(f),g.appendChild(c),n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(a,d,c){c=null!=c?c:a.sidebar.entries;var b=document.createElement("div"),g=[];if(null!=a.sidebar.customEntries)for(var f=0;f<a.sidebar.customEntries.length;f++){for(var k=a.sidebar.customEntries[f], l={title:a.getResource(k.title),entries:[]},n=0;n<k.entries.length;n++){var t=k.entries[n];l.entries.push({id:t.id,title:a.getResource(t.title),desc:a.getResource(t.desc),image:t.preview})}g.push(l)}for(f=0;f<c.length;f++)if(null==a.sidebar.enabledLibraries)g.push(c[f]);else{l={title:c[f].title,entries:[]};for(n=0;n<c[f].entries.length;n++)0<=mxUtils.indexOf(a.sidebar.enabledLibraries,c[f].entries[n].id)&&l.entries.push(c[f].entries[n]);0<l.entries.length&&g.push(l)}c=g;if(d){n=mxUtils.bind(this, -function(b){for(var c=0;c<b.length;c++)(function(b){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);e.appendChild(d);for(var f=0;f<b.entries.length;f++)(function(b){var d=v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",b.title+" ("+b.id+")");var q= -document.createElement("input");q.setAttribute("type","checkbox");q.checked=a.sidebar.isEntryVisible(b.id);q.defaultChecked=q.checked;d.appendChild(q);mxUtils.write(d," "+b.title);e.appendChild(d);var g=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=b.desc){var e=document.createElement("pre");e.style.boxSizing="border-box";e.style.fontFamily="inherit";e.style.margin="20px";e.style.right="0px"; -e.style.textAlign="left";mxUtils.write(e,b.desc);m.appendChild(e)}null!=b.imageCallback?b.imageCallback(m):null!=b.image?m.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",g);mxEvent.addListener(d,"dblclick",function(a){q.checked= -!q.checked;mxEvent.consume(a)});u.push(function(){return q.checked?b.id:null});0==c&&0==f&&g()})(b.entries[f])})(b[c])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var e=document.createElement("div"),m=document.createElement("div");e.style.position="absolute";e.style.top= +function(b){for(var c=0;c<b.length;c++)(function(b){var d=u.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor="dark"==uiTheme?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,b.title);e.appendChild(d);for(var f=0;f<b.entries.length;f++)(function(b){var d=u.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",b.title+" ("+b.id+")");var g= +document.createElement("input");g.setAttribute("type","checkbox");g.checked=a.sidebar.isEntryVisible(b.id);g.defaultChecked=g.checked;d.appendChild(g);mxUtils.write(d," "+b.title);e.appendChild(d);var k=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=b.desc){var e=document.createElement("pre");e.style.boxSizing="border-box";e.style.fontFamily="inherit";e.style.margin="20px";e.style.right="0px"; +e.style.textAlign="left";mxUtils.write(e,b.desc);m.appendChild(e)}null!=b.imageCallback?b.imageCallback(m):null!=b.image?m.innerHTML+='<img border="0" src="'+b.image+'"/>':null==b.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=d;p.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9";null!=a&&mxEvent.consume(a)}};mxEvent.addListener(d,"click",k);mxEvent.addListener(d,"dblclick",function(a){g.checked= +!g.checked;mxEvent.consume(a)});q.push(function(){return g.checked?b.id:null});0==c&&0==f&&k()})(b.entries[f])})(b[c])});f=document.createElement("div");f.className="geDialogTitle";mxUtils.write(f,mxResources.get("shapes"));f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.style.lineHeight="40px";f.style.height="40px";f.style.right="0px";mxClient.IS_QUIRKS&&(f.style.width="718px");var e=document.createElement("div"),m=document.createElement("div");e.style.position="absolute";e.style.top= "40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";mxClient.IS_QUIRKS&&(m.style.width=parseInt(f.style.width)-202+"px",m.style.height=e.style.height,m.style.marginTop=e.style.marginTop); -var p=null,u=[],v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";n(c);b.style.padding="30px";b.appendChild(f);b.appendChild(e);b.appendChild(m);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop= -"12px");var q=document.createElement("input");q.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(q),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=q&&(q.checked=!q.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"), -function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),q.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var g=document.createElement("td"), -k=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});n.appendChild(d);n.appendChild(g); -n.appendChild(k);f.appendChild(n);z.appendChild(f);for(var u=[],C=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)C++;for(var y=[d,g,k],A=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(x(y[Math.floor(A/(C/3))],e.title,e.id));A++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";q=document.createElement("input");isLocalStorage&&(q.setAttribute("type","checkbox"),q.checked=!0,q.defaultChecked= -!0,c.appendChild(q),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length? -b.join(";"):"",q.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var e=0;e<g.length;e++){var c=document.createElement("span");c.style.whiteSpace= +var p=null,q=[],u=document.createElement("div");u.style.position="relative";u.style.left="0px";u.style.right="0px";n(c);b.style.padding="30px";b.appendChild(f);b.appendChild(e);b.appendChild(m);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=f.style.width,c.style.paddingTop= +"12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"), +function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<q.length;e++){var c=q[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");z.style.width="100%";d=document.createElement("td");var g=document.createElement("td"), +k=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";z.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?c:null}});n.appendChild(d);n.appendChild(g); +n.appendChild(k);f.appendChild(n);z.appendChild(f);for(var q=[],B=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)B++;for(var x=[d,g,k],A=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];q.push(y(x[Math.floor(A/(B/3))],e.title,e.id));A++}})(c[f]);b.appendChild(z);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type","checkbox"),v.checked=!0,v.defaultChecked= +!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<q.length;e++){var c=q[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length? +b.join(";"):"",v.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var e=0;e<g.length;e++){var c=document.createElement("span");c.style.whiteSpace= "nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";c.appendChild(p);mxUtils.write(c,g[e]);b.appendChild(c);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);d()})}}(e))}}}var c=document.createElement("div"),b=document.createElement("div"); b.style.height="120px";b.style.overflow="auto";var g=mxSettings.getPlugins().slice();c.appendChild(b);d();var f=mxUtils.button(mxResources.get("add"),function(){var b="",c=urlParams.p;if(null!=c&&0<c.length){for(var p=c.split(";"),c=0;c<p.length;c++){var f=App.pluginRegistry[p[c]];null!=f&&(b+=f+";")}";"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1))}b=new FilenameDialog(a,b,mxResources.get("add"),function(a){if(null!=a&&0<a.length){p=a.split(";");for(a=0;a<p.length;a++){var b=p[a],e=App.pluginRegistry[b]; null!=e&&(b=e);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var n= @@ -8784,80 +8789,80 @@ n.style["float"]="right";n.style.position="inherit";t.className="cr-rotate-l";e. n.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";a.editor.cancelFirst?(t.appendChild(l),t.appendChild(n)):(t.appendChild(n),t.appendChild(l));g.appendChild(t);this.container=g},EditGeometryDialog=function(a,d){var c=a.editor.graph,b=1==d.length?c.getCellGeometry(d[0]):null,g=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"), t=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(n,mxResources.get("relative")+":");var e=document.createElement("input");e.setAttribute("type","checkbox");null!=b&&b.relative&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);this.init=function(){e.focus()};t.appendChild(e);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("left")+":");var m= document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=b?b.x:"";t.appendChild(m);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";t.appendChild(p);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr"); -n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";t.appendChild(u);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type", -"text");v.style.width="100px";v.value=null!=b&&null!=b.offset?b.offset.y:"";t.appendChild(v);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b?b.width:"";t.appendChild(q);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n= -document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=b?b.height:"";t.appendChild(z);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var x=document.createElement("input");x.setAttribute("type","text"); -x.style.width="100px";x.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(x);l.appendChild(n);l.appendChild(t);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var C=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=f&&(f=f.clone(),c.isCellMovable(d[b])&& -(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(q.value).length&&(f.width=Number(q.value)),0<mxUtils.trim(z.value).length&&(f.height=Number(z.value))),c.getModel().setGeometry(d[b], -f));0<mxUtils.trim(x.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[b]])}}finally{c.getModel().endUpdate()}});C.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&C.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(C)):(f.appendChild(C),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,c,b,g,f){function k(a){for(a= -document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,p,f,g,n,x){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==q[b]){var B=function(){F.innerHTML="";F.style.cursor="pointer";F.style.whiteSpace="nowrap";F.style.textOverflow="ellipsis";mxUtils.write(F,null!=J.title&&0<J.title.length?J.title:mxResources.get("untitled")); -F.style.color=null==J.title||0==J.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var G=p,D=f;if(p>a.maxImageSize||f>a.maxImageSize){var E=Math.min(1,Math.min(a.maxImageSize/Math.max(1,p)),a.maxImageSize/Math.max(1,f));p*=E;f*=E}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var H=document.createElement("div");H.setAttribute("draggable","true");H.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";H.style.position="relative";H.style.cursor="move"; -mxUtils.setPrefixedStyle(H.style,"transition","transform .1s ease-in-out");if(null!=b){var t=document.createElement("img");t.setAttribute("src",y.convert(b));t.style.width=G+"px";t.style.height=D+"px";t.style.margin="10px";t.style.paddingBottom=Math.floor((100-D)/2)+"px";t.style.paddingLeft=Math.floor((100-G)/2)+"px";H.appendChild(t)}else if(null!=g){var I=a.stringToCells(Graph.decompress(g.xml));0<I.length&&(a.sidebar.createThumb(I,100,100,H,null,!0,!1),H.firstChild.style.display=mxClient.IS_QUIRKS? -"inline":"inline-block",H.firstChild.style.cursor="")}var K=document.createElement("img");K.setAttribute("src",Editor.closeImage);K.setAttribute("border","0");K.setAttribute("title",mxResources.get("delete"));K.setAttribute("align","top");K.style.paddingTop="4px";K.style.position="absolute";K.style.marginLeft="-12px";K.style.zIndex="1";K.style.cursor="pointer";mxEvent.addListener(K,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(K,"click",function(d){q[b]=null;for(var m= -0;m<e.length;m++)if(null!=e[m].data&&e[m].data==b||null!=e[m].xml&&null!=c&&e[m].xml==c.xml){e.splice(m,1);break}H.parentNode.removeChild(a);0==e.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(K,"dblclick",function(a){mxEvent.consume(a)})})(H,b,g);H.appendChild(K);H.style.marginBottom="30px";var F=document.createElement("div");F.style.position="absolute";F.style.boxSizing="border-box";F.style.bottom="-18px";F.style.left= -"10px";F.style.right="10px";F.style.backgroundColor="#ffffff";F.style.overflow="hidden";F.style.textAlign="center";var J=null;null!=b?(J={data:b,w:p,h:f,title:x},null!=n&&(J.aspect=n),q[b]=t,e.push(J)):null!=g&&(g.aspect="fixed",e.push(g),J=g);mxEvent.addListener(F,"keydown",function(a){13==a.keyCode&&null!=C&&(C(),C=null,mxEvent.consume(a))});B();H.appendChild(F);mxEvent.addListener(F,"mousedown",function(a){"true"!=F.getAttribute("contentEditable")&&mxEvent.consume(a)});I=function(b){if(mxClient.IS_IOS|| -mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,J.title||"",mxResources.get("ok"),function(a){null!=a&&(J.title=a,B())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=F.getAttribute("contentEditable")){null!=C&&(C(),C=null);if(null==J.title||0==J.title.length)F.innerHTML="";F.style.textOverflow="";F.style.whiteSpace="";F.style.cursor="text";F.style.color="";F.setAttribute("contentEditable", -"true");mxUtils.setPrefixedStyle(F.style,"user-select","text");F.focus();document.execCommand("selectAll",!1,null);C=function(){F.removeAttribute("contentEditable");F.style.cursor="pointer";J.title=F.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(F,"click",I);mxEvent.addListener(H,"dblclick",I);u.appendChild(H);mxEvent.addListener(H,"dragstart",function(a){null==b&&null!=g&&(K.style.visibility="hidden",F.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text", -g.xml);z=k(a);mxClient.IS_GC&&(H.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(H.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(H,30);K.style.visibility="";F.style.visibility=""},0)});mxEvent.addListener(H,"dragend",function(a){"hidden"==K.style.visibility&&(K.style.visibility="",F.style.visibility="");z=null;mxUtils.setOpacity(H,100);mxUtils.setPrefixedStyle(H.style,"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{p= -!1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var N=0;N<D.length;N++)null!=D[N].xml?l(null,null,0,0,0,0,D[N]):l(D[N].data,null,0,0,D[N].w,D[N].h,null,"fixed",D[N].title);p=!0}else if("mxfile"==G.documentElement.nodeName){for(var R=G.documentElement.getElementsByTagName("diagram"),N=0;N<R.length;N++){var D=mxUtils.getTextContent(R[N]),I=a.stringToCells(Graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(I); -l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}p=!0}}catch(da){}p||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();A=!1;x=k(b);if(null!=z)null!=x&&x<u.children.length?(e.splice(x>z?x-1:x,0,e.splice(z,1)[0]),u.insertBefore(u.children[z],u.children[x])):(e.push(e.splice(z,1)[0]),u.appendChild(u.children[z])); -else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,E(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var e=[];c=document.createElement("div"); +n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=b&&null!=b.offset?b.offset.x:"";t.appendChild(q);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+":");var u=document.createElement("input");u.setAttribute("type", +"text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.y:"";t.appendChild(u);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";t.appendChild(v);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n= +document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=b?b.height:"";t.appendChild(z);l.appendChild(n);l.appendChild(t);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");t=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var y=document.createElement("input");y.setAttribute("type","text"); +y.style.width="100px";y.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";t.appendChild(y);l.appendChild(n);l.appendChild(t);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=f&&(f=f.clone(),c.isCellMovable(d[b])&& +(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(q.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(q.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(u.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(z.value).length&&(f.height=Number(z.value))),c.getModel().setGeometry(d[b], +f));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[b]])}}finally{c.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&B.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(B)):(f.appendChild(B),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,d,c,b,g,f){function k(a){for(a= +document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=q;)a=a.parentNode;var b=null;if(null!=a)for(var e=q.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,f,p,g,n,y){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var C=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled")); +I.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};q.style.backgroundImage="";u.style.display="none";var H=f,D=p;if(f>a.maxImageSize||p>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,p));f*=F;p*=F}H>D?(D=Math.round(100*D/H),H=100):(H=Math.round(100*H/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move"; +mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var J=document.createElement("img");J.setAttribute("src",x.convert(b));J.style.width=H+"px";J.style.height=D+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-D)/2)+"px";J.style.paddingLeft=Math.floor((100-H)/2)+"px";E.appendChild(J)}else if(null!=g){var t=a.stringToCells(Graph.decompress(g.xml));0<t.length&&(a.sidebar.createThumb(t,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS? +"inline":"inline-block",E.firstChild.style.cursor="")}var G=document.createElement("img");G.setAttribute("src",Editor.closeImage);G.setAttribute("border","0");G.setAttribute("title",mxResources.get("delete"));G.setAttribute("align","top");G.style.paddingTop="4px";G.style.position="absolute";G.style.marginLeft="-12px";G.style.zIndex="1";G.style.cursor="pointer";mxEvent.addListener(G,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(G,"click",function(d){v[b]=null;for(var m= +0;m<e.length;m++)if(null!=e[m].data&&e[m].data==b||null!=e[m].xml&&null!=c&&e[m].xml==c.xml){e.splice(m,1);break}E.parentNode.removeChild(a);0==e.length&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(d)});mxEvent.addListener(G,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(G);E.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left= +"10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:p,title:y},null!=n&&(K.aspect=n),v[b]=J,e.push(K)):null!=g&&(g.aspect="fixed",e.push(g),K=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(a))});C();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});t=function(b){if(mxClient.IS_IOS|| +mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,C())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==K.title||0==K.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable", +"true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";K.title=I.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",t);mxEvent.addListener(E,"dblclick",t);q.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(G.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text", +g.xml);z=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);G.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==G.style.visibility&&(G.style.visibility="",I.style.visibility="");z=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else A||(A=!0,a.handleError({message:mxResources.get("fileExists")}));else{f= +!1;try{if(H=mxUtils.parseXml(b),"mxlibrary"==H.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(H.documentElement));if(null!=D&&0<D.length)for(var O=0;O<D.length;O++)null!=D[O].xml?l(null,null,0,0,0,0,D[O]):l(D[O].data,null,0,0,D[O].w,D[O].h,null,"fixed",D[O].title);f=!0}else if("mxfile"==H.documentElement.nodeName){for(var Q=H.documentElement.getElementsByTagName("diagram"),O=0;O<Q.length;O++){var D=mxUtils.getTextContent(Q[O]),t=a.stringToCells(Graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(t); +l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}function t(b){b.stopPropagation();b.preventDefault();A=!1;y=k(b);if(null!=z)null!=y&&y<q.children.length?(e.splice(y>z?y-1:y,0,e.splice(z,1)[0]),q.insertBefore(q.children[z],q.children[y])):(e.push(e.splice(z,1)[0]),q.appendChild(q.children[z])); +else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,E(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);q.scrollTop=q.scrollHeight})}b.stopPropagation();b.preventDefault()}var e=[];c=document.createElement("div"); c.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";c.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",d);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF|| -5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v= -document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));c.appendChild(v);var q={},z=null,x=null,C=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=C&&(C(),C=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart", -d);var y=new mxUrlConverter,A=!1;if(null!=b)for(d=0;d<b.length;d++)m=b[d],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(u,"dragleave",function(a){v.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==v){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var E=function(b){return function(e,c,d,m,p,f,q,g,k){null!=k&&(/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name))?a.importVisio(k,mxUtils.bind(this,function(a){l(a,c,d,m,p,f,q,"fixed",mxEvent.isAltDown(b)? -null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,k.name)?a.parseFile(k,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(l(e.responseText,c,d,m,p,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(e,c,d,m,p,f,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g, -" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",t);mxEvent.addListener(v,"dragover",n);mxEvent.addListener(v,"drop",t);c.appendChild(u);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(e), +5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var q=document.createElement("div");q.style.borderWidth="1px 0px 1px 0px";q.style.borderColor="#d3d3d3";q.style.borderStyle="solid";q.style.marginTop="6px";q.style.overflow="auto";q.style.height="340px";q.style.backgroundPosition="center center";q.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(q.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u= +document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));c.appendChild(u);var v={},z=null,y=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(q,"mousedown",d);mxEvent.addListener(q,"pointerdown",d);mxEvent.addListener(q,"touchstart", +d);var x=new mxUrlConverter,A=!1;if(null!=b)for(d=0;d<b.length;d++)m=b[d],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(q,"dragleave",function(a){u.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==q||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var E=function(b){return function(e,c,d,m,f,p,g,k,u){null!=u&&(/(\.vsdx)($|\?)/i.test(u.name)||/(\.vssx)($|\?)/i.test(u.name))?a.importVisio(u,mxUtils.bind(this,function(a){l(a,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)? +null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=u&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,u.name)?a.parseFile(u,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(l(e.responseText,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),q.scrollTop=q.scrollHeight))})):(l(e,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g, +" ")),q.scrollTop=q.scrollHeight)}};mxEvent.addListener(q,"dragover",n);mxEvent.addListener(q,"drop",t);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",t);c.appendChild(q);b=document.createElement("div");b.style.textAlign="right";b.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(e), c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";b.appendChild(m);if(Graph.fileSupport){if(null==a.libDlgFileInputElt){var D=document.createElement("input");D.setAttribute("multiple","multiple");D.setAttribute("type","file");mxEvent.addListener(D,"change", -function(b){A=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,m,p,f,q,g){null!=D.files&&(E(b)(a,e,c,d,m,p,f,q,g),D.type="",D.type="file",D.value="")});u.scrollTop=u.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}m=mxUtils.button(mxResources.get("import"),function(){null!=C&&(C(),C=null);a.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";b.appendChild(m)}m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!= -C&&(C(),C=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,e){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var c=a.indexOf(",");0<c&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))}l(a,null,0,0,b,e);u.scrollTop=u.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";b.appendChild(m);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=C&&(C(),C=null);this.saveBtnClickHandler(p.value, +function(b){A=!1;a.importFiles(D.files,0,0,a.maxImageSize,function(a,e,c,d,m,f,p,g,k){null!=D.files&&(E(b)(a,e,c,d,m,f,p,g,k),D.type="",D.type="file",D.value="")});q.scrollTop=q.scrollHeight});D.style.display="none";document.body.appendChild(D);a.libDlgFileInputElt=D}m=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);a.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";b.appendChild(m)}m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!= +B&&(B(),B=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,e){A=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var c=a.indexOf(",");0<c&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))}l(a,null,0,0,b,e);q.scrollTop=q.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";b.appendChild(m);this.saveBtnClickHandler=function(b,e,c,d){a.saveLibrary(b,e,c,d)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=B&&(B(),B=null);this.saveBtnClickHandler(p.value, e,g,f)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";b.appendChild(m);a.editor.cancelFirst||b.appendChild(d);c.appendChild(b);this.container=c},EditShapeDialog=function(a,d,c,b,g){b=null!=b?b:300;g=null!=g?g:120;var f,k,l=document.createElement("table"),n=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,c);f.appendChild(k);n.appendChild(f); f=document.createElement("tr");k=document.createElement("td");var t=document.createElement("textarea");t.style.outline="none";t.style.resize="none";t.style.width=b-200+"px";t.style.height=g+"px";this.textarea=t;this.init=function(){t.focus();t.scrollTop=0};k.appendChild(t);f.appendChild(k);k=document.createElement("td");c=document.createElement("div");c.style.position="relative";c.style.border="1px solid gray";c.style.top="6px";c.style.width="200px";c.style.height=g+4+"px";c.style.overflow="hidden"; c.style.marginBottom="16px";mxEvent.disableContextMenu(c);k.appendChild(c);var e=new Graph(c);e.setEnabled(!1);var m=a.editor.graph.cloneCell(d);e.addCells([m]);c=e.view.getState(m);var p="";null!=c.shape&&null!=c.shape.stencil&&(p=mxUtils.getPrettyXml(c.shape.stencil.desc));mxUtils.write(t,p||"");c=e.getGraphBounds();g=Math.min(160/c.width,(g-40)/c.height);e.view.scaleAndTranslate(g,20/g-c.x,20/g-c.y);f.appendChild(k);n.appendChild(f);f=document.createElement("tr");k=document.createElement("td"); -k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var u=function(b,e,c){var d=t.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement), +k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");a.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),g.className="geBtn",k.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&k.appendChild(g);var q=function(b,e,c){var d=t.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement), m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!b.model.contains(e),!c||m||d!=p){d=Graph.compress(d);b.getModel().beginUpdate();try{if(m){var f=a.editor.graph.getFreeInsertPoint();e.geometry.x=f.x;e.geometry.y=f.y;b.addCell(e)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[e])}catch(A){throw A;}finally{b.getModel().endUpdate()}m&& -(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){u(e,m,!1)});c.className="geBtn";k.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";k.appendChild(c);a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);n.appendChild(f);l.appendChild(n);this.container=l},CustomDialog=function(a,d,c,b,g,f,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div"); +(b.setSelectionCell(e),b.scrollCellToVisible(e))}};c=mxUtils.button(mxResources.get("preview"),function(){q(e,m,!1)});c.className="geBtn";k.appendChild(c);c=mxUtils.button(mxResources.get("apply"),function(){q(a.editor.graph,d,!0)});c.className="geBtn gePrimaryBtn";k.appendChild(c);a.editor.cancelFirst||k.appendChild(g);f.appendChild(k);n.appendChild(f);l.appendChild(n);this.container=l},CustomDialog=function(a,d,c,b,g,f,k,l){var n=document.createElement("div");n.appendChild(d);d=document.createElement("div"); d.style.marginTop="16px";d.style.textAlign="center";null!=k&&d.appendChild(k);a.isOffline()||null==f||(k=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),k.className="geBtn",d.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&d.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c()});d.appendChild(g);g.className="geBtn gePrimaryBtn"; a.editor.cancelFirst||d.appendChild(k);n.appendChild(d);this.cancelBtn=k;this.okButton=g;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+ mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+ mxResources.get("myDiagrams",null,"My diagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">🛈 '+ mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",d=document.createElement("div");d.innerHTML=a;d.className="geTemplateDlg"; var a=window.innerWidth,c=window.innerHeight,b=987,g=712;.9*a<b&&(b=Math.max(.9*a,600),d.style.width=b+"px");.9*c<g&&(g=Math.max(.9*c,300),d.style.height=g+"px");this.width=b;this.height=g;this.container=d}; -TemplatesDialog.prototype.init=function(a,d,c,b,g,f,k,l,n,t){function e(){null!=G&&(G.style.fontWeight="normal",G.style.textDecoration="none",G=null)}function m(a,b,e,c,d,m,p){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";E.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(p?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");E.querySelector("."+b).src="/images/"+e+"-sel.svg";E.querySelector("."+d).src="/images/"+ +TemplatesDialog.prototype.init=function(a,d,c,b,g,f,k,l,n,t){function e(){null!=H&&(H.style.fontWeight="normal",H.style.textDecoration="none",H=null)}function m(a,b,e,c,d,m,f){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";E.querySelector(".geTempDlgRadioBtn[data-id="+c+"]").className="geTempDlgRadioBtn "+(f?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");E.querySelector("."+b).src="/images/"+e+"-sel.svg";E.querySelector("."+d).src="/images/"+ m+".svg";return!0}function p(a){function b(a){W.removeChild(c);E.removeChild(e);W.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var e=document.createElement("div");e.className="geTempDlgDialogMask";E.appendChild(e);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn"; -a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var m=W.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,b,e){if(null!=I){for(var c=I.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}I.className=c.join(" ")}null!=a?(I=a,I.className+=" "+b,H=e,Y.className="geTempDlgCreateBtn"):(H=I=null,Y.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")} -function v(b){if(null!=H){var e=H;H=null;Y.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";e.isExternal?(1==b?t(e.url,e,"nameInput.value"):n(e.url,e,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+e.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function q(a){a=a?"":"none";for(var b=E.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display= -a}function z(a,b,e){function c(){Y.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));q(!b)}U.innerHTML="";u();N=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML= -mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(f);d.appendChild(m);U.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,f=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,B=a[m].imgUrl,l=mxUtils.htmlEntities(a[m].changedBy||""),A=mxUtils.htmlEntities(a[m].lastModifiedOn|| -"");B||(B=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=e?50:15;null!=f&&f.length>g&&(f=f.substring(0,g)+"…");if(e){var y=document.createElement("tr"),B=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));B.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=f;B.appendChild(k);y.appendChild(B);B=document.createElement("td"); -B.innerHTML=l;y.appendChild(B);B=document.createElement("td");B.innerHTML=A;y.appendChild(B);d.appendChild(y);null==I&&(c(),u(y,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(y,"click",function(){I!=b&&(c(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(y,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],y)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==I&&(c(),u(x,"geTempDlgDiagramTileActive", -a[m]));l=document.createElement("div");l.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,l);z.src=B;l.appendChild(z);x.appendChild(l);l=document.createElement("div");l.className="geTempDlgDiagramTileLbl";l.innerHTML=null!=f?f:"";x.appendChild(l); -n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));x.appendChild(n);(function(a,b){mxEvent.addListener(x,"click",function(){I!=b&&(c(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",v);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],x);U.appendChild(x)}}}function x(a,b){ba.innerHTML="";u();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory= -!0;var m=document.createElement("div"),p=mxResources.get(d.title);null==p&&(p=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",p);p=mxUtils.htmlEntities(p);15<p.length&&(p=p.substring(0,15)+"…");null==I&&(Y.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(m,"geTempDlgNewDiagramCatItemActive",d));var f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img"); -g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;f.appendChild(g);m.appendChild(f);f=document.createElement("div");f.className="geTempDlgNewDiagramCatItemLbl";f.innerHTML=p;m.appendChild(f);ba.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){I!=b&&(Y.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),q(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",v)})(d,m)}X.style.display=5>a.length?"none":""}function C(a){var b=E.querySelector(".geTemplatesList"), -e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),m=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");c.innerHTML=d+" ("+m.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(fa.style.display="none",ga.style.minHeight= -"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",W.scrollTop=0,D&&(B=!0),L.innerHTML=e,V.style.display="none",z(a[b],!0))})})(e,d,c)}}function y(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),B=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),R=null,k(M,a?null:f))}function A(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);B=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+ -mxUtils.htmlEntities(a)+'"';l(a,M,F?null:f);R=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var E=this.container,D=!1,B=!1,G=null,I=null,H=null,J=!1,F=!0,K=!1,N=[],R,X=E.querySelector(".geTempDlgShowAllBtn"),U=E.querySelector(".geTempDlgDiagramsTiles"),L=E.querySelector(".geTempDlgDiagramsListTitle"),V=E.querySelector(".geTempDlgDiagramsListBtns"),W=E.querySelector(".geTempDlgContent"),ga=E.querySelector(".geTempDlgDiagramsList"),fa=E.querySelector(".geTempDlgNewDiagramCat"), -ba=E.querySelector(".geTempDlgNewDiagramCatList"),Y=E.querySelector(".geTempDlgCreateBtn"),aa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(E.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){e();fa.style.display="";ga.style.minHeight="calc(100% - 280px)";y(F)});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg", -"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(F=!0,null==R?y(F):A(R))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(F=!1,null==R?y(F):A(R))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg", -"tiles",!1)&&(K=!0,z(N,!1,K))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,z(N,!1,K))});mxEvent.addListener(X,"click",function(){J?(fa.style.height="280px",ba.style.height="190px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(da)):(fa.style.height="440px",ba.style.height="355px",X.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess", -null,"- Show less")),x(da,!0));J=!J});var P=!1,ca=!1,Z={},da=[],Q=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(Q++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a= -a.nextSibling}C(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;B?B=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")): -z(a,!1,K)};y(F);var ea=null;l&&mxEvent.addListener(E.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?A(b.value):ea=setTimeout(function(){A(b.value)},500)});mxEvent.addListener(Y,"click",v);mxEvent.addListener(E.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){v(!0)});mxEvent.addListener(E.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})}; +a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var m=W.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function q(a,b,e){if(null!=G){for(var c=G.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}G.className=c.join(" ")}null!=a?(G=a,G.className+=" "+b,J=e,X.className="geTempDlgCreateBtn"):(J=G=null,X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")} +function u(b){if(null!=J){var e=J;J=null;X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";e.isExternal?(1==b?t(e.url,e,"nameInput.value"):n(e.url,e,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+e.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=E.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display= +a}function z(a,b,e){function c(){X.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}U.innerHTML="";q();O=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML= +mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(f);d.appendChild(m);U.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,f=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,C=a[m].imgUrl,A=mxUtils.htmlEntities(a[m].changedBy||""),x=mxUtils.htmlEntities(a[m].lastModifiedOn|| +"");C||(C=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=e?50:15;null!=f&&f.length>g&&(f=f.substring(0,g)+"…");if(e){var l=document.createElement("tr"),C=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));C.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=f;C.appendChild(k);l.appendChild(C);C=document.createElement("td"); +C.innerHTML=A;l.appendChild(C);C=document.createElement("td");C.innerHTML=x;l.appendChild(C);d.appendChild(l);null==G&&(c(),q(l,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(l,"click",function(){G!=b&&(c(),q(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],l)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",k);null==G&&(c(),q(y,"geTempDlgDiagramTileActive", +a[m]));A=document.createElement("div");A.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var z=document.createElement("img");z.style.display="none";(function(a,b){z.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};z.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(z,A);z.src=C;A.appendChild(z);y.appendChild(A);A=document.createElement("div");A.className="geTempDlgDiagramTileLbl";A.innerHTML=null!=f?f:"";y.appendChild(A); +n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){G!=b&&(c(),q(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",u);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],y);U.appendChild(y)}}}function y(a,b){ba.innerHTML="";q();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory= +!0;var m=document.createElement("div"),f=mxResources.get(d.title);null==f&&(f=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",f);f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"…");null==G&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),q(m,"geTempDlgNewDiagramCatItemActive",d));var p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img"); +g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;p.appendChild(g);m.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=f;m.appendChild(p);ba.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){G!=b&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),q(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",u)})(d,m)}Y.style.display=5>a.length?"none":""}function B(a){var b=E.querySelector(".geTemplatesList"), +e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),m=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"…");c.innerHTML=d+" ("+m.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){H!=d&&(null!=H?(H.style.fontWeight="normal",H.style.textDecoration="none"):(fa.style.display="none",ga.style.minHeight= +"100%"),H=d,H.style.fontWeight="bold",H.style.textDecoration="underline",W.scrollTop=0,D&&(C=!0),L.innerHTML=e,V.style.display="none",z(a[b],!0))})})(e,d,c)}}function x(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),C=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(M,a?null:f))}function A(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);C=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+ +mxUtils.htmlEntities(a)+'"';l(a,M,F?null:f);Q=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var E=this.container,D=!1,C=!1,H=null,G=null,J=null,I=!1,F=!0,K=!1,O=[],Q,Y=E.querySelector(".geTempDlgShowAllBtn"),U=E.querySelector(".geTempDlgDiagramsTiles"),L=E.querySelector(".geTempDlgDiagramsListTitle"),V=E.querySelector(".geTempDlgDiagramsListBtns"),W=E.querySelector(".geTempDlgContent"),ga=E.querySelector(".geTempDlgDiagramsList"),fa=E.querySelector(".geTempDlgNewDiagramCat"), +ba=E.querySelector(".geTempDlgNewDiagramCatList"),X=E.querySelector(".geTempDlgCreateBtn"),aa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(E.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){e();fa.style.display="";ga.style.minHeight="calc(100% - 280px)";x(F)});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg", +"all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(F=!0,null==Q?x(F):A(Q))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(F=!1,null==Q?x(F):A(Q))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg", +"tiles",!1)&&(K=!0,z(O,!1,K))});mxEvent.addListener(E.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,z(O,!1,K))});mxEvent.addListener(Y,"click",function(){I?(fa.style.height="280px",ba.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(da)):(fa.style.height="440px",ba.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess", +null,"- Show less")),y(da,!0));I=!I});var P=!1,ca=!1,Z={},da=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(R++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a= +a.nextSibling}B(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;C?C=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")): +z(a,!1,K)};x(F);var ea=null;l&&mxEvent.addListener(E.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?A(b.value):ea=setTimeout(function(){A(b.value)},500)});mxEvent.addListener(X,"click",u);mxEvent.addListener(E.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(E.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})}; var BtnDialog=function(a,d,c,b){var g=document.createElement("div");g.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("done"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";d==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox? (k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}")); -c=mxUtils.button(c,b);c.insertBefore(l,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&C.click()}var k,l,n,t=document.createElement("table"),e=document.createElement("tbody");t.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace= +c=mxUtils.button(c,b);c.insertBefore(l,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&B.click()}var k,l,n,t=document.createElement("table"),e=document.createElement("tbody");t.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace= "nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","sysfonts");m.setAttribute("type","radio");m.setAttribute("name","current-fontdialog");m.setAttribute("id","fontdialog-sysfonts");l.appendChild(m);n=document.createElement("label");n.setAttribute("for","fontdialog-sysfonts");mxUtils.write(n,mxResources.get("sysFonts",null,"System Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k); k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var p=document.createElement("input");"s"==b&&p.setAttribute("value",d);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";l=document.createElement("td");l.appendChild(p);k.appendChild(l);e.appendChild(k);k=document.createElement("tr"); -l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");l.appendChild(u);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts", -null,"Google Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var v=document.createElement("input");"g"==b&&v.setAttribute("value",d);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(v); -k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","webfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-webfonts");l.appendChild(q);n=document.createElement("label");n.setAttribute("for", +l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","googlefonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-googlefonts");l.appendChild(q);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts", +null,"Google Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var u=document.createElement("input");"g"==b&&u.setAttribute("value",d);u.style.marginLeft="4px";u.style.width="250px";u.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(u); +k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");l.appendChild(v);n=document.createElement("label");n.setAttribute("for", "fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var z=document.createElement("input");"w"==b&&z.setAttribute("value",d);z.style.marginLeft="4px";z.style.width="250px"; -z.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(z);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";l=document.createElement("td"); -l.appendChild(x);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=v:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}), -d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var C=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):u.checked?(b=v.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):q.checked&&(b=z.value,e=x.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null== -b||0==b.length?(t.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(t.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});C.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(v,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(v,"focus", -function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(z,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(x,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});l.appendChild(C);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);t.appendChild(e);this.container=t}; +z.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(z);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";l=document.createElement("td"); +l.appendChild(y);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=u:"w"==b&&(a=z);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}), +d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var B=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):q.checked?(b=u.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=z.value,e=y.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null== +b||0==b.length?(t.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(t.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(u,"keypress",f);mxEvent.addListener(z,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(u,"focus", +function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(z,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});l.appendChild(B);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);t.appendChild(e);this.container=t}; function AspectDialog(a,d,c,b,g){this.aspect={pageId:d||a.pages[0].getId(),layerIds:c||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList"; d.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var k=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(k);k.className="geBtn gePrimaryBtn"; a.editor.cancelFirst||c.appendChild(f);k.setAttribute("disabled","disabled");this.okBtn=k;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node,d.root)}}; @@ -8889,16 +8894,16 @@ defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectangle dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a,b){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}}, {name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=b.editorUi.editor.graph;return null!=e&&(c.isSwimlane(e)||0<c.model.getChildCount(e))},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&"1"!=mxUtils.getValue(a.style,"part","0")}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,b){var e=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null, c=b.editorUi.editor.graph;return null!=e&&(c.isContainer(e)&&"0"!=a.style.collapsible||!c.isContainer(e)&&"1"==a.style.collapsible)},isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,b){return 1==a.vertices.length&&0==a.edges.length&&!b.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool", -defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length?b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable", -type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"moveCells",dispName:"Move Cells on Fold", -type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; +defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,b){var e=b.editorUi.editor.graph.model;return 0<a.vertices.length?e.isVertex(e.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,b){var e=0<a.vertices.length? +b.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=e&&!e.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding", +type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,b){var e=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return null==e||e==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,b){return 0<a.vertices.length&&b.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,b,e){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var m=0;m<c.length;m++)if("mxgraph"==c[m].getAttribute("class")){d.push(c[m]);break}0<d.length&& (c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(a=mxUtils.parseXml(d.xml),a=a.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=Graph.decompress(c,null,e),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)), null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(a=Editor.parseDiagramNode(d,e)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,b){var e=mxUtils.trim(mxUtils.getTextContent(a)),c=null; 0<e.length?(e=Graph.decompress(e,null,b),null!=e&&0<e.length&&(c=mxUtils.parseXml(e).documentElement)):(e=mxUtils.getChildNodes(a),0<e.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(e[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var b=mxUtils.getTextContent(a),e=null;0<b.length?e=Graph.decompress(b):null!=a.firstChild&&(e=mxUtils.getXml(a.firstChild));return e};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&& -!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,m=[],p=null;d<a.length;){var f=a.charCodeAt(d),d=d+1;10!=f&&(e+=String.fromCharCode(f));f=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var q=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(q>d){b=a.substring(d,q);break}}10==f&&("endobj"==e?p=null:"obj"==e.substring(e.length-3,e.length)||"xref"==e||"trailer"==e?(p=[],m[e.split(" ")[0]]=p):null!=p&&p.push(e),e="")}null==b&&(b=Editor.extractGraphModelFromXref(m));null!=b&& +!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var b=null,e="",c=0,d=0,m=[],f=null;d<a.length;){var p=a.charCodeAt(d),d=d+1;10!=p&&(e+=String.fromCharCode(p));p=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var g=a.indexOf("%3C%2Fmxfile%3E)",d)+15,d=d-9;if(g>d){b=a.substring(d,g);break}}10==p&&("endobj"==e?f=null:"obj"==e.substring(e.length-3,e.length)||"xref"==e||"trailer"==e?(f=[],m[e.split(" ")[0]]=f):null!=f&&f.push(e),e="")}null==b&&(b=Editor.extractGraphModelFromXref(m));null!=b&& (b=decodeURIComponent(b.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return b};Editor.extractGraphModelFromXref=function(a){var b=a.trailer,e=null;null!=b&&(b=/.* \/Info (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&(b=a[b[1]],null!=b&&(b=/.* \/Subject (\d+) (\d+) R/g.exec(b.join("\n")),null!=b&&0<b.length&&(a=a[b[1]],null!=a&&(a=a.join("\n"),e=a.substring(1,a.length-1))))));return e};Editor.extractGraphModelFromPng=function(a){var b=null;try{var e=a.substring(a.indexOf(",")+1),c=window.atob&& -!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,e,d){a=c.substring(a+8,a+8+d);"zTXt"==e?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==e&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==e)return!0}))}catch(J){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)); +!mxClient.IS_SF?atob(e):Base64.decode(e,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,e,d){a=c.substring(a+8,a+8+d);"zTXt"==e?(d=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,d)&&(a=pako.inflateRaw(a.substring(d+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==e&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(b=a[1]));if(null!=b||"IDAT"==e)return!0}))}catch(I){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)); null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.extractParserError=function(a,b){var e=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(e=b||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(e=mxUtils.getTextContent(c[0])));return null!=e?mxUtils.trim(e):e};Editor.configure=function(a,b){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts; ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile= a.templateFile);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!= @@ -8910,9 +8915,9 @@ b)}}}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUI decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var e=b.getElementsByTagName("parsererror");if(null!=e&&0<e.length){var e=e[0],c=e.getElementsByTagName("div");null!=c&&0<c.length&&(e=c[0]);throw{message:mxUtils.getTextContent(e)};}if("mxGraphModel"==b.nodeName){e=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=e&&""!=e)e!=this.graph.currentStyle&& (c=null!=this.graph.themes?this.graph.themes[e]:mxUtils.load(STYLE_PATH+"/"+e+".xml").getDocumentElement(),null!=c&&(d=new mxCodec(c.ownerDocument),d.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var d=new mxCodec(c.ownerDocument);d.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=e;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math"); e=b.getAttribute("backgroundImage");null!=e?(e=JSON.parse(e),this.graph.setBackgroundImage(new mxImage(e.src,e.width,e.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1);if(e=b.getAttribute("extFonts"))try{for(e= -e.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<e.length;c++)this.graph.addExtFont(e[c].name,e[c].url)}catch(J){console.log("ExtFonts format error: "+J.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!= +e.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<e.length;c++)this.graph.addExtFont(e[c].name,e[c].url)}catch(I){console.log("ExtFonts format error: "+I.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var b=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!= this.graph.currentStyle&&b.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));b.setAttribute("math",this.graph.mathEnabled?"1":"0");b.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var e=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});b.setAttribute("extFonts",e.join("|"))}return b};Editor.prototype.isDataSvg=function(a){try{var b= -mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var e=mxUtils.parseXml(b).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(H){}return!1};Editor.prototype.extractGraphModel=function(a,b,e){return Editor.extractGraphModel.apply(this,arguments)};var c=Editor.prototype.resetGraph; +mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var e=mxUtils.parseXml(b).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(a,b,e){return Editor.extractGraphModel.apply(this,arguments)};var c=Editor.prototype.resetGraph; Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();c.apply(this,arguments)};var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this, arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,b){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset", MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a= @@ -8922,20 +8927,20 @@ Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagNa return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert, e=this;a.convert=function(c){if(null!=c){var d="http://"==c.substring(0,7)||"https://"==c.substring(0,8);d&&!navigator.onLine?c=EditorUi.prototype.svgBrokenImage.src:!d||c.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&e.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+ btoa(unescape(encodeURIComponent(a)))};Editor.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(EditorUi.prototype.svgBrokenImage.src)});else{var e=new Image;EditorUi.prototype.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){var a=document.createElement("canvas"),c=a.getContext("2d");a.height=e.height;a.width=e.width;c.drawImage(e,0,0);try{b(a.toDataURL())}catch(F){b(EditorUi.prototype.svgBrokenImage.src)}}; -e.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};e.src=a}};Editor.prototype.convertImages=function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,m=e||{};e=mxUtils.bind(this,function(e,p){for(var f=a.getElementsByTagName(e),q=0;q<f.length;q++)mxUtils.bind(this,function(e){var f=c.convert(e.getAttribute(p));if(null!=f&&"data:"!=f.substring(0,5)){var q=m[f];null==q?(d++,this.convertImageToDataUri(f,function(c){null!=c&&(m[f]=c,e.setAttribute(p,c));d--;0==d&&b(a)})):e.setAttribute(p, -q)}else null!=f&&e.setAttribute(p,f)})(f[q])});e("image","xlink:href");e("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",e=0,c=a.length,d,m,p;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}m=a.charCodeAt(e++);if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> -2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2);b+="=";break}p=a.charCodeAt(e++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2|(p&192)>>6); -b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p&63)}return b};Editor.prototype.loadUrl=function(a,b,e,c,d,m){try{var p=c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(p){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a= -mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}m=null!=m?m:"data:image/png;base64,";c=m+this.base64Encode(c)}b(c)}}else null!=e&&e({code:App.ERROR_UNKNOWN},a)}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},p,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(R){null!=e&&e(R)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b= -function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},e=this.fontCss.split("url("),c=0,d={},m=mxUtils.bind(this,function(){if(0==c){for(var m=[e[0]],p=1;p<e.length;p++){var f=e[p].indexOf(")");m.push('url("');m.push(d[b(e[p].substring(0,f))]);m.push('"'+e[p].substring(f))}this.resolvedFontCss=m.join("");a()}});if(0<e.length)for(var p=1;p<e.length;p++){var f=e[p].indexOf(")"),q=null,g=e[p].indexOf("format(",f);0<g&&(q=b(e[p].substring(g+7,e[p].indexOf(")", -g))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;c++;var b="application/x-font-ttf";if("svg"==q||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==q||"embedded-opentype"==q||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==q||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==q||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==q||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==q||/(\.sfnt)($|\?)/i.test(a))b= -"application/font-sfnt";var e=a;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(e,mxUtils.bind(this,function(b){d[a]=b;c--;m()}),mxUtils.bind(this,function(a){c--;m()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(e[p].substring(0,f)),q)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&& +e.onerror=function(){b(EditorUi.prototype.svgBrokenImage.src)};e.src=a}};Editor.prototype.convertImages=function(a,b,e,c){null==c&&(c=this.createImageUrlConverter());var d=0,m=e||{};e=mxUtils.bind(this,function(e,f){for(var p=a.getElementsByTagName(e),g=0;g<p.length;g++)mxUtils.bind(this,function(e){var p=c.convert(e.getAttribute(f));if(null!=p&&"data:"!=p.substring(0,5)){var g=m[p];null==g?(d++,this.convertImageToDataUri(p,function(c){null!=c&&(m[p]=c,e.setAttribute(f,c));d--;0==d&&b(a)})):e.setAttribute(f, +g)}else null!=p&&e.setAttribute(f,p)})(p[g])});e("image","xlink:href");e("img","src");0==d&&b(a)};Editor.prototype.base64Encode=function(a){for(var b="",e=0,c=a.length,d,m,f;e<c;){d=a.charCodeAt(e++)&255;if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);b+="==";break}m=a.charCodeAt(e++);if(e==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>> +2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2);b+="=";break}f=a.charCodeAt(e++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(m&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((m&15)<<2|(f&192)>>6); +b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return b};Editor.prototype.loadUrl=function(a,b,e,c,d,m){try{var f=c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var p=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var c=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a= +mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);c=c.join("")}m=null!=m?m:"data:image/png;base64,";c=m+this.base64Encode(c)}b(c)}}else null!=e&&e({code:App.ERROR_UNKNOWN},a)}),function(){null!=e&&e({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){d&&null!=e&&e({code:App.ERROR_TIMEOUT,retry:p})})});p()}catch(Q){null!=e&&e(Q)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var b= +function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},e=this.fontCss.split("url("),c=0,d={},m=mxUtils.bind(this,function(){if(0==c){for(var m=[e[0]],f=1;f<e.length;f++){var p=e[f].indexOf(")");m.push('url("');m.push(d[b(e[f].substring(0,p))]);m.push('"'+e[f].substring(p))}this.resolvedFontCss=m.join("");a()}});if(0<e.length)for(var f=1;f<e.length;f++){var p=e[f].indexOf(")"),g=null,k=e[f].indexOf("format(",p);0<k&&(g=b(e[f].substring(k+7,e[f].indexOf(")", +k))));mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;c++;var b="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==g||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(a))b= +"application/font-sfnt";var e=a;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(e,mxUtils.bind(this,function(b){d[a]=b;c--;m()}),mxUtils.bind(this,function(a){c--;m()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(e[f].substring(0,p)),g)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var b=document.getElementsByTagName("style"),e=0;e<b.length;e++)0<mxUtils.getTextContent(b[e]).indexOf("MathJax")&& a[0].appendChild(b[e].cloneNode(!0))};Editor.prototype.addFontCss=function(a,b){b=null!=b?b:this.fontCss;if(null!=b){var e=a.getElementsByTagName("defs"),c=a.ownerDocument;0==e.length?(e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(e,a.firstChild):a.appendChild(e)):e=e[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c, -b);e.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,m,p,f,q,g,k,u,l,A){m=null!=m?m:!0;u=null!=u?u:this.graph;l=null!=l?l:0;var y=q?null:u.background;y==mxConstants.NONE&&(y=null);null==y&&(y=c);null==y&&0==q&&(y=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(y, -null,null,A,null,null!=p?p:!0,null,null,null,g),mxUtils.bind(this,function(e){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var p=document.createElement("canvas"),q=parseInt(e.getAttribute("width")),g=parseInt(e.getAttribute("height"));f=null!=f?f:1;null!=b&&(f=m?Math.min(1,Math.min(3*b/(4*g),b/q)):b/q);q=Math.ceil(f*q)+2*l;g=Math.ceil(f*g)+2*l;p.setAttribute("width",q);p.setAttribute("height",g);var k=p.getContext("2d");null!=y&&(k.beginPath(),k.rect(0,0,q,g),k.fillStyle=y,k.fill()); -k.scale(f,f);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(c,l/f,l/f);a(p)},0):(k.drawImage(c,l/f,l/f),a(p))}catch(da){null!=d&&d(da)}});c.onerror=function(a){null!=d&&d(a)};try{g&&this.graph.addSvgShadow(e);var p=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;e.getElementsByTagName("defs")[0].appendChild(a)}u.mathEnabled&&this.addMathCss(e);c.src=this.createSvgDataUri(mxUtils.getXml(e))}); -this.loadFonts(p)}catch(aa){null!=d&&d(aa)}}),e,k)};Editor.prototype.writeGraphModelToPng=function(a,b,e,c,d){function m(a,b){var e=q;q+=b;return a.substring(e,q)}function p(a){a=m(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function f(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var q=0;if(m(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10, -26,10))null!=d&&d();else if(m(a,4),"IHDR"!=m(a,4))null!=d&&d();else{m(a,17);d=a.substring(0,q);do{var g=p(a);if("IDAT"==m(a,4)){d=a.substring(0,q-8);e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,b,0,4);c=EditorUi.prototype.updateCRC(c,e,0,e.length);d+=f(e.length)+b+e+f(c^4294967295);d+=a.substring(q-8,a.length);break}d+=a.substring(q-8,q-4+g);m(a,g);m(a,4)}while(g);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d, +b);e.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,b,e,c,d,m,f,p,g,k,q,u,v,A){m=null!=m?m:!0;u=null!=u?u:this.graph;v=null!=v?v:0;var x=g?null:u.background;x==mxConstants.NONE&&(x=null);null==x&&(x=c);null==x&&0==g&&(x=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(x, +null,null,A,null,null!=f?f:!0,null,null,null,k),mxUtils.bind(this,function(e){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var f=document.createElement("canvas"),g=parseInt(e.getAttribute("width")),k=parseInt(e.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=m?Math.min(1,Math.min(3*b/(4*k),b/g)):b/g);g=Math.ceil(p*g)+2*v;k=Math.ceil(p*k)+2*v;f.setAttribute("width",g);f.setAttribute("height",k);var q=f.getContext("2d");null!=x&&(q.beginPath(),q.rect(0,0,g,k),q.fillStyle=x,q.fill()); +q.scale(p,p);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(c,v/p,v/p);a(f)},0):(q.drawImage(c,v/p,v/p),a(f))}catch(da){null!=d&&d(da)}});c.onerror=function(a){null!=d&&d(a)};try{k&&this.graph.addSvgShadow(e);var f=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;e.getElementsByTagName("defs")[0].appendChild(a)}u.mathEnabled&&this.addMathCss(e);c.src=this.createSvgDataUri(mxUtils.getXml(e))}); +this.loadFonts(f)}catch(aa){null!=d&&d(aa)}}),e,q)};Editor.prototype.writeGraphModelToPng=function(a,b,e,c,d){function m(a,b){var e=g;g+=b;return a.substring(e,g)}function f(a){a=m(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function p(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var g=0;if(m(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10, +26,10))null!=d&&d();else if(m(a,4),"IHDR"!=m(a,4))null!=d&&d();else{m(a,17);d=a.substring(0,g);do{var k=f(a);if("IDAT"==m(a,4)){d=a.substring(0,g-8);e=e+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,b,0,4);c=EditorUi.prototype.updateCRC(c,e,0,e.length);d+=p(e.length)+b+e+p(c^4294967295);d+=a.substring(g-8,a.length);break}d+=a.substring(g-8,g-4+k);m(a,k);m(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d, !0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell= function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)?e=b.getId():null!=a.currentPage&&(e=a.currentPage.getId());return e});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments): this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var n=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,e=b.editor.graph,c=this.createOption(mxResources.get("shadow"), @@ -8967,30 +8972,30 @@ null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,e){if(null!=b) Editor.commonVertexProperties):Array.prototype.push.apply(d.shape.customProperties,Editor.commonEdgeProperties)),c(d.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(F){}}};var e=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);if(Editor.enableCustomProperties){for(var b= {},c=a.vertices,d=a.edges,m=0;m<c.length;m++)this.findCommonProperties(c[m],b,0==m);for(m=0;m<d.length;m++)this.findCommonProperties(d[m],b,0==c.length&&0==m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()})); b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b); -mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,e){function c(a,b,e,c){u.getModel().beginUpdate();try{var d=[],m=[];if(null!=e.index){for(var p=[],f=e.parentRow.nextSibling;f&&f.getAttribute("data-pName")==a;)p.push(f.getAttribute("data-pValue")),f=f.nextSibling;e.index<p.length?null!=c?p.splice(c,1):p[e.index]=b:p.push(b);null!=e.size&&p.length>e.size&&(p=p.slice(0,e.size));b=p.join(",");null!=e.countProperty&& -(u.setCellStyles(e.countProperty,p.length,u.getSelectionCells()),d.push(e.countProperty),m.push(p.length))}u.setCellStyles(a,b,u.getSelectionCells());d.push(a);m.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var q=e.dependentPropsDefVal[a],g=e.dependentPropsVals[a];if(g.length>b)g=g.slice(0,b);else for(var l=g.length;l<b;l++)g.push(q);g=g.join(",");u.setCellStyles(e.dependentProps[a],g,u.getSelectionCells());d.push(e.dependentProps[a]);m.push(g)}if("function"==typeof e.onChange)e.onChange(u, -b);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),m=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=m.x-d.x+"px";e.style.top=m.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function m(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px"; -d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function p(a,b,e,d,m,p,f){null!=b&&(b=b.split(","),l.push({name:a,values:b,type:e,defVal:d,countProperty:m, -parentRow:p,isDeletable:!0,flipBkg:f}));btn=mxUtils.button("+",mxUtils.bind(k,function(b){for(var q=p,k=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==a)q=q.nextSibling,k++;else break;var u={type:e,parentRow:p,index:k,isDeletable:!0,defVal:d,countProperty:m},k=g(a,"",u,0==k%2,f);c(a,d,u);q.parentNode.insertBefore(k,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function f(a,b,e,c,d,m,p){if(0<d){var f=Array(d); -b=null!=b?b.split(","):[];for(var q=0;q<d;q++)f[q]=null!=b[q]?b[q]:null!=c?c:"";l.push({name:a,values:f,type:e,defVal:c,parentRow:m,flipBkg:p,size:d})}return document.createElement("div")}function q(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function g(b,e,g,u,l){var y=g.dispName,A=g.type,v=document.createElement("tr");v.className="gePropRow"+(l?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow"; -v.setAttribute("data-pName",b);v.setAttribute("data-pValue",e);u=!1;null!=g.index&&(v.setAttribute("data-index",g.index),y=(null!=y?y:"")+"["+g.index+"]",u=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(y,null,y));u&&(n.style.textAlign="right");v.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==A)n.appendChild(m(b,e,g));else if("bool"==A||"boolean"==A)n.appendChild(q(b,e,g));else if("enum"==A){var x= -g.enumList;for(l=0;l<x.length;l++)if(y=x[l],y.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(k,function(){var m=document.createElement("select");d(n,m);for(var p=0;p<x.length;p++){var f=x[p],q=document.createElement("option");q.value=mxUtils.htmlEntities(f.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(f.dispName,null,f.dispName));m.appendChild(q)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change", -function(){var a=mxUtils.htmlEntities(m.value);c(b,a,g)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==A?n.appendChild(p(b,e,g.subType,g.subDefVal,g.countProperty,v,l)):"staticArr"==A?n.appendChild(f(b,e,g.subType,g.subDefVal,g.size,v,l)):(n.innerHTML=e,mxEvent.addListener(n,"click",mxUtils.bind(k,function(){function m(){var a=p.value,a=0==a.length&&"string"!=A?0:a;g.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",A="string"):(a=parseFloat(a), -a=isNaN(a)?0:a));null!=g.min&&a<g.min?a=g.min:null!=g.max&&a>g.max&&(a=g.max);a=mxUtils.htmlEntities(("int"==A?parseInt(a):a)+"");c(b,a,g)}var p=document.createElement("input");d(n,p,!0);p.value=e;p.className="gePropEditor";"int"!=A&&"float"!=A||g.allowAuto||(p.type="number",p.step="int"==A?"1":"any",null!=g.min&&(p.min=parseFloat(g.min)),null!=g.max&&(p.max=parseFloat(g.max)));a.appendChild(p);mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&m()});p.focus();mxEvent.addListener(p,"blur", -function(){m()})})));g.isDeletable&&(l=mxUtils.button("-",mxUtils.bind(k,function(a){c(b,"",g,g.index);mxEvent.consume(a)})),l.style.height="16px",l.style.width="25px",l.style["float"]="right",l.className="geColorBtn",n.appendChild(l));v.appendChild(n);return v}var k=this,u=this.editorUi.editor.graph,l=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var y=document.createElement("tr");y.className="gePropHeader"; -var v=document.createElement("th");v.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;v.appendChild(n);mxUtils.write(v,mxResources.get("property"));y.style.cursor="pointer";var x=function(){var b=A.querySelectorAll(".gePropNonHeaderRow"),e;if(k.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src= -Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(y,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;x()});y.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";v.innerHTML=mxResources.get("value");y.appendChild(v);A.appendChild(y);var z=!1,D=!1,B;for(B in b)if(y=b[B],"function"!=typeof y.isVisible||y.isVisible(e,this)){var C=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=y.getDefaultValue? -y.getDefaultValue(e,this):y.defVal;if("separator"==y.type)D=!D;else{if("staticArr"==y.type)y.size=parseInt(e.style[y.sizeProperty]||b[y.sizeProperty].defVal)||0;else if(null!=y.dependentProps){for(var E=y.dependentProps,t=[],G=[],v=0;v<E.length;v++){var I=e.style[E[v]];G.push(b[E[v]].subDefVal);t.push(null!=I?I.split(","):[])}y.dependentPropsDefVal=G;y.dependentPropsVals=t}A.appendChild(g(B,C,y,z,D));z=!z}}for(v=0;v<l.length;v++)for(y=l[v],b=y.parentRow,e=0;e<y.values.length;e++)B=g(y.name,y.values[e], -{type:y.type,parentRow:y.parentRow,isDeletable:y.isDeletable,index:e,defVal:y.defVal,countProperty:y.countProperty,size:y.size},0==e%2,y.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(A);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),p=0;p<m.length;p++)d=mxUtils.removeStylename(d, -m[p]);var f=c.getModel().isVertex(e[b])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(f,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR, -a.stroke||mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(f,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(f, -mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(f,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[b],d)}}finally{c.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ +mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,e){function c(a,b,e,c){u.getModel().beginUpdate();try{var d=[],m=[];if(null!=e.index){for(var f=[],p=e.parentRow.nextSibling;p&&p.getAttribute("data-pName")==a;)f.push(p.getAttribute("data-pValue")),p=p.nextSibling;e.index<f.length?null!=c?f.splice(c,1):f[e.index]=b:f.push(b);null!=e.size&&f.length>e.size&&(f=f.slice(0,e.size));b=f.join(",");null!=e.countProperty&& +(u.setCellStyles(e.countProperty,f.length,u.getSelectionCells()),d.push(e.countProperty),m.push(f.length))}u.setCellStyles(a,b,u.getSelectionCells());d.push(a);m.push(b);if(null!=e.dependentProps)for(a=0;a<e.dependentProps.length;a++){var g=e.dependentPropsDefVal[a],k=e.dependentPropsVals[a];if(k.length>b)k=k.slice(0,b);else for(var v=k.length;v<b;v++)k.push(g);k=k.join(",");u.setCellStyles(e.dependentProps[a],k,u.getSelectionCells());d.push(e.dependentProps[a]);m.push(k)}if("function"==typeof e.onChange)e.onChange(u, +b);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function d(b,e,c){var d=mxUtils.getOffset(a,!0),m=mxUtils.getOffset(b,!0);e.style.position="absolute";e.style.left=m.x-d.x+"px";e.style.top=m.y-d.y+"px";e.style.width=b.offsetWidth+"px";e.style.height=b.offsetHeight-(c?4:0)+"px";e.style.zIndex=5}function m(a,b,e){var d=document.createElement("div");d.style.width="32px";d.style.height="4px";d.style.margin="2px"; +d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,b,e,d,m,f,p){null!=b&&(b=b.split(","),v.push({name:a,values:b,type:e,defVal:d,countProperty:m, +parentRow:f,isDeletable:!0,flipBkg:p}));btn=mxUtils.button("+",mxUtils.bind(q,function(b){for(var g=f,q=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,q++;else break;var u={type:e,parentRow:f,index:q,isDeletable:!0,defVal:d,countProperty:m},q=k(a,"",u,0==q%2,p);c(a,d,u);g.parentNode.insertBefore(q,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function p(a,b,e,c,d,m,f){if(0<d){var p=Array(d); +b=null!=b?b.split(","):[];for(var g=0;g<d;g++)p[g]=null!=b[g]?b[g]:null!=c?c:"";v.push({name:a,values:p,type:e,defVal:c,parentRow:m,flipBkg:f,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function k(b,e,k,u,v){var A=k.dispName,x=k.type,l=document.createElement("tr");l.className="gePropRow"+(v?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow"; +l.setAttribute("data-pName",b);l.setAttribute("data-pValue",e);u=!1;null!=k.index&&(l.setAttribute("data-index",k.index),A=(null!=A?A:"")+"["+k.index+"]",u=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(A,null,A));u&&(n.style.textAlign="right");l.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==x)n.appendChild(m(b,e,k));else if("bool"==x||"boolean"==x)n.appendChild(g(b,e,k));else if("enum"==x){var y= +k.enumList;for(v=0;v<y.length;v++)if(A=y[v],A.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(A.dispName,null,A.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(q,function(){var m=document.createElement("select");d(n,m);for(var f=0;f<y.length;f++){var p=y[f],g=document.createElement("option");g.value=mxUtils.htmlEntities(p.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(p.dispName,null,p.dispName));m.appendChild(g)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change", +function(){var a=mxUtils.htmlEntities(m.value);c(b,a,k)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==x?n.appendChild(f(b,e,k.subType,k.subDefVal,k.countProperty,l,v)):"staticArr"==x?n.appendChild(p(b,e,k.subType,k.subDefVal,k.size,l,v)):(n.innerHTML=e,mxEvent.addListener(n,"click",mxUtils.bind(q,function(){function m(){var a=f.value,a=0==a.length&&"string"!=x?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",x="string"):(a=parseFloat(a), +a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");c(b,a,k)}var f=document.createElement("input");d(n,f,!0);f.value=e;f.className="gePropEditor";"int"!=x&&"float"!=x||k.allowAuto||(f.type="number",f.step="int"==x?"1":"any",null!=k.min&&(f.min=parseFloat(k.min)),null!=k.max&&(f.max=parseFloat(k.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&m()});f.focus();mxEvent.addListener(f,"blur", +function(){m()})})));k.isDeletable&&(v=mxUtils.button("-",mxUtils.bind(q,function(a){c(b,"",k,k.index);mxEvent.consume(a)})),v.style.height="16px",v.style.width="25px",v.style["float"]="right",v.className="geColorBtn",n.appendChild(v));l.appendChild(n);return l}var q=this,u=this.editorUi.editor.graph,v=[];a.style.position="relative";a.style.padding="0";var A=document.createElement("table");A.style.whiteSpace="nowrap";A.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader"; +var l=document.createElement("th");l.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;l.appendChild(n);mxUtils.write(l,mxResources.get("property"));x.style.cursor="pointer";var y=function(){var b=A.querySelectorAll(".gePropNonHeaderRow"),e;if(q.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src= +Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;y()});x.appendChild(l);l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");x.appendChild(l);A.appendChild(x);var z=!1,D=!1,B;for(B in b)if(x=b[B],"function"!=typeof x.isVisible||x.isVisible(e,this)){var E=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=x.getDefaultValue? +x.getDefaultValue(e,this):x.defVal;if("separator"==x.type)D=!D;else{if("staticArr"==x.type)x.size=parseInt(e.style[x.sizeProperty]||b[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var C=x.dependentProps,t=[],H=[],l=0;l<C.length;l++){var G=e.style[C[l]];H.push(b[C[l]].subDefVal);t.push(null!=G?G.split(","):[])}x.dependentPropsDefVal=H;x.dependentPropsVals=t}A.appendChild(k(B,E,x,z,D));z=!z}}for(l=0;l<v.length;l++)for(x=v[l],b=x.parentRow,e=0;e<x.values.length;e++)B=k(x.name,x.values[e], +{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:e,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==e%2,x.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(A);y();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),f=0;f<m.length;f++)d=mxUtils.removeStylename(d, +m[f]);var p=c.getModel().isVertex(e[b])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR, +a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p, +mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[b],d)}}finally{c.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=""==a.fill?mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),b.style.border=a.stroke==mxConstants.NONE? -"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var e=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=e;b.style.border="1px solid "+ -p}d.appendChild(b)}d.innerHTML="";for(var e=0;e<a.length;e++)0<e&&0==mxUtils.mod(e,4)&&mxUtils.br(d),b(a[e])}function e(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d); -var m="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var p=document.createElement("div");p.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; -mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; -1<this.defaultColorSchemes.length&&(a.appendChild(p),a.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));e(p);e(f);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&& +"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var e=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=e;b.style.border="1px solid "+ +f}d.appendChild(b)}d.innerHTML="";for(var e=0;e<a.length;e++)0<e&&0==mxUtils.mod(e,4)&&mxUtils.br(d),b(a[e])}function e(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var c=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d); +var m="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var f=document.createElement("div");f.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var p=document.createElement("div");p.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; +1<this.defaultColorSchemes.length&&(a.appendChild(f),a.appendChild(p));mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));e(f);e(p);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&& (e=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",a.appendChild(e));var c=this.editorUi.editor.graph,d=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this, function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==e?b.style.width="202px":(e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==e?b.style.width="202px": (e.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize= @@ -8998,21 +9003,21 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti a.button,b.relatedTarget=a.relatedTarget}catch(F){}}p.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):e.apply(this,arguments)};var c=this.layoutManager.getLayout; this.layoutManager.getLayout=function(a){var b=this.graph.getCellStyle(a);if(null!=b){if("rack"==b.childLayout){var e=new mxStackLayout(this.graph,!1);e.gridSize=null!=b.rackUnitSize?parseFloat(b.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;e.fill=!0;e.marginLeft=b.marginLeft||0;e.marginRight=b.marginRight||0;e.marginTop=b.marginTop||0;e.marginBottom=b.marginBottom||0;e.allowGaps=b.allowGaps||0;e.resizeParent=!1;return e}if("undefined"!==typeof mxTableLayout&&"tableLayout"== b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||2,e.columns=b.tableColumns||2,e.colPercentages=b.colPercentages,e.rowPercentages=b.rowPercentages,e.equalColumns="1"==mxUtils.getValue(b,"equalColumns",e.colPercentages?"0":"1"),e.equalRows="1"==mxUtils.getValue(b,"equalRows",e.rowPercentages?"0":"1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.border=b.tableBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop|| -0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return u.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars= -Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var v=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b= -v.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var q=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,m,p,f,g,k,u){var l=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& -(l=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=q.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var A=y.ownerDocument,v=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");null!=A.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var n="",x="",z=0;z<this.extFonts.length;z++){var D=this.extFonts[z].name,C=this.extFonts[z].url;0==C.indexOf(Editor.GOOGLE_FONTS)? -n+="@import url("+C+");\n":x+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+C+'");\n}\n'}v.appendChild(A.createTextNode(n+x));y.getElementsByTagName("defs")[0].appendChild(v)}null!=l&&(this.stylesheet=l,this.refresh());return y};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& -(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= -function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& -this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== +0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return q.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars= +Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b= +u.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,m,f,p,g,k,q){var u=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& +(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=v.apply(this,arguments);if(q&&null!=this.extFonts&&0<this.extFonts.length){var x=A.ownerDocument,l=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?l.setAttributeNS("type","text/css"):l.setAttribute("type","text/css");for(var n="",y="",z=0;z<this.extFonts.length;z++){var D=this.extFonts[z].name,B=this.extFonts[z].url;0==B.indexOf(Editor.GOOGLE_FONTS)? +n+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+B+'");\n}\n'}l.appendChild(x.createTextNode(n+y));A.getElementsByTagName("defs")[0].appendChild(l)}null!=u&&(this.stylesheet=u,this.refresh());return A};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=z.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& +(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= +function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& +this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null!=e.open)if(this.isCustomLink(e.open)){if(!this.customLinkClicked(e.open))return}else this.openLink(e.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)e=a.actions[b],null!=e.toggle&&this.toggleCells(this.getCellsForAction(e.toggle,!0)),null!=e.show&&this.setCellsVisible(this.getCellsForAction(e.show,!0),!0),null!=e.hide&&this.setCellsVisible(this.getCellsForAction(e.hide, !0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var e=a.actions[b],c=[];null!=e.select&&this.isEnabled()&&(c=this.getCellsForAction(e.select),this.setSelectionCells(c));null!=e.highlight&&(c=this.getCellsForAction(e.highlight),this.highlightCells(c,e.highlight.color,e.highlight.duration,e.highlight.opacity));null!=e.scroll&&(c=this.getCellsForAction(e.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var e=this.getLinkForCell(b); -null!=e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.getLabel(b);for(var d=c.getElementsByTagName("a"),m=!1,p=0;p<d.length;p++)e=d[p].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[p].setAttribute("href",this.updateCustomLink(a,e)),m=!0);m&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0, -17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(H){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction= +null!=e&&"data:action/json,"==e.substring(0,17)&&this.setLinkForCell(b,this.updateCustomLink(a,e));if(this.isHtmlLabel(b)){var c=document.createElement("div");c.innerHTML=this.getLabel(b);for(var d=c.getElementsByTagName("a"),m=!1,f=0;f<d.length;f++)e=d[f].getAttribute("href"),null!=e&&"data:action/json,"==e.substring(0,17)&&(d[f].setAttribute("href",this.updateCustomLink(a,e)),m=!0);m&&this.labelChanged(b,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,b){if("data:action/json,"==b.substring(0, +17))try{var e=JSON.parse(b.substring(17));null!=e.actions&&(this.updateCustomLinkActions(a,e.actions),b="data:action/json,"+JSON.stringify(e))}catch(J){}return b};Graph.prototype.updateCustomLinkActions=function(a,b){for(var e=0;e<b.length;e++){var c=b[e];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction= function(a,b){if(null!=b&&null!=b.cells){for(var e=[],c=0;c<b.cells.length;c++)if("*"==b.cells[c])e.push(b.cells[c]);else{var d=a[b.cells[c]];null!=d?""!=d&&e.push(d):e.push(b.cells[c])}b.cells=e}};Graph.prototype.getCellsForAction=function(a,b){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,b))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var e=0;e<a.length;e++)if("*"==a[e])var c=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!= -c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var m=0,p={},f=0;f<a.length;f++)0<a[f].length&&(p[a[f].toLowerCase()]=!0,m++);for(f=0;f<b.length;f++)if(c&&this.model.getParent(b[f])==this.model.root||this.model.isVertex(b[f])||this.model.isEdge(b[f])){var q=null!=b[f].value&&"object"==typeof b[f].value?mxUtils.trim(b[f].value.getAttribute(e)|| -""):"",g=!1;if(0<q.length){if(q=q.toLowerCase().split(" "),q.length>=a.length){for(var k=g=0;k<q.length&&g<m;k++)null!=p[q[k]]&&g++;g=g==m}}else g=0==a.length;g&&d.push(b[f])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}}; +c},c));else{var d=this.model.getCell(a[e]);null!=d&&b.push(d)}return b};Graph.prototype.getCellsForTags=function(a,b,e,c){var d=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());e=null!=e?e:"tags";for(var m=0,f={},p=0;p<a.length;p++)0<a[p].length&&(f[a[p].toLowerCase()]=!0,m++);for(p=0;p<b.length;p++)if(c&&this.model.getParent(b[p])==this.model.root||this.model.isVertex(b[p])||this.model.isEdge(b[p])){var g=null!=b[p].value&&"object"==typeof b[p].value?mxUtils.trim(b[p].value.getAttribute(e)|| +""):"",k=!1;if(0<g.length){if(g=g.toLowerCase().split(" "),g.length>=a.length){for(var q=k=0;q<g.length&&k<m;q++)null!=f[g[q]]&&k++;k=k==m}}else k=0==a.length;k&&d.push(b[p])}}return d};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)this.model.setVisible(a[e],b)}finally{this.model.endUpdate()}}; Graph.prototype.highlightCells=function(a,b,e,c){for(var d=0;d<a.length;d++)this.highlightCell(a[d],b,e,c)};Graph.prototype.highlightCell=function(a,b,e,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;e=null!=e?e:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),m=new mxCellHighlight(this,b,d,!1);null!=c&&(m.opacity=c);m.highlight(a);window.setTimeout(function(){null!=m.shape&&(mxUtils.setPrefixedStyle(m.shape.node.style,"transition", "all 1200ms ease-in-out"),m.shape.node.style.opacity=0);window.setTimeout(function(){m.destroy()},1200)},e)}};Graph.prototype.addSvgShadow=function(a,b,e){e=null!=e?e:!1;var c=a.ownerDocument,d=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");d.setAttribute("id",this.shadowId);var m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation", this.svgShadowBlur);m.setAttribute("result","blur");d.appendChild(m);m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");d.appendChild(m);m=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity", @@ -9028,67 +9033,67 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo [SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+ "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d= [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst= -[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(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 y=mxMarker.createMarker;mxMarker.createMarker= -function(a,b,e,c,d,m,p,f,q,g){if(null!=e&&null==mxMarker.markers[e]){var k=this.getPackageForType(e);null!=k&&mxStencilRegistry.getStencil(k)}return y.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){y.value=Math.max(1,Math.min(f,Math.max(parseInt(y.value),parseInt(l.value))));l.value=Math.max(1,Math.min(f,Math.min(parseInt(y.value),parseInt(l.value))))}function c(b){function e(b,e,m){var p=b.useCssTransforms,f=b.currentTranslate,g=b.currentScale,q=b.view.translate,k= -b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var u=b.getGraphBounds(),l=0,y=0,A=ma.get(),v=1/b.pageScale,z=x.checked;if(z)var v=parseInt(S.value),D=parseInt(ha.value),v=Math.min(A.height*D/(u.height/b.view.scale),A.width*v/(u.width/b.view.scale));else v=parseInt(n.value)/(100*b.pageScale),isNaN(v)&&(c=1/b.pageScale,n.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width* -c);A.height=Math.ceil(A.height*c);v*=c;!z&&b.pageVisible?(u=b.getPageLayout(),l-=u.x*A.width,y-=u.y*A.height):z=!0;if(null==e){e=PrintDialog.createPrintPreview(b,v,A,0,l,y,z);e.pageSelector=!1;e.mathEnabled=!1;l=a.getCurrentFile();null!=l&&(e.title=l.getTitle());var C=e.writeHead;e.writeHead=function(e){C.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d= -b.extFonts[c].name,m=b.extFonts[c].url;0==m.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+m+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=e.renderPage;e.renderPage=function(b,e,c,d,m,p){var f=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; -var g=E.apply(this,arguments);mxClient.NO_FO=f;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}l=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(l=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=l&&(d.stylesheet=l,d.refresh())}else{A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;e.autoOrigin=z;e.appendGraph(b,v,l,y,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m= -0;m<b.extFonts.length;m++)l=b.extFonts[m].name,y=b.extFonts[m].url,0==y.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+y+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+l+'";\n\tsrc: url("'+y+'");\n}'),e.wnd.document.writeln("</style>"))}p&&(b.useCssTransforms=p,b.currentTranslate=f,b.currentScale=g,b.view.translate=q,b.view.scale=k);return e}var c=parseInt(O.value)/ -100;isNaN(c)&&(c=1,O.value="100 %");var c=.75*c,m=l.value,p=y.value,f=!k.checked,g=null;f&&(f=m==q&&p==q);if(!f&&null!=a.pages&&a.pages.length){var u=0,f=a.pages.length-1;k.checked||(u=parseInt(m)-1,f=parseInt(p)-1);for(var A=u;A<=f;A++){var v=a.pages[A],m=v==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),p=!0,u=!1,z=null,D=null;null==v.viewState&&null==v.root&&a.updatePageRoot(v);null!=v.viewState&&(p=v.viewState.pageVisible,u=v.viewState.mathEnabled,z=v.viewState.background, -D=v.viewState.backgroundImage,m.extFonts=v.viewState.extFonts);m.background=z;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=p;m.mathEnabled=u;var C=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?A+1:"pagecount"==b?null!=a.pages?a.pages.length:1:C.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(v);m.model.setRoot(v.root)}g=e(m,g,A!=f);m!=d&&m.container.parentNode.removeChild(m.container)}}else g= -e(d);null==g?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(g.mathEnabled&&(f=g.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln("showMathMenu: false,"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln('"HTML-CSS": {'),f.writeln("imageFont: null"),f.writeln("},"),f.writeln("TeX: {"), -f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),b&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),f.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')), -g.closeDocument(),!g.mathEnabled&&b&&PrintDialog.printPreview(g))}var d=a.editor.graph,m=document.createElement("div"),p=document.createElement("h3");p.style.width="100%";p.style.textAlign="center";p.style.marginTop="0px";mxUtils.write(p,b||mxResources.get("print"));m.appendChild(p);var f=1,q=1,g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;"; -k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("printAllPages"));g.appendChild(p);mxUtils.br(g);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");g.appendChild(u);p=document.createElement("span");mxUtils.write(p,mxResources.get("pages")+":");g.appendChild(p);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;"; -l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.style.width="50px";g.appendChild(l);p=document.createElement("span");mxUtils.write(p,mxResources.get("to"));g.appendChild(p);var y=l.cloneNode(!0);g.appendChild(y);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(y,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",e);mxEvent.addListener(y,"change",e);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(p=0;p<a.pages.length;p++)if(a.currentPage== -a.pages[p]){q=p+1;l.value=q;y.value=q;break}l.setAttribute("max",f);y.setAttribute("max",f);1<f&&m.appendChild(g);var A=document.createElement("div");A.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");A.appendChild(v);p=document.createElement("span");mxUtils.write(p,mxResources.get("adjustTo"));A.appendChild(p);var n=document.createElement("input");n.style.cssText= -"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";A.appendChild(n);mxEvent.addListener(n,"focus",function(){v.checked=!0});m.appendChild(A);var g=g.cloneNode(!1),x=v.cloneNode(!0);x.setAttribute("value","fit");v.setAttribute("checked","checked");p=document.createElement("div");p.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";p.appendChild(x);g.appendChild(p);A=document.createElement("table");A.style.display="inline-block";var z=document.createElement("tbody"), -D=document.createElement("tr"),C=D.cloneNode(!0),E=document.createElement("td"),t=E.cloneNode(!0),B=E.cloneNode(!0),G=E.cloneNode(!0),ea=E.cloneNode(!0),T=E.cloneNode(!0);E.style.textAlign="right";G.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";t.appendChild(S);p=document.createElement("span");mxUtils.write(p, -mxResources.get("fitToSheetsAcross"));B.appendChild(p);mxUtils.write(G,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(ha,"focus",function(){x.checked=!0});p=document.createElement("span");mxUtils.write(p,mxResources.get("fitToSheetsDown"));T.appendChild(p);D.appendChild(E);D.appendChild(t);D.appendChild(B);C.appendChild(G);C.appendChild(ea);C.appendChild(T);z.appendChild(D);z.appendChild(C);A.appendChild(z); -g.appendChild(A);m.appendChild(g);g=document.createElement("div");p=document.createElement("div");p.style.fontWeight="bold";p.style.marginBottom="12px";mxUtils.write(p,mxResources.get("paperSize"));g.appendChild(p);p=document.createElement("div");p.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(p,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);g.appendChild(p);p=document.createElement("span");mxUtils.write(p,mxResources.get("pageScale"));g.appendChild(p); -var O=document.createElement("input");O.style.cssText="margin:0 8px 0 8px;";O.setAttribute("value","100 %");O.style.width="60px";g.appendChild(O);m.appendChild(g);p=document.createElement("div");p.style.cssText="text-align:right;margin:48px 0 0 0;";g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&p.appendChild(g);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}), -A.className="geBtn",p.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),A.className="geBtn",p.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});A.className="geBtn gePrimaryBtn";p.appendChild(A);a.editor.cancelFirst||p.appendChild(g);m.appendChild(p);this.container=m};var A=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null== +[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 x=mxMarker.createMarker;mxMarker.createMarker= +function(a,b,e,c,d,m,f,p,g,k){if(null!=e&&null==mxMarker.markers[e]){var q=this.getPackageForType(e);null!=q&&mxStencilRegistry.getStencil(q)}return x.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){A.value=Math.max(1,Math.min(p,Math.max(parseInt(A.value),parseInt(v.value))));v.value=Math.max(1,Math.min(p,Math.min(parseInt(A.value),parseInt(v.value))))}function c(b){function e(b,e,m){var f=b.useCssTransforms,p=b.currentTranslate,g=b.currentScale,k=b.view.translate,q= +b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var u=b.getGraphBounds(),v=0,A=0,x=ma.get(),l=1/b.pageScale,z=y.checked;if(z)var l=parseInt(S.value),D=parseInt(ha.value),l=Math.min(x.height*D/(u.height/b.view.scale),x.width*l/(u.width/b.view.scale));else l=parseInt(n.value)/(100*b.pageScale),isNaN(l)&&(c=1/b.pageScale,n.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width* +c);x.height=Math.ceil(x.height*c);l*=c;!z&&b.pageVisible?(u=b.getPageLayout(),v-=u.x*x.width,A-=u.y*x.height):z=!0;if(null==e){e=PrintDialog.createPrintPreview(b,l,x,0,v,A,z);e.pageSelector=!1;e.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(e.title=v.getTitle());var B=e.writeHead;e.writeHead=function(e){B.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d= +b.extFonts[c].name,m=b.extFonts[c].url;0==m.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+m+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=e.renderPage;e.renderPage=function(b,e,c,d,m,f){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; +var g=E.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}v=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(v=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=v&&(d.stylesheet=v,d.refresh())}else{x=b.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";e.backgroundColor=x;e.autoOrigin=z;e.appendGraph(b,l,v,A,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m= +0;m<b.extFonts.length;m++)v=b.extFonts[m].name,A=b.extFonts[m].url,0==A.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+A+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+A+'");\n}'),e.wnd.document.writeln("</style>"))}f&&(b.useCssTransforms=f,b.currentTranslate=p,b.currentScale=g,b.view.translate=k,b.view.scale=q);return e}var c=parseInt(N.value)/ +100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,m=v.value,f=A.value,p=!q.checked,k=null;p&&(p=m==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var u=0,p=a.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(f)-1);for(var x=u;x<=p;x++){var l=a.pages[x],m=l==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),f=!0,u=!1,z=null,D=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&(f=l.viewState.pageVisible,u=l.viewState.mathEnabled,z=l.viewState.background, +D=l.viewState.backgroundImage,m.extFonts=l.viewState.extFonts);m.background=z;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=f;m.mathEnabled=u;var B=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?l.getName():"pagenumber"==b?x+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(l);m.model.setRoot(l.root)}k=e(m,k,x!=p);m!=d&&m.container.parentNode.removeChild(m.container)}}else k= +e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,p.writeln('<script type="text/x-mathjax-config">'),p.writeln("MathJax.Hub.Config({"),p.writeln("showMathMenu: false,"),p.writeln('messageStyle: "none",'),p.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),p.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),p.writeln('"HTML-CSS": {'),p.writeln("imageFont: null"),p.writeln("},"),p.writeln("TeX: {"), +p.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),p.writeln("},"),p.writeln("tex2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("},"),p.writeln("asciimath2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("}"),p.writeln("});"),b&&(p.writeln("MathJax.Hub.Queue(function () {"),p.writeln("window.print();"),p.writeln("});")),p.writeln("\x3c/script>"),p.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')), +k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,m=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,b||mxResources.get("print"));m.appendChild(f);var p=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;"; +q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");k.appendChild(q);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));k.appendChild(f);mxUtils.br(k);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");k.appendChild(u);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");k.appendChild(f);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;"; +v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";k.appendChild(v);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));k.appendChild(f);var A=v.cloneNode(!0);k.appendChild(A);mxEvent.addListener(v,"focus",function(){u.checked=!0});mxEvent.addListener(A,"focus",function(){u.checked=!0});mxEvent.addListener(v,"change",e);mxEvent.addListener(A,"change",e);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage== +a.pages[f]){g=f+1;v.value=g;A.value=g;break}v.setAttribute("max",p);A.setAttribute("max",p);1<p&&m.appendChild(k);var x=document.createElement("div");x.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");x.appendChild(l);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));x.appendChild(f);var n=document.createElement("input");n.style.cssText= +"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";x.appendChild(n);mxEvent.addListener(n,"focus",function(){l.checked=!0});m.appendChild(x);var k=k.cloneNode(!1),y=l.cloneNode(!0);y.setAttribute("value","fit");l.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);k.appendChild(f);x=document.createElement("table");x.style.display="inline-block";var z=document.createElement("tbody"), +D=document.createElement("tr"),B=D.cloneNode(!0),E=document.createElement("td"),t=E.cloneNode(!0),C=E.cloneNode(!0),H=E.cloneNode(!0),ea=E.cloneNode(!0),T=E.cloneNode(!0);E.style.textAlign="right";H.style.textAlign="right";mxUtils.write(E,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";t.appendChild(S);f=document.createElement("span");mxUtils.write(f, +mxResources.get("fitToSheetsAcross"));C.appendChild(f);mxUtils.write(H,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){y.checked=!0});mxEvent.addListener(ha,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));T.appendChild(f);D.appendChild(E);D.appendChild(t);D.appendChild(C);B.appendChild(H);B.appendChild(ea);B.appendChild(T);z.appendChild(D);z.appendChild(B);x.appendChild(z); +k.appendChild(x);m.appendChild(k);k=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));k.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));k.appendChild(f); +var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","100 %");N.style.width="60px";k.appendChild(N);m.appendChild(k);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}), +x.className="geBtn",f.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),x.className="geBtn",f.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});x.className="geBtn gePrimaryBtn";f.appendChild(x);a.editor.cancelFirst||f.appendChild(k);m.appendChild(f);this.container=m};var A=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null== this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(A.apply(this,arguments),null!=this.mathEnabled&& this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),D=new Image;D.onload=function(){try{E.getContext("2d").drawImage(D,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport= -null!=a&&6<a.length}catch(G){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(B){}})(); -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.2";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= +null!=a&&6<a.length}catch(H){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(C){}})(); +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.3";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&& !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4, topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,k){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& -null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(C){}try{k||null==window.console|| -console.error(g,a,b,c,d,f)}catch(C){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> +null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=e+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(B){}try{k||null==window.console|| +console.error(g,a,b,c,d,f)}catch(B){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(p){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(p){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(p){}};EditorUi.parsePng=function(a,b,c){function e(a,b){var e=m;m+=b;return a.substring(e, -m)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(a,4),"IHDR"!=e(a,4))null!=c&&c();else{e(a,17);do{c=d(a);var p=e(a,4);if(null!=b&&b(m-8,p,c))break;value=e(a,c);e(a,4);if("IEND"==p)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; +m)}function d(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(a,4),"IHDR"!=e(a,4))null!=c&&c();else{e(a,17);do{c=d(a);var f=e(a,4);if(null!=b&&b(m-8,f,c))break;value=e(a,c);e(a,4);if("IEND"==f)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile= -null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c, -0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(q){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=document.createElement("canvas");b.width=b.height=1;var d= -b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(v){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled= +null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c, +0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(v){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{b=document.createElement("canvas");b.width=b.height=1;var d= +b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24; -var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=e.spin;e.spin=function(c,m){var p=!1;this.active||(d.call(this,c),this.active=!0,null!=m&&(p=document.createElement("div"),p.style.position="absolute",p.style.whiteSpace="nowrap",p.style.background="#4B4243",p.style.color="white",p.style.fontFamily="Helvetica, Arial",p.style.fontSize="9pt",p.style.padding="6px",p.style.paddingLeft= -"10px",p.style.paddingRight="10px",p.style.zIndex=2E9,p.style.left=Math.max(0,a)+"px",p.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(p.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(p.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),p.innerHTML=m,c.appendChild(p),e.status=p,mxClient.IS_VML&&(null==document.documentMode||8>= -document.documentMode)&&(p.style.left=Math.round(Math.max(0,a-p.offsetWidth/2))+"px",p.style.top=Math.round(Math.max(0,b+70-p.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),p=!0);return p};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}}; -return e};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),e=this.editor.extractGraphModel(b.documentElement,!0);return null!=e&&0==e.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&& +var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),d=e.spin;e.spin=function(c,m){var f=!1;this.active||(d.call(this,c),this.active=!0,null!=m&&(f=document.createElement("div"),f.style.position="absolute",f.style.whiteSpace="nowrap",f.style.background="#4B4243",f.style.color="white",f.style.fontFamily="Helvetica, Arial",f.style.fontSize="9pt",f.style.padding="6px",f.style.paddingLeft= +"10px",f.style.paddingRight="10px",f.style.zIndex=2E9,f.style.left=Math.max(0,a)+"px",f.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(f.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),f.innerHTML=m,c.appendChild(f),e.status=f,mxClient.IS_VML&&(null==document.documentMode||8>= +document.documentMode)&&(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),f=!0);return f};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}}; +return e};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),e=this.editor.extractGraphModel(b.documentElement,!0);return null!=e&&0==e.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&& 3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c= b.indexOf("<mxfile ");if(0<=c){var d=b.lastIndexOf("</mxfile>");d>c&&(e=b.substring(c,d+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(z){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">'); 0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var e=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&& c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", -[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=e)for(d=0;d<e.length;d++)b.model.execute(new ChangePage(this,e[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,k,l,n,y,A){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var e,m=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? -e="_blank":m=e=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(A){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}y?(p=p.cloneNode(!0),p.removeAttribute("modified"), +[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=e)for(d=0;d<e.length;d++)b.model.execute(new ChangePage(this,e[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,k,l,n,x,A){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var e,m=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? +e="_blank":m=e=d;if(null==a)return"";var p=a;if("mxfile"!=p.nodeName.toLowerCase()){if(A){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));p=Graph.compress(q);if(Graph.decompress(p)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,p)}p=a.ownerDocument.createElement("mxfile");p.appendChild(q)}x?(p=p.cloneNode(!0),p.removeAttribute("modified"), p.removeAttribute("host"),p.removeAttribute("agent"),p.removeAttribute("etag"),p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.removeAttribute("userAgent"),p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("pages"),p.removeAttribute("type"),mxClient.IS_CHROMEAPP?p.setAttribute("host","Chrome"):EditorUi.isElectronApp?p.setAttribute("host","Electron"):p.setAttribute("host",window.location.hostname),p.setAttribute("modified", (new Date).toISOString()),p.setAttribute("agent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&p.setAttribute("type",a),1<p.getElementsByTagName("diagram").length&&null!=this.pages&&p.setAttribute("pages",this.pages.length));A=A?mxUtils.getPrettyXml(p):mxUtils.getXml(p);if(!g&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))A=this.getHtml2(mxUtils.getXml(p),b,null!=c?c.getTitle():null,e,m);else if(g|| !f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),A=this.getEmbeddedSvg(A,b,d,null,l,n,m);return A};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var e=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)), a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));e.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(e)),e=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var d= -(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,d);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(d));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],e=0;e<a.length;e++){var d=a.charAt(e);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!= -d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var c=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name", -this.anonymizeString(c.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(c)}catch(q){a[EditorUi.DIFF_INSERT][b].data=q.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var e in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][e];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var c in b)null!=b[c].value&&(b[c].value="["+b[c].value.length+"]"),null!=b[c].xmlValue&&(b[c].xmlValue="["+b[c].xmlValue.length+ -"]"),null!=b[c].style&&(b[c].style="["+b[c].style.length+"]"),0==Object.keys(b[c]).length&&delete b[c];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][e]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!= -a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),e=0;e<c.length;e++)null!=c[e].getAttribute("value")&&c[e].setAttribute("value","["+c[e].getAttribute("value").length+"]"),null!=c[e].getAttribute("xmlValue")&&c[e].setAttribute("xmlValue","["+c[e].getAttribute("xmlValue").length+ -"]"),null!=c[e].getAttribute("style")&&c[e].setAttribute("style","["+c[e].getAttribute("style").length+"]"),null!=c[e].parentNode&&"root"!=c[e].parentNode.nodeName&&null!=c[e].parentNode.parentNode&&(c[e].setAttribute("id",c[e].parentNode.getAttribute("id")),c[e].parentNode.parentNode.replaceChild(c[e],c[e].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum? +(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,d);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(d));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return e};EditorUi.prototype.anonymizeString=function(a,b){for(var e=[],c=0;c<a.length;c++){var d=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?e.push(d):isNaN(parseInt(d))?d.toLowerCase()!= +d?e.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?e.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(d)?e.push(" "):e.push("?"):e.push(b?"0":Math.round(9*Math.random()))}return e.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var b=0;b<a[EditorUi.DIFF_INSERT].length;b++)try{var e=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][b].data).documentElement.cloneNode(!1);null!=e.getAttribute("name")&&e.setAttribute("name", +this.anonymizeString(e.getAttribute("name")));a[EditorUi.DIFF_INSERT][b].data=mxUtils.getXml(e)}catch(v){a[EditorUi.DIFF_INSERT][b].data=v.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var d=a[EditorUi.DIFF_UPDATE][c];null!=d.name&&(d.name=this.anonymizeString(d.name));null!=d.cells&&(b=mxUtils.bind(this,function(a){var b=d.cells[a];if(null!=b){for(var e in b)null!=b[e].value&&(b[e].value="["+b[e].value.length+"]"),null!=b[e].xmlValue&&(b[e].xmlValue="["+b[e].xmlValue.length+ +"]"),null!=b[e].style&&(b[e].style="["+b[e].style.length+"]"),0==Object.keys(b[e]).length&&delete b[e];0==Object.keys(b).length&&delete d.cells[a]}}),b(EditorUi.DIFF_INSERT),b(EditorUi.DIFF_UPDATE),0==Object.keys(d.cells).length&&delete d.cells);0==Object.keys(d).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var e=0;e<a.attributes.length;e++)"as"!= +a.attributes[e].name&&a.setAttribute(a.attributes[e].name,this.anonymizeString(a.attributes[e].value,b));if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)this.anonymizeAttributes(a.childNodes[e],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var e=a.getElementsByTagName("mxCell"),c=0;c<e.length;c++)null!=e[c].getAttribute("value")&&e[c].setAttribute("value","["+e[c].getAttribute("value").length+"]"),null!=e[c].getAttribute("xmlValue")&&e[c].setAttribute("xmlValue","["+e[c].getAttribute("xmlValue").length+ +"]"),null!=e[c].getAttribute("style")&&e[c].setAttribute("style","["+e[c].getAttribute("style").length+"]"),null!=e[c].parentNode&&"root"!=e[c].parentNode.nodeName&&null!=e[c].parentNode.parentNode&&(e[c].setAttribute("id",e[c].parentNode.getAttribute("id")),e[c].parentNode.parentNode.replaceChild(e[c],e[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var b=this.getCurrentFile();null!=b&&(b.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&b.invalidChecksum? b.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(b.clearAutosave(),this.editor.setStatus(""),a?b.reloadFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)})):b.synchronizeFile(mxUtils.bind(this,function(){b.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){b.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,k, -l,n,y){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(y=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var m=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),p=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(f,g,y);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k, -e,n,window.location.href,a,b,c,d,f,l,y);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,m=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(e.x/p-b.view.translate.x);p=Math.floor(e.y/p-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(m=EditorUi.drawHost+ +l,n,x){f=null!=f?f:!0;g=null!=g?g:!1;var e=this.editor.graph;if(b||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))if(x=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var m=e.getGlobalVariable,e=this.createTemporaryGraph(e.getStylesheet()),p=this.pages[0];e.getGlobalVariable=function(a){return"page"==a?p.getName():"pagenumber"==a?1:m.apply(this,arguments)};document.body.appendChild(e.container);e.model.setRoot(p.root)}k=null!=k?k:this.getXmlFileData(f,g,x);n=null!=n?n:this.getCurrentFile();a=this.createFileData(k, +e,n,window.location.href,a,b,c,d,f,l,x);e!=this.editor.graph&&e.container.parentNode.removeChild(e.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,m=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),p=b.view.scale;g=Math.floor(e.x/p-b.view.translate.x);p=Math.floor(e.y/p-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(m=EditorUi.drawHost+ "/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",p)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";d=Graph.compress(a);Graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': "")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style="background-color:'+e+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+ "</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+m+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+f+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,f){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=f&&(f=f.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled, @@ -9097,49 +9102,49 @@ f+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(b)throw Error(mxResources.get("notADiagramFile")+" ("+b+")");b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){var c= null;this.fileNode=a;this.pages=[];for(var e=0;e<b.length;e++)null==b[e].getAttribute("id")&&b[e].setAttribute("id",e),a=new DiagramPage(b[e]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(c=a);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"), this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var d=urlParams["layer-ids"].split(" ");a={};for(e=0;e<d.length;e++)a[d[e]]=!0;for(var f=this.editor.graph.getModel(),g=f.getChildren(f.root),e=0;e<g.length;e++){var k=g[e];f.setVisible(k,a[k.id]|| -!1)}}catch(C){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b}; -EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,k,l,n,y,A){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),m=e+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"== -a?m=e+".png":"jpeg"==a&&(m=e+".jpg"),this.saveRequest(m,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,f,l,n,y,A);this.editor.graph.pageVisible=e;return m}catch(X){this.handleError(X)}}));else{var q=null,u=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), -mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var x=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(x);this.convertImages(x,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();u('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else m=e+".svg",q=this.getFileData(!1, -!0,null,mxUtils.bind(this,function(a){this.spinner.stop();u(a)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,k,l,n,y){var e=this.editor.graph,m=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",q="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(y="1",b="png",null!=this.pages&&null!=this.currentPage))for(g= -0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p="&from="+g;break}g=e.background;"png"==b&&f?g=mxConstants.NONE:f||null!=g&&g!=mxConstants.NONE||(g="#ffffff");f={globalVars:e.getExportVariables()};n&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+y+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+ +!1)}}catch(B){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b}; +EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,k,l,n,x,A){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),m=e+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"== +a?m=e+".png":"jpeg"==a&&(m=e+".jpg"),this.saveRequest(m,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,f,l,n,x,A);this.editor.graph.pageVisible=e;return m}catch(Y){this.handleError(Y)}}));else{var q=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), +mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var u=this.editor.graph.background;if(k||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else m=e+".svg",q=this.getFileData(!1, +!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,k,l,n,x){var e=this.editor.graph,m=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",q="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==b&&0==g&&(q="&allPages=1");if("xmlpng"==b&&(x="1",b="png",null!=this.pages&&null!=this.currentPage))for(g= +0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p="&from="+g;break}g=e.background;"png"==b&&f?g=mxConstants.NONE:f||null!=g&&g!=mxConstants.NONE||(g="#ffffff");f={globalVars:e.getExportVariables()};n&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+q+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+x+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+ (null!=k?"&scale="+k:"")+(null!=l?"&border="+l:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"== -a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var m=null!=a.interval?parseInt(a.interval):6E4,f=null,p=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+ -" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(f);f=window.setTimeout(p,m)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var m=a.url;/^https?:\/\//.test(m)&&!this.editor.isCorsEnabledForUrl(m)&&(m=PROXY_URL+"?url="+encodeURIComponent(m));this.loadUrl(m,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&& +a.format&&this.importCsv(d,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var f=null!=a.interval?parseInt(a.interval):6E4,m=null,p=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),g()):this.handleError({message:mxResources.get("error")+ +" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),g=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(p,f)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){g();p()}));g();p()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var f=a.url;/^https?:\/\//.test(f)&&!this.editor.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));this.loadUrl(f,mxUtils.bind(this,function(a){d(a)}),mxUtils.bind(this,function(a){null!=c&& c(a)}))}else d("")};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){e.alert(a.tooltip)});return b}var c=null,e=this;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,f=d.getModel();f.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var k=f.getCell(a.getAttribute("id")); -if(null!=k){try{var l=a.getAttribute("value");if(null!=l){var y=mxUtils.parseXml(l).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))f.setValue(k,y);else for(var A=y.attributes,n=0;n<A.length;n++)d.setAttributeForCell(k,A[n].nodeName,0<A[n].nodeValue.length?A[n].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&d.model.setStyle(k,D)}catch(K){null!=window.console&&console.log("Error in style for "+ -k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var G=0<t.length?JSON.parse(t):null;null!=G&&G.append||d.removeCellOverlays(k);null!=G&&d.addCellOverlay(k,b(G))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var I=a.getAttribute("geometry");if(null!=I){var I=JSON.parse(I),H=d.getCellGeometry(k);if(null!=H){H=H.clone();for(key in I){var J=parseFloat(I[key]);"dx"==key?H.x+=J:"dy"==key?H.y+=J:"dw"==key?H.width+=J:"dh"==key?H.height+=J:H[key]=parseFloat(I[key])}d.model.setGeometry(k, -H)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var F=a.firstChild;null!=F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(a.firstChild)).decode(F,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"== -a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var m=new Date,d=m.getFullYear(),f=m.getMonth()+1,g=m.getDate(),k=m.getHours(),l=m.getMinutes(),m=m.getSeconds(),c= -c+(" "+(d+"-"+f+"-"+g+"-"+k+"-"+l+"-"+m));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle(); +if(null!=k){try{var l=a.getAttribute("value");if(null!=l){var x=mxUtils.parseXml(l).documentElement;if(null!=x)if("1"==x.getAttribute("replace-value"))f.setValue(k,x);else for(var A=x.attributes,n=0;n<A.length;n++)d.setAttributeForCell(k,A[n].nodeName,0<A[n].nodeValue.length?A[n].nodeValue:null)}}catch(K){null!=window.console&&console.log("Error in value for "+k.id+": "+K)}try{var D=a.getAttribute("style");null!=D&&d.model.setStyle(k,D)}catch(K){null!=window.console&&console.log("Error in style for "+ +k.id+": "+K)}try{var t=a.getAttribute("icon");if(null!=t){var H=0<t.length?JSON.parse(t):null;null!=H&&H.append||d.removeCellOverlays(k);null!=H&&d.addCellOverlay(k,b(H))}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}try{var G=a.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),J=d.getCellGeometry(k);if(null!=J){J=J.clone();for(key in G){var I=parseFloat(G[key]);"dx"==key?J.x+=I:"dy"==key?J.y+=I:"dw"==key?J.width+=I:"dh"==key?J.height+=I:J[key]=parseFloat(G[key])}d.model.setGeometry(k, +J)}}}catch(K){null!=window.console&&console.log("Error in icon for "+k.id+": "+K)}}}else if("model"==a.nodeName){for(var F=a.firstChild;null!=F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(a.firstChild)).decode(F,f)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"== +a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{f.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return c};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,e="",d=c.lastIndexOf(".");0<=d&&(e=c.substring(d),c=c.substring(0,d));if(b)var f=new Date,d=f.getFullYear(),m=f.getMonth()+1,g=f.getDate(),k=f.getHours(),x=f.getMinutes(),f=f.getSeconds(),c= +c+(" "+(d+"-"+m+"-"+g+"-"+k+"-"+x+"-"+f));return c=mxResources.get("copyOf",[c])+e};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var e=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle(); this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0; this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+ mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+ a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(z){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(z){}}catch(z){this.fileLoadedError=z;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+ -(null!=a?a.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(x){}var m=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?m():this.handleError(z,mxResources.get("errorLoadingFile"),m,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount= -0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var m=0;m<a.length;m++){this.updatePageRoot(a[m]);var f=a[m].node.cloneNode(!1);f.removeAttribute("name");e.root=a[m].root;var g=d.encode(e);this.editor.graph.saveViewState(a[m].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");f.appendChild(g);null!=b&&(b.eltCount+=f.getElementsByTagName("*").length,b.nodeCount+=f.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(f,function(a,b,c,e){return!e||"mxGeometry"!= -a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?e&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var e=0;e<a.attributes.length;e++){var m=a.attributes[e].name, -f=null!=b?b(a,m,a.attributes[e].value,!0):a.attributes[e].value;null!=f&&(d^=this.hashValue(m,b,c)+this.hashValue(f,b,c))}}if(null!=a.childNodes)for(e=0;e<a.childNodes.length;e++)d=(d<<5)-d+this.hashValue(a.childNodes[e],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(e=0;e<a.length;e++)b=(b<<5)-b+a.charCodeAt(e)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary= +(null!=a?a.getHash():"none"),action:"message_"+z.message,label:"stack_"+z.stack})}catch(y){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?f():this.handleError(z,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount= +0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var m=a[f].node.cloneNode(!1);m.removeAttribute("name");e.root=a[f].root;var g=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");m.appendChild(g);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(m,function(a,b,c,e){return!e||"mxGeometry"!= +a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?e&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name, +m=null!=b?b(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=m&&(e^=this.hashValue(f,b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary= function(a,b,c,d,f,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(), c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}}; -EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement)); -this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var m= -null,f=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==m&&(m=document.createElement("div"),m.className="geDropTarget",mxUtils.write(m,mxResources.get("dragElementsHere"))),c.appendChild(m)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(e);var g=p.parentNode.previousSibling;d=g.getAttribute("title"); -null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");g.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle"); -l.setAttribute("border","0");l.style.cursor="pointer";l.style.margin="0 3px";var u=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=u?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,t=null, -G=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p,b,a,a.getMode());mxEvent.consume(c)}),I=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=l.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",k.insertBefore(t,k.firstChild),g.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(), -b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),g.style.paddingRight=18*k.childNodes.length+"px")})):null==u&&(u=l.cloneNode(!1),u.setAttribute("src",IMAGE_PATH+"/download.png"),u.setAttribute("title",mxResources.get("save")),k.insertBefore(u,k.firstChild),mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==u||a.isModified()||(g.style.paddingRight=18*k.childNodes.length+ -"px",u.parentNode.removeChild(u),u=null)});mxEvent.consume(c)})),g.style.paddingRight=18*k.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var g=n.getCellGeometry(a[f]);null!=g&&g.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&& -(a.title=e);b.push(a);I(d);null!=m&&null!=m.parentNode&&0<b.length&&(m.parentNode.removeChild(m),m=null)}),J=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),d=n.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=n.view.translate.x;c.y-=n.view.translate.y; -H(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.first&&(n.graphHandler.suspend(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(p.style.backgroundColor= -"",p.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.first&&(n.graphHandler.resume(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",n.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this, -function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,g,k,q,l,A,y){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ -this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,q),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,k,q),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=m&&null!=m.parentNode&&0<b.length&&(m.parentNode.removeChild(m),m=null);else{var n=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var g= -JSON.parse(mxUtils.getTextContent(e.documentElement));f(g,p);b=b.concat(g);I(a);this.spinner.stop();n=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),g=0;g<k.length;g++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[g])),l=this.editor.graph.getBoundingBoxFromGeometry(q);H(q,new mxRectangle(0,0,l.width,l.height),a)}n=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); -null!=m&&null!=m.parentNode&&0<b.length&&(m.parentNode.removeChild(m),m=null)});null!=y&&null!=l&&(/(\.v(dx|sdx?))($|\?)/i.test(l)||/(\.vs(x|sx?))($|\?)/i.test(l))?this.importVisio(y,function(a){u(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,l)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));k.insertBefore(l,k.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)== -p&&G(a)});d=l.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));k.insertBefore(d,k.firstChild);mxEvent.addListener(d,"click",J);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); -mxEvent.consume(a)})),k.insertBefore(d,k.firstChild))}g.appendChild(k);g.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),m="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(m+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(m+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)), +EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,e=c.previousSibling;b.insertBefore(c,a);b.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(a,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(c.documentElement)); +this.libraryLoaded(a,e,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,d){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var e=this.sidebar.palettes[a.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f= +null,m=mxUtils.bind(this,function(b,c){0==b.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(b,c)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),c,null!=d?d:!0,mxUtils.bind(this,function(a){m(b,a)}));this.repositionLibrary(e);var g=p.parentNode.previousSibling;d=g.getAttribute("title"); +null!=d&&0<d.length&&".scratchpad"!=a.title&&g.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="0px";k.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");g.style.position="relative";var q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get("close"));q.setAttribute("valign","absmiddle"); +q.setAttribute("border","0");q.style.cursor="pointer";q.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)k.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var n=this.editor.graph,t=null, +H=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p,b,a,a.getMode());mxEvent.consume(c)}),G=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=q.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",k.insertBefore(t,k.firstChild),g.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(a.getTitle(), +b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),g.style.paddingRight=18*k.childNodes.length+"px")})):null==l&&(l=q.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),k.insertBefore(l,k.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(g.style.paddingRight=18*k.childNodes.length+ +"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),g.style.paddingRight=18*k.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var m=0;m<a.length;m++){var g=n.getCellGeometry(a[m]);null!=g&&g.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&& +(a.title=e);b.push(a);G(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=n.getSelectionCells(),c=n.view.getBounds(b),d=n.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=n.view.translate.x;c.y-=n.view.translate.y; +J(b,c)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.first&&(n.graphHandler.suspend(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(p.style.backgroundColor= +"",p.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.first&&(n.graphHandler.resume(),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",n.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this, +function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,g,k,q,x,A,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ +this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,k,q),c)],c[0].vertex=!0,J(c,new mxRectangle(0,0,k,q),a,mxEvent.isAltDown(a)?null:x.substring(0,x.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,u=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var g= +JSON.parse(mxUtils.getTextContent(e.documentElement));m(g,p);b=b.concat(g);G(a);this.spinner.stop();v=!0}catch(M){}else if("mxfile"==e.documentElement.nodeName)try{for(var k=e.documentElement.getElementsByTagName("diagram"),g=0;g<k.length;g++){var q=this.stringToCells(Editor.getDiagramNodeXml(k[g])),x=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,x.width,x.height),a)}v=!0}catch(M){null!=window.console&&console.log("error in drop handler:",M)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); +null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=l&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?this.importVisio(l,function(a){u(a,"text/xml")},null,x):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,x)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? +"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));k.insertBefore(q,k.firstChild);mxEvent.addListener(q,"click",H);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)== +p&&H(a)});d=q.cloneNode(!1);d.setAttribute("src",Editor.plusImage);d.setAttribute("title",mxResources.get("add"));k.insertBefore(d,k.firstChild);mxEvent.addListener(d,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); +mxEvent.consume(a)})),k.insertBefore(d,k.firstChild))}g.appendChild(k);g.style.paddingRight=18*k.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)), 0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS? "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor= "black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", @@ -9147,13 +9152,13 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM 480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,640,440,!0,!1, mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var b=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&b.refresh()}));return b};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position= "absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct(); -mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,k){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(B){}if(null!=m||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError")); +mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,d,f,g,k){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(C){}if(null!=m||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError")); var p=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=m){null!=m.retry&&(p=mxResources.get("cancel"),q=function(){e();m.retry()});if(404==m.code||404==m.status||403==m.code){k=403==m.code?null!=m.message?mxUtils.htmlEntities(m.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=f?f:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var l= null!=g?g:window.location.hash;if(null!=l&&("#G"==l.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==l.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==m.code||404==m.status)){l="#U"==l.substring(0,2)?l.substring(45,l.lastIndexOf("%26ex")):l.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this, function(){this.editor.graph.openLink("https://drive.google.com/open?id="+l);this.handleError(a,b,c,d,f)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<b.length;a++){var c=document.createElement("option");mxUtils.write(c,b[a].displayName);c.value=a;e.appendChild(c);c=document.createElement("option");c.innerHTML=" ";mxUtils.write(c,"<"+b[a].email+">");c.setAttribute("disabled","disabled");e.appendChild(c)}c=document.createElement("option"); mxUtils.write(c,mxResources.get("addAccount"));c.value=b.length;e.appendChild(c)}var b=this.drive.getUsersList(),c=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");c.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var c=e.value,d=b.length!=c;d&&this.drive.setUser(b[c]);this.drive.authorize(d,mxUtils.bind(this,function(){d|| (b=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=m.message?k=mxUtils.htmlEntities(m.message):null!=m.response&&null!=m.response.error?k=mxUtils.htmlEntities(m.response.error):"undefined"!== -typeof window.App&&(m.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):m.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var n=g=null;null!=m&&null!=m.helpLink&&(g=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(m.helpLink)}));this.showError(b,k,p,c,q,null,null,g,n,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container, +typeof window.App&&(m.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):m.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var v=g=null;null!=m&&null!=m.helpLink&&(g=mxResources.get("help"),v=mxUtils.bind(this,function(){return this.editor.graph.openLink(m.helpLink)}));this.showError(b,k,p,c,q,null,null,g,v,null,null,null,d?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container, 340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,f,g){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f,null,null,null,null,m);this.showDialog(a.container,340,46+m,!0,g);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&& null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn"; d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;"; @@ -9164,8 +9169,8 @@ function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDa function(a,b,c,d,f){var e="jpeg"==c?"jpg":c;d=this.getBaseFilename(d)+"."+e;a=this.createImageDataUri(a,b,c,f);this.saveData(d,e,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog= function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"), null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,d);else{var e=document.createElement("a"),m=0>navigator.userAgent.indexOf("PaleMoon/")&&!mxClient.IS_IOS&&"undefined"!==typeof e.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),m=65==(g?parseInt(g[2], -10):!1)?!1:m;if(m||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));m?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(C){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!= -c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var g=1024*m,k=Math.min(g+1024,d),l=Array(k-g),A=0;g<k;++A,++g)l[A]=c[g].charCodeAt(0);f[m]=new Uint8Array(l)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=f&& +10):!1)?!1:m;if(m||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));m?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(B){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!= +c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),m=0;m<e;++m){for(var g=1024*m,k=Math.min(g+1024,d),x=Array(k-g),l=0;g<k;++l,++g)x[l]=c[g].charCodeAt(0);f[m]=new Uint8Array(x)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g,k){g=null!=g?g:!1;k=null!=k?k:"vsdx"!=f&& (!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);isLocalStorage&&f++;var e=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,d);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e, mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(D){this.handleError(D)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,k,null,1<f,e,a,c,d);g=this.isServices(f)?f>e?390:270:160;this.showDialog(b.container,400,g,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG? (c=c?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?d.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+c+'"/></html>'):d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+c+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems= @@ -9175,10 +9180,10 @@ this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this, function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}c.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a, b,c,d,f,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var e=this.getServiceCount(!1);isLocalStorage&&e++;var m=4>=e?2:6<e?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+ -b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(B){this.handleError(B)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,e,c)}catch(B){this.handleError(B)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), -mxResources.get("download"),!1,!1,k,null,1<e,m,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,k,l,n,y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e= -this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var m=b?null:this.editor.graph.background;m==mxConstants.NONE&&(m=null);null==m&&0==b&&(m="#ffffff");var p=this.editor.graph.getSvg(m,a,k,l,null,c,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var q=this.getBaseFilename()+".svg",u=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,u,this.thumbImageCache)):u(p)}catch(I){this.handleError(I)}};EditorUi.prototype.addRadiobox= +b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,e,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), +mxResources.get("download"),!1,!1,k,null,1<e,m,d,g,f);e=this.isServices(e)?4<e?390:270:160;this.showDialog(a.container,380,e,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,k,l,n,x){if(this.spinner.spin(document.body,mxResources.get("export")))try{var e= +this.editor.graph.isSelectionEmpty();c=null!=c?c:e;var m=b?null:this.editor.graph.background;m==mxConstants.NONE&&(m=null);null==m&&0==b&&(m="#ffffff");var p=this.editor.graph.getSvg(m,a,k,l,null,c,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0);d&&this.editor.graph.addSvgShadow(p);var q=this.getBaseFilename()+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,n,null,null,null,!1));var b='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ +mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.editor.addFontCss(p);this.editor.graph.mathEnabled&&this.editor.addMathCss(p);g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(p,v,this.thumbImageCache)):v(p)}catch(G){this.handleError(G)}};EditorUi.prototype.addRadiobox= function(a,b,c,d,f,g,k){return this.addCheckbox(a,c,d,f,g,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g,k,l){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();e.id=k;null!=l&&e.setAttribute("name",l);c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),c=document.createElement("label"),mxUtils.write(c, b),c.setAttribute("for",k),a.appendChild(c),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option"); d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container, @@ -9188,75 +9193,75 @@ e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();m.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}}; EditorUi.prototype.createLink=function(a,b,c,d,f,g,k,l){var e=this.getCurrentFile(),m=[];d&&(m.push("lightbox=1"),"auto"!=a&&m.push("target="+a),null!=b&&b!=mxConstants.NONE&&m.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&m.push("edit="+encodeURIComponent(f)),g&&m.push("layers=1"),this.editor.graph.foldingEnabled&&m.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());a=!0;null!=k?c= "#U"+encodeURIComponent(k):(e=this.getCurrentFile(),l||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+e.getHash(),a=!1));a&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&m.push("title="+encodeURIComponent(e.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost: -"https://"+window.location.host+"/")+(0<m.length?"?"+m.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,l,n,y,A){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0); -l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=y&&0<y.length&&(e.edit=y);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";A(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1": +"https://"+window.location.host+"/")+(0<m.length?"?"+m.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,l,n,x,A){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0); +l&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";A(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1": EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var m=document.createElement("div"); -m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value","copy");m.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));m.appendChild(p);mxUtils.br(m);m.appendChild(g); -p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));m.appendChild(p);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),m.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));f.setAttribute("checked", -"checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(m);var l=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value="100%";e.appendChild(u);var t=this.addCheckbox(e,mxResources.get("fit"),!0),m=null!=this.pages&&1<this.pages.length,G=G=this.addCheckbox(e,mxResources.get("allPages"), -m,!m),I=this.addCheckbox(e,mxResources.get("layers"),!0),H=this.addCheckbox(e,mxResources.get("lightbox"),!0),J=this.addEditButton(e,H),F=J.getEditInput();F.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");F.checked&&H.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked, -u.value,l.getTarget(),l.getColor(),t.checked,G.checked,I.checked,H.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,a||mxResources.get("link"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(m);var p=this.getCurrentFile(),m="https://desk.draw.io/support/solutions/articles/16000051941"; -a=0;if(null!=p&&p.constructor==window.DriveFile&&!b){a=80;var m="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));k.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(p.getId())})); -l.style.marginTop="12px";l.className="geBtn";k.appendChild(l);e.appendChild(k);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));k.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, -null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,n=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",e.appendChild(q),mxUtils.write(e,mxResources.get("height")+ -":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",e.appendChild(n),mxUtils.br(e);var u=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==p||p.constructor!=window.DriveFile||b)v=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(e,mxResources.get("lightbox"),!0),H=this.addEditButton(e,t),J=H.getEditInput(),F=this.addCheckbox(e,mxResources.get("layers"), -!0);F.style.marginLeft=J.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(F.removeAttribute("disabled"),J.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==v? -!0:v.checked,t.checked,H.getLink(),F.checked,null!=q?q.value:null,null!=n?n.value:null)}),null,mxResources.get("create"),m);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m, -mxResources.get("image"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(m);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type", -"text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";e.appendChild(p);mxUtils.br(e)}var k=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),m=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),m.background==mxConstants.NONE||null==m.background);null!=n&&(n.style.marginBottom="16px");a= -new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(p.value)||0;c(!k.checked,null!=l?l.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,l){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph,p="jpeg"==l?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; -e.appendChild(q);mxUtils.write(e,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";e.appendChild(n);mxUtils.write(e,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.value=this.lastExportBorder|| -"0";e.appendChild(u);mxUtils.br(e);var v=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),t=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");g&&(e.appendChild(x),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(t,"change",function(){t.checked? -x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var z=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||F.setAttribute("disabled","disabled");b&&(e.appendChild(F),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+= -26);var K=null;if("png"==l||"jpeg"==l)K=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var N=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),R=null!=this.pages&&1<this.pages.length,X=this.addCheckbox(e,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=l);X.style.marginLeft="24px";X.style.marginBottom="16px";R?p+=26:X.style.display="none";mxEvent.addListener(N,"change",function(){N.checked&&R?X.removeAttribute("disabled"): -X.setAttribute("disabled","disabled")});k&&R||X.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));U.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));U.appendChild(a);a=document.createElement("option"); -a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=n.value;f(n.value,v.checked,!t.checked,z.checked,N.checked,F.checked,u.value,x.checked,!X.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null, -null,null,null,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var p=this.addCheckbox(e,mxResources.get("fit"), -!0),k=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),u=this.addEditButton(e,n),v=u.getEditInput(),t=1<m.model.getChildCount(m.model.getRoot()),I=this.addCheckbox(e,mxResources.get("layers"),t,!t);I.style.marginLeft=v.style.marginLeft;I.style.marginBottom="12px";I.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(t&&I.removeAttribute("disabled"),v.removeAttribute("disabled")): -(I.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(p.checked,k.checked,l.checked,n.checked,u.getLink(),I.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,l){function e(b){var e=" ",p="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value","copy");m.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));m.appendChild(k);mxUtils.br(m);m.appendChild(g); +k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));m.appendChild(k);var p=this.getCurrentFile();null==c&&null!=p&&p.constructor==window.DriveFile&&(k=document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),m.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked", +"checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(m);var l=this.addLinkSection(e),n=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";e.appendChild(q);var t=this.addCheckbox(e,mxResources.get("fit"),!0),m=null!=this.pages&&1<this.pages.length,H=H=this.addCheckbox(e,mxResources.get("allPages"), +m,!m),G=this.addCheckbox(e,mxResources.get("layers"),!0),J=this.addCheckbox(e,mxResources.get("lightbox"),!0),I=this.addEditButton(e,J),F=I.getEditInput();F.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled");F.checked&&J.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,n.checked, +q.value,l.getTarget(),l.getColor(),t.checked,H.checked,G.checked,J.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,a||mxResources.get("link"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(m);var k=this.getCurrentFile(),m="https://desk.draw.io/support/solutions/articles/16000051941"; +a=0;if(null!=k&&k.constructor==window.DriveFile&&!b){a=80;var m="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var l=document.createElement("div");l.style.whiteSpace="normal";mxUtils.write(l,mxResources.get("linkAccountRequired"));p.appendChild(l);l=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(k.getId())})); +l.style.marginTop="12px";l.className="geBtn";p.appendChild(l);e.appendChild(p);l=document.createElement("a");l.style.paddingLeft="12px";l.style.color="gray";l.style.fontSize="11px";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("check"));p.appendChild(l);mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, +null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,q=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",e.appendChild(n),mxUtils.write(e,mxResources.get("height")+ +":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",e.appendChild(q),mxUtils.br(e);var v=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==k||k.constructor!=window.DriveFile||b)u=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(e,mxResources.get("lightbox"),!0),J=this.addEditButton(e,t),I=J.getEditInput(),F=this.addCheckbox(e,mxResources.get("layers"), +!0);F.style.marginLeft=I.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(F.removeAttribute("disabled"),I.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&t.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==u? +!0:u.checked,t.checked,J.getLink(),F.checked,null!=n?n.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),m);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m, +mxResources.get("image"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(f?"10":"4")+"px";e.appendChild(m);if(f){mxUtils.write(e,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";e.appendChild(g);mxUtils.write(e,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type", +"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";e.appendChild(k);mxUtils.br(e)}var p=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),m=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),m.background==mxConstants.NONE||null==m.background);null!=n&&(n.style.marginBottom="16px");a= +new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=l?l.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,l){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph,p="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";e.appendChild(q);mxUtils.write(e,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder|| +"0";e.appendChild(v);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),t=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");g&&(e.appendChild(y),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(t,"change",function(){t.checked? +y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var z=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||F.setAttribute("disabled","disabled");b&&(e.appendChild(F),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+= +26);var K=null;if("png"==l||"jpeg"==l)K=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var O=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),Q=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(e,Q?mxResources.get("allPages"):"",Q,!Q,null,"jpeg"!=l);Y.style.marginLeft="24px";Y.style.marginBottom="16px";Q?p+=26:Y.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&Q?Y.removeAttribute("disabled"): +Y.setAttribute("disabled","disabled")});k&&Q||Y.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));U.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));U.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;f(q.value,u.checked,!t.checked,z.checked,O.checked,F.checked,v.value,y.checked,!Y.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null, +null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var k=this.addCheckbox(e,mxResources.get("fit"), +!0),p=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),q=this.addEditButton(e,n),u=q.getEditInput(),t=1<m.model.getChildCount(m.model.getRoot()),G=this.addCheckbox(e,mxResources.get("layers"),t,!t);G.style.marginLeft=u.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(t&&G.removeAttribute("disabled"),u.removeAttribute("disabled")): +(G.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,n.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,l){function e(b){var e=" ",p="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");var l="";c&&(l=' width="'+Math.round(m.width)+'" height="'+Math.round(m.height)+'"');k('<img src="'+b+'"'+l+(""!=p?' style="'+p+'"':"")+e+"/>")}var m=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");e(a)}),null,null,null, -mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),m.width*m.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*m.width)+"&h="+Math.round(2*m.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?e("data:image/png;base64,"+q.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,k){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),m=e.getElementsByTagName("a");if(null!=m)for(var p=0;p<m.length;p++){var l=m[p].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==m[p].getAttribute("target")&&m[p].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(e);if(c){var q=" ",n="";d&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+q+"/>")}))}else n="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=n&&e.setAttribute("style",n),this.editor.addFontCss(e),this.editor.graph.mathEnabled&&this.editor.addMathCss(e),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- +mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),m.width*m.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var p="";c&&(p="&w="+Math.round(2*m.width)+"&h="+Math.round(2*m.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+p+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?e("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,k){var e=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),m=e.getElementsByTagName("a");if(null!=m)for(var p=0;p<m.length;p++){var l=m[p].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==m[p].getAttribute("target")&&m[p].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(e);if(c){var n=" ",q="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+n+"/>")}))}else q="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=q&&e.setAttribute("style",q),this.editor.addFontCss(e),this.editor.graph.mathEnabled&&this.editor.addMathCss(e),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"== -a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(q){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=null;if(null!= +a.nodeName){var d=a.getElementsByTagName("diagram");if(0<d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=null;if(null!= c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container); -d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(y){null!=b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!= -b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(x){null!=b&&b(x)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!= +b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&& -this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(u){b(a)}}))}catch(p){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,l,n,y,A){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); -try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,A)}catch(B){"Invalid image"==B.message?this.downloadFile(n):this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,y)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", +this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(q){b(a)}}))}catch(p){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,l,n,x,A){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); +try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,A)}catch(C){"Invalid image"==C.message?this.downloadFile(n):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,x)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", "g"),"")}var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var m=d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,m))]);a.push('"'+d[f].substring(m))}b(a.join(""))}});if(0<d.length){for(var m=1;m<d.length;m++){var g=d[m].indexOf(")"),k=null,l=d[m].indexOf("format(",g);0<l&&(k=c(d[m].substring(l+7,d[m].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]= a;e++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&& !this.editor.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){this.cachedFonts[a]=b;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(c(d[m].substring(0,g)),k)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(b){this.editor.resolvedFontCss=b;a()})):a()};EditorUi.prototype.embedExtFonts= function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?(d++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;c+=a;d--;e()}),mxUtils.bind(this,function(a){d--;c+="@import url("+b+");";e()}))):c+=this.cachedGoogleFonts[b]: -c+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,l,n,y,A,t,D,B,G){try{g=null!=g?g:!0;k=null!=k?k:!0;t=null!=t?t:this.editor.graph;D=null!=D?D:0;var e=n?null:t.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(t.getSvg(null,null,null,B,null,k,null,null,null,y),mxUtils.bind(this,function(c){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m= -function(){mxClient.IS_SF?window.setTimeout(function(){n.drawImage(d,D/l,D/l);a(k)},0):(n.drawImage(d,D/l,D/l),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*q),b/p)):b/p);p=Math.ceil(l*p)+2*D;q=Math.ceil(l*q)+2*D;k.setAttribute("width",p);k.setAttribute("height",q);var n=k.getContext("2d");null!=e&&(n.beginPath(),n.rect(0,0,p,q),n.fillStyle=e,n.fill());n.scale(l,l);if(G){var y= -t.view,A=y.scale;y.scale=1;var u=btoa(unescape(encodeURIComponent(y.createSvgGrid(y.gridColor))));y.scale=A;var u="data:image/svg+xml;base64,"+u,v=t.gridSize*y.gridSteps*l,x=t.getGraphBounds(),E=y.translate.x*A,z=y.translate.y*A,C=E+(x.x-E)/A,B=z+(x.y-z)/A,H=new Image;H.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((E-C)*l,v)),b=-Math.round(v-mxUtils.mod((z-B)*l,v));a<p;a+=v)for(var c=b;c<q;c+=v)n.drawImage(H,a/l,c/l);m()}catch(M){null!=f&&f(M)}};H.onerror=function(a){null!=f&&f(a)};H.src= -u}else m()}catch(Z){null!=f&&f(Z)}});d.onerror=function(a){null!=f&&f(a)};y&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var m=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),d.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(K){null!=f&&f(K)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(m)}catch(N){null!=f&&f(N)}}))}catch(K){null!= -f&&f(K)}}),c,A)}catch(H){null!=f&&f(H)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+ +c+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,l,n,x,A,t,D,C,H){try{g=null!=g?g:!0;k=null!=k?k:!0;t=null!=t?t:this.editor.graph;D=null!=D?D:0;var e=n?null:t.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(t.getSvg(null,null,null,C,null,k,null,null,null,x),mxUtils.bind(this,function(c){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m= +function(){mxClient.IS_SF?window.setTimeout(function(){x.drawImage(d,D/l,D/l);a(k)},0):(x.drawImage(d,D/l,D/l),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(l*p)+2*D;n=Math.ceil(l*n)+2*D;k.setAttribute("width",p);k.setAttribute("height",n);var x=k.getContext("2d");null!=e&&(x.beginPath(),x.rect(0,0,p,n),x.fillStyle=e,x.fill());x.scale(l,l);if(H){var A= +t.view,q=A.scale;A.scale=1;var v=btoa(unescape(encodeURIComponent(A.createSvgGrid(A.gridColor))));A.scale=q;var v="data:image/svg+xml;base64,"+v,u=t.gridSize*A.gridSteps*l,E=t.getGraphBounds(),y=A.translate.x*q,z=A.translate.y*q,B=y+(E.x-y)/q,C=z+(E.y-z)/q,F=new Image;F.onload=function(){try{for(var a=-Math.round(u-mxUtils.mod((y-B)*l,u)),b=-Math.round(u-mxUtils.mod((z-C)*l,u));a<p;a+=u)for(var c=b;c<n;c+=u)x.drawImage(F,a/l,c/l);m()}catch(M){null!=f&&f(M)}};F.onerror=function(a){null!=f&&f(a)};F.src= +v}else m()}catch(Z){null!=f&&f(Z)}});d.onerror=function(a){null!=f&&f(a)};x&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var m=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),d.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(K){null!=f&&f(K)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(m)}catch(O){null!=f&&f(O)}}))}catch(K){null!= +f&&f(K)}}),c,A)}catch(J){null!=f&&f(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+ "?url="+encodeURIComponent(d)}return d};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,m){for(var g=a.getElementsByTagName(c),k=0;k<g.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var g=d.convert(c.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=f[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(f[g]=d,c.setAttribute(m,d));e--;0==e&&b(a)})):c.setAttribute(m, -k)}else null!=g&&c.setAttribute(m,g)}}catch(B){}})(g[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,k,l){try{var e=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));f=null!=f?f:!0;var m=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&& +k)}else null!=g&&c.setAttribute(m,g)}}catch(C){}})(g[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,k,l){try{var e=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));f=null!=f?f:!0;var m=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&& "undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},e,this.timeout,function(){f&& null!=c&&c({code:App.ERROR_TIMEOUT,retry:m})},l)});m()}catch(A){null!=c&&c(A)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d); -c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(C){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(z){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!= +c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(B){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(z){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!= b?b:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var m=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var m=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&& -(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));m.push(u)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(e=g.importGraphModel(k,b,c,d),null!= -e))for(l=0;l<e.length;l++)this.updatePageLinksForCell(a,e[l])}finally{g.model.endUpdate()}}}catch(G){if(f)throw G;this.handleError(G)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f= +(a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var u=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[u+1]));g.model.execute(new ChangePage(this,q,q,u,!0));m.push(q)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(e=g.importGraphModel(k,b,c,d),null!= +e))for(l=0;l<e.length;l++)this.updatePageLinksForCell(a,e[l])}finally{g.model.endUpdate()}}}catch(H){if(f)throw H;this.handleError(H)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f= c.getElementsByTagName("a"),g=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17)); if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(z){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this, -function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);try{var f="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(f=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(y){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")}); +function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);try{var f="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(f=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(x){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")}); else{e=new FormData;e.append("file1",a,d);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var e=new FileReader;e.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){c({message:mxResources.get("errorLoadingFile")})}});e.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(E){c(E)}else c({})}); -m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(y){c(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a, -b,c)}catch(v){c(v)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(), -this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(v){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(v){null!= -window.console&&console.error(v),c(v)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel= +m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(x){c(x)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a, +b,c)}catch(u){c(u)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(), +this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(u){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(u){null!= +window.console&&console.error(u),c(u)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel= "strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(e.convertDataUri(e.createSvgDataUri(a)), f,g)}else d({message:mxResources.get("invalidInput")})}catch(A){d(A)}})}catch(z){d(z)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+ a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType= "blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=e.result,m=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(m+1)))),p=mxUtils.parseXml(k).getElementsByTagName("svg");0<p.length&&(a=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}c(e.result,a, -f)}catch(J){d(J)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};g.onerror=function(a){d(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&& +f)}catch(I){d(I)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};g.onerror=function(a){d(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&& !this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var e=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var m= Editor.extractGraphModelFromPdf(a);if(null!=m&&0<m.length)return this.importXml(m,b,c,g,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(m=this.extractGraphModelFromPng(a),null!=m&&0<m.length))return this.importXml(m,b,c,g,!0);if("data:image/svg+xml;"==a.substring(0,19))try{m=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(m=a.substring(a.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0)):m=decodeURIComponent(a.substring(a.indexOf(",")+1));var p=this.importXml(m, b,c,g,!0);if(0<p.length)return p}catch(A){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)), @@ -9269,51 +9274,51 @@ this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),f.value=a,e.update !1;window.openKey="import";if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var c=new Blob([a],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))})); this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c(); else{var f=0,g,m=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(m=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText): -c())}),a.name):c()}):m||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,l,n,y,A){y=null!=y?y:!0;var e=!1,m=null,p=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,y);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"== -b.substring(0,9)&&(b=A?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(m=this.importXml(b,c,d,y),n=!0)),n||(b=this.editor.graph,A=a.indexOf(";"),0<A&&(a=a.substring(0,A)+a.substring(a.indexOf(",",A+1))),y&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),m=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,p)):null!=n&& +c())}),a.name):c()}):m||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,l,n,x,A){x=null!=x?x:!0;var e=!1,m=null,p=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,x);null!=l&&l(b)});"image"==b.substring(0,5)?(n=!1,"image/png"== +b.substring(0,9)&&(b=A?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(m=this.importXml(b,c,d,x),n=!0)),n||(b=this.editor.graph,A=a.indexOf(";"),0<A&&(a=a.substring(0,A)+a.substring(a.indexOf(",",A+1))),x&&b.isGridEnabled()&&(c=b.snap(c),d=b.snap(d)),m=[b.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(e=!0,this.importGraphML(a,p)):null!=n&& null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?(e=!0,this.importVisio(n,p)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(e=!0,this.parseFile(null!=n?n:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?p(a.responseText):null!=l&&l(null))}),k)):0==a.indexOf("PK")&&null!=n?(e=!0,this.importZipFile(n,p,mxUtils.bind(this,function(){m=this.insertTextAt(this.validateFileData(a), -c,d,!0,null,y);l(m)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,y));e||null==l||l(m);return m};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c== +c,d,!0,null,x);l(m)}))):/(\.v(sd|dx))($|\?)/i.test(k)||/(\.vs(s|x))($|\?)/i.test(k)||(m=this.insertTextAt(this.validateFileData(a),c,d,!0,null,x));e||null==l||l(m);return m};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c== d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f& -15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,l,n,y,A,t){d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var e=null!=b&&null!=c,m=!0;b=null!=b?b:0;c=null!=c?c:0;var p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=A||this.resampleThreshold,u=0;u<a.length;u++)if("image/"==a[u].type.substring(0,6)&&a[u].size>q){p=!0;break}var v=mxUtils.bind(this,function(){var p=this.editor.graph, -n=p.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,m,k,l){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,m)),null):this.importFile(a,b,c,d,f,g,m,k,l,e,t)}catch(Z){return this.handleError(Z),null}});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,v=[],D=mxUtils.bind(this,function(a,b){v[a]=b;if(0==--u){this.spinner.stop(); -if(null!=l)l(v);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(c=c.concat(e))}}finally{p.getModel().endUpdate()}}g(c)}}),E=0;E<q;E++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),u=decodeURIComponent(escape(atob(l.substring(q+1)))),v=mxUtils.parseXml(u),u= -v.getElementsByTagName("svg");if(0<u.length){var u=u[0],E=t?null:u.getAttribute("content");null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null==E||"<mxfile "!==E.substring(0,8)&&"<mxGraphModel "!==E.substring(0,14)?D(e,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var m=a[0],k=m.getAttribute("width"),y=m.getAttribute("height"), -k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,A=m.getAttribute("viewBox");if(null==A||0==A.length)m.setAttribute("viewBox","0 0 "+k+" "+y);else if(isNaN(k)||isNaN(y)){var u=A.split(" ");3<u.length&&(k=parseFloat(u[2]),y=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(m));var t=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,y)),D=f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(k*t)),Math.max(1,Math.round(y*t)),g.name);if(isNaN(k)|| -isNaN(y)){var E=new Image;E.onload=mxUtils.bind(this,function(){k=Math.max(1,E.width);y=Math.max(1,E.height);D[0].geometry.width=k;D[0].geometry.height=y;m.setAttribute("viewBox","0 0 "+k+" "+y);l=this.createSvgDataUri(mxUtils.getXml(m));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[D[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(m))}return D}}}catch(ia){}return null})):D(e,mxUtils.bind(this,function(){return f(E,"text/xml",b+e*n,c+e* -n,0,0,g.name)}))}else D(e,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==g.type){var z=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var B=new Image;B.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(z,"text/xml",b+e*n,c+e*n,B.width,B.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this, -function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,p){D(e,mxUtils.bind(this,function(){if(null!=k&&k.length<y){var q=m&&this.isResampleImage(a.target.result,A)?Math.min(1,Math.min(d/l,d/p)):1;return f(k,g.type,b+e*n,c+e*n,Math.round(l*q),Math.round(p*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")}); +15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,l,n,x,A,t){d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=b&&null!=c,m=!0;b=null!=b?b:0;c=null!=c?c:0;var p=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=A||this.resampleThreshold,v=0;v<a.length;v++)if("image/"==a[v].type.substring(0,6)&&a[v].size>q){p=!0;break}var u=mxUtils.bind(this,function(){var p=this.editor.graph, +n=p.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,k,m,p){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,c,d,f,g,k,m,p,e,t)}catch(Z){return this.handleError(Z),null}});g=null!=g?g:mxUtils.bind(this,function(a){p.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,v=q,u=[],D=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--v){this.spinner.stop(); +if(null!=l)l(u);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{p.getModel().endUpdate()}}g(c)}}),E=0;E<q;E++)mxUtils.bind(this,function(e){var g=a[e];if(null!=g){var l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),v=decodeURIComponent(escape(atob(l.substring(q+1)))),u=mxUtils.parseXml(v),v= +u.getElementsByTagName("svg");if(0<v.length){var v=v[0],E=t?null:v.getAttribute("content");null!=E&&"<"!=E.charAt(0)&&"%"!=E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(E,!0)));null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E));null==E||"<mxfile "!==E.substring(0,8)&&"<mxGraphModel "!==E.substring(0,14)?D(e,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var k=a[0],m=k.getAttribute("width"),x=k.getAttribute("height"), +m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var v=A.split(" ");3<v.length&&(m=parseFloat(v[2]),x=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var t=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,x)),D=f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(m*t)),Math.max(1,Math.round(x*t)),g.name);if(isNaN(m)|| +isNaN(x)){var E=new Image;E.onload=mxUtils.bind(this,function(){m=Math.max(1,E.width);x=Math.max(1,E.height);D[0].geometry.width=m;D[0].geometry.height=x;k.setAttribute("viewBox","0 0 "+m+" "+x);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[D[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(k))}return D}}}catch(ia){}return null})):D(e,mxUtils.bind(this,function(){return f(E,"text/xml",b+e*n,c+e* +n,0,0,g.name)}))}else D(e,mxUtils.bind(this,function(){return null}))}else{v=!1;if("image/png"==g.type){var z=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var y=new Image;y.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(z,"text/xml",b+e*n,c+e*n,y.width,y.height,g.name)}));v=!0}}v||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this, +function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,p){D(e,mxUtils.bind(this,function(){if(null!=k&&k.length<x){var q=m&&this.isResampleImage(a.target.result,A)?Math.min(1,Math.min(d/l,d/p)):1;return f(k,g.type,b+e*n,c+e*n,Math.round(l*q),Math.round(p*q),g.name)}this.handleError({message:mxResources.get("imageTooBig")}); return null}))}),m,d,A)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l=a.target.result,f(l,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?l.readAsDataURL(g):l.readAsText(g)}})(E)});if(p){p=[]; -for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){m=a;v()},n)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), +for(v=0;v<a.length;v++)p.push(a[v]);a=p;this.confirmImageResize(function(a){m=a;u()},n)}else u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST", -OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(q){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),m=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var k=Math.max(e/f,m/f);if(1<k){var l=Math.round(e/k),p=Math.round(m/k),n=document.createElement("canvas"); -n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var q=n.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=l;u.height=p;var t=u.toDataURL();q!==t&&(b=q,e=l,m=p)}}}catch(I){}c(b,e,m)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,f=0;8>f;f++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+e))&255]^a>>>8;return a}; -EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){function e(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+ -1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,k);do{var l=g(a);if("IDAT"==e(a,4)){f=a.substring(0,k-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);f+=m(c.length)+ -b+c+m(d^4294967295);f+=a.substring(k-8,a.length);break}f+=a.substring(k-8,k-4+l);e(a,l);e(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(v){if(null!=c)c(v);else throw v; +OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(v){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var m=Math.max(e/f,k/f);if(1<m){var l=Math.round(e/m),p=Math.round(k/m),n=document.createElement("canvas"); +n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var q=n.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=l;v.height=p;var u=v.toDataURL();q!==u&&(b=q,e=l,k=p)}}}catch(G){}c(b,e,k)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var g=b,f=0;8>f;f++)g=1==(g&1)?3988292384^g>>>1:g>>>1,EditorUi.prototype.crcTable[b]=g;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+e))&255]^a>>>8;return a}; +EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,c=0;c<a.length;c++)b=b>>>8^this.crcTable[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){function e(a,b){var c=m;m+=b;return a.substring(c,m)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+ +1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,m);do{var l=g(a);if("IDAT"==e(a,4)){f=a.substring(0,m-8);"pHYs"==b&&"dpi"==c?(c=Math.round(d/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);f+=k(c.length)+ +b+c+k(d^4294967295);f+=a.substring(m-8,a.length);break}f+=a.substring(m-8,m-4+l);e(a,l);e(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(u){if(null!=c)c(u);else throw u; }};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format, -function(e,g,m){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=g,k.height=m,b.cellsResized([c],[k],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0); -d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,m){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,m),b.cellsResized([c],[k],!1));b.setAttributeForCell(c, -"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(I){a.handleError(I)}}; -b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!= +function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",a.convertDataUri(e),[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=g,m.height=k,b.cellsResized([c],[m],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0); +d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,k){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[c]);var m=b.model.getGeometry(c);null!=m&&(m=m.clone(),m.width=Math.max(m.width,g),m.height=Math.max(m.height,k),b.cellsResized([c],[m],!1));b.setAttributeForCell(c, +"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(G){a.handleError(G)}}; +b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(H){a.handleError(H)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!= a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&& mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var b=l.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle()); b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages? a.pages.length:1:n.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b}; -var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", +var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", !0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave", function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e, f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1, -a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view, -y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", -"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, -function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless|| +a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view, +x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", +"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, +function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless|| this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this, -function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types, -"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(d=c.getElementsByTagName("a"),null!= -d&&1==d.length?k=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(k=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1, -a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation(); +function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var k=0<=mxUtils.indexOf(a.dataTransfer.types, +"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=m;var l=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(l=!0)):(d=c.getElementsByTagName("a"),null!= +d&&1==d.length?m=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(m=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(m,f,g,!0,l,null,p))});l&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1, +a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(k,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation(); a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index]; -if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML= +if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(B){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML= " ";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow= "hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML=" ";var d=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown|| b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this, @@ -9328,7 +9333,7 @@ function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==u null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&& (d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}), mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(D){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(D){}try{var l=this.editor.graph;if(null!=f&&0<f.length){l.lastPasteXml==f?l.pasteCounter++: -(l.lastPasteXml=f,l.pasteCounter=0);var p=l.pasteCounter*l.gridSize;if(g||this.isCompatibleString(f))l.setSelectionCells(this.importXml(f,p,p));else{var n=l.getInsertPoint();l.isMouseInsertPoint()&&(p=0,l.lastPasteXml==f&&0<l.pasteCounter&&l.pasteCounter--);l.setSelectionCells(this.insertTextAt(f,n.x+p,n.y+p,!0))}l.isSelectionEmpty()||(l.scrollCellToVisible(l.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(l.view.getState(l.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c|| +(l.lastPasteXml=f,l.pasteCounter=0);var n=l.pasteCounter*l.gridSize;if(g||this.isCompatibleString(f))l.setSelectionCells(this.importXml(f,n,n));else{var p=l.getInsertPoint();l.isMouseInsertPoint()&&(n=0,l.lastPasteXml==f&&0<l.pasteCounter&&l.pasteCounter--);l.setSelectionCells(this.insertTextAt(f,p.x+n,p.y+n,!0))}l.isSelectionEmpty()||(l.scrollCellToVisible(l.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(l.view.getState(l.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c|| (l.lastPasteXml=null,l.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& 12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))): @@ -9352,20 +9357,20 @@ this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(! d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"== a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ca){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(P){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey? mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"== -k.action){var p=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog(); -g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,q=1==k.enableSearch,t=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml; -null!=k.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(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this, -function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"== -k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey|| -this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var x=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(z);g.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a= -this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container);K(a)}),R=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var X=x.getGlobalVariable,x=this.createTemporaryGraph(x.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==R){U=this.updatePageRoot(this.pages[L]);break}x.getGlobalVariable=function(a){return"page"== -a?U.getName():"pagenumber"==a?1:X.apply(this,arguments)};document.body.appendChild(x.container);x.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=x.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){N(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){N(null)}),null,null,k.scale,null,null,null,x)}else(new mxXmlRequest(EXPORT_URL, -"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);v=this.createLoadMessage("export"); -if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();v.xml=mxUtils.getXml(ga);v.data=this.getFileData(null,null,!0,null,null,null,ga);v.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),v.data=this.getHtml(z,this.editor.graph),v.xml=mxUtils.getXml(z),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);v.xml=this.getFileData(!0, -null,null,null,null,null,null,null,null,!1);v.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body, -null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var Y=this.editor.graph.getSvg(fa);this.embedFonts(Y,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(v),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&& -null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), -this.buttonContainer.appendChild(p),this.embedFilenameSpan=p),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(P){this.handleError(P)}}var aa=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(da){this.handleError(da)}c= +k.action){var n=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog(); +g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var p=1==k.enableRecent,q=1==k.enableSearch,v=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml; +null!=k.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(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this, +function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var t=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:t,message:k}),"*");return}if("status"== +k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var u=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,u):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey|| +this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,y=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(z);g.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a= +this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);y(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=Q){for(var Y=F.getGlobalVariable,F=this.createTemporaryGraph(F.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==Q){U=this.updatePageRoot(this.pages[L]);break}F.getGlobalVariable=function(a){return"page"== +a?U.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=F.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,k.scale,null,null,null,F)}else(new mxXmlRequest(EXPORT_URL, +"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);u=this.createLoadMessage("export"); +if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();u.xml=mxUtils.getXml(ga);u.data=this.getFileData(null,null,!0,null,null,null,ga);u.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),u.data=this.getHtml(z,this.editor.graph),u.xml=mxUtils.getXml(z),u.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);u.xml=this.getFileData(!0, +null,null,null,null,null,null,null,null,!1);u.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();u.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(u),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(u.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body, +null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var X=this.editor.graph.getSvg(fa);this.embedFonts(X,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(u),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&& +null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), +this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(P){this.handleError(P)}}var aa=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(da){this.handleError(da)}c= !1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=m();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged", b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")), "*")});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){aa(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this, @@ -9374,25 +9379,25 @@ function(){if(null!=this.menubar){var a=document.createElement("div");a.style.di a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",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.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";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.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()}; -EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,t=null,D=null,B=null,G=null,I="",H="auto",J= -"auto",F=null,K=null,N=40,R=40,X=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,Y="auto",G=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0< -da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?ba=L.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?n=M:"labels"==Q&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?D=M:"stylename"==Q&&0<M.length&&"-"!=M?m=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?G=M:"namespace"==Q&&0<M.length&&"-"!=M?I=M:"width"==Q?H=M:"height"==Q?J=M:"left"==Q&&0<M.length?F=M:"top"==Q&&0<M.length? -K=M:"ignore"==Q?ca=M.split(","):"connect"==Q?aa.push(JSON.parse(M)):"link"==Q?P=M:"padding"==Q?U=parseFloat(M):"edgespacing"==Q?N=parseFloat(M):"nodespacing"==Q?R=parseFloat(M):"levelspacing"==Q?X=parseFloat(M):"layout"==Q&&(Y=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),Q=da=null,M=[],T=0;T<ea.length;T++)B==ea[T]&&(da=T),G==ea[T]&&(Q=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null== -ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==g[aa[S].to]&&(g[aa[S].to]={});B=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&B.push(ha)}L.model.beginUpdate();try{for(T=0;T<B.length;T++){var ha=B[T],O=null,ka=null!=da?I+ha[da]:null;null!=ka&&(O=L.model.getCell(ka));var c=null!=O,ia=new mxCell(ba,new mxGeometry(ga, -W,0,0),k||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=t){var ua=t[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=m&&null!=l){var va=l[ia.getAttribute(m)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,ia.style);c&&(L.model.setGeometry(O,ia.geometry),L.model.setStyle(O,ia.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ia;if(!c)for(S=0;S<aa.length;S++)g[aa[S].to][O.getAttribute(aa[S].to)]= -O;null!=P&&"link"!=P&&(L.setLinkForCell(O,O.getAttribute(P)),L.setAttributeForCell(O,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=F&&null!=O.getAttribute(F)&&(O.geometry.x=ga+parseFloat(O.getAttribute(F))),null!=K&&null!=O.getAttribute(K)&&(O.geometry.y=fa+parseFloat(O.getAttribute(K))),"@"==H.charAt(0)&&null!=O.getAttribute(H.substring(1))?O.geometry.width=parseFloat(O.getAttribute(H.substring(1))):O.geometry.width= -"auto"==H?wa.width+U:parseFloat(H),"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+U:parseFloat(J),W+=O.geometry.height+R);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(O)):(G=null!=Q?L.model.getCell(I+ha[Q]):null,d.push(O),null!=G?(G.style=L.replacePlaceholders(G,D),L.addCell(O,G)):e.push(L.addCell(O)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var O= -d[T],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?L.replacePlaceholders(l,c.style):L.createCurrentEdgeStyle();la.push(L.insertEdge(null,null,k||"", -c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,na)}}});ya(O,O,xa);if(null!=f[O.id])for(ja=0;ja<f[O.id].length;ja++)ya(O,f[O.id][ja],xa)}if(null!=ca)for(T=0;T<d.length;T++)for(O=d[T],ja=0;ja<ca.length;ja++)L.setAttributeForCell(O,mxUtils.trim(ca[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y)); -"auto"==H&&(b.width=Math.round(L.snap(b.width)));"auto"==J&&(b.height=Math.round(L.snap(b.height)))}};if("["==Y.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(Y),function(){ta();za()});V=null}else if("circle"==Y){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"== -Y||"verticaltree"==Y||"auto"==Y&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==Y);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing= -R;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=X;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,fa)},!0,V);V=null}else if("organic"==Y||"auto"==Y&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*R;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=N;this.executeLayout(function(){qa.execute(L.getDefaultParent()); +EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var k={},g=null,m=null,l=null,n=null,t=null,D=null,C=null,H=null,G="",J="auto",I= +"auto",F=null,K=null,O=40,Q=40,Y=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,X="auto",H=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0< +da){var R=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==R?ba=L.sanitizeHtml(M):"labelname"==R&&0<M.length&&"-"!=M?n=M:"labels"==R&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==R?g=M:"parentstyle"==R?D=M:"stylename"==R&&0<M.length&&"-"!=M?l=M:"styles"==R&&0<M.length&&"-"!=M?m=JSON.parse(M):"identity"==R&&0<M.length&&"-"!=M?C=M:"parent"==R&&0<M.length&&"-"!=M?H=M:"namespace"==R&&0<M.length&&"-"!=M?G=M:"width"==R?J=M:"height"==R?I=M:"left"==R&&0<M.length?F=M:"top"==R&&0<M.length? +K=M:"ignore"==R?ca=M.split(","):"connect"==R?aa.push(JSON.parse(M)):"link"==R?P=M:"padding"==R?U=parseFloat(M):"edgespacing"==R?O=parseFloat(M):"nodespacing"==R?Q=parseFloat(M):"levelspacing"==R?Y=parseFloat(M):"layout"==R&&(X=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),R=da=null,M=[],T=0;T<ea.length;T++)C==ea[T]&&(da=T),H==ea[T]&&(R=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null== +ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==k[aa[S].to]&&(k[aa[S].to]={});C=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&C.push(ha)}L.model.beginUpdate();try{for(T=0;T<C.length;T++){var ha=C[T],N=null,ka=null!=da?G+ha[da]:null;null!=ka&&(N=L.model.getCell(ka));var c=null!=N,ia=new mxCell(ba,new mxGeometry(ga, +W,0,0),g||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=t){var ua=t[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=l&&null!=m){var va=m[ia.getAttribute(l)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,ia.style);c&&(L.model.setGeometry(N,ia.geometry),L.model.setStyle(N,ia.style),0>mxUtils.indexOf(e,N)&&e.push(N));N=ia;if(!c)for(S=0;S<aa.length;S++)k[aa[S].to][N.getAttribute(aa[S].to)]= +N;null!=P&&"link"!=P&&(L.setLinkForCell(N,N.getAttribute(P)),L.setAttributeForCell(N,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[N]));var wa=this.editor.graph.getPreferredSizeForCell(N);N.vertex&&(null!=F&&null!=N.getAttribute(F)&&(N.geometry.x=ga+parseFloat(N.getAttribute(F))),null!=K&&null!=N.getAttribute(K)&&(N.geometry.y=fa+parseFloat(N.getAttribute(K))),"@"==J.charAt(0)&&null!=N.getAttribute(J.substring(1))?N.geometry.width=parseFloat(N.getAttribute(J.substring(1))):N.geometry.width= +"auto"==J?wa.width+U:parseFloat(J),"@"==I.charAt(0)&&null!=N.getAttribute(I.substring(1))?N.geometry.height=parseFloat(N.getAttribute(I.substring(1))):N.geometry.height="auto"==I?wa.height+U:parseFloat(I),W+=N.geometry.height+Q);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(N)):(H=null!=R?L.model.getCell(G+ha[R]):null,d.push(N),null!=H?(H.style=L.replacePlaceholders(H,D),L.addCell(N,H)):e.push(L.addCell(N)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var N= +d[T],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));var m="target"==c.placeholders==!c.invert?f:a,m=null!=c.style?L.replacePlaceholders(m,c.style):L.createCurrentEdgeStyle();la.push(L.insertEdge(null,null,g||"", +c.invert?f:a,c.invert?a:f,m));mxUtils.remove(c.invert?a:f,na)}}});ya(N,N,xa);if(null!=f[N.id])for(ja=0;ja<f[N.id].length;ja++)ya(N,f[N.id][ja],xa)}if(null!=ca)for(T=0;T<d.length;T++)for(N=d[T],ja=0;ja<ca.length;ja++)L.setAttributeForCell(N,mxUtils.trim(ca[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=O;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y)); +"auto"==J&&(b.width=Math.round(L.snap(b.width)));"auto"==I&&(b.height=Math.round(L.snap(b.height)))}};if("["==X.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(X),function(){ta();za()});V=null}else if("circle"==X){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"== +X||"verticaltree"==X||"auto"==X&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==X);sa.levelDistance=Q;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==X||"verticalflow"==X||"auto"==X&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==X?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing= +Q;pa.parallelEdgeSpacing=O;pa.interRankCellSpacing=Y;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,fa)},!0,V);V=null}else if("organic"==X||"auto"==X&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*Q;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=O;this.executeLayout(function(){qa.execute(L.getDefaultParent()); ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Ca){this.handleError(Ca)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0; if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b= l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&& null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width- 2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; -this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, +this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var k=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=k.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, !0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates(); var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c); Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b); @@ -9401,66 +9406,65 @@ function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrent this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility); this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&& -(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g,k){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var l=a.getFileData(!0,null,null, -null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),p=Math.floor(m.height*f/e.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d: -"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()), +(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,k,g){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,k)),"image/svg+xml");else{var m=a.getFileData(!0,null,null, +null,null,!0),l=e.getGraphBounds(),n=Math.floor(l.width*f/e.view.scale),p=Math.floor(l.height*f/e.view.scale);if(m.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<g?"&dpi="+g:"")+"&bg="+(null!=d?d: +"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(m))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,k,!0,!1,null,null,g):a.exportImage(f,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()), this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e= -document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0== -a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b, -mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B, +document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var g=k[a];if("R"==g.substring(0,1)){var l=JSON.parse(decodeURIComponent(g.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0== +a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var k=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,k)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b, +mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(C){this.handleError(C, mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b= -a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g); -e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp= -b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this, -k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(y){c(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}), -b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src", -"https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml? -b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}}); -a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var n=JSON.parse(a.data);"init"==n.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=n.event||d||(c?null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?(e=n.resp[0],c=!1,l()):g():null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?m(n.resp[0]):k())}}catch(K){try{f= -JSON.stringify(f)}catch(N){}EditorUi.logError("Migration Caught: "+K.message+(0<=K.message.indexOf("JSON")?" >> "+f:""),null,null,null,K,"INFO")}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(v){null!=b&&b(v)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g= -e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a, -b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(z){null!=c&&c(z)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value), -b.target.result["continue"]())};e.onerror=b}catch(z){null!=b&&b(z)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a= -this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a? -a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!= -c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"== -localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null; -var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;y.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}q={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className= -"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();q=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);q=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this, +a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(k); +e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp= +b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var g=a.functionArgs;Array.isArray(g)||(g=[]);if(e.isAsync)g.push(function(){c(Array.prototype.slice.apply(arguments))}),g.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this, +g);else{var l=this[d].apply(this,g);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(x){c(null,"Invalid Call: An error occured, "+x.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}), +b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display= +"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,k=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),g=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)k();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this, +function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):g()}),g)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],g,g,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f= +{};try{f=JSON.parse(a.data)}catch(F){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):k():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):g())}}catch(F){console.log(F)}});window.addEventListener("message",a)}})));a(c);c.onversionchange= +function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(u){null!=b&&b(u)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var k=e.transaction(f,"readwrite");k.oncomplete=c;k.onerror=d;for(e=0;e<f.length;e++)k.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(y){null!=d&&d(y)}}),d)};EditorUi.prototype.removeDatabaseItem= +function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(z){null!=c&&c(z)}}),c)};EditorUi.prototype.getDatabaseItems= +function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(z){null!=b&&b(z)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys(); +e.onsuccess=function(){a(e.result)};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile(); +null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null, +a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName= +function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"=== +d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;x.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className= +"geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this, function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo", [e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function t(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function e(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,f,g){function A(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className= -"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});G.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function B(c,d,g,k,n){function q(){t(D);b.addReply(u,function(a){u.id=a;b.replies.push(u);m(D);g&&g()},function(b){y();e(D);a.handleError(b,null, -null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function y(){l(u,D,function(a){q()},!0)}var A=E().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var D=p(u,b.replies,A,f+1);d?y():q()}if(g||!b.isResolved){y.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite"); -var x=document.createElement("div");x.className="geCommentHeader";var K=document.createElement("img");K.className="geCommentUserImg";K.src=b.user.pictureUrl||Editor.userImage;x.appendChild(K);K=document.createElement("div");K.className="geCommentHeaderTxt";x.appendChild(K);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");K.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);n(b, -H);K.appendChild(H);z.appendChild(x);x=document.createElement("div");x.className="geCommentTxt";mxUtils.write(x,b.content||"");z.appendChild(x);x=document.createElement("div");x.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";x.appendChild(G);u||0!=f&&!v||A(mxResources.get("reply"),function(){B("",!0)},b.isResolved);K=a.getCurrentUser();null==K||K.id!=b.user.id||u||(A(mxResources.get("edit"),function(){function c(){l(b,z,function(){t(z);b.editComment(b.content, -function(){m(z)},function(b){e(z);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),A(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(z);b.deleteComment(function(){for(var a=E(b).replies,d=0;d<a.length;d++)C.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}y.style.display=0==C.getElementsByTagName("div").length?"block":"none"},function(b){e(z);a.handleError(b,null,null, -null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=f||A(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"), -m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?B(mxResources.get("reOpened")+": ",!0,c,!1,!0):B(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(x);null!=d?C.insertBefore(z,d.nextSibling):C.appendChild(z);for(d=0;null!=b.replies&&d<b.replies.length;d++)x=b.replies[d],x.isResolved=b.isResolved,p(x,b.replies,null,f+1,g);null!=q&&(q.comment.id==b.id?(g=b.content,b.content=q.comment.content,l(b,z,q.saveCallback,q.deleteOnCancel), -b.content=g):null==q.comment.id&&q.comment.pCommentId==b.id&&(C.appendChild(q.div),l(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return z}}var u=!a.canComment(),v=a.canReplyToReplies(),q=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": -Dialog.backdropColor;C.style.bottom=parseInt(x)+7+"px";z.appendChild(C);var y=document.createElement("span");y.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(y,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=x;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter= -"none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!u){var E=x.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){l(d,f,function(b){t(f);a.addComment(b,function(a){b.id=a;B.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, -!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,B,null,0);c();b.preventDefault();mxEvent.consume(b)});A.appendChild(E)}E=x.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&& -(E=x.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& -(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),A.appendChild(x));z.appendChild(A);var B=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var b=q.div.querySelector(".geCommentEditTxtArea"),c=q.div.querySelector(".geCommentEditBtns");q.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(F){a.handleError(F)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ -IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});C.innerHTML="";C.appendChild(y);y.style.display="block";B=a;for(a=0;a<B.length;a++)b(B[a].replies), -p(B[a],B,null,0,D);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(C.appendChild(q.div),l(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(a){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])} -if(this.window.isVisible()){for(var b=C.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<B.length;d++)a(B[d])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),z,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var I=mxUtils.bind(this,function(){var a=this.window.getX(), -b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},ConfirmDialog=function(a,d,c,b,g,f,k,l,n,t,e){var m=document.createElement("div");m.style.textAlign="center";e=null!=e?e:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=e+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,d); -m.appendChild(p);null!=t&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",t),p.appendChild(d),m.appendChild(p));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom= -"8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&t.appendChild(f);var v=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(u.checked)});t.appendChild(v);null!=k?(v.innerHTML=k+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(f);m.appendChild(t);n?(t.style.marginTop= -"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0}; +"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(e);d&&(e.style.display="none")}function E(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=z;a(b);return{pdiv:d,replies:c}}function F(c,d,k,g,n){function x(){t(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);m(u);k&&k()},function(b){A();e(u);a.handleError(b,null, +null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},g,n)}function A(){l(v,u,function(a){x()},!0)}var q=E().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=p(v,b.replies,q,f+1);d?A():x()}if(g||!b.isResolved){x.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite"); +var y=document.createElement("div");y.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;y.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";y.appendChild(C);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,b.user.displayName||"");C.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",b.id);n(b, +H);C.appendChild(H);z.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");z.appendChild(y);y=document.createElement("div");y.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";y.appendChild(J);q||0!=f&&!u||A(mxResources.get("reply"),function(){F("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||q||(A(mxResources.get("edit"),function(){function c(){l(b,z,function(){t(z);b.editComment(b.content, +function(){m(z)},function(b){e(z);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),A(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){t(z);b.deleteComment(function(){for(var a=E(b).replies,d=0;d<a.length;d++)B.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}x.style.display=0==B.getElementsByTagName("div").length?"block":"none"},function(b){e(z);a.handleError(b,null,null, +null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=f||A(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=E(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"), +m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?F(mxResources.get("reOpened")+": ",!0,c,!1,!0):F(mxResources.get("markedAsResolved"),!1,c,!0)});z.appendChild(y);null!=d?B.insertBefore(z,d.nextSibling):B.appendChild(z);for(d=0;null!=b.replies&&d<b.replies.length;d++)y=b.replies[d],y.isResolved=b.isResolved,p(y,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,l(b,z,v.saveCallback,v.deleteOnCancel), +b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(B.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return z}}var q=!a.canComment(),u=a.canReplyToReplies(),v=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": +Dialog.backdropColor;B.style.bottom=parseInt(y)+7+"px";z.appendChild(B);var x=document.createElement("span");x.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(x,mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=y;A.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";A.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(A.style.filter= +"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!q){var E=y.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){l(d,f,function(b){t(f);a.addComment(b,function(a){b.id=a;C.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, +!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,C,null,0);c();b.preventDefault();mxEvent.consume(b)});A.appendChild(E)}E=y.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});A.appendChild(E);a.commentsRefreshNeeded()&& +(E=y.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),A.appendChild(E));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& +(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),A.appendChild(y));z.appendChild(A);var C=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(F){a.handleError(F)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ +IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(x);x.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies), +p(C[a],C,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(B.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;A=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])} +if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),z,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var G=mxUtils.bind(this,function(){var a=this.window.getX(), +b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},ConfirmDialog=function(a,d,c,b,g,f,k,l,n,t,e){var m=document.createElement("div");m.style.textAlign="center";e=null!=e?e:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=e+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,d); +m.appendChild(p);null!=t&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",t),p.appendChild(d),m.appendChild(p));t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(q.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom= +"8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&t.appendChild(f);var u=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=c&&c(q.checked)});t.appendChild(u);null!=k?(u.innerHTML=k+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||t.appendChild(f);m.appendChild(t);n?(t.style.marginTop= +"10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(q),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):t.style.marginTop="12px";this.init=function(){u.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0}; EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},k=[],l={},n={},t={},e={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE])f[m]=b[EditorUi.DIFF_UPDATE][m];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)n[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)l[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(m in d[EditorUi.DIFF_UPDATE])b= -d[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(e[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();t[u]=a[b];null!=e[p]||n[u]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][u]&&null!=d[EditorUi.DIFF_UPDATE][u].previous||(e[p]=u);p=u}}var v={},q=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!v[b]){v[b]=!0;k.push(a);var m=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name), -null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],q(t[a]));a=l[b];null!=a&&(delete l[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=t[a.getId()];null==b?q(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});q();for(m in e)q(t[e[m]]), +d[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(e[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var q=a[b].getId();t[q]=a[b];null!=e[p]||n[q]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][q]&&null!=d[EditorUi.DIFF_UPDATE][q].previous||(e[p]=q);p=q}}var u={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!u[b]){u[b]=!0;k.push(a);var m=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name), +null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],v(t[a]));a=l[b];null!=a&&(delete l[b],z(a))}),z=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=t[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(m in e)v(t[e[m]]), delete e[m];for(m in l)z(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}}; EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],k=null!=f.parent?f.parent:"",l=null!=f.previous?f.previous:"";c(k).inserted[l]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var n in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(k=f.parent,null==k&&(g=a.getCell(n),null!=g&&(g= a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(c(k).moved[f.previous]=n));return b}; EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var k=g.updateEdgeParent,l=new mxDictionary,n=[];g.updateEdgeParent=function(a,c){!l.get(a)&&b&&(l.put(a,!0),n.push(a))};var t=f[""],e=null!=t&&null!=t.inserted?t.inserted[""]:null,m=null;null!=e&&(m=this.getCellForJson(e));if(null==m){var p=null!=t&&null!=t.moved?t.moved[""]:null;null!=p&&(m=g.getCell(p))}null!=m&&(g.setRoot(m), -a.root=m);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var u=0;u<d[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(d[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=d[EditorUi.DIFF_UPDATE]){var q=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(p in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),d[EditorUi.DIFF_UPDATE][p],null!=q?q[p]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(u=0;u<d[EditorUi.DIFF_INSERT].length;u++)e=d[EditorUi.DIFF_INSERT][u], -v=g.getCell(e.id),null!=v&&(g.setTerminal(v,g.getCell(e.source),!0),g.setTerminal(v,g.getCell(e.target),!1));g.updateEdgeParent=k;if(b&&0<n.length)for(u=0;u<n.length;u++)g.contains(n[u])&&g.updateEdgeParent(n[u])}finally{g.endUpdate()}}; +a.root=m);this.patchCellRecursive(a,g,g.root,f,d);if(null!=d[EditorUi.DIFF_REMOVE])for(var q=0;q<d[EditorUi.DIFF_REMOVE].length;q++){var u=g.getCell(d[EditorUi.DIFF_REMOVE][q]);null!=u&&g.remove(u)}if(null!=d[EditorUi.DIFF_UPDATE]){var v=null!=c&&null!=c.cells?c.cells[EditorUi.DIFF_UPDATE]:null;for(p in d[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(p),d[EditorUi.DIFF_UPDATE][p],null!=v?v[p]:null)}if(null!=d[EditorUi.DIFF_INSERT])for(q=0;q<d[EditorUi.DIFF_INSERT].length;q++)e=d[EditorUi.DIFF_INSERT][q], +u=g.getCell(e.id),null!=u&&(g.setTerminal(u,g.getCell(e.source),!0),g.setTerminal(u,g.getCell(e.target),!1));g.updateEdgeParent=k;if(b&&0<n.length)for(q=0;q<n.length;q++)g.contains(n[q])&&g.updateEdgeParent(n[q])}finally{g.endUpdate()}}; EditorUi.prototype.patchCellRecursive=function(a,d,c,b,g){if(null!=c){for(var f=b[c.getId()],k=null!=f&&null!=f.inserted?f.inserted:{},f=null!=f&&null!=f.moved?f.moved:{},l=0,n=d.getChildCount(c),t="",e=0;e<n;e++){var m=d.getChildAt(c,e).getId();null==f[t]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][m]||null==g[EditorUi.DIFF_UPDATE][m].previous&&null==g[EditorUi.DIFF_UPDATE][m].parent)&&(f[t]=m);t=m}n=mxUtils.bind(this,function(e,f){var k=null!=e?e.getId():"";if(null!=e&&f){var m= d.getCell(k);null!=m&&m!=e&&(e=null)}null!=e&&(d.getChildAt(c,l)!=e&&d.add(c,e,l),this.patchCellRecursive(a,d,e,b,g),l++);return k});for(t=[null];0<t.length;)if(e=t.shift(),e=n(null!=e?e.child:null,null!=e?e.insert:!1),m=f[e],null!=m&&(delete f[e],t.push({child:d.getCell(m)})),m=k[e],null!=m&&(delete k[e],t.push({child:this.getCellForJson(m),insert:!0})),0==t.length){for(e in f)t.push({child:d.getCell(f[e])}),delete f[e];for(e in k)t.push({child:this.getCellForJson(k[e]),insert:!0}),delete k[e]}}}; EditorUi.prototype.patchCell=function(a,d,c,b){if(null!=d&&null!=c){if(null==b||null==b.xmlValue&&(null==b.value||""==b.value))"value"in c?a.setValue(d,c.value):null!=c.xmlValue&&a.setValue(d,mxUtils.parseXml(c.xmlValue).documentElement);null!=b&&null!=b.style||null==c.style||a.setStyle(d,c.style);null!=c.visible&&a.setVisible(d,1==c.visible);null!=c.collapsed&&a.setCollapsed(d,1==c.collapsed);null!=c.vertex&&(d.vertex=1==c.vertex);null!=c.edge&&(d.edge=1==c.edge);null!=c.connectable&&(d.connectable= @@ -9513,13 +9517,13 @@ DrawioFileSync.prototype.fileChanged=function(a,d,c,b){return this.notifyThread= DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(a){null!=a?(this.file.setDescriptorRevisionId(a,this.file.getCurrentRevisionId()),this.updateDescriptor(a),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(a){this.file.inConflictState=!0;this.file.handleFileError(a)}))}; DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()}; DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),l=0,n=!1,t=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var e=!0,m=window.setTimeout(mxUtils.bind(this,function(){e=!1; -this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(m);if(e&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var q= -JSON.parse(g.getText());if(null!=q&&0<q.length)for(var z=0;z<q.length;z++){var x=this.stringToObject(q[z]);if(x.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)k=x.d.checksum,p.push(x.d.patch);else{n=!0;p=[];break}}}catch(C){p=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(t, -(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(C){null!=c&&c(C)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(t,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),c,b)}; +this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(m);if(e&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var g=null,p=[];if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var v= +JSON.parse(k.getText());if(null!=v&&0<v.length)for(var z=0;z<v.length;z++){var y=this.stringToObject(v[z]);if(y.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)g=y.d.checksum,p.push(y.d.patch);else{n=!0;p=[];break}}}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,g,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=k.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(t, +(l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(B){null!=c&&c(B)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(t,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),c,b)}; DrawioFileSync.prototype.merge=function(a,d,c,b,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),l=this.file.getDescriptorRevisionId(c);if(!k){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages, a[f]);var n=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",l,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==n,d);if(null!=d&&d!=n){var t=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l);this.file.checksumError(g,a,"From: "+t+"\nTo: "+e+"\nChecksum: "+d+"\nCurrent: "+n,l,"merge"); -return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l),this.file.sendErrorReport("Error in merge", -"From: "+t+"\nTo: "+e+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),u);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,u)}}catch(v){}}}; +return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),c);this.file.backupPatch=null;null!=b&&b()}catch(q){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(q);try{if(this.file.errorReportsEnabled)t=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l),this.file.sendErrorReport("Error in merge", +"From: "+t+"\nTo: "+e+"\nChecksum: "+d+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(a,null,2)),q);else{var m=this.file.getCurrentUser(),p=null!=m?m.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),p,q)}}catch(u){}}}; DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var d=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),c=this.file.getCurrentRevisionId(),b=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(c)+"&msg="+encodeURIComponent(d)+"&data="+encodeURIComponent(b));this.file.stats.bytesSent+=b.length;this.file.stats.msgSent++}this.updateStatus()}; DrawioFileSync.prototype.objectToString=function(a){a=Graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(a))}; DrawioFileSync.prototype.fileSaved=function(a,d,c,b){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);b=this.ui.getHashValueForPages(a);g=this.ui.diffPages(g,a);d=this.file.getDescriptorRevisionId(d); @@ -9565,8 +9569,8 @@ DriveFile.prototype.isConflict=function(a){return null!=a&&null!=a.error&&412==a DriveFile.prototype.getPublicUrl=function(a){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(d){if(null!=d&&null!=d.items)for(var c=0;c<d.items.length;c++)if("anyoneWithLink"===d.items[c].id||"anyone"===d.items[c].id){a(this.desc.webContentLink);return}a(null)}),mxUtils.bind(this,function(){a(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0}; DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(a,d,c,b,g){DrawioFile.prototype.save.apply(this,[a,mxUtils.bind(this,function(){this.saveFile(null,a,d,c,b,g)}),c,b,g])}; DriveFile.prototype.saveFile=function(a,d,c,b,g,f){try{if(!this.isEditable())null!=c&&c();else if(!this.savingFile){var k=mxUtils.bind(this,function(a,f){var l=null,e=null;try{l=this.isModified;e=this.isModified();this.setModified(!1);this.savingFileTime=new Date;this.savingFile=!0;this.isModified=function(){return!0};var m=this.desc;this.ui.drive.saveFile(this,f,mxUtils.bind(this,function(a,f){try{this.savingFile=!1,this.isModified=l,0!=a?(d&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay= -Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b)):(this.setModified(e||this.isModified()),null!=b&&b(a))}catch(v){if(this.setModified(e||this.isModified()),null!=b)b(v);else throw v;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=l,this.setModified(e||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile= -!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(v){if(this.setModified(e||this.isModified()),null!=b)b(v);else throw v;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=l&&(this.isModified=l),null!=e&&this.setModified(e||this.isModified()),null!=b)b(p);else throw p; +Math.min(8E3,Math.max(this.saveDelay+500,DriveFile.prototype.autosaveDelay)),this.desc=a,this.fileSaved(f,m,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c(a)}),b)):(this.setModified(e||this.isModified()),null!=b&&b(a))}catch(u){if(this.setModified(e||this.isModified()),null!=b)b(u);else throw u;}}),mxUtils.bind(this,function(c,d){try{this.savingFile=!1,this.isModified=l,this.setModified(e||this.isModified()),this.isConflict(c)?(this.inConflictState=!0,null!=this.sync?(this.savingFile= +!0,this.savingFileTime=new Date,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();k(a,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}))):null!=b&&b()):null!=b&&b(c)}catch(u){if(this.setModified(e||this.isModified()),null!=b)b(u);else throw u;}}),g,g,a)}catch(p){if(this.savingFile=!1,null!=l&&(this.isModified=l),null!=e&&this.setModified(e||this.isModified()),null!=b)b(p);else throw p; }});k(f,d)}}catch(l){if(null!=b)b(l);else throw l;}};DriveFile.prototype.copyFile=function(a,d){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,a,d)}catch(c){d(c)}}),d,!0)}; DriveFile.prototype.makeCopy=function(a,d,c){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,c),mxUtils.bind(this,function(b){this.desc=b;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();a()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=d&&d()}))};DriveFile.prototype.saveAs=function(a,d,c){this.ui.drive.copyFile(this.getId(),a,d,c)}; DriveFile.prototype.rename=function(a,d,c){var b=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),a,mxUtils.bind(this,function(g){this.hasSameExtension(a,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(b),null!=d&&d(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(b),this.save(!0,d,c))}),c)}; @@ -9578,7 +9582,7 @@ DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototy DriveFile.prototype.setDescriptorEtag=function(a,d){a.etag=d};DriveFile.prototype.loadPatchDescriptor=function(a,d){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(c){a(c)}),d)};DriveFile.prototype.patchDescriptor=function(a,d){DrawioFile.prototype.patchDescriptor.apply(this,arguments);a.headRevisionId=d.headRevisionId;a.modifiedDate=d.modifiedDate}; DriveFile.prototype.loadDescriptor=function(a,d){this.ui.drive.loadDescriptor(this.getId(),a,d)};DriveFile.prototype.commentsSupported=function(){return!0}; DriveFile.prototype.getComments=function(a,d){function c(a,d,k){if(d.deleted)return null;k=new DriveComment(a,d.commentId||d.replyId,d.content,d.modifiedDate,d.createdDate,"resolved"==d.status,d.author.isAuthenticatedUser?b:new DrawioUser(d.author.permissionId,d.author.emailAddress,d.author.displayName,d.author.picture.url),k);for(var f=0;null!=d.replies&&f<d.replies.length;f++)k.addReplyDirect(c(a,d.replies[f],d.commentId));return k}var b=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+ -this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var d=[],g=0;g<b.items.length;g++){var l=c(this,b.items[g]);null!=l&&d.push(l)}a(d)}),d)};DriveFile.prototype.addComment=function(a,d,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){d(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment}; +this.getId()+"/comments"},mxUtils.bind(this,function(b){for(var d=[],k=0;k<b.items.length;k++){var g=c(this,b.items[k]);null!=g&&d.push(g)}a(d)}),d)};DriveFile.prototype.addComment=function(a,d,c){a={content:a.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:a},mxUtils.bind(this,function(a){d(a.commentId)}),c)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment}; DriveFile.prototype.newComment=function(a,d){return new DriveComment(this,null,a,Date.now(),Date.now(),!1,d)};DriveLibrary=function(a,d,c){DriveFile.call(this,a,d,c)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(a,d,c){this.ui.drive.saveFile(this,a,mxUtils.bind(this,function(a){this.desc=a;null!=d&&d(a)}),c)};DriveLibrary.prototype.open=function(){};DriveClient=function(a){mxEventSource.call(this);DrawioClient.call(this,a,"gDriveAuthInfo");this.ui=a;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com", this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";"1"==urlParams.photos&&this.scopes.push("https://www.googleapis.com/auth/photos.upload"); a=JSON.parse(this.token);if(null!=a&&null!=a.current){a=a.current;this.userId=a.userId;this.token=a.access_token;var d=(a.expires-Date.now())/1E3;a.expires_in=600>d?1:d;this.resetTokenRefresh(a);this.authCalled=!1}};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2"; @@ -9592,8 +9596,8 @@ DriveClient.prototype.execute=function(a){var d=mxUtils.bind(this,function(c){th mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,d)}; DriveClient.prototype.executeRequest=function(a,d,c){try{var b=!0,g=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=a;null!=g&&window.clearTimeout(g);g=window.setTimeout(mxUtils.bind(this,function(){b=!1;null!=c&&c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:k})}),this.ui.timeout);var l=null,n=!1;"string"===typeof a.params?l=a.params:null!=a.params&&(l=JSON.stringify(a.params), n=!0);var t=a.fullUrl||this.GDriveBaseUrl+a.url;n&&(t+=(0<t.indexOf("?")?"&":"?")+"alt=json");var e=new mxXmlRequest(t,l,a.method||"GET");e.setRequestHeaders=mxUtils.bind(this,function(b,c){if(null!=a.headers)for(var d in a.headers)b.setRequestHeader(d,a.headers[d]);else null!=a.contentType?b.setRequestHeader("Content-Type",a.contentType):n&&b.setRequestHeader("Content-Type","application/json");b.setRequestHeader("Authorization","Bearer "+this.token)});e.send(mxUtils.bind(this,function(e){try{if(window.clearTimeout(g), -b){var l;try{l=JSON.parse(e.getText())}catch(q){l=null}if(200<=e.getStatus()&&299>=e.getStatus())null!=d&&d(l);else{var m=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==l||null==l.error||-1!=l.error.code&&(403!=l.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=n)?403==l.error.code&&this.retryAuth|| -401==l.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(l):c(l)}}}catch(q){if(null!=c)c(q);else throw q;}}))}catch(m){if(null!=c)c(m);else throw m;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(l){if(null!= +b){var l;try{l=JSON.parse(e.getText())}catch(v){l=null}if(200<=e.getStatus()&&299>=e.getStatus())null!=d&&d(l);else{var m=null!=l&&null!=l.error?null!=l.error.data?l.error.data:l.error.errors:null,n=null!=m&&0<m.length?m[0].reason:null;null==c||null==l||null==l.error||-1!=l.error.code&&(403!=l.error.code||"domainPolicy"!=n&&"The requested mime type change is forbidden."!=l.error.message)?null!=l&&null!=l.error&&(401==l.error.code||403==l.error.code&&"rateLimitExceeded"!=n)?403==l.error.code&&this.retryAuth|| +401==l.error.code&&this.retryAuth&&"authError"==n?(null!=c&&c(l),this.retryAuth=!1):(this.retryAuth=!0,this.execute(k)):null!=l&&null!=l.error&&412!=l.error.code&&404!=l.error.code&&400!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=c&&c(l):c(l)}}}catch(v){if(null!=c)c(v);else throw v;}}))}catch(m){if(null!=c)c(m);else throw m;}});null!=this.token&&this.authCalled?k():this.execute(k)}catch(l){if(null!= c)c(l);else throw l;}};DriveClient.prototype.createAuthWin=function(a){return window.open(a?a:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())}; DriveClient.prototype.authorize=function(a,d,c,b,g){var f=mxUtils.bind(this,function(a,b,e){this.token=a.access_token;a.expires=Date.now()+1E3*parseInt(a.expires_in);a.remember=b;this.resetTokenRefresh(a);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(a);this.updateUser(mxUtils.bind(this,function(){var a=JSON.parse(f);this.setPersistentToken(a,!b);null!=d&&d()}),c)}else null!=d&&(this.setPersistentToken(a,!b),d())});try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId= this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));var k=JSON.parse(this.getPersistentToken(!0));null!=k&&(null==this.userId?null!=k.current?(this.userId=k.current.userId,k=k[this.userId]):k=null:k=k[this.userId]);if(!a||null!=k&&null!=k.refresh_token)if(a)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname)+"&refresh_token="+k.refresh_token,null,"GET")).send(mxUtils.bind(this,function(a){200<= @@ -9608,24 +9612,24 @@ DriveClient.prototype.loadDescriptor=function(a,d,c,b){this.executeRequest({url: DriveClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,d,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&& f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,d,c,null,{Authorization:"Bearer "+this.token}):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,d,c,!0,g):this.getXmlFile(a,d,c)}else c({message:mxResources.get("loggedOut")})}catch(l){if(null!=c)c(l);else throw l;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)}; DriveClient.prototype.getXmlFile=function(a,d,c,b,g){try{var f={Authorization:"Bearer "+this.token},k=a.downloadUrl;this.ui.loadUrl(k,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?d(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(a.title)){var l=b.lastIndexOf(",");if(0<l){var e=this.ui.extractGraphModelFromPng(b.substring(l+ -1));if(null!=e&&0<e.length)b=e;else try{var e=b.substring(l+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(e):atob(e),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?f=!0:b=m}catch(u){f=!0}}}else/\.pdf$/i.test(a.title)?(e=Editor.extractGraphModelFromPdf(b),null!=e&&0<e.length&&(f=!0,b=e)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m): -Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(v){if(null!=c)c(v);else throw v;}}),a.title):d(f?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(u){if(null!= -c)c(u);else throw u;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(l){if(null!=c)c(l);else throw l;}}; +1));if(null!=e&&0<e.length)b=e;else try{var e=b.substring(l+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(e):atob(e),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?f=!0:b=m}catch(q){f=!0}}}else/\.pdf$/i.test(a.title)?(e=Editor.extractGraphModelFromPdf(b),null!=e&&0<e.length&&(f=!0,b=e)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m): +Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?this.ui.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){try{4==b.readyState&&(200<=b.status&&299>=b.status?d(new LocalFile(this.ui,b.responseText,a.title+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(u){if(null!=c)c(u);else throw u;}}),a.title):d(f?new LocalFile(this.ui,b,a.title,!0):new DriveFile(this.ui,b,a))}}catch(q){if(null!= +c)c(q);else throw q;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title)||/\.pdf$/i.test(a.title),null,null,null,f)}catch(l){if(null!=c)c(l);else throw l;}}; DriveClient.prototype.saveFile=function(a,d,c,b,g,f,k,l){try{var n=0;a.saveLevel=1;var t=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"": "-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),e=mxUtils.bind(this,function(b){t(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+ -"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+n+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(E){}});if(a.isEditable()&&null!=a.desc){var m=(new Date).getTime(),p=a.desc.etag,u=a.desc.modifiedDate,v=a.desc.headRevisionId,q=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()); -f=null!=f?f:!1;var z=null,x=!1,C={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(C.mimeType))C.mimeType=this.xmlMimeType,z=a.desc,x=d=!0;else if("application/octet-stream"==C.mimeType||"1"==urlParams["override-mime"]&&C.mimeType!=this.xmlMimeType)C.mimeType=this.xmlMimeType;var y=mxUtils.bind(this,function(b,g,y){try{a.saveLevel=3;a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&& -l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));y||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(C.thumbnail={image:b,mimeType:g}));var A=a.getData(),D=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-m,a.saveLevel=11,null==b)t({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(b.modifiedDate)).getTime()-(new Date(u)).getTime();if(0>=f||p==b.etag||d&&v==b.headRevisionId){a.saveLevel= -12;var g=[];0>=f&&g.push("invalid modified time");p==b.etag&&g.push("stale etag");d&&v==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");t({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+v+"."+u+"-"+this.ui.hashValue(p)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+ -a.sync.clientId:"-nosync"))}catch(N){}}else if(a.saveLevel=null,c(b,A),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!= -this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(N){}}}}catch(N){e(N)}}),E=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(C.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this, -function(){l=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),C,c,d||b||k,f,b?null:g,x),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&D(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!= -c&&c.etag==g)if(n<this.staleEtagMaxRetries){n++;var d=2*n*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",n,"delay",d)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+ -(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&c.headRevisionId==v&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),t(b,c)}catch(ba){e(ba)}}),mxUtils.bind(this,function(){t(b)})):t(b)}catch(ga){e(ga)}}}))}catch(W){e(W)}}),p=mxUtils.bind(this,function(b){a.saveLevel= -9;if(b)m(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=f&&f.headRevisionId==v?("1"==urlParams.test&&g!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",g,"to",f.etag,"rev", -a.desc.headRevisionId,"response",[f],"file",[a]),g=f.etag,m(b)):t({error:{code:412}},f)}catch(W){e(W)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,t(b))}))}});if(q&&null==b){a.saveLevel=8;var y=new Image;y.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/y.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(y.height*a);b.getContext("2d").drawImage(y,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+ -1).replace(/\+/g,"-").replace(/\//g,"_");C.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){try{p(!1)}catch(W){e(W)}}});y.src="data:image/png;base64,"+c}else p(!1)}catch(X){e(X)}});q?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){E(a,!0)}),t,this.ui.getCurrentFile()!=a?A:null):E(A,!1)}catch(H){e(H)}});try{a.saveLevel=2,(f||q||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=C.mimeType&&"application/vnd.jgraph.mxfile"!=C.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth, -mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}y(b,"image/png")}catch(D){e(D)}})))&&y(null,null,a.constructor!=DriveLibrary)}catch(A){e(A)}}else this.ui.editor.graph.reset(),t({message:mxResources.get("readOnly")})}catch(A){e(A)}}; +"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+n+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(E){}});if(a.isEditable()&&null!=a.desc){var m=(new Date).getTime(),p=a.desc.etag,q=a.desc.modifiedDate,u=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()); +f=null!=f?f:!1;var z=null,y=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(B.mimeType))B.mimeType=this.xmlMimeType,z=a.desc,y=d=!0;else if("application/octet-stream"==B.mimeType||"1"==urlParams["override-mime"]&&B.mimeType!=this.xmlMimeType)B.mimeType=this.xmlMimeType;var x=mxUtils.bind(this,function(b,g,x){try{a.saveLevel=3;a.constructor==DriveFile&&(null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&& +l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));x||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,mimeType:g}));var A=a.getData(),E=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-m,a.saveLevel=11,null==b)t({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(b.modifiedDate)).getTime()-(new Date(q)).getTime();if(0>=f||p==b.etag||d&&u==b.headRevisionId){a.saveLevel= +12;var k=[];0>=f&&k.push("invalid modified time");p==b.etag&&k.push("stale etag");d&&u==b.headRevisionId&&k.push("stale revision");var g=k.join(", ");t({message:mxResources.get("errorSavingFile")+": "+g},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+q+"-"+this.ui.hashValue(p)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+this.ui.hashValue(b.etag)+(0<g.length?"-errors-"+g:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+ +a.sync.clientId:"-nosync"))}catch(O){}}else if(a.saveLevel=null,c(b,A),null!=z){this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+z.id+"/revisions/"+z.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from_"+z.id+"."+z.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!= +this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(O){}}}}catch(O){e(O)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(B.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this, +function(){l=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),B,c,d||b||k,f,b?null:g,y),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&E(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!= +c&&c.etag==g)if(n<this.staleEtagMaxRetries){n++;var d=2*n*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(x,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",n,"delay",d)}else{x(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+ +(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&c.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),t(b,c)}catch(ba){e(ba)}}),mxUtils.bind(this,function(){t(b)})):t(b)}catch(ga){e(ga)}}}))}catch(W){e(W)}}),x=mxUtils.bind(this,function(b){a.saveLevel= +9;if(b)m(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=f&&f.headRevisionId==u?("1"==urlParams.test&&g!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",g,"to",f.etag,"rev", +a.desc.headRevisionId,"response",[f],"file",[a]),g=f.etag,m(b)):t({error:{code:412}},f)}catch(W){e(W)}}}),mxUtils.bind(this,function(b){window.clearTimeout(d);c&&(a.saveLevel=11,t(b))}))}});if(v&&null==b){a.saveLevel=8;var p=new Image;p.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/p.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(p.height*a);b.getContext("2d").drawImage(p,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+ +1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};x(!1)}catch(V){try{x(!1)}catch(W){e(W)}}});p.src="data:image/png;base64,"+c}else x(!1)}catch(Y){e(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),t,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(J){e(J)}});try{a.saveLevel=2,(f||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=B.mimeType&&"application/vnd.jgraph.mxfile"!=B.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth, +mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}x(b,"image/png")}catch(D){e(D)}})))&&x(null,null,a.constructor!=DriveLibrary)}catch(A){e(A)}}else this.ui.editor.graph.reset(),t({message:mxResources.get("readOnly")})}catch(A){e(A)}}; DriveClient.prototype.insertFile=function(a,d,c,b,g,f,k){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,d,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,d,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,d,a))}),g)}; DriveClient.prototype.createUploadRequest=function(a,d,c,b,g,f,k){g=null!=g?g:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(l["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:l,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(d)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+ (null!=c?g?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a}; @@ -9650,9 +9654,9 @@ DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.get DropboxFile.prototype.getRevisions=function(a,d){var c=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(b){try{for(var c=[],f=b.entries.length-1;0<=f;f--)mxUtils.bind(this,function(a){c.push({modifiedDate:a.client_modified,fileSize:a.size,getXml:mxUtils.bind(this,function(b,c){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:a.rev},b,c)}),getUrl:mxUtils.bind(this,function(b){return this.ui.getUrl(window.location.pathname+"?rev="+ a.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=b?"&page="+b:""))+window.location.hash})})})(b.entries[f]);a(c)}catch(k){d(k)}}));c["catch"](function(a){d(a)})};DropboxFile.prototype.getLatestVersion=function(a,d){this.ui.dropbox.getFile(this.getId(),a,d)};DropboxFile.prototype.updateDescriptor=function(a){this.stat=a.stat};DropboxFile.prototype.save=function(a,d,c,b,g){this.doSave(this.getTitle(),a,d,c,b,g)};DropboxFile.prototype.saveAs=function(a,d,c){this.doSave(a,!1,d,c)}; DropboxFile.prototype.doSave=function(a,d,c,b,g,f){var k=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=k;this.saveFile(a,d,c,b,g,f)}),b,g,f])}; -DropboxFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(d){if(d){var f=null,g=null;try{f=this.isModified;g=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});l();var n=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a, -d,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.stat=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.setModified(g||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){l();c()}}b(a)}}),e)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!= -this?this.getData():null):n(this.getData())}catch(t){if(this.savingFile=!1,null!=f&&(this.isModified=f),null!=g&&this.setModified(g||this.isModified()),null!=b)b(t);else throw t;}}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,d)):null!=c&&c()}; +DropboxFile.prototype.saveFile=function(a,d,c,b){this.isEditable()?this.savingFile?null!=b&&b({code:App.ERROR_BUSY}):(d=mxUtils.bind(this,function(d){if(d){var f=null,k=null;try{f=this.isModified;k=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var g=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});g();var n=mxUtils.bind(this,function(d){var e=this.stat.path_display.lastIndexOf("/"),e=1<e?this.stat.path_display.substring(1,e+1):null;this.ui.dropbox.saveFile(a, +d,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.stat=a;this.contentChanged();null!=c&&c()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.setModified(k||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){g();c()}}b(a)}}),e)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(this.ui.base64ToBlob(a,"image/png"))}),b,this.ui.getCurrentFile()!= +this?this.getData():null):n(this.getData())}catch(t){if(this.savingFile=!1,null!=f&&(this.isModified=f),null!=k&&this.setModified(k||this.isModified()),null!=b)b(t);else throw t;}}else null!=b&&b()}),this.getTitle()==a?d(!0):this.ui.dropbox.checkExists(a,d)):null!=c&&c()}; DropboxFile.prototype.rename=function(a,d,c){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(b){this.hasSameExtension(a,this.getTitle())?(this.stat=b,this.descriptorChanged(),null!=d&&d()):(this.stat=b,this.descriptorChanged(),this.save(!0,d,c))}),c)};DropboxLibrary=function(a,d,c){DropboxFile.call(this,a,d,c)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4; DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))}; DropboxClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(c){window.clearTimeout(g);b&&(this.setUser(new DrawioUser(c.account_id,c.email,c.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(g);b&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null), @@ -9708,8 +9712,8 @@ OneDriveClient.prototype.executeRequest=function(a,d,c){var b=mxUtils.bind(this, c,g))}),c)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){b(!0)},c):b(!1)};OneDriveClient.prototype.checkToken=function(a){null==this.token||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(a,this.emptyFn):a()};OneDriveClient.prototype.getItemRef=function(a){var d=a.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:a}}; OneDriveClient.prototype.getItemURL=function(a,d){var c=a.split("/");return 1<c.length?(d?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(d?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)}; OneDriveClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),f=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,d,c);else{var n=!0,t=window.setTimeout(mxUtils.bind(this, -function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),n){var e=f?a.lastIndexOf(","):-1,k=null;if(0<e){var l=this.ui.extractGraphModelFromPng(a.substring(e+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var v=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v)}Graph.fileSupport&&(new XMLHttpRequest).upload&& -this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(q){if(null!=c)c(q);else throw q; +function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(t),n){var e=f?a.lastIndexOf(","):-1,k=null;if(0<e){var l=this.ui.extractGraphModelFromPng(a.substring(e+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var u=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u)}Graph.fileSupport&&(new XMLHttpRequest).upload&& +this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(z){if(null!=c)c(z);else throw z;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v; }}),mxUtils.bind(this,function(a){window.clearTimeout(t);n&&c(this.parseRequestText(a))}),f||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)}; OneDriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&(this.isValidFilename(d)?this.checkExists(a.getParentId(),d,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))}; OneDriveClient.prototype.moveFile=function(a,d,c,b){d=this.getItemRef(d);var g=this.getItemRef(a);d.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:d}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)}; @@ -9729,13 +9733,13 @@ GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUti GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(a,d){this.peer.getFile(this.getId(),a,d)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(a){this.meta=a};GitHubFile.prototype.getDescriptorEtag=function(a){return a.sha};GitHubFile.prototype.setDescriptorEtag=function(a,d){a.sha=d}; GitHubFile.prototype.save=function(a,d,c,b,g,f){this.doSave(this.getTitle(),d,c,b,g,f)};GitHubFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};GitHubFile.prototype.doSave=function(a,d,c,b,g,f){var k=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(a,!1,d,c,b,g,f)}),c,b,g])}; GitHubFile.prototype.saveFile=function(a,d,c,b,g,f,k){if(this.isEditable())if(this.savingFile)null!=b&&b({code:App.ERROR_BUSY});else{var l=mxUtils.bind(this,function(d){if(this.getTitle()==a){var g=null,e=null;try{g=this.isModified;e=this.isModified();this.savingFile=!0;this.savingFileTime=new Date;var k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return e}}),l=this.getCurrentEtag(),n=this.data;k();this.peer.saveFile(this,mxUtils.bind(this,function(a){this.savingFile= -!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,l,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:d});else if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}),f,d)}catch(v){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=e&&this.setModified(e|| -this.isModified()),null!=b)b(v);else throw v;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=k?l(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}), +!1;this.isModified=g;this.setDescriptorEtag(this.meta,a);this.fileSaved(n,l,mxUtils.bind(this,function(){this.contentChanged();null!=c&&c()}),b)}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(e||this.isModified());if(this.isConflict(a))this.inConflictState=!0,null!=b&&b({commitMessage:d});else if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}),f,d)}catch(u){if(this.savingFile=!1,null!=g&&(this.isModified=g),null!=e&&this.setModified(e|| +this.isModified()),null!=b)b(u);else throw u;}}else this.savingFile=!0,this.savingFileTime=new Date,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=b&&b()}),!1,e,d)}))});null!=k?l(k):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(a){l(a)}), b)}else null!=c&&c()};GitHubLibrary=function(a,d,c){GitHubFile.call(this,a,d,c)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a,d){DrawioClient.call(this,a,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token"; GitHubClient.prototype.updateUser=function(a,d,c){var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),f=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),k=this.authToken+" "+this.token;f.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",k)};f.send(mxUtils.bind(this,function(){window.clearTimeout(g);b&&(401===f.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this, function(){this.updateUser(a,d,!0)}),d)):200>f.getStatus()||300<=f.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(f.getText()))),a()))}),d)};GitHubClient.prototype.createUser=function(a){return new DrawioUser(a.id,a.email,a.name)}; GitHubClient.prototype.authenticate=function(a,d){if(null==window.onGitHubCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(b)if(window.onGitHubCallback=null,b=!1,null==k)d({message:mxResources.get("accessDenied"),retry:c});else{var n=mxUtils.bind(this,function(){var b= -!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(c);if(b)try{if(200>e.getStatus()||300<=e.getStatus())d({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(u){d(u)}finally{null!=l&& +!0,c=window.setTimeout(mxUtils.bind(this,function(){b=!1;d({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(c);if(b)try{if(200>e.getStatus()||300<=e.getStatus())d({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);g&&this.setPersistentToken(this.token);a()}}catch(q){d(q)}finally{null!=l&& l.close()}}))});n()}else null!=l&&l.close()}):d({message:mxResources.get("serviceUnavailableOrBlocked"),retry:c})}),mxUtils.bind(this,function(){b&&(window.onGitHubCallback=null,b=!1,d({message:mxResources.get("accessDenied"),retry:c}))}))});c()}else d({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(a,d){try{var c=JSON.parse(a.getText());null!=c&&null!=c.message&&(d=c.message)}catch(b){}return d}; GitHubClient.prototype.executeRequest=function(a,d,c,b){var g=mxUtils.bind(this,function(k){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),t=this.authToken+" "+this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization",t)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=a.getStatus()&&299>=a.getStatus()||b&&404==a.getStatus())d(a);else if(401===a.getStatus())k?c({code:a.getStatus(), message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===a.getStatus()){var e=!1;try{var m=JSON.parse(a.getText());null!=m&&null!=m.errors&&0<m.errors.length&&(e="too_large"==m.errors[0].code)}catch(p){}c({message:mxResources.get(e?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?c({code:a.getStatus(),message:this.getErrorMessage(a,mxResources.get("fileNotFound"))}):409===a.getStatus()? @@ -9754,18 +9758,18 @@ GitHubClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.re t(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,k,n,l,mxUtils.bind(this,function(b){a.meta.sha=b;e()}),c):e()};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)}; GitHubClient.prototype.showGitHubDialog=function(a,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing= "border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m= -mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;C()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this, -function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,C()):this.ui.hideDialog()}))}),v=null,q=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+ -"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(n,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var y=mxUtils.bind(this,function(){z(k+1)});mxEvent.addListener(v, -"click",y);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,C();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var q=!0,y=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=t.cloneNode();p.style.backgroundColor= -q?"#eeeeee":"";q=!q;var A=document.createElement("img");A.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");A.setAttribute("align","absmiddle");A.style.marginRight="4px";A.style.marginTop="-4px";A.width=20;p.appendChild(A);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,z()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);y++}})(l[k],k)});e(!0);a&&e(!1)}}),u,!0)}),x=mxUtils.bind(this, -function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(n,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k= -mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;C()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g= -a.name;f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(v),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}}),u)}),C=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=q&&mxEvent.removeListener(n,"scroll",q);null!=v&&null!=v.parentNode&& -v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){C(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this, -function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,x()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";z()}),mxUtils.bind(this,function(a){this.ui.spinner.stop(); +mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this, +function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),u=null,v=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+ +"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(k+1)});mxEvent.addListener(u, +"click",x);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var x=!0,A=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=t.cloneNode();p.style.backgroundColor= +x?"#eeeeee":"";x=!x;var v=document.createElement("img");v.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");v.setAttribute("align","absmiddle");v.style.marginRight="4px";v.style.marginTop="-4px";v.width=20;p.appendChild(v);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,z()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);A++}})(l[k],k)});e(!0);a&&e(!1)}}),q,!0)}),y=mxUtils.bind(this, +function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k= +mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g= +a.name;f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(u),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),q)}),B=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&mxEvent.removeListener(n,"scroll",v);null!=u&&null!=u.parentNode&& +u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this, +function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";z()}),mxUtils.bind(this,function(a){this.ui.spinner.stop(); this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var e=0;e<d.length;e++)mxUtils.bind(this,function(a,d){var e=t.cloneNode();e.style.backgroundColor=0==d%2?"#eeeeee":"";e.appendChild(m(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=a.name;g=a.default_branch; -f="";z()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(v),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}),u)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; +f="";z()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(u),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}),q)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; TrelloFile.prototype.save=function(a,d,c){this.doSave(this.getTitle(),d,c)};TrelloFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};TrelloFile.prototype.doSave=function(a,d,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,d,c)}; TrelloFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=g;this.meta=f;this.contentChanged();null!=c&& c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(f){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&& @@ -9783,10 +9787,10 @@ TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(thi TrelloClient.prototype.showTrelloDialog=function(a,d){var c=null,b="@me",g=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height= "194px";f.appendChild(l);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var n=mxUtils.bind(this,function(a,b,c){g++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==g%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height= c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";e.appendChild(f)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),t=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),e=mxUtils.bind(this,function(){g=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(c+"/attachments",{fields:"id,name,previews"}, -mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0): -null!=t&&t(b)}))});a()}),m=null,p=null,u=mxUtils.bind(this,function(f){null==f&&(g=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m);m=document.createElement("a");m.style.display="block";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",p);u(f+1)});mxEvent.addListener(m,"click",k);var v=mxUtils.bind(this,function(){Trello.get("search", -{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards"); -this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var q=0;q<g.length;q++)mxUtils.bind(this,function(b){l.appendChild(n(b.name,mxUtils.bind(this,function(){a?(c=b.id,e()):(this.ui.hideDialog(),d(b.id))})))})(g[q]);100==g.length&&(l.appendChild(m),p=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(v,t,!0):null!=t&&t({message:a.responseText})}))});v()});u()}; +mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(n("../ [Up]",mxUtils.bind(this,function(){q()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){l.appendChild(n(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();d(c+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[b])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,t,!0): +null!=t&&t(b)}))});a()}),m=null,p=null,q=mxUtils.bind(this,function(f){null==f&&(g=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=m&&null!=m.parentNode&&m.parentNode.removeChild(m);m=document.createElement("a");m.style.display="block";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",p);q(f+1)});mxEvent.addListener(m,"click",k);var u=mxUtils.bind(this,function(){Trello.get("search", +{query:""==mxUtils.trim(b)?"is:open":b,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(n(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,b,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(b=a,q())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards"); +this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var v=0;v<g.length;v++)mxUtils.bind(this,function(b){l.appendChild(n(b.name,mxUtils.bind(this,function(){a?(c=b.id,e()):(this.ui.hideDialog(),d(b.id))})))})(g[v]);100==g.length&&(l.appendChild(m),p=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",p))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(u,t,!0):null!=t&&t({message:a.responseText})}))});u()});q()}; TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(a,d,c){GitHubFile.call(this,a,d,c);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(a){return null!=a&&400==a.status}; GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(a){return a.last_commit_id};GitLabFile.prototype.setDescriptorEtag=function(a,d){a.last_commit_id=d};GitLabLibrary=function(a,d,c){GitLabFile.call(this,a,d,c)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(a,d,c){this.saveFile(a,!1,d,c)};GitLabLibrary.prototype.open=function(){};GitLabClient=function(a){GitHubClient.call(this,a,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.authToken="Bearer"; GitLabClient.prototype.authenticate=function(a,d){if(null==window.onGitLabCallback){var c=mxUtils.bind(this,function(){var b=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(g,f){var k=window.location.href,k=k.substring(0,k.lastIndexOf("/")),k=encodeURIComponent(k+"/gitlab.html");null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+k+"&response_type=token&state=123","gitlabauth")?window.onGitLabCallback=mxUtils.bind(this, @@ -9797,12 +9801,12 @@ mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status GitLabClient.prototype.getRefIndex=function(a,d,c,b,g){if(null!=g)c(a,g);else{var f=a.length-2,k=mxUtils.bind(this,function(){if(2>f)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(f-1,0),n=a.slice(0,g).join("/"),g=a[g],t=a[f],e=a.slice(f+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(d?"tree?path="+e+"&ref="+t:"files/"+encodeURIComponent(e)+"?ref="+t),m=new mxXmlRequest(n,null,"HEAD");this.executeRequest(m,mxUtils.bind(this,function(){200== m.getStatus()?c(a,f):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==m.getStatus()?(f--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}}; GitLabClient.prototype.getFile=function(a,d,c,b,g,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,l){var k=Math.max(l-1,0),t=f.slice(0,k).join("/"),e=f[k],m=f[l];a=f.slice(l+1,f.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k))if(null!=this.token){var k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+e)+"/repository/files/"+encodeURIComponent(a)+ -"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+ -k,null,"GET"),this.executeRequest(k,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(t,e,m,JSON.parse(a.getText()),b,l))}catch(v){c(v)}}),c)}),c,f)}; +"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(t+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+ +k,null,"GET"),this.executeRequest(k,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(t,e,m,JSON.parse(a.getText()),b,l))}catch(u){c(u)}}),c)}),c,f)}; GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c}; GitLabClient.prototype.createGitLabFile=function(a,d,c,b,g,f){var k=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:c,name:b.file_name,path:b.file_path,html_url:k+a+"/"+d+"/blob/"+c+"/"+b.file_path,download_url:k+a+"/"+d+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return g?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)}; GitLabClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;this.getRefIndex(f.split("/"),!0,mxUtils.bind(this,function(f,n){var l=Math.max(n-1,0),e=f.slice(0,l).join("/"),m=f[l],p=f[n];path=f.slice(n+1,f.length).join("/");0<path.length&&(path+="/");path+=a;this.checkExists(e+"/"+m+"/"+p+"/"+path,!0,mxUtils.bind(this,function(f,l){if(f)if(g)k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(e,m,p,path,a,d,l,mxUtils.bind(this,function(a){try{var d= -JSON.parse(a.getText());c(this.createGitLabFile(e,m,p,d.content,g,n))}catch(y){b(y)}}),b)}),b);else{var q=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:e,repo:m,ref:p,name:a,path:path,html_url:q+e+"/"+m+"/blob/"+p+"/"+path,download_url:q+e+"/"+m+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else b()}))}),b)}; +JSON.parse(a.getText());c(this.createGitLabFile(e,m,p,d.content,g,n))}catch(x){b(x)}}),b)}),b);else{var v=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:e,repo:m,ref:p,name:a,path:path,html_url:v+e+"/"+m+"/blob/"+p+"/"+path,download_url:v+e+"/"+m+"/raw/"+p+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else b()}))}),b)}; GitLabClient.prototype.checkExists=function(a,d,c){this.getFile(a,mxUtils.bind(this,function(b){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){g();c(!0,b.getCurrentEtag())},function(){g();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(a){c(!0)}),null,!0)}; GitLabClient.prototype.writeFile=function(a,d,c,b,g,f,k,l,n){if(f.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"});else{var t="POST";c={path:encodeURIComponent(b),branch:decodeURIComponent(c),commit_message:g,content:f,encoding:"base64"};null!=k&&(c.last_commit_id=k,t="PUT");a=this.baseUrl+"/projects/"+encodeURIComponent(a+"/"+d)+"/repository/files/"+encodeURIComponent(b);t=new mxXmlRequest(a,JSON.stringify(c),t);this.executeRequest(t, mxUtils.bind(this,function(a){l(a)}),n)}}; @@ -9810,20 +9814,20 @@ GitLabClient.prototype.saveFile=function(a,d,c,b,g){var f=a.meta.org,k=a.meta.re function(b){t(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData():null):t(a.meta.last_commit_id,Base64.encode(a.getData()))});b?this.getFile(f+"/"+k+"/"+l+"/"+n,mxUtils.bind(this,function(b){a.meta.last_commit_id=b.meta.last_commit_id;e()}),c):e()};GitLabClient.prototype.pickFolder=function(a){this.showGitLabDialog(!1,a)};GitLabClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("A"+encodeURIComponent(a))});this.showGitLabDialog(!0,a)}; GitLabClient.prototype.showGitLabDialog=function(a,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing= "border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var t=document.createElement("div");t.style.textOverflow="ellipsis";t.style.boxSizing="border-box";t.style.overflow="hidden";t.style.padding="4px";t.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m= -mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;C()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this, -function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,C()):this.ui.hideDialog()}))}),v=null,q=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+ -"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=q&&(mxEvent.removeListener(n,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var y=mxUtils.bind(this,function(){z(k+ -1)});mxEvent.addListener(v,"click",y);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,C();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,u=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l= -t.cloneNode();l.style.backgroundColor=A?"#eeeeee":"";A=!A;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;l.appendChild(p);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,z()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);u++}})(l[k])});e(!0);a&&e(!1);100== -u&&(n.appendChild(v),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&y()},mxEvent.addListener(n,"scroll",q))}}),u,!0)}),x=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=q&&(mxEvent.removeListener(n,"scroll",q),q=null);null!=v&&null!=v.parentNode&& -v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(v,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;C()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles")); -else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(v),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}}),u)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var C=mxUtils.bind(this, -function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=q&&(mxEvent.removeListener(n,"scroll",q),q=null);null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v);v=document.createElement("a");v.style.display="block";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){C(a+1)});mxEvent.addListener(v,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+ -"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});e(mxUtils.bind(this,function(e){var l=new mxXmlRequest(this.baseUrl+"/users/"+ +mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=t.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this, +function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");z()})))})(a)}n.appendChild(d)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),u=null,v=null,z=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+ +"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var x=mxUtils.bind(this,function(){z(k+ +1)});mxEvent.addListener(u,"click",x);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");z()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,q=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l= +t.cloneNode();l.style.backgroundColor=A?"#eeeeee":"";A=!A;var x=document.createElement("img");x.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");x.setAttribute("align","absmiddle");x.style.marginRight="4px";x.style.marginTop="-4px";x.width=20;l.appendChild(x);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,z()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);q++}})(l[k])});e(!0);a&&e(!1);100== +q&&(n.appendChild(u),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&x()},mxEvent.addListener(n,"scroll",v))}}),q,!0)}),y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=u&&null!=u.parentNode&& +u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles")); +else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=t.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";z()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(u),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),q)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this, +function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(u,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+ +"/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),q)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),q)});e(mxUtils.bind(this,function(e){var l=new mxXmlRequest(this.baseUrl+"/users/"+ this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();l=JSON.parse(l.getText());if(null!=l&&0!=l.length||null!=e&&0!=e.length){1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],g="master", -f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),z()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var p=!0,y=0;y<l.length;y++)mxUtils.bind(this,function(a,d){var e=t.cloneNode();e.style.backgroundColor=p?"#eeeeee":"";p=!p;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b= -a.path;g=a.default_branch||"master";f="";z()})));n.appendChild(e)})(l[y],y);for(y=0;y<e.length;y++)k(e[y],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=t.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";z()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(v), -q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&d()},mxEvent.addListener(n,"scroll",q))}),u)}))});this.token?this.user?C():this.updateUser(function(){C()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,k){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,k,l){DrawioComment.call(this,a,d,c,b,g,f,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)}; +f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),z()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var x=!0,p=0;p<l.length;p++)mxUtils.bind(this,function(a,d){var e=t.cloneNode();e.style.backgroundColor=x?"#eeeeee":"";x=!x;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b= +a.path;g=a.default_branch||"master";f="";z()})));n.appendChild(e)})(l[p],p);for(p=0;p<e.length;p++)k(e[p],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=t.cloneNode();k.style.backgroundColor=x?"#eeeeee":"";x=!x;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";z()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(u), +v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&d()},mxEvent.addListener(n,"scroll",v))}),q)}))});this.token?this.user?B():this.updateUser(function(){B()},q,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},q,!0)}),q)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,k){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,k,l){DrawioComment.call(this,a,d,c,b,g,f,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)}; DriveComment.prototype.editComment=function(a,d,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,c)}; DriveComment.prototype.deleteComment=function(a,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,d)};App=function(a,d,c){EditorUi.call(this,a,d,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!= a.ageStart?Math.round((Date.now()-a.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+"-open_"+(null!=a.opened?Math.round((Date.now()-a.opened.getTime())/1E3):"x")+"-save_"+(null!=a.lastSaved?Math.round((Date.now()-a.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=a.lastChanged?Math.round((Date.now()-a.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=a.sync?"client_"+a.sync.clientId:"nosync"}; @@ -9841,7 +9845,7 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage 2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient= null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})(); App.main=function(a,d){function c(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!e[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},e={},f;for(f in App.pluginRegistry)e[App.pluginRegistry[f]]=!0; -var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(z){window.location.hash="",alert(z)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(), +var k=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=k&&c(k.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(k)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(k)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(z){window.location.hash="",alert(z)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(), Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=d?d():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL, function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback): "undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!= @@ -9890,12 +9894,13 @@ a.getText();if(0<c.length){var d=JSON.parse(c);null!=d&&this.handleLicense(d,b)} App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var d=this.getRecent();if(null==d)d=[];else for(var c=0;c<d.length;c++)d[c].id==a.id&&d.splice(c,1);null!=d&&(d.unshift(a),d=d.slice(0,10),localStorage.setItem(".recent",JSON.stringify(d)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(d){}return null}}; App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(d){}}; App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if(a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")}; -App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],d,c=0;256>c;c++){d=c;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[c]=d}return a}; +App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,d=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=d&&(a=(null!=d.getTitle()?d.getTitle():this.defaultFilename)+" - "+a);document.title!=a&&(document.title=a,a=this.editor.graph,a.invalidateDescendantsWithPlaceholders(a.model.getRoot()),a.view.validate())}}; +App.prototype.createCrcTable=function(){for(var a=[],d,c=0;256>c;c++){d=c;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[c]=d}return a}; App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,l=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||l)){var n=k.getGlobalVariable,k=this.createTemporaryGraph(l?k.getDefaultStylesheet():k.getStylesheet()),t=this.pages[0]; l&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?1:n.apply(this,arguments)};k.getGlobalVariable=n;document.body.appendChild(k.container);k.model.setRoot(t.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(E){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},null, -null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),u=Math.floor(m.x),v=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var q=e.getContext("2d");q.scale(p,p);q.translate(-u,-v);var z=k.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";q.save();q.fillStyle=z;q.fillRect(u, -v,Math.ceil(m.width+4),Math.ceil(m.height+4));q.restore();var x=new mxJsCanvas(e),C=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var y=new mxImageExport;y.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};y.drawText=function(a,b){};y.drawState(k.getView().getState(k.model.root),C);C.finish(mxUtils.bind(this,function(){try{y.drawState(k.getView().getState(k.model.root), -x),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(A){e=null}f(e)}));c=!0}}catch(A){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c}; +null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),q=Math.floor(m.x),u=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var v=e.getContext("2d");v.scale(p,p);v.translate(-q,-u);var z=k.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";v.save();v.fillStyle=z;v.fillRect(q, +u,Math.ceil(m.width+4),Math.ceil(m.height+4));v.restore();var y=new mxJsCanvas(e),B=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var x=new mxImageExport;x.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};x.drawText=function(a,b){};x.drawState(k.getView().getState(k.model.root),B);B.finish(mxUtils.bind(this,function(){try{x.drawState(k.getView().getState(k.model.root), +y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(A){e=null}f(e)}));c=!0}}catch(A){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c}; App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a}; (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();d=null!=b?b.getMode():d;d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])), this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=d==App.MODE_DEVICE?"pointer":"default")}if(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+d+"; expires="+g.toUTCString()}}catch(f){}}})(); @@ -9964,7 +9969,7 @@ null!=d&&this.sidebar.showEntries(d);if(null!=g){for(var b=[],e=g.split(";"),f=0 null==a.getMode())),null!=b&&b(),window.openWindow(f,null,m))});a.constructor==LocalFile?m():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(a){e();this.handleError(a)}))}}; App.prototype.loadFile=function(a,d,c,b,g){this.hideDialog();var f=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage){var f=mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))});a=decodeURIComponent(a.substring(1)); StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,a)),null!=b&&b()):f({message:mxResources.get("fileNotFound")})}),f)}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!=c)this.spinner.stop(),this.fileLoaded(c),null!=b&&b();else if("S"==a.charAt(0)){this.spinner.stop(); -try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var g=decodeURIComponent(a.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);g.getHash=function(){return a};this.fileLoaded(g); +try{this.loadDescriptor(JSON.parse(Graph.decompress(a.substring(1))),b,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0)){this.spinner.stop();var g=decodeURIComponent(a.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);g.getHash=function(){return a};this.fileLoaded(g); null!=b&&b()}else if("U"==a.charAt(0)){var e=decodeURIComponent(a.substring(1)),k=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=e.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var a=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var a=e.substring(31,e.lastIndexOf("&ex"));this.loadFile("G"+a,d,null,mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&this.editor.chromeless&&!this.editor.editable&& (c.getHash=function(){return"G"+a},window.location.hash="#"+c.getHash());null!=b&&b()}));return!0}return!1});!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a);return!0});this.loadTemplate(e,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var c=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var d=e,f=e.lastIndexOf("."),g=d.lastIndexOf("/");f>g&&0<g&&(d=d.substring(g+1,f),f=e.substring(f),this.useCanvasForExport|| ".png"!=f||(f=".drawio"),".svg"===f||".xml"===f||".html"===f||".png"===f||".drawio"===f)&&(c=d+f)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):c,!0);b.getHash=function(){return a};this.fileLoaded(b,!0)||k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else k()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){k()||(this.spinner.stop(), @@ -9976,9 +9981,9 @@ App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))}; App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=g[c]&&this.loadLibrary(g[c]);null!=d&&d()}});if(null!=a)for(var k=0;k<a.length;k++){var l=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,d){if(null!= a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];g[d]=c;b--;f()}),k=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&& -(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(x){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(x){k()}else k()}),function(){k()})}catch(z){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)), -!this.isOffline())try{var l=JSON.parse(l),t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,t))}catch(x){k()}}),function(){k()})}catch(z){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(z){k()}else{var q=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(q=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&& -(q=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}}; +(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(y){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(z){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)), +!this.isOffline())try{var l=JSON.parse(l),t={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[t.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,t))}catch(y){k()}}),function(){k()})}catch(z){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(z){k()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&& +(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}}; App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+ Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton), this.commentButton=null);null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight= @@ -9996,8 +10001,8 @@ window.location.hash=a:0<window.location.hash.length&&(window.location.hash="")) App.prototype.showAuthDialog=function(a,d,c,b){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,a,d,mxUtils.bind(this,function(a){try{null!=c&&c(a,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,d?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))}; App.prototype.convertFile=function(a,d,c,b,g,f,k,l){var n=d;/\.svg$/i.test(n)||(n=n.substring(0,d.lastIndexOf("."))+b);var t=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(t=!0);if(/\.v(dx|sdx?)$/i.test(d)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var e=new XMLHttpRequest;e.open("GET",a,!0);t||(e.responseType="blob");if(l)for(var m in l)e.setRequestHeader(m,l[m]);e.onload=mxUtils.bind(this,function(){if(200<= e.status&&299>=e.status){var a=null;t?(a=JSON.parse(e.responseText),a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([e.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),f,d)}else null!=f&&f({message:mxResources.get("errorLoadingFile")})});e.onerror=f;e.send()}else{var p=mxUtils.bind(this,function(b){try{if(/\.pdf$/i.test(d)){var c=Editor.extractGraphModelFromPdf(b);null!=c&&0<c.length&&g(new LocalFile(this, -c,n,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,n,!0)):g(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,n,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,n,!0))}catch(q){null!= -f&&f(q)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);t?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));p(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!= +c,n,!0))}else/\.png$/i.test(d)?(c=this.extractGraphModelFromPng(b),null!=c?g(new LocalFile(this,c,n,!0)):g(new LocalFile(this,b,d,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,n,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),d):g(new LocalFile(this,b,n,!0))}catch(v){null!= +f&&f(v)}});c=/\.png$/i.test(d)||/\.jpe?g$/i.test(d)||/\.pdf$/i.test(d)||null!=c&&"image/"==c.substring(0,6);t?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=g){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(d)?"data:image/png;base64,"+b:/\.pdf$/i.test(d)?"data:application/pdf;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));p(b)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!= f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})},l):null!=k?k(a,p,f,c):this.loadUrl(a,p,f,c,null,null,null,l)}}; App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon, "click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)": @@ -10064,8 +10069,8 @@ b.editor.autosave});e=b.actions.addAction("compressed",function(){var a=b.getCur c),b.showDialog(a.container,200,250,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize".split(" "); b.actions.addAction("copyStyle",function(){var a=g.view.getState(g.getSelectionCell());if(g.isEnabled()&&null!=a){b.copiedStyle=mxUtils.clone(a.style);for(var a=g.getModel().getStyle(a.cell),a=null!=a?a.split(";"):[],c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");if(0<=e){var f=d.substring(0,e),d=d.substring(e+1);null==b.copiedStyle[f]&&"none"==d&&(b.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");b.actions.addAction("pasteStyle",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&& null!=b.copiedStyle){g.getModel().beginUpdate();try{for(var a=g.getSelectionCells(),c=0;c<a.length;c++)for(var d=g.view.getState(a[c]),e=0;e<p.length;e++){var f=p[e],k=b.copiedStyle[f];d.style[f]!=k&&g.setCellStyles(f,k,[a[c]])}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");b.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!b.isOffline()){var a=new BackgroundImageDialog(b,function(a){b.setBackgroundImage(a)});b.showDialog(a.container, -320,170,!0,!0);a.init()}}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,q){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,k,!l,m,null,q)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"), -null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n,q){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,k,!l,!1,"jpeg",q)}),!0,!1,"jpeg"):b.isOffline()|| +320,170,!0,!0);a.init()}}));b.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,k,g,l,m,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,c,d,e,f,g,!l,m,null,p)}),!0,!0,"png"):b.isOffline()||mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"), +null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile(c?"xmlpng":"png",null,null,a,null,null,d,e,f)}),!1,!0)}));b.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){b.isExportToCanvas()?b.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,k,g,l,m,n,p){a=parseInt(a);!isNaN(a)&&0<a&&b.exportImage(a/100,!1,d,e,!1,g,!l,!1,"jpeg",p)}),!0,!1,"jpeg"):b.isOffline()|| mxClient.IS_IOS&&navigator.standalone||b.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,c,d,e,f){b.downloadFile("jpeg",null,null,a,null,null,null,e,f)}),!0,!0)}));e=b.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));e.setToggleAction(!0);e.setSelectedCallback(function(){return g.shadowVisible});b.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){b.isOffline()? b.alert("diagrams.net "+EditorUi.VERSION):b.openLink("https://www.diagrams.net/")}));b.actions.addAction("userManual...",function(){b.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});b.actions.addAction("support...",function(){b.openLink("https://drawio-app.com/support/")});b.actions.addAction("exportOptionsDisabled...",function(){b.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});b.actions.addAction("keyboardShortcuts...", function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?b.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?b.openLink("shortcuts.svg"):b.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});b.actions.addAction("feedback...",function(){var a=new FeedbackDialog(b);b.showDialog(a.container,610,360,!0,!1);a.init()});b.actions.addAction("quickStart...",function(){b.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});e=b.actions.addAction("tags...", @@ -10074,30 +10079,30 @@ function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));e this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));b.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){b.exportVisio()}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&b.actions.addAction("configuration...",function(){var a=localStorage.getItem(".configuration"),a=new TextareaDialog(b, mxResources.get("configuration")+":",null!=a?JSON.stringify(JSON.parse(a),null,2):"",function(a){if(null!=a)try{if(0<a.length){var c=JSON.parse(a);localStorage.setItem(".configuration",JSON.stringify(c))}else localStorage.removeItem(".configuration");b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}},null,null,null,null,null,!0,null,null,"https://desk.draw.io/support/solutions/articles/16000058316",EditorUi.isElectronApp?null:[[mxResources.get("reset"), function(a,c){b.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(".configuration"),localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode"),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))}catch(D){b.handleError(D)}})}],[mxResources.get("link"),function(a,c){if(0<c.value.length)try{var d=JSON.parse(c.value),e=window.location.protocol+"//"+window.location.host+"/"+b.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(d)),f=new EmbedDialog(b, -e);b.showDialog(f.container,440,240,!0);f.init()}catch(I){b.handleError(I)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this, -function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!= +e);b.showDialog(f.container,440,240,!0);f.init()}catch(G){b.handleError(G)}else b.handleError({message:mxResources.get("invalidInput")})}]]);a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!1);a.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(a,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,null,mxUtils.bind(this, +function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);b.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(c);for(var e in mxLanguageMap)d(e)})));var q=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=q.apply(this,arguments);if(null!=b){var c=this.get("language");if(null!= c){c=b.addMenu("",c.funct);c.setAttribute("title",mxResources.get("language"));c.style.width="16px";c.style.paddingTop="2px";c.style.paddingLeft="4px";c.style.zIndex="1";c.style.position="absolute";c.style.display="block";c.style.cursor="pointer";c.style.right="17px";"atlas"==uiTheme?(c.style.top="6px",c.style.right="15px"):c.style.top="min"==uiTheme?"2px":"0px";if(mxClient.IS_VML)c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>';else{var d=document.createElement("div");d.style.backgroundImage= "url("+Editor.globeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="19px 19px";d.style.position="absolute";d.style.height="19px";d.style.width="19px";d.style.marginTop="2px";d.style.zIndex="1";c.appendChild(d);mxUtils.setOpacity(c,40);if("atlas"==uiTheme||"dark"==uiTheme)c.style.opacity="0.85",c.style.filter="invert(100%)"}document.body.appendChild(c)}}return b}}b.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west", intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];b.actions.addAction("runLayout",function(){var a=new TextareaDialog(b,"Run Layouts:",JSON.stringify(b.customLayoutConfig,null,2),function(a){if(0<a.length)try{var c=JSON.parse(a);b.executeLayoutList(c);b.customLayoutConfig=c}catch(D){b.handleError(D),null!=window.console&&console.error(D)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}); -var e=this.get("layout"),v=e.funct;e.funct=function(a,c){v.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=a&&e){var f=b.editor.graph;(new mxOrgChartLayout(f,a,c,d)).execute(f.getDefaultParent());e=!1}},g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width= -"140px";mxUtils.write(k,mxResources.get("orgChartType")+": ");g.appendChild(k);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var k=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],m=0;m<k.length;m++){var n=document.createElement("option");mxUtils.write(n,k[m]);n.value=m;2== -m&&n.setAttribute("selected","selected");l.appendChild(n)}mxEvent.addListener(l,"change",function(){a=l.value});g.appendChild(l);k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("parentChildSpacing")+": ");g.appendChild(k);var q=document.createElement("input");q.type="number";q.value=c;q.style.width="200px";q.style.boxSizing="border-box";g.appendChild(q);mxEvent.addListener(q,"change",function(){c=q.value}); -k=document.createElement("div");k.style.marginTop="6px";k.style.display="inline-block";k.style.width="140px";mxUtils.write(k,mxResources.get("siblingSpacing")+": ");g.appendChild(k);var p=document.createElement("input");p.type="number";p.value=d;p.style.width="200px";p.style.boxSizing="border-box";g.appendChild(p);mxEvent.addListener(p,"change",function(){d=p.value});g=new CustomDialog(b,g,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body, -mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(g.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor= +var e=this.get("layout"),u=e.funct;e.funct=function(a,c){u.apply(this,arguments);a.addSeparator(c);a.addItem(mxResources.get("orgChart")+"...",null,function(){var a=null,c=20,d=20,e=!0,f=function(){b.loadingOrgChart=!1;b.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=a&&e){var f=b.editor.graph;(new mxOrgChartLayout(f,a,c,d)).execute(f.getDefaultParent());e=!1}},k=document.createElement("div"),g=document.createElement("div");g.style.marginTop="6px";g.style.display="inline-block";g.style.width= +"140px";mxUtils.write(g,mxResources.get("orgChartType")+": ");k.appendChild(g);var l=document.createElement("select");l.style.width="200px";l.style.boxSizing="border-box";for(var g=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],m=0;m<g.length;m++){var n=document.createElement("option");mxUtils.write(n,g[m]);n.value=m;2== +m&&n.setAttribute("selected","selected");l.appendChild(n)}mxEvent.addListener(l,"change",function(){a=l.value});k.appendChild(l);g=document.createElement("div");g.style.marginTop="6px";g.style.display="inline-block";g.style.width="140px";mxUtils.write(g,mxResources.get("parentChildSpacing")+": ");k.appendChild(g);var p=document.createElement("input");p.type="number";p.value=c;p.style.width="200px";p.style.boxSizing="border-box";k.appendChild(p);mxEvent.addListener(p,"change",function(){c=p.value}); +g=document.createElement("div");g.style.marginTop="6px";g.style.display="inline-block";g.style.width="140px";mxUtils.write(g,mxResources.get("siblingSpacing")+": ");k.appendChild(g);var x=document.createElement("input");x.type="number";x.value=d;x.style.width="200px";x.style.boxSizing="border-box";k.appendChild(x);mxEvent.addListener(x,"change",function(){d=x.value});k=new CustomDialog(b,k,function(){null==a&&(a=2);"undefined"!==typeof mxOrgChartLayout||b.loadingOrgChart||b.isOffline(!0)?f():b.spinner.spin(document.body, +mxResources.get("loading"))&&(b.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart.min.js",f):mxscript("js/extensions.min.js",f))});b.showDialog(k.container,355,125,!0,!0)},c,null,f());a.addSeparator(c);b.menus.addMenuItem(a,"runLayout",c,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(a,c){if(!mxClient.IS_CHROMEAPP&&b.isOffline())this.addMenuItems(a,["about"],c);else{var d=a.addItem("Search:",null,null,c,null,null,!1);d.style.backgroundColor= "dark"==uiTheme?"#505759":"whiteSmoke";d.style.cursor="default";var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","25");e.style.marginLeft="8px";mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(e.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+encodeURIComponent(b)),e.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:b}),null!=this.editorUi.menubar&& window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(e.value="")}));d.firstChild.nextSibling.appendChild(e);mxEvent.addGestureListeners(e,function(a){document.activeElement!=e&&e.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){e.focus()},0);this.addMenuItems(a,["-","keyboardShortcuts","quickStart","-","userManual"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(a,["support"],c); this.addMenuItems(a,["-","about"],c)}"1"==urlParams.test&&(a.addSeparator(c),this.addSubmenu("testDevelop",a,c))})));"1"==urlParams.test&&(mxResources.parse("testDevelop=Develop"),mxResources.parse("showBoundingBox=Show bounding box"),mxResources.parse("createSidebarEntry=Create Sidebar Entry"),mxResources.parse("testCheckFile=Check File"),mxResources.parse("testDiff=Diff"),mxResources.parse("testInspect=Inspect"),mxResources.parse("testShowConsole=Show Console"),mxResources.parse("testXmlImageExport=XML Image Export"), mxResources.parse("testDownloadRtModel=Export RT model"),mxResources.parse("testImportRtModel=Import RT model"),b.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){g.isSelectionEmpty()||b.showTextDialog("Create Sidebar Entry","sb.createVertexTemplateFromData('"+Graph.compress(mxUtils.getXml(g.encodeCells(g.getSelectionCells())))+"', width, height, 'Title');")})),b.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=g.getGraphBounds(),b=g.view.translate,c=g.view.scale; g.insertVertex(g.getDefaultParent(),null,"",a.x/c-b.x,a.y/c-b.y,a.width/c,a.height/c,"fillColor=none;strokeColor=red;")})),b.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var a=null!=b.pages&&null!=b.getCurrentFile()?b.getCurrentFile().getAnonymizedXmlForPages(b.pages):"",a=new TextareaDialog(b,"Paste Data:",a,function(a){if(0<a.length)try{var c=function(a){function b(a){if(null==n[a]){if(n[a]=!0,null!=e[a]){for(;0<e[a].length;){var d=e[a].pop();b(d)}delete e[a]}}else mxLog.debug(c+ ": Visited: "+a)}var c=a.parentNode.id,d=a.childNodes;a={};for(var e={},f=null,g={},k=0;k<d.length;k++){var l=d[k];if(null!=l.id&&0<l.id.length)if(null==a[l.id]){a[l.id]=l.id;var m=l.getAttribute("parent");null==m?null!=f?mxLog.debug(c+": Multiple roots: "+l.id):f=l.id:(null==e[m]&&(e[m]=[]),e[m].push(l.id))}else g[l.id]=l.id}0<Object.keys(g).length?(d=c+": "+Object.keys(g).length+" Duplicates: "+Object.keys(g).join(", "),mxLog.debug(d+" (see console)")):mxLog.debug(c+": Checked");var n={};null== -f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(H){mxLog.debug("Error: ",H.message)}else mxLog.debug("No pages found for checksum"); -var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(H){b.handleError(H),null!=window.console&&console.error(H)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)), +f?mxLog.debug(c+": No root"):(b(f),Object.keys(n).length!=Object.keys(a).length&&(mxLog.debug(c+": Invalid tree: (see console)"),console.log(c+": Invalid tree",e)))};"<"!=a.charAt(0)&&(a=Graph.decompress(a),mxLog.debug("See console for uncompressed XML"),console.log("xml",a));var d=mxUtils.parseXml(a),e=b.getPagesForNode(d.documentElement,"mxGraphModel");if(null!=e&&0<e.length)try{var f=b.getHashValueForPages(e);mxLog.debug("Checksum: ",f)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum"); +var g=d.getElementsByTagName("root");for(a=0;a<g.length;a++)c(g[a]);mxLog.show()}catch(J){b.handleError(J),null!=window.console&&console.error(J)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()})),b.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=b.pages){var a=new TextareaDialog(b,"Paste Data:","",function(a){if(0<a.length)try{console.log(JSON.stringify(b.diffPages(b.pages,b.getPagesForNode(mxUtils.parseXml(a).documentElement)), null,2))}catch(E){b.handleError(E),null!=window.console&&console.error(E)}});a.textarea.style.width="600px";a.textarea.style.height="380px";b.showDialog(a.container,620,460,!0,!0);a.init()}else b.alert("No pages")})),b.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(b,g.getModel())})),b.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=g.getGraphBounds(),c=g.view.scale,d=mxUtils.createXmlDocument(),e=d.createElement("output");d.appendChild(e); d=new mxXmlCanvas2D(e);d.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));d.scale(1/c);var f=0,k=d.save;d.save=function(){f++;k.apply(this,arguments)};var l=d.restore;d.restore=function(){f--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,f);m.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(g.getView().getState(g.model.root),d);mxLog.show();mxLog.debug(mxUtils.getXml(e));mxLog.debug("stateCounter",f)})),b.actions.addAction("testDownloadRtModel...", mxUtils.bind(this,function(){null==b.drive?b.handleError({message:mxResources.get("serviceUnavailableOrBlocked")}):b.drive.execute(mxUtils.bind(this,function(){var a=prompt("File ID","");if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("export"))){var c=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a+"/realtime?supportsAllDrives=true",null,"GET");c.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);a.setRequestHeader("authorization", "Bearer "+b.drive.token)};c.send(function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.saveLocalFile(c.getText(),"json-"+a+".txt","text/plain"):b.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))})}}))})),b.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.put("testDevelop",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a, "createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testDownloadRtModel".split(" "),c);a.addItem(mxResources.get("testImportRtModel")+"...",null,function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",mxUtils.bind(this,function(){if(null!=a.files){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{b.openLocalFile(mxUtils.getXml(b.drive.convertJsonToXml(JSON.parse(c.target.result).data)), -a.files[0].name,!0)}catch(G){b.handleError(G,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape", +a.files[0].name,!0)}catch(H){b.handleError(H,mxResources.get("errorLoadingFile"))}});c.readAsText(a.files[0])}}));a.click()},c);this.addMenuItems(a,["-","testShowConsole"],c)}))));b.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!b.isOffline()?b.showDialog((new MoreShapesDialog(b,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):b.showDialog((new MoreShapesDialog(b,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});b.actions.put("createShape", new Action(mxResources.get("shape")+"...",function(a){g.isEnabled()&&(a=new mxCell("",new mxGeometry(0,0,120,120),b.defaultCustomShapeStyle),a.vertex=!0,a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())})).isEnabled=f;b.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){b.spinner.spin(document.body,mxResources.get("loading"))&&b.getPublicUrl(b.getCurrentFile(),function(a){b.spinner.stop();b.showHtmlDialog(mxResources.get("create"), "https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,c,d,e,f,g,k,l,m,n){b.createHtml(a,c,d,e,f,g,k,l,m,n,mxUtils.bind(this,function(a,c){var d=new EmbedDialog(b,a+"\n"+c,null,null,function(){var d=window.open(),e=d.document;if(null!=e){"CSS1Compat"===document.compatMode&&e.writeln("<!DOCTYPE html>");e.writeln("<html>");e.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');e.writeln("<body>");e.writeln(a);var f=mxClient.IS_IE|| mxClient.IS_EDGE||null!=document.documentMode;f&&e.writeln(c);e.writeln("</body>");e.writeln("</html>");e.close();if(!f){var g=d.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));f=d.document.createElement("img");f.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");f.style.marginLeft="6px";g.appendChild(f);d.document.body.insertBefore(g,d.document.body.firstChild);window.setTimeout(function(){var a= @@ -10127,13 +10132,13 @@ f.apply(this,arguments)};e.visible="1"!=urlParams.embed;b.actions.addAction("mak a.setModified(!1);a.addAllSavedStatus()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),mxUtils.bind(this,function(a){b.handleError(a)})):b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0,null,null,null,null,b.editor.fileExtensions),b.showDialog(c.container,420,380,!0,!0),c.init()):b.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));b.actions.addAction("moveToFolder...",mxUtils.bind(this, function(){var a=b.getCurrentFile();if(a.getMode()==App.MODE_GOOGLE||a.getMode()==App.MODE_ONEDRIVE){var c=!1;if(a.getMode()==App.MODE_GOOGLE&&null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this, function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(A){b.handleError(A)}}));this.put("embed", -new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var q=function(a, +new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a, c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},z=function(a,c,d,e){var f=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint(),k=new mxCell(a,new mxGeometry(f.x, f.y,c,d),e);k.vertex=!0;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&g.startEditing(k);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(g.view.getState(k))},0);return k};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"), !0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}), null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus", -new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):q(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "), -c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){x(a,c,["fromText","plantUml", +new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&z("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "), +c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){y(a,c,["fromText","plantUml", "mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,c){var d=b.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()}, c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+ " ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+ @@ -10146,11 +10151,11 @@ c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github") "...",null,function(){b.pickLibrary(App.MODE_GOOGLE)},c):k&&"function"===typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickLibrary(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+ "...",null,function(){b.pickLibrary(App.MODE_DROPBOX)},c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickLibrary(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickLibrary(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...", null,function(){b.pickLibrary(App.MODE_TRELLO)},c):t&&"function"===typeof window.TrelloClient&&a.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&a.addItem(mxResources.get("browser")+"...",null,function(){b.pickLibrary(App.MODE_BROWSER)},c);a.addItem(mxResources.get("device")+"...",null,function(){b.pickLibrary(App.MODE_DEVICE)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+ -"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(I){b.handleError(I,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))}, +"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&b.spinner.spin(document.body,mxResources.get("loading"))){var c=a;b.editor.isCorsEnabledForUrl(a)||(c=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){b.spinner.stop();try{b.loadLibrary(new UrlLibrary(this,c.getText(),a))}catch(G){b.handleError(G,mxResources.get("errorLoadingFile"))}}else b.spinner.stop(),b.handleError(null,mxResources.get("errorLoadingFile"))}, function(){b.spinner.stop();b.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()},c));"1"==urlParams.confLib&&(a.addSeparator(c),a.addItem(mxResources.get("confluenceCloud")+"...",null,function(){b.showRemotelyStoredLibrary(mxResources.get("libraries"))},c))})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["undo","redo","-","cut","copy"]);mxIsElectron&&this.addMenuItems(a,["copyAsImage"]); this.addMenuItems(a,"paste delete - duplicate - find - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));e=b.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(b,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide", function(){b.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("comments"));else{var a=!this.commentsWindow.window.isVisible();this.commentsWindow.window.setVisible(a);this.commentsWindow.refreshCommentsTime();a&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));e.setToggleAction(!0);e.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));b.editor.addListener("fileLoaded", -mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var e=this.get("viewPanels"),C=e.funct;e.funct=function(a,c){C.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"], +mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var e=this.get("viewPanels"),B=e.funct;e.funct=function(a,c){B.apply(this,arguments);b.commentsSupported()&&b.menus.addMenuItems(a,["comments"],c)};this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers"]).concat(b.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(a,["-","search"], c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",a,c);this.addMenuItems(a,"- scrollbars tooltips ruler - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(a,"shadowVisible", c);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",a,c),a.addSeparator(c));if("undefined"!==typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",c);(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}this.addMenuItems(a,["copyConnect", "collapseExpand","-"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(a,["showStartScreen"],c);"1"!=urlParams.embed&&this.addMenuItems(a,["autosave","compressed"],c);a.addSeparator(c);!b.isOfflineApp()&&isLocalStorage&&this.addMenuItem(a,"plugins",c);this.addMenuItems(a,["tags","-","editDiagram","-","configuration"],c);a.addSeparator(c);"1"==urlParams.newTempDlg&&(b.actions.addAction("templates",function(){var a=new TemplatesDialog;b.showDialog(a.container,a.width, @@ -10230,47 +10235,46 @@ null,null,!0,!0))}),b))})};(function(){var a=EditorUi.prototype.refresh;EditorUi (function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){a=b.previous;b.previous=b.name;b.name=a;return b};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),d="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,b,g){g.setAttribute("relatedPage",b.relatedPage.getId());null==b.index&&(g.setAttribute("name",b.relatedPage.getName()),null!=b.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(b.relatedPage.viewState,function(a,b){return 0>mxUtils.indexOf(d, a)?b:void 0})),null!=b.relatedPage.root&&a.encodeCell(b.relatedPage.root,g));return g};a.beforeDecode=function(a,b,d){d.ui=a.ui;d.relatedPage=d.ui.getPageById(b.getAttribute("relatedPage"));if(null==d.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));d.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(d.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState")); -b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var g=c.getAttribute("id");null==a.lookup(g)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= -"selectDescendants";var d=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,b,c,l,n){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=c.slice(),e=[],g=0;g<c.length;g++){var k=this.view.getState(c[g]),u=null!=k?k.style:this.getCellStyle(c[g]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(c[g],!0,mxUtils.bind(this,function(a,b){null!=b&&e.push(b);a!=c[g]&&e.push(a);return a==c[g]||!this.model.isCollapsed(a)})), -this.model.setCollapsed(c[g],a))}for(g=0;g<e.length;g++)this.model.setVisible(e[g],!a);c=f;c=d.apply(this,arguments)}finally{this.model.endUpdate()}return c};var c=EditorUi.prototype.init;EditorUi.prototype.init=function(){c.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return z.isVertex(a)&&d(a)}function c(a){var b=!1;null!=a&&(b=q.view.getState(a),b="1"==(null!=b?b.style:q.getCellStyle(a)).treeMoving); -return b}function d(a){var b=!1;null!=a&&(a=z.getParent(a),b=q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);return b}function l(a){var b=!1;null!=a&&(a=z.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function n(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== -a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH|| -f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),l=q.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=q.getOutgoingEdges(q.model.getTerminal(d[0], -!0));if(null!=p){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,u=g=d=0;u<p.length;u++){var A=q.model.getTerminal(p[u],!1);if(f==n(A)){var v=q.view.getState(A);A!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,v)&&(d=10+Math.max(d,(Math.min(m.x+m.width,v.x+v.width)-Math.max(m.x,v.x))/l),g=10+Math.max(g,(Math.min(m.y+m.height,v.y+v.height)-Math.max(m.y,v.y))/l))}}t?g=0:d=0;for(u=0;u<p.length;u++)if(A=q.model.getTerminal(p[u], -!1),f==n(A)&&(v=q.view.getState(A),A!=a&&null!=v&&(t&&b!=v.getCenterX()<k.getCenterX()||!t&&b!=v.getCenterY()<k.getCenterY()))){var y=[];q.traverse(v.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});q.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function e(a){q.model.beginUpdate();try{var b=n(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1); -var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,l=-l):b==mxConstants.DIRECTION_WEST?(k=-k,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);q.moveCells(g,k,l);return q.addCells(d,e)}finally{q.model.endUpdate()}}function m(a){q.model.beginUpdate();try{var b= -q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var l=q.view.getBounds(f),m=n(a),p=q.view.translate,t=q.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height- -e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/t-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/t-p.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function p(a, -b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function u(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}var v=this,q=v.editor.graph,z=q.getModel(),x=v.menus.createPopupMenu; -v.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(q.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(q.getSelectionCell())&&(a.addSeparator(),0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(q.isEnabled()&& -1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c], -!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}}, -null,null,"Alt+Shift+D");var C=q.removeCells;q.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];z.isEdge(g)&&d(g)&&(e.push(g),g=z.getTerminal(g,!1));if(b(g)){var k=[];q.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==q.getIncomingEdges(a).length)return k.push(a),!0;k=[];return!1});0<k.length&&(e=e.concat(k),g=q.getIncomingEdges(a[f]),a=a.concat(g))}else null!= -g&&e.push(a[f])}a=e;return C.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var y=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=y.call(this,a,c);if(k.length==a.length)for(e= -0;e<a.length;e++)if(b(a[e])){var l=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])|| -q.model.isEdge(a[t])&&null==q.model.getTerminal(a[t],!0)){f=q.model.getParent(a[t]);break}if(null!=m&&f!=m&&null!=this.view.getState(a[0])){var u=q.getIncomingEdges(a[0]);if(0<u.length){var v=q.view.getState(q.model.getTerminal(u[0],!0));if(null!=v){var y=q.view.getState(m);null!=y&&(c=(y.getCenterX()-v.getCenterX())/q.view.scale,d=(y.getCenterY()-v.getCenterY())/q.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(t=0;t<l.length;t++)if(this.model.isEdge(l[t]))b(m)&& -0>mxUtils.indexOf(l,this.model.getTerminal(l[t],!0))&&this.model.setTerminal(l[t],m,!0);else if(b(a[t])&&(u=q.getIncomingEdges(a[t]),0<u.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],m,!0);else if(0==q.getIncomingEdges(l[t]).length){n=m;if(null==n||n==q.model.getParent(a[t]))n=q.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,q.getDefaultParent(),n,l[t])}}finally{this.model.endUpdate()}return l};if(null!=v.sidebar){var E=v.sidebar.dropAndConnect; -v.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=E.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var l=q.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},B= -v.onKeyDown;v.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?e(q.getSelectionCell()):m(q.getSelectionCell()):13==a.which&&(c=t(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())), -q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=D[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(u(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(u(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH), -mxEvent.consume(a))}}catch(X){console.log("error",X)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var G=q.connectVertex;q.connectVertex=function(a,c,d,f,g,k){var l=q.getIncomingEdges(a);return b(a)&&0<l.length?(d=n(a),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?m(a):f==g?e(a):t(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):G.call(this,a,c,d,f,g,k)};q.getSubtree=function(a){var d=[a];!c(a)&& -!b(a)||l(a)||q.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);var d=this.graph.model.getParent(this.state.cell),d=this.graph.view.getState(d);(c(this.state.cell)||b(this.state.cell))&&(null==d||"flowLayout"!=d.style.childLayout)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a), +b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(d.relatedPage.root=a.decodeCell(c,!1),d=c.nextSibling,c.parentNode.removeChild(c),c=d;null!=c;){d=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var g=c.getAttribute("id");null==a.lookup(g)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=d}}return b};a.afterDecode=function(a,b,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,c,d,k,l){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=[],e=0;e<d.length;e++){var m=this.view.getState(d[e]),p=null!=m?m.style:this.getCellStyle(d[e]);"1"==mxUtils.getValue(p,"treeFolding","0")&&(this.traverse(d[e],!0,mxUtils.bind(this,function(a,b){null!=b&& +g.push(b);a!=d[e]&&g.push(a);return a==d[e]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[e],b))}for(e=0;e<g.length;e++)this.model.setVisible(g[e],!b);d=f;d=a.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return v.isVertex(a)&&d(a)}function c(a){var b=!1;null!= +a&&(b=u.view.getState(a),b="1"==(null!=b?b.style:u.getCellStyle(a)).treeMoving);return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=u.view.getState(a),b="tree"==(null!=b?b.style:u.getCellStyle(a)).containerType);return b}function k(a){var b=!1;null!=a&&(a=v.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function l(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.view.getState(b[0]), +null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0], +u.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=u.view.getState(a),m=u.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width- +10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=u.getOutgoingEdges(u.model.getTerminal(d[0],!0));if(null!=p){for(var v=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<p.length;q++){var t=u.model.getTerminal(p[q],!1);if(f==l(t)){var x=u.view.getState(t);t!=a&&null!=x&&(v&&b!=x.getCenterX()<k.getCenterX()||!v&&b!=x.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,x)&&(d=10+Math.max(d,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/m),g=10+Math.max(g, +(Math.min(n.y+n.height,x.y+x.height)-Math.max(n.y,x.y))/m))}}v?g=0:d=0;for(q=0;q<p.length;q++)if(t=u.model.getTerminal(p[q],!1),f==l(t)&&(x=u.view.getState(t),t!=a&&null!=x&&(v&&b!=x.getCenterX()<k.getCenterX()||!v&&b!=x.getCenterY()<k.getCenterY()))){var A=[];u.traverse(x.cell,!0,function(a,b){null!=b&&A.push(b);A.push(a);return!0});u.moveCells(A,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function t(a){u.model.beginUpdate();try{var b=l(a),c=u.getIncomingEdges(a), +d=u.cloneCells([c[0],a]);u.model.setTerminal(c[0],d[1],!1);u.model.setTerminal(d[0],d[1],!0);u.model.setTerminal(d[0],a,!1);var e=u.model.getParent(a),f=e.geometry,g=[];u.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&& +(m=0);u.moveCells(g,k,m);return u.addCells(d,e)}finally{u.model.endUpdate()}}function e(a){u.model.beginUpdate();try{var b=u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(d[0],a,!0);var c=u.getOutgoingEdges(a),e=b.geometry,f=[];u.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=u.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=u.view.getBounds(f),n=l(a),p=u.view.translate,v=u.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x= +null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/v-p.x-e.x+10,d[1].geometry.y+=d[1].geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/v-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height+e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width+e.x+40):d[1].geometry.x+(d[1].geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height- +d[1].geometry.height)/2:(m.y+m.height)/v-p.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function m(a,b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=u.view.getState(u.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d} +function p(a,b){var c=l(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)==d&&c!=b?q.actions.get("selectParent").funct():c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST? +-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var q=this,u=q.editor.graph,v=u.getModel(),z=q.menus.createPopupMenu;q.menus.createPopupMenu=function(b,c,d){z.apply(this,arguments);if(1==u.getSelectionCount()){c=u.getSelectionCell();var e=u.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(u.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(u.getSelectionCell())&&(b.addSeparator(),0<u.getIncomingEdges(c).length&& +this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};q.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);if(null!=a&&0<a.length&& +(a=u.getOutgoingEdges(u.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);null!=a&&0<a.length&&u.setSelectionCell(u.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a= +u.getSelectionCell(),b=[];u.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});u.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=u.removeCells;u.removeCells=function(b,c){c=null!=c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];u.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==u.getIncomingEdges(a).length)return k.push(a), +!0;k=[];return!1});0<k.length&&(e=e.concat(k),g=u.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return y.apply(this,arguments)};q.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var B=u.duplicateCells;u.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=u.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=u.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=u.getIncomingEdges(k[e]),g=u.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,u.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=u.moveCells;u.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f); +if(null!=b&&a(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var v=0;v<b.length;v++)if(a(b[v])||u.model.isEdge(b[v])&&null==u.model.getTerminal(b[v],!0)){f=u.model.getParent(b[v]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var q=u.getIncomingEdges(b[0]);if(0<q.length){var t=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=t){var A=u.view.getState(m);null!=A&&(c=(A.getCenterX()-t.getCenterX())/u.view.scale,d=(A.getCenterY()-t.getCenterY())/u.view.scale)}}}}l=x.apply(this,arguments); +if(null!=l&&null!=b&&l.length==b.length)for(v=0;v<l.length;v++)if(this.model.isEdge(l[v]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[v],!0))&&this.model.setTerminal(l[v],m,!0);else if(a(b[v])&&(q=u.getIncomingEdges(b[v]),0<q.length))if(!e)a(m)&&0>mxUtils.indexOf(b,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],m,!0);else if(0==u.getIncomingEdges(l[v]).length){n=m;if(null==n||n==u.model.getParent(b[v]))n=u.model.getTerminal(q[0],!0);e=this.cloneCell(q[0]);this.addEdge(e,u.getDefaultParent(), +n,l[v])}}finally{this.model.endUpdate()}return l};if(null!=q.sidebar){var A=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(b,c,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=A.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var l=u.getCellGeometry(g[k]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"), +80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},D=q.onKeyDown;q.onKeyDown=function(b){try{if(u.isEnabled()&&!u.isEditing()&&a(u.getSelectionCell())&&1==u.getSelectionCount()){var c=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?t(u.getSelectionCell()):e(u.getSelectionCell()):13==b.which&&(c=n(u.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&u.model.isEdge(c[0])?u.setSelectionCell(u.model.getTerminal(c[0], +!1)):u.setSelectionCell(c[c.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var d=E[b.keyCode];null!=d&&(d.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(p(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(p(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(p(u.getSelectionCell(), +mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(p(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(Q){console.log("error",Q)}mxEvent.isConsumed(b)||D.apply(this,arguments)};var C=u.connectVertex;u.connectVertex=function(b,c,d,f,g,k){var m=u.getIncomingEdges(b);return a(b)&&0<m.length?(d=l(b),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?e(b):f==g?t(b):n(b,c!=mxConstants.DIRECTION_NORTH&& +c!=mxConstants.DIRECTION_WEST)):C.call(this,b,c,d,f,g,k)};u.getSubtree=function(b){var d=[b];!c(b)&&!a(b)||k(b)||u.traverse(b,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(c(this.state.cell)||a(this.state.cell))&&!k(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage), this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0; -this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(a)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible; -mxVertexHandler.prototype.setHandlesVisible=function(a){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this, -arguments),c=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); +this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(a)})))};var G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.setHandlesVisible; +mxVertexHandler.prototype.setHandlesVisible=function(a){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this, +arguments),d=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");g.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);g.insertEdge(u, -!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");q.geometry.relative=!0;q.edge= -!0;b.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(f);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(e);a.insert(g);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");g.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);g.insertEdge(e,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;b.insertEdge(p,!0);m.insertEdge(p, +!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");u.geometry.relative=!0;u.edge= +!0;b.insertEdge(u,!0);q.insertEdge(u,!1);a.insert(d);a.insert(e);a.insert(p);a.insert(u);a.insert(b);a.insert(c);a.insert(g);a.insert(m);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");a.vertex=!0;var b= new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); -a.vertex=!0;var b=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");c.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);d.insertEdge(f,!1);var e=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);a.insert(f);a.insert(g);a.insert(b);a.insert(d); -a.insert(e);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");c.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division", +a.vertex=!0;var b=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); +g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);c.insertEdge(g,!1);var t=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");t.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);t.insertEdge(e,!1);a.insert(g);a.insert(e);a.insert(b);a.insert(c); +a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");d.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division", new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections", function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section", new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60, @@ -10282,7 +10286,7 @@ g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("di c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0, 0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+ -(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(q){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(b)}catch(v){}var g=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&& (this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src; mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR= @@ -10299,7 +10303,7 @@ a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUt "lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow? this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&& (this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(), -this.menus.findWindow=null);m.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label= +this.menus.findWindow=null);m.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var q=Menus.prototype.init;Menus.prototype.init=function(){q.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;b.actions.get("editDiagram").label= mxResources.get("formatXml")+"...";b.actions.get("createShape").label=mxResources.get("shape")+"...";b.actions.get("outline").label=mxResources.get("outline")+"...";b.actions.get("layers").label=mxResources.get("layers")+"...";b.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();b.showImportCsvDialog()}));b.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=new ParseDialog(b,"Insert from Text");b.showDialog(a.container, 620,420,!0,!1);a.init()}));b.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(b,"Insert from Text","formatSql");b.showDialog(a.container,620,420,!0,!1);a.init()}));b.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){d(b)}));b.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(b)}));EditorUi.enablePlantUml&&!b.isOffline()&&b.actions.put("plantUml",new Action(mxResources.get("plantUml")+ "...",function(){var a=new ParseDialog(b,"Insert from Text","plantUml");b.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();b.menus.addSubmenu("extras",a,c,mxResources.get("preferences"));a.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(b.menus.addMenuItems(a,["new","open","-"],c),EditorUi.isElectronApp&&b.menus.addMenuItems(a,["synchronize","-"],c),b.menus.addMenuItems(a,["save","saveAs","-"],c)): @@ -10310,7 +10314,7 @@ b.menus.addMenuItems(a,["-","revisionHistory"],c)})));var e=this.get("exportAs") a,c);a.addSeparator(c);b.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],c);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&b.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],c);!b.isOfflineApp()&&isLocalStorage&&b.menus.addMenuItem(a,"plugins",c);a.addSeparator(c);b.menus.addMenuItem(a,"drawConfig",c);a.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "), c)})));mxUtils.bind(this,function(){var a=this.get("insert"),c=a.funct;a.funct=function(a,d){c.apply(this,arguments);a.addSeparator(d);b.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,c,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);a.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a, b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){b.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),c);if("undefined"!==typeof MathJax){var d=b.menus.addMenuItem(a,"mathematicalTypesetting",c);b.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}b.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"], -c)})))};var v=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),n);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d, +c)})))};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=p.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),n);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d, e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function b(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display= "inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?m.insertBefore(g,k.statusContainer):m.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown", mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function e(a,b){var c=document.createElement("div");c.className= @@ -10323,35 +10327,35 @@ d.funct,null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;b e([b("",function(){l.popupMenuHandler.hideMenu();var a=l.view.scale,b=l.view.translate.x,c=l.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-l.view.scale)&&b==l.view.translate.x&&c==l.view.translate.y&&k.actions.get(l.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), 640<=c?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="): null,640<=c?b("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="): -null],60)}d=k.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==N&&(f=p.addMenu("",d.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor= -"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),N=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=N&&(N.parentNode.removeChild(N),N=null))}v.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&& +null],60)}d=k.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c?(null==O&&(f=p.addMenu("",d.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor= +"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",m.appendChild(f),O=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}u.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&& null==urlParams.libs||d(this);var k=this,l=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var m=document.createElement("div");m.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var n=null,p=new Menubar(k,m);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative"; -k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var t=k.descriptorChanged;k.descriptorChanged=function(){t.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub": +k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var q=k.descriptorChanged;k.descriptorChanged=function(){q.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub": "gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);m.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else m.removeAttribute("title")};k.setStatusText(k.editor.getStatus());m.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";m.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer; -k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var J=k.menus.get("viewZoom"); -if(null!=J){this.tabContainer.style.right="70px";var F=p.addMenu("100%",J.funct);F.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");F.style.whiteSpace="nowrap";F.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";F.style.backgroundPosition="right 6px center";F.style.backgroundRepeat="no-repeat";F.style.backgroundColor="#ffffff";F.style.paddingRight="10px";F.style.display="block";F.style.position="absolute";F.style.textDecoration="none";F.style.textDecoration="none"; -F.style.right="0px";F.style.bottom="0px";F.style.overflow="hidden";F.style.visibility="hidden";F.style.textAlign="center";F.style.color="#000";F.style.fontSize="12px";F.style.color="#707070";F.style.width="59px";F.style.cursor="pointer";F.style.borderTop="1px solid lightgray";F.style.borderLeft="1px solid lightgray";F.style.height=parseInt(k.tabContainerHeight)-1+"px";F.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(F);J=mxUtils.bind(this,function(){F.innerHTML=Math.round(100* -k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,J);k.editor.addListener("resetGraphView",J);k.editor.addListener("pageSelected",J);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(F.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer); -g.appendChild(u);k.updateTabContainer();var N=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}}; -(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,t=!1,e=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var q=[],z=[],x=0;x<this.states.length;x++){var C=this.states[x];C instanceof mxCellState&&(k||!this.graph.isCellSelected(C.cell))&&((p.x>=C.x&&p.x<=C.x+C.width||C.x>=p.x&&C.x<=p.x+p.width)&&(p.y> -C.y+C.height+4||p.y+p.height+4<C.y)?q.push(C):(p.y>=C.y&&p.y<=C.y+C.height||C.y>=p.y&&C.y<=p.y+p.height)&&(p.x>C.x+C.width+4||p.x+p.width+4<C.x)&&z.push(C))}var y=0,A=0,E=C=0,D=0,B=0,G=0,I=0,H=5*u;if(1<q.length){q.push(p);q.sort(function(a,b){return a.y-b.y});var J=!1,x=p==q[0],u=p==q[q.length-1];if(!x&&!u)for(x=1;x<q.length-1;x++)if(p==q[x]){u=q[x-1];x=q[x+1];C=A=E=(x.y-u.y-u.height-p.height)/2;break}for(x=0;x<q.length-1;x++){var u=q[x],F=q[x+1],K=p==u||p==F,F=F.y-u.y-u.height,J=J|p==u;if(0==A&& -0==y)A=F,y=1;else if(Math.abs(A-F)<=(K||1==x&&J?v:0))y+=1;else if(1<y&&J){q=q.slice(0,x+1);break}else if(3<=q.length-x&&!J)y=0,C=A=0!=E?E:0,q.splice(0,0==x?1:x),x=-1;else break;0!=C||K||(A=C=F)}3==q.length&&q[1]==p&&(C=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});J=!1;x=p==z[0];u=p==z[z.length-1];if(!x&&!u)for(x=1;x<z.length-1;x++)if(p==z[x]){u=z[x-1];x=z[x+1];G=B=I=(x.x-u.x-u.width-p.width)/2;break}for(x=0;x<z.length-1;x++){u=z[x];F=z[x+1];K=p==u||p==F;F=F.x-u.x-u.width;J|=p== -u;if(0==B&&0==D)B=F,D=1;else if(Math.abs(B-F)<=(K||1==x&&J?v:0))D+=1;else if(1<D&&J){z=z.slice(0,x+1);break}else if(3<=z.length-x&&!J)D=0,G=B=0!=I?I:0,z.splice(0,0==x?1:x),x=-1;else break;0!=G||K||(B=G=F)}3==z.length&&z[1]==p&&(G=0)}v=function(a,b,c,d){var e=[],f;d?(d=H,f=0):(d=0,f=H);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR, -mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};B=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==z.length-1){D=[];I=m.guidesArrHor;t=[];g=0;x=z[0]==p?1:0;J=z[x].y+z[x].height;if(0<G)for(x=0;x<z.length-1;x++)u= -z[x],F=z[x+1],p==u?(g=F.x-u.width-G,t.push(new mxPoint(g+u.width+H,J)),t.push(new mxPoint(F.x-H,J))):p==F?(t.push(new mxPoint(u.x+u.width+H,J)),g=u.x+u.width+G,t.push(new mxPoint(g-H,J))):(t.push(new mxPoint(u.x+u.width+H,J)),t.push(new mxPoint(F.x-H,J)));else u=z[0],x=z[2],g=u.x+u.width+(x.x-u.x-u.width-p.width)/2,t.push(new mxPoint(u.x+u.width+H,J)),t.push(new mxPoint(g-H,J)),t.push(new mxPoint(g+p.width+H,J)),t.push(new mxPoint(x.x-H,J));for(x=0;x<t.length;x+=2)z=t[x],G=t[x+1],z=v(z,G,null!=I? -I[x/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(x=t.length/2;null!=I&&x<I.length;x++)I[x].destroy();m.guidesArrHor=D;g-=b.x;t=!0}else B(!0);if(1<y&&y==q.length-1){D=[];I=m.guidesArrVer;e=[];f=0;x=q[0]==p?1:0;y=q[x].x+q[x].width;if(0<C)for(x=0;x<q.length-1;x++)u=q[x],F=q[x+1],p==u?(f=F.y-u.height-C,e.push(new mxPoint(y,f+u.height+H)),e.push(new mxPoint(y,F.y-H))):p==F?(e.push(new mxPoint(y,u.y+u.height+H)),f=u.y+u.height+C,e.push(new mxPoint(y,f-H))):(e.push(new mxPoint(y,u.y+ -u.height+H)),e.push(new mxPoint(y,F.y-H)));else u=q[0],x=q[2],f=u.y+u.height+(x.y-u.y-u.height-p.height)/2,e.push(new mxPoint(y,u.y+u.height+H)),e.push(new mxPoint(y,f-H)),e.push(new mxPoint(y,f+p.height+H)),e.push(new mxPoint(y,x.y-H));for(x=0;x<e.length;x+=2)z=e[x],G=e[x+1],z=v(z,G,null!=I?I[x/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(x=e.length/2;null!=I&&x<I.length;x++)I[x].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else B(!1,!0)}if(t||e)return p=new mxPoint(g,f),q=a.call(this, -b,p,d,k),t&&!e?p.y=q.y:e&&!t&&(p.x=q.x),q.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),q.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;B(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!= +k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var I=k.menus.get("viewZoom"); +if(null!=I){this.tabContainer.style.right="70px";var F=p.addMenu("100%",I.funct);F.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");F.style.whiteSpace="nowrap";F.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";F.style.backgroundPosition="right 6px center";F.style.backgroundRepeat="no-repeat";F.style.backgroundColor="#ffffff";F.style.paddingRight="10px";F.style.display="block";F.style.position="absolute";F.style.textDecoration="none";F.style.textDecoration="none"; +F.style.right="0px";F.style.bottom="0px";F.style.overflow="hidden";F.style.visibility="hidden";F.style.textAlign="center";F.style.color="#000";F.style.fontSize="12px";F.style.color="#707070";F.style.width="59px";F.style.cursor="pointer";F.style.borderTop="1px solid lightgray";F.style.borderLeft="1px solid lightgray";F.style.height=parseInt(k.tabContainerHeight)-1+"px";F.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";t.appendChild(F);I=mxUtils.bind(this,function(){F.innerHTML=Math.round(100* +k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);k.editor.addListener("resetGraphView",I);k.editor.addListener("pageSelected",I);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(F.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(k.tabContainer);t.appendChild(m);t.appendChild(k.diagramContainer); +g.appendChild(t);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}}; +(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,t=!1,e=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,q=this.graph.getView().scale,u=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var v=[],z=[],y=0;y<this.states.length;y++){var B=this.states[y];B instanceof mxCellState&&(k||!this.graph.isCellSelected(B.cell))&&((p.x>=B.x&&p.x<=B.x+B.width||B.x>=p.x&&B.x<=p.x+p.width)&&(p.y> +B.y+B.height+4||p.y+p.height+4<B.y)?v.push(B):(p.y>=B.y&&p.y<=B.y+B.height||B.y>=p.y&&B.y<=p.y+p.height)&&(p.x>B.x+B.width+4||p.x+p.width+4<B.x)&&z.push(B))}var x=0,A=0,E=B=0,D=0,C=0,H=0,G=0,J=5*q;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var I=!1,y=p==v[0],q=p==v[v.length-1];if(!y&&!q)for(y=1;y<v.length-1;y++)if(p==v[y]){q=v[y-1];y=v[y+1];B=A=E=(y.y-q.y-q.height-p.height)/2;break}for(y=0;y<v.length-1;y++){var q=v[y],F=v[y+1],K=p==q||p==F,F=F.y-q.y-q.height,I=I|p==q;if(0==A&& +0==x)A=F,x=1;else if(Math.abs(A-F)<=(K||1==y&&I?u:0))x+=1;else if(1<x&&I){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!I)x=0,B=A=0!=E?E:0,v.splice(0,0==y?1:y),y=-1;else break;0!=B||K||(A=B=F)}3==v.length&&v[1]==p&&(B=0)}if(1<z.length){z.push(p);z.sort(function(a,b){return a.x-b.x});I=!1;y=p==z[0];q=p==z[z.length-1];if(!y&&!q)for(y=1;y<z.length-1;y++)if(p==z[y]){q=z[y-1];y=z[y+1];H=C=G=(y.x-q.x-q.width-p.width)/2;break}for(y=0;y<z.length-1;y++){q=z[y];F=z[y+1];K=p==q||p==F;F=F.x-q.x-q.width;I|=p== +q;if(0==C&&0==D)C=F,D=1;else if(Math.abs(C-F)<=(K||1==y&&I?u:0))D+=1;else if(1<D&&I){z=z.slice(0,y+1);break}else if(3<=z.length-y&&!I)D=0,H=C=0!=G?G:0,z.splice(0,0==y?1:y),y=-1;else break;0!=H||K||(C=H=F)}3==z.length&&z[1]==p&&(H=0)}u=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR, +mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};C=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==z.length-1){D=[];G=m.guidesArrHor;t=[];g=0;y=z[0]==p?1:0;I=z[y].y+z[y].height;if(0<H)for(y=0;y<z.length-1;y++)q= +z[y],F=z[y+1],p==q?(g=F.x-q.width-H,t.push(new mxPoint(g+q.width+J,I)),t.push(new mxPoint(F.x-J,I))):p==F?(t.push(new mxPoint(q.x+q.width+J,I)),g=q.x+q.width+H,t.push(new mxPoint(g-J,I))):(t.push(new mxPoint(q.x+q.width+J,I)),t.push(new mxPoint(F.x-J,I)));else q=z[0],y=z[2],g=q.x+q.width+(y.x-q.x-q.width-p.width)/2,t.push(new mxPoint(q.x+q.width+J,I)),t.push(new mxPoint(g-J,I)),t.push(new mxPoint(g+p.width+J,I)),t.push(new mxPoint(y.x-J,I));for(y=0;y<t.length;y+=2)z=t[y],H=t[y+1],z=u(z,H,null!=G? +G[y/2]:null),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=t.length/2;null!=G&&y<G.length;y++)G[y].destroy();m.guidesArrHor=D;g-=b.x;t=!0}else C(!0);if(1<x&&x==v.length-1){D=[];G=m.guidesArrVer;e=[];f=0;y=v[0]==p?1:0;x=v[y].x+v[y].width;if(0<B)for(y=0;y<v.length-1;y++)q=v[y],F=v[y+1],p==q?(f=F.y-q.height-B,e.push(new mxPoint(x,f+q.height+J)),e.push(new mxPoint(x,F.y-J))):p==F?(e.push(new mxPoint(x,q.y+q.height+J)),f=q.y+q.height+B,e.push(new mxPoint(x,f-J))):(e.push(new mxPoint(x,q.y+ +q.height+J)),e.push(new mxPoint(x,F.y-J)));else q=v[0],y=v[2],f=q.y+q.height+(y.y-q.y-q.height-p.height)/2,e.push(new mxPoint(x,q.y+q.height+J)),e.push(new mxPoint(x,f-J)),e.push(new mxPoint(x,f+p.height+J)),e.push(new mxPoint(x,y.y-J));for(y=0;y<e.length;y+=2)z=e[y],H=e[y+1],z=u(z,H,null!=G?G[y/2]:null,!0),z.node.style.visibility="visible",z.redraw(),D.push(z);for(y=e.length/2;null!=G&&y<G.length;y++)G[y].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else C(!1,!0)}if(t||e)return p=new mxPoint(g,f),v=a.call(this, +b,p,d,k),t&&!e?p.y=v.y:e&&!t&&(p.x=v.x),v.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;C(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!= c)for(k=0;k<c.length;k++)c[k].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;t.style.top=b.offsetTop-k+"px";t.style.left=b.offsetLeft-k+"px";t.style.width=(c?0:b.offsetWidth)+k+"px";t.style.height=(c?b.offsetHeight:0)+k+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,l=this;this.unit=d;var n="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb", strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},t=document.createElement("div");t.style.position="absolute";t.style.background=n.bkgClr;t.style[c?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;t.style.borderLeft="0.5px solid "+n.strokeClr;document.body.appendChild(t);mxEvent.disableContextMenu(t);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a, -arguments);g()};g();var e=document.createElement("canvas");e.width=t.offsetWidth;e.height=t.offsetHeight;t.style.overflow="hidden";e.style.position="relative";t.appendChild(e);var m=e.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=t;this.canvas=e;var u=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);m.beginPath();m.moveTo(a+.5,b+.5);m.lineTo(d+.5,e+.5);m.stroke();f&&(c?(m.save(),m.translate(a,b),m.rotate(-Math.PI/2),m.fillText(f,0,0), -m.restore()):m.fillText(f,a,b))},v=function(){m.clearRect(0,0,e.width,e.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=n.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),d=p.view.translate,f=p.view.getGraphBounds(),g=p.pageVisible,t=g?k+(c?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(c?d.y-p.container.scrollTop:d.x-p.container.scrollLeft),v=0;g&&(v=c?Math.floor(((f.y+1)/a-d.y)/p.pageFormat.height)*p.pageFormat.height* -a:Math.floor(((f.x+1)/a-d.x)/p.pageFormat.width)*p.pageFormat.width*a);var D,B,G;switch(l.unit){case mxConstants.POINTS:D=G=10;B=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;D=mxConstants.PIXELS_PER_MM;B=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/G,B=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}d=D;2<=a?d=D/(2*Math.floor(a/2)):.5>=a&&(d=D*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));D=null;b=g?Math.min(t+(c?b.height:b.width), -c?e.height:e.width):c?e.height:e.width;g&&(m.fillStyle=n.outBkgClr,c?(m.fillRect(0,k,k,t-k),m.fillRect(0,b,k,e.height)):(m.fillRect(k,0,t-k,k),m.fillRect(b,0,e.width,k)));m.fillStyle=n.fontClr;for(g=g?t:t%(d*a);g<=b;g+=d*a)if(f=Math.round((g-t)/a/d),!(g<k||f==D)){D=f;var I=null;0==f%G&&(I=l.formatText(v+f*d)+"");c?u(k-B[Math.abs(f)%G],g,k,g,I):u(g,k-B[Math.abs(f)%G],g,k,I)}m.lineWidth=1;u(c?0:k,c?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=v;this.sizeListener=d=f(function(){var a= -p.container;c?(a=a.offsetHeight+k,e.height!=a&&(e.height=a,t.style.height=a+"px",v())):(a=a.offsetWidth+k,e.width!=a&&(e.width=a,t.style.width=a+"px",v()))},10);this.pageListener=function(){v()};this.scrollListener=b=f(function(){var a=c?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,v())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener); -a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;t.style.background=n.bkgClr;v()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3, -l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,q,t,v,x,z,C,F;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,C=p+a.height,z=0,q=m.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=m.getImageData(t,v-1,k,3),u(t,v,k,v),v--,F=m.getImageData(z,C-1,k,3),u(z,C,k,C),C--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,C=0,z=g+a.width,q=m.getImageData(g-1,p,3,k),u(g, -p,g,k),g--,x=m.getImageData(t-1,v,3,k),u(t,v,t,k),t--,F=m.getImageData(z-1,C,3,k),u(z,C,z,k),z--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:q,x1:g,y1:p,imgData2:x,x2:t,y2:v,imgData3:F,x3:z,y3:C}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1, +arguments);g()};g();var e=document.createElement("canvas");e.width=t.offsetWidth;e.height=t.offsetHeight;t.style.overflow="hidden";e.style.position="relative";t.appendChild(e);var m=e.getContext("2d");this.ui=a;var p=a.editor.graph;this.graph=p;this.container=t;this.canvas=e;var q=function(a,b,d,e,f){a=Math.round(a);b=Math.round(b);d=Math.round(d);e=Math.round(e);m.beginPath();m.moveTo(a+.5,b+.5);m.lineTo(d+.5,e+.5);m.stroke();f&&(c?(m.save(),m.translate(a,b),m.rotate(-Math.PI/2),m.fillText(f,0,0), +m.restore()):m.fillText(f,a,b))},u=function(){m.clearRect(0,0,e.width,e.height);m.beginPath();m.lineWidth=.7;m.strokeStyle=n.strokeClr;m.setLineDash([]);m.font="9px Arial";m.textAlign="center";var a=p.view.scale,b=p.view.getBackgroundPageBounds(),d=p.view.translate,f=p.view.getGraphBounds(),g=p.pageVisible,t=g?k+(c?b.y-p.container.scrollTop:b.x-p.container.scrollLeft):k+(c?d.y-p.container.scrollTop:d.x-p.container.scrollLeft),u=0;g&&(u=c?Math.floor(((f.y+1)/a-d.y)/p.pageFormat.height)*p.pageFormat.height* +a:Math.floor(((f.x+1)/a-d.x)/p.pageFormat.width)*p.pageFormat.width*a);var D,C,H;switch(l.unit){case mxConstants.POINTS:D=H=10;C=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:H=10;D=mxConstants.PIXELS_PER_MM;C=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:H=.5>=a||4<=a?8:16,D=mxConstants.PIXELS_PER_INCH/H,C=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}d=D;2<=a?d=D/(2*Math.floor(a/2)):.5>=a&&(d=D*Math.floor(1/a/2)*(l.unit==mxConstants.MILLIMETERS?2:1));D=null;b=g?Math.min(t+(c?b.height:b.width), +c?e.height:e.width):c?e.height:e.width;g&&(m.fillStyle=n.outBkgClr,c?(m.fillRect(0,k,k,t-k),m.fillRect(0,b,k,e.height)):(m.fillRect(k,0,t-k,k),m.fillRect(b,0,e.width,k)));m.fillStyle=n.fontClr;for(g=g?t:t%(d*a);g<=b;g+=d*a)if(f=Math.round((g-t)/a/d),!(g<k||f==D)){D=f;var G=null;0==f%H&&(G=l.formatText(u+f*d)+"");c?q(k-C[Math.abs(f)%H],g,k,g,G):q(g,k-C[Math.abs(f)%H],g,k,G)}m.lineWidth=1;q(c?0:k,c?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=u;this.sizeListener=d=f(function(){var a= +p.container;c?(a=a.offsetHeight+k,e.height!=a&&(e.height=a,t.style.height=a+"px",u())):(a=a.offsetWidth+k,e.width!=a&&(e.width=a,t.style.width=a+"px",u()))},10);this.pageListener=function(){u()};this.scrollListener=b=f(function(){var a=c?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,u())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener); +a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;t.style.background=n.bkgClr;u()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3, +l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,t,u,v,y,z,B,F;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,u=k/2,B=p+a.height,z=0,t=m.getImageData(g,p-1,k,3),q(g,p,k,p),p--,y=m.getImageData(u,v-1,k,3),q(u,v,k,v),v--,F=m.getImageData(z,B-1,k,3),q(z,B,k,B),B--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,u=g+a.width/2,B=0,z=g+a.width,t=m.getImageData(g-1,p,3,k),q(g, +p,g,k),g--,y=m.getImageData(u-1,v,3,k),q(u,v,u,k),u--,F=m.getImageData(z-1,B,3,k),q(z,B,z,k),z--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:t,x1:g,y1:p,imgData2:y,x2:u,y2:v,imgData3:F,x3:z,y3:B}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1, l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(z){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()}; mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}; mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged", @@ -10359,10 +10363,10 @@ this.pageListener);null!=this.container&&this.container.parentNode.removeChild(t function mxDualRuler(a,d){var c=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=a.getDiagramContainerOffset;a.getDiagramContainerOffset=function(){return c};this.editorUiRefresh=a.refresh;this.ui=a;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(a,d,!0);this.hRuler=new mxRuler(a,d,!1,!0);var b=mxUtils.bind(this,function(b){var c=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this, function(b){c=null!=a.currentMenu;mxEvent.consume(b)}),null,mxUtils.bind(this,function(d){if(a.editor.graph.isEnabled()&&!a.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(d)||mxEvent.isPopupTrigger(d))){a.editor.graph.popupMenuHandler.hideMenu();a.hideCurrentMenu();if(!mxEvent.isTouchEvent(d)||!c){var f=new mxPopupMenu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,["points","millimeters"],c)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu= mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);a.resetCurrentMenu();f.destroy()});var g=mxEvent.getClientX(d),k=mxEvent.getClientY(d);f.popup(g,k,null,d);a.setCurrentMenu(f,b)}mxEvent.consume(d)}}))});b(this.hRuler.container);b(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.setUnit=function(a){this.vRuler.setUnit(a);this.hRuler.setUnit(a)};mxDualRuler.prototype.setStyle=function(a){this.vRuler.setStyle(a);this.hRuler.setStyle(a)}; -mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,k=[],l,n=!1,t=!0,e=[],m=!1,p=!0;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){c=a};var u=function(b){m=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor= -b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){u(!0)};this.isDrawing=function(){return m};var v=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=l&&2>l.length;c||k.push.apply(k,l);l=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e, -k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var q='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],z=k[l-1];!n&&t&&(x=v.x-z.x,z=v.y-z.y,x=Math.sqrt(x*x+z*z)<=a.tolerance);if(n||x)q+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';q+="</path>"+(n||x?"<fillstroke/>":"<stroke/>");v=l+1}else q=l==v?q+('<path><move x="'+x.x.toFixed(2)+ -'" y="'+x.y.toFixed(2)+'"/>'):q+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(q+"</foreground></shape>")+");fillColor=none;",q=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/q-v.x,f/q-v.y,c/q,e/q),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])}, -10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(d,function(c){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n= -a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=q(c);z(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){z(q(a));var c=x(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=x(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},v);var q=function(b){return mxUtils.convertPoint(a.container, -mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(e.push(a);e.length>c;)e.shift()},x=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20; +mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(a){var d=null!=a.view&&null!=a.view.canvas?a.view.canvas.ownerSVGElement:null;if(null!=a.container&&null!=d){var c=mxFreehand.prototype.NORMAL_SMOOTHING,b=null,g=[],f,k=[],l,n=!1,t=!0,e=[],m=!1,p=!0;this.setClosedPath=function(a){n=a};this.setAutoClose=function(a){t=a};this.setStopClickEnabled=function(a){p=a};this.setSmoothing=function(a){c=a};var q=function(b){m=b;a.getRubberband().setEnabled(!b);a.graphHandler.setSelectEnabled(!b);a.graphHandler.setMoveEnabled(!b);a.container.style.cursor= +b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){q(!0)};this.isDrawing=function(){return m};var u=mxUtils.bind(this,function(a){if(b){var c=p&&0<k.length&&null!=l&&2>l.length;c||k.push.apply(k,l);l=[];k.push(null);g.push(b);b=null;c&&this.stopDrawing();mxEvent.consume(a)}});this.stopDrawing=function(){if(0<g.length){for(var c=k[0].x,d=k[0].x,e=k[0].y,f=k[0].y,l=1;l<k.length;l++)null!=k[l]&&(c=Math.max(c,k[l].x),d=Math.min(d,k[l].x),e=Math.max(e, +k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var u='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var y=k[l];if(null==y){var y=!1,v=k[v],z=k[l-1];!n&&t&&(y=v.x-z.x,z=v.y-z.y,y=Math.sqrt(y*y+z*z)<=a.tolerance);if(n||y)u+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';u+="</path>"+(n||y?"<fillstroke/>":"<stroke/>");v=l+1}else u=l==v?u+('<path><move x="'+y.x.toFixed(2)+ +'" y="'+y.y.toFixed(2)+'"/>'):u+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(u+"</foreground></shape>")+");fillColor=none;",u=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/u-v.x,f/u-v.y,c/u,e/u),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])}, +10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}q(!1)};mxEvent.addGestureListeners(d,function(c){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n= +a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=v(c);z(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){z(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},u);var v=function(b){return mxUtils.convertPoint(a.container, +mxEvent.getClientX(b),mxEvent.getClientY(b))},z=function(a){for(e.push(a);e.length>c;)e.shift()},y=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20; diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js index fdb688d4d..9273188fb 100644 --- a/src/main/webapp/js/diagramly/App.js +++ b/src/main/webapp/js/diagramly/App.js @@ -1949,7 +1949,13 @@ App.prototype.updateDocumentTitle = function() title = filename + ' - ' + title; } - document.title = title; + if (document.title != title) + { + document.title = title; + var graph = this.editor.graph; + graph.invalidateDescendantsWithPlaceholders(graph.model.getRoot()); + graph.view.validate(); + } } }; diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js index fd2938fa9..4d99f40e1 100644 --- a/src/main/webapp/js/diagramly/Editor.js +++ b/src/main/webapp/js/diagramly/Editor.js @@ -252,7 +252,12 @@ mxUtils.getValue(state.style, 'childLayout', null) == null; }}, {name: 'expand', dispName: 'Expand', type: 'bool', defVal: true}, - {name: 'part', dispName: 'Part', type: 'bool', defVal: false}, + {name: 'part', dispName: 'Part', type: 'bool', defVal: false, isVisible: function(state, format) + { + var model = format.editorUi.editor.graph.model; + + return (state.vertices.length > 0) ? model.isVertex(model.getParent(state.vertices[0])) : false; + }}, {name: 'editable', dispName: 'Editable', type: 'bool', defVal: true}, {name: 'backgroundOutline', dispName: 'Background Outline', type: 'bool', defVal: false}, {name: 'movable', dispName: 'Movable', type: 'bool', defVal: true}, @@ -270,6 +275,12 @@ {name: 'deletable', dispName: 'Deletable', type: 'bool', defVal: true}, {name: 'treeFolding', dispName: 'Tree Folding', type: 'bool', defVal: false}, {name: 'treeMoving', dispName: 'Tree Moving', type: 'bool', defVal: false}, + {name: 'pointerEvents', dispName: 'Pointer Events', type: 'bool', defVal: true, isVisible: function(state, format) + { + var fillColor = mxUtils.getValue(state.style, mxConstants.STYLE_FILLCOLOR, null); + + return fillColor == null || fillColor == mxConstants.NONE; + }}, {name: 'moveCells', dispName: 'Move Cells on Fold', type: 'bool', defVal: false, isVisible: function(state, format) { return state.vertices.length > 0 && format.editorUi.editor.graph.isContainer(state.vertices[0]); diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js index 96ac4b606..a0a681b63 100644 --- a/src/main/webapp/js/diagramly/EditorUi.js +++ b/src/main/webapp/js/diagramly/EditorUi.js @@ -13845,14 +13845,14 @@ this.getDatabaseItem('.drawioMigrated3', mxUtils.bind(this, function(value) { - if (value) //Already migrated + if (value && urlParams['forceMigration'] != '1') //Already migrated { return; } var drawioFrame = document.createElement('iframe'); drawioFrame.style.display = 'none'; - drawioFrame.setAttribute('src', 'https://www.draw.io?embed=1&proto=json'); + drawioFrame.setAttribute('src', 'https://www.draw.io?embed=1&proto=json&forceMigration=' + urlParams['forceMigration']); document.body.appendChild(drawioFrame); var collectNames = true, allDone = false; var fileNames, index = 0; @@ -13897,7 +13897,7 @@ catch(e) { //Log error - EditorUi.logError('Migration Caught: ' + e.message, null, null, null, e, 'INFO'); + console.log(e); } }); @@ -13918,14 +13918,12 @@ catch(e) { //Log error - EditorUi.logError('Migration Caught: ' + e.message, null, null, null, e, 'INFO'); + console.log(e); } }); var messageListener = mxUtils.bind(this, function(evt) { - var evtData; - try { //Only accept messages from migration iframe @@ -13934,8 +13932,13 @@ return; } - evtData = evt.data; - var drawMsg = JSON.parse(evt.data); + var drawMsg = {}; + + try + { + drawMsg = JSON.parse(evt.data); + } + catch(e){} //Ignore if (drawMsg.event == 'init') { @@ -13974,13 +13977,7 @@ } catch(e) { - try - { - evtData = JSON.stringify(evtData); - } - catch(e2){} - //Log error - EditorUi.logError('Migration Caught: ' + e.message + (e.message.indexOf('JSON') >= 0? ' >> ' + evtData : ''), null, null, null, e, 'INFO'); + console.log(e); } }); @@ -14350,7 +14347,7 @@ EditorUi.prototype.getLocalStorageFileNames = function() { - if (localStorage.getItem('.localStorageMigrated') == '1') + if (localStorage.getItem('.localStorageMigrated') == '1' && urlParams['forceMigration'] != '1') { return null; } @@ -14380,7 +14377,7 @@ EditorUi.prototype.getLocalStorageFile = function(key) { - if (localStorage.getItem('.localStorageMigrated') == '1') + if (localStorage.getItem('.localStorageMigrated') == '1' && urlParams['forceMigration'] != '1') { return null; } diff --git a/src/main/webapp/js/diagramly/Extensions.js b/src/main/webapp/js/diagramly/Extensions.js index 30d3b3a20..7019c559e 100644 --- a/src/main/webapp/js/diagramly/Extensions.js +++ b/src/main/webapp/js/diagramly/Extensions.js @@ -3368,6 +3368,11 @@ LucidImporter = {}; fontStyle += 1; } } + else if (currM.n == 'fc' && currM.v == 'Bold') + { + isBT = true; + fontStyle += 1; + } i++; } @@ -3592,7 +3597,7 @@ LucidImporter = {}; //adds global spacing if (typeof properties.InsetMargin === 'number') { - return 'spacing=' + parseInt(properties.InsetMargin) + ';'; + return 'spacing=' + Math.max(0, Math.round(parseInt(properties.InsetMargin) * scale)) + ';'; } return ''; @@ -3811,7 +3816,7 @@ LucidImporter = {}; function getStrokeWidth(properties) { - return createStyle(mxConstants.STYLE_STROKEWIDTH, parseFloat(properties.LineWidth) * scale, '1'); + return createStyle(mxConstants.STYLE_STROKEWIDTH, Math.round(parseFloat(properties.LineWidth) * scale), '1'); } function getImage(properties, action) @@ -3939,7 +3944,7 @@ LucidImporter = {}; graph.setAttributeForCell(cell, currentKey, (value != null) ? value : ''); }; - function updateCell(cell, obj, graph, source, target) + function updateCell(cell, obj, graph, source, target, ignoreLabel) { var a = getAction(obj); @@ -3957,7 +3962,7 @@ LucidImporter = {}; if (p != null) { // Adds label - cell.value = convertText(p); + cell.value = (!ignoreLabel) ? convertText(p) : ''; cell.style += addAllStyles(cell.style, p, a, cell); if (!cell.style.includes('strokeColor')) @@ -4069,8 +4074,12 @@ LucidImporter = {}; Math.round(source.geometry.y + source.geometry.height * p.Endpoint1.LinkY)); var entry = new mxPoint(Math.round(target.geometry.x + target.geometry.width * p.Endpoint2.LinkX), Math.round(target.geometry.y + target.geometry.height * p.Endpoint2.LinkY)); - cell.geometry.points = [new mxPoint(exit.x + 20, exit.y), new mxPoint(entry.x + 20, entry.y)]; - implicitY = true; + var dx = (exit.x == entry.x) ? 20 : 0; + var dy = (exit.y == entry.y) ? 0 : 0; + + cell.geometry.points = [new mxPoint(exit.x + dx, exit.y + dy), new mxPoint(entry.x + dx, entry.y + dy)]; + implicitX = (exit.y == entry.y); + implicitY = (exit.x == entry.x); } } @@ -4110,7 +4119,7 @@ LucidImporter = {}; var e = new mxCell('', new mxGeometry(0, 0, 100, 100), edgeStyle); e.geometry.relative = true; e.edge = true; - updateCell(e, obj, graph, source, target); + updateCell(e, obj, graph, source, target, true); // Adds text labels var a = getAction(obj); @@ -4161,7 +4170,13 @@ LucidImporter = {}; function insertLabel(textArea, e, obj) { var x = (parseFloat(textArea.Location) - 0.5) * 2; - var lab = new mxCell(convertText(textArea), new mxGeometry(x, 0, 0, 0), + + if (isNaN(x) && textArea.Text != null && textArea.Text.Location != null) + { + x = (parseFloat(textArea.Text.Location) - 0.5) * 2; + } + + var lab = new mxCell(convertText(textArea), new mxGeometry((!isNaN(x)) ? x : 0, 0, 0, 0), labelStyle + getEdgeLabelStyle(textArea)); lab.geometry.relative = true; lab.vertex = true; @@ -4210,13 +4225,13 @@ LucidImporter = {}; return ''; }; - function updateEndpoint(cell, endpoint, source, ignoreY) + function updateEndpoint(cell, endpoint, source, ignoreX, ignoreY) { if (endpoint != null) { if (endpoint.LinkX != null && endpoint.LinkY != null) { - cell.style += ((source) ? 'exitX' : 'entryX') + '=' + endpoint.LinkX + ';' + + cell.style += ((!ignoreX) ? ((source) ? 'exitX' : 'entryX') + '=' + endpoint.LinkX + ';' : '') + ((!ignoreY) ? (((source) ? 'exitY' : 'entryY') + '=' + endpoint.LinkY + ';') : '') + ((source) ? 'exitPerimeter' : 'entryPerimeter') + '=1;'; } @@ -4469,6 +4484,11 @@ LucidImporter = {}; }); }; + if (state.state != null && urlParams['dev'] == '1' && window.console != null) + { + console.log(JSON.stringify(JSON.parse(state.state), null, 2)); + } + if (state.state != null) { addPages(JSON.parse(state.state)); @@ -4705,21 +4725,25 @@ LucidImporter = {}; lanesNum = p.Lanes.length; } - v.style = 'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;strokeColor=none;fillColor=none;'; + v.style = 'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;' + + 'horizontalStack=0;resizeParent=1;strokeColor=none;fillColor=none;dropTarget=0;'; v.style += addAllStyles(v.style, p, a, v); var totalOffset = 0; //relative var lane = new Array(); - var laneStyle = rotatedSL? 'swimlane;horizontal=0;html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout;startSize=25;' - : 'swimlane;html=1;whiteSpace=wrap;part=1;connectable=0;collapsible=0;startSize=25;'; + var laneStyle = 'swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize=25;dropTarget=0;'; if (!rotatedSL) { var tbl = v; - v = new mxCell('', new mxGeometry(x, y, w, h), 'html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout'); + v = new mxCell('', new mxGeometry(x, y, w, h), 'html=1;whiteSpace=wrap;container=1;collapsible=0;strokeColor=none;fillColor=none;dropTarget=0;'); v.vertex = true; - tbl.insert(lane[i]); + tbl.insert(v); + } + else + { + laneStyle += 'horizontal=0;' } for (var j = 0; j < lanesNum; j++) @@ -4745,14 +4769,7 @@ LucidImporter = {}; getTextGlobalSpacing(p["Lane_" + i]) + getTextVerticalAlignment(p["Lane_" + i]) + getHeaderColor(p["HeaderFill_" + i]); - - if (rotatedSL) - { - var dc = new mxCell('', new mxGeometry(0, 0, h - 25, w * currOffset), 'html=1;whiteSpace=wrap;part=1;connectable=0;fillColor=none;strokeColor=none;'); - dc.vertex = true; - lane[j].insert(dc); - } - + totalOffset += currOffset; } @@ -5325,14 +5342,14 @@ LucidImporter = {}; if (p.Checked) { - dot = new mxCell('', new mxGeometry(w * 0.15, h * 0.15, w * 0.7, h * 0.7), 'shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;'); + dot = new mxCell('', new mxGeometry(w * 0.15, h * 0.15, w * 0.7, h * 0.7), 'shape=ellipse;fillColor=#33B5E5;strokeWidth=1;'); dot.vertex = true; v.insert(dot); } if (p.Scheme == 'Dark') { - v.style += 'shape=ellipse;strokeWidth=0.6;strokeColor=#272727;'; + v.style += 'shape=ellipse;strokeWidth=1;strokeColor=#272727;'; if (p.Checked) { @@ -5346,7 +5363,7 @@ LucidImporter = {}; } else { - v.style += 'shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;'; + v.style += 'shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;'; if (p.Checked) { @@ -5368,11 +5385,11 @@ LucidImporter = {}; if (p.Scheme == 'Dark') { - v.style += 'strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;'; + v.style += 'strokeWidth=1;strokeColor=#272727;fillColor=#111111;'; } else { - v.style += 'strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;'; + v.style += 'strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;'; } v.style += addAllStyles(v.style, p, a, v); @@ -9376,7 +9393,7 @@ LucidImporter = {}; //add line if (p.Dividers[(i + 1)] != null) { - item[i] = new mxCell('', new mxGeometry(w * 0.05, i * h / p.Lines, w * 0.9, itemH), 'shape=line;strokeWidth=0.25;'); + item[i] = new mxCell('', new mxGeometry(w * 0.05, i * h / p.Lines, w * 0.9, itemH), 'shape=line;strokeWidth=1;'); item[i].vertex = true; v.insert(item[i]); item[i].style += getStrokeColor(p, a); diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js index 5c21c3ebb..d60f85f11 100644 --- a/src/main/webapp/js/diagramly/Init.js +++ b/src/main/webapp/js/diagramly/Init.js @@ -16,7 +16,8 @@ window.mxLoadSettings = window.mxLoadSettings || urlParams['configure'] != '1'; window.isSvgBrowser = window.isSvgBrowser || (navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 9); // CUSTOM_PARAMETERS - URLs for save and export -window.DRAWIO_BASE_URL = window.DRAWIO_BASE_URL || 'https://app.diagrams.net'; +window.DRAWIO_BASE_URL = window.DRAWIO_BASE_URL || ((/.*\.draw\.io$/.test(window.location.hostname)) ? + window.location.protocol + '//' + window.location.hostname : 'https://app.diagrams.net'); window.EXPORT_URL = window.EXPORT_URL || 'https://exp.draw.io/ImageExport4/export'; window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml-1-2020-2'; window.DRAW_MATH_URL = window.DRAW_MATH_URL || window.DRAWIO_BASE_URL + '/math'; diff --git a/src/main/webapp/js/diagramly/Trees.js b/src/main/webapp/js/diagramly/Trees.js index f20483a39..f56ffa3ca 100644 --- a/src/main/webapp/js/diagramly/Trees.js +++ b/src/main/webapp/js/diagramly/Trees.js @@ -7,8 +7,6 @@ /** * Defines resources. */ - var moveImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/move.png' : - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg=='; EditorUi.prototype.altShiftActions[68] = 'selectDescendants'; // Alt+Shift+D /** @@ -164,7 +162,7 @@ var sib = graph.getOutgoingEdges(cell); menu.addSeparator(); - if (sib != null && sib.length > 0) + if (sib.length > 0) { if (isTreeVertex(graph.getSelectionCell())) { @@ -1100,7 +1098,8 @@ { var cells = [initialCell]; - if ((isTreeMoving(initialCell) || isTreeVertex(initialCell)) && !hasLayoutParent(initialCell)) + if ((isTreeMoving(initialCell) || isTreeVertex(initialCell)) && + !hasLayoutParent(initialCell)) { // Gets the subtree from cell downwards graph.traverse(initialCell, true, function(vertex, edge) @@ -1122,7 +1121,6 @@ return cells; }; - var vertexHandlerInit = mxVertexHandler.prototype.init; @@ -1130,14 +1128,11 @@ { vertexHandlerInit.apply(this, arguments); - var parent = this.graph.model.getParent(this.state.cell); - var pstate = this.graph.view.getState(parent); - - if ((isTreeMoving(this.state.cell) || isTreeVertex(this.state.cell)) && - (pstate == null || pstate.style['childLayout'] != 'flowLayout') && - this.graph.getOutgoingEdges(this.state.cell).length > 0) + if (((isTreeMoving(this.state.cell) || isTreeVertex(this.state.cell)) && + !hasLayoutParent(this.state.cell)) && this.graph.getOutgoingEdges( + this.state.cell).length > 0) { - this.moveHandle = mxUtils.createImage(moveImage); + this.moveHandle = mxUtils.createImage(Editor.moveImage); this.moveHandle.setAttribute('title', 'Move Subtree'); this.moveHandle.style.position = 'absolute'; this.moveHandle.style.cursor = 'pointer'; @@ -1147,7 +1142,9 @@ mxEvent.addGestureListeners(this.moveHandle, mxUtils.bind(this, function(evt) { - this.graph.graphHandler.start(this.state.cell, mxEvent.getClientX(evt), mxEvent.getClientY(evt), this.graph.getSubtree(this.state.cell)); + this.graph.graphHandler.start(this.state.cell, + mxEvent.getClientX(evt), mxEvent.getClientY(evt), + this.graph.getSubtree(this.state.cell)); this.graph.graphHandler.cellWasClicked = true; this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt); this.graph.isMouseDown = true; diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js index 1bc7b9638..abdd1b279 100644 --- a/src/main/webapp/js/extensions.min.js +++ b/src/main/webapp/js/extensions.min.js @@ -4,121 +4,123 @@ b.t.replace(/>/g,">"),b.t;if(null!=b.Value&&null!=b.Value.t)return b.Value.t= d(g)+p(g)+y(g)+z(g)+x(g)+A(g)+C(g)+H(g)}function f(a,b,d,g){var p="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(p=";");return p+=e(mxConstants.STYLE_FONTSIZE,a,b,d,g)+e(mxConstants.STYLE_FONTCOLOR,a,b,d,g)+e(mxConstants.STYLE_FONTSTYLE,a,b,d,g)+e(mxConstants.STYLE_ALIGN,a,b,d,g)+e(mxConstants.STYLE_SPACING_LEFT,a,b,d,g)+e(mxConstants.STYLE_SPACING_RIGHT,a,b,d,g)+e(mxConstants.STYLE_SPACING_TOP,a,b,d,g)+e(mxConstants.STYLE_SPACING_BOTTOM,a,b,d,g)+e(mxConstants.STYLE_SPACING,a,b,d,g)+e(mxConstants.STYLE_VERTICAL_ALIGN, a,b,d,g)+e(mxConstants.STYLE_STROKECOLOR,a,b,d,g)+e(mxConstants.STYLE_OPACITY,a,b,d,g)+e(mxConstants.STYLE_ROUNDED,a,b,d,g)+e(mxConstants.STYLE_ROTATION,a,b,d,g)+e(mxConstants.STYLE_FLIPH,a,b,d,g)+e(mxConstants.STYLE_FLIPV,a,b,d,g)+e(mxConstants.STYLE_SHADOW,a,b,d,g)+e(mxConstants.STYLE_FILLCOLOR,a,b,d,g)+e(mxConstants.STYLE_DASHED,a,b,d,g)+e(mxConstants.STYLE_STROKEWIDTH,a,b,d,g)+e(mxConstants.STYLE_IMAGE,a,b,d,g)}function e(g,c,e,f,h){a:{if(null!=c&&null!=g){if(c.includes(";"+g+"=")){c=!0;break a}if(c.substring(0, g.length+1)==g+"="){c=!0;break a}}c=!1}if(!c)switch(g){case mxConstants.STYLE_FONTSIZE:return b(e);case mxConstants.STYLE_FONTCOLOR:return a(e);case mxConstants.STYLE_FONTSTYLE:return d(e);case mxConstants.STYLE_ALIGN:return p(e);case mxConstants.STYLE_SPACING_LEFT:return y(e);case mxConstants.STYLE_SPACING_RIGHT:return z(e);case mxConstants.STYLE_SPACING_TOP:return x(e);case mxConstants.STYLE_SPACING_BOTTOM:return A(e);case mxConstants.STYLE_SPACING:return C(e);case mxConstants.STYLE_VERTICAL_ALIGN:return H(e); -case mxConstants.STYLE_STROKECOLOR:return B(e,f);case mxConstants.STYLE_OPACITY:return E(e,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=e.Rounding&&0<e.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*e.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return g="",null!=e.Rotation&&(e=mxUtils.toDegree(parseFloat(e.Rotation)),c=!0,"AdvancedSwimLaneBlockRotated"==f.Class?(e+=90,h.geometry.rotate90(),c=!1):0<=mxUtils.indexOf(tb,f.Class)?(e-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(ob, -f.Class)&&(e+=180),0!=e&&(g+="rotation="+e+";"),c||(g+="horizontal=0;")),g;case mxConstants.STYLE_FLIPH:return f=e.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=e.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return F(e);case mxConstants.STYLE_FILLCOLOR:return M(e,f);case mxConstants.STYLE_DASHED:return ba(e);case mxConstants.STYLE_STROKEWIDTH:return T(e);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+e.URL+";":"UserImage2Block"==f.Class&&null!=e.ImageFillProps&& +case mxConstants.STYLE_STROKECOLOR:return B(e,f);case mxConstants.STYLE_OPACITY:return E(e,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=e.Rounding&&0<e.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*e.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return g="",null!=e.Rotation&&(e=mxUtils.toDegree(parseFloat(e.Rotation)),c=!0,"AdvancedSwimLaneBlockRotated"==f.Class?(e+=90,h.geometry.rotate90(),c=!1):0<=mxUtils.indexOf(sb,f.Class)?(e-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Ea, +f.Class)&&(e+=180),0!=e&&(g+="rotation="+e+";"),c||(g+="horizontal=0;")),g;case mxConstants.STYLE_FLIPH:return f=e.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=e.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return F(e);case mxConstants.STYLE_FILLCOLOR:return M(e,f);case mxConstants.STYLE_DASHED:return ca(e);case mxConstants.STYLE_STROKEWIDTH:return Q(e);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+e.URL+";":"UserImage2Block"==f.Class&&null!=e.ImageFillProps&& null!=e.ImageFillProps.url?"image="+e.ImageFillProps.url+";":"",f}return""}function b(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function a(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function d(a){return g(m(a))}function g(a){if(null!=a){var b=0,d=!1; -if(null!=a)for(var g=0;!d&&g<a.length;){var p=a[g];"b"==p.n&&null!=p.v&&p.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"i"==p.n&&null!=p.v&&p.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"u"==p.n&&null!=p.v&&p.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function p(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function y(a){var b=m(a);if(null!=b)for(var d=0;d<b.length;){var g= -b[d];if(null!=g.v){if("il"==g.n)return"spacingLeft="+.6*g.v+";";p(a)}d++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function A(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"=== -typeof a.InsetMargin?"spacing="+parseInt(a.InsetMargin)+";":""}function H(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":ca(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function B(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":ca(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function E(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var g="0x"+a.LineColor.substring(a.LineColor.length- -2,a.LineColor.length);b+="strokeOpacity="+Math.round(parseInt(g)/2.55)+";"}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function F(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function M(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return ca(mxConstants.STYLE_FILLCOLOR, -a.FillColor.cs[0].c.substring(0,7))+ca(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?ca(mxConstants.STYLE_FILLCOLOR,a.FillColor.substring(0,7),"#FFFFFF"):ca(mxConstants.STYLE_FILLCOLOR,"none");return""}function ba(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0, -6)?"dashed=1;":""}function T(a){return ca(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(a.LineWidth),"1")}function O(a,b,d,g){for(var p=b,c=0;null!=g.getAttributeForCell(a,p);)c++,p=b+"_"+c;g.setAttributeForCell(a,p,null!=d?d:"")}function ga(a,b,d,g,p){var e=n(b);if(null!=e){var h=Da[e.Class];null!=h&&(a.style+=h+";");h=null!=e.Properties?e.Properties:e;if(null!=h){a.value=c(h);a.style+=f(a.style,h,e,a);a.style.includes("strokeColor")||(a.style+=B(h,e));if(null!=h.Link&&0<h.Link.length&&"ext"==h.Link[0].tp)d.setAttributeForCell(a, -"link",h.Link[0].url);else if(null!=h.Text){a:{e=m(h.Text);if(null!=e)for(var y=0;y<e.length;y++)if(e[y].n=null!=e[y].v&&0<e[y].v.length&&"ext"==e[y].v[0].tp){e=e[y].v[0].url;break a}e=null}null!=e&&d.setAttributeForCell(a,"link",e)}var e=[],y=d.convertValueToString(a),x=!1;if(null!=y){for(var z=0;match=pb.exec(y);){var k=match[0],x=!0;if(2<k.length){var A=k.substring(2,k.length-2);"documentName"==A?A="filename":"date:"==A.substring(0,5)?A="date{"+A.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"== -A.substring(0,9)&&(A="date{"+A.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");A="%"+A+"%";e.push(y.substring(z,match.index)+(null!=A?A:k));z=match.index+k.length}}x&&(e.push(y.substring(z)),d.setAttributeForCell(a,"label",e.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var u in h)if(h.hasOwnProperty(u)&&u.toString().startsWith("ShapeData_"))try{var C=h[u],H=mxUtils.trim(C.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/, -"");O(a,H,C.Value,d)}catch(sc){window.console&&console.log("Ignored "+u+":",sc)}if(a.edge){a.style=null!=h.Rounding?a.style+("rounded=1;arcSize="+h.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=h.Shape)if(null!=h.ElbowPoints)for(a.geometry.points=[],u=0;u<h.ElbowPoints.length;u++)a.geometry.points.push(new mxPoint(Math.round(.6*h.ElbowPoints[u].x+0),Math.round(.6*h.ElbowPoints[u].y+0)));else"elbow"==h.Shape?a.style=null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;": -a.style+"edgeStyle=elbowEdgeStyle;":null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==h.Shape&&(a.style+="curved=1;"));null!=h.Endpoint1.Style&&(null!=Ja[h.Endpoint1.Style]?a.style+="startArrow="+Ja[h.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+h.Endpoint1.Style));null!=h.Endpoint2.Style&&(null!=Ja[h.Endpoint2.Style]?a.style+="endArrow="+Ja[h.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+ -h.Endpoint2.Style));C=!1;if(null==h.ElbowPoints&&null!=h.Endpoint1.Block&&h.Endpoint1.Block==h.Endpoint2.Block)if(null!=h.ElbowControlPoints)for(a.geometry.points=[],u=0;u<h.ElbowControlPoints.length;u++)p=h.ElbowControlPoints[u],a.geometry.points.push(new mxPoint(Math.round(.6*p.x+0),Math.round(.6*p.y+0)));else null!=g&&null!=p&&(g=new mxPoint(Math.round(g.geometry.x+g.geometry.width*h.Endpoint1.LinkX),Math.round(g.geometry.y+g.geometry.height*h.Endpoint1.LinkY)),p=new mxPoint(Math.round(p.geometry.x+ -p.geometry.width*h.Endpoint2.LinkX),Math.round(p.geometry.y+p.geometry.height*h.Endpoint2.LinkY)),a.geometry.points=[new mxPoint(g.x+20,g.y),new mxPoint(p.x+20,p.y)],C=!0);ia(a,h.Endpoint1,!0,C);ia(a,h.Endpoint2,!1,C)}}}null!=b.id&&O(a,"lucidchartObjectId",b.id,d)}function Z(a,b){var d=n(a).Properties.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+0),Math.round(.6*d.y+ -0),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;ga(v,a,b);return v}function Y(a,b,d){var p=2*(parseFloat(a.Location)-.5);d=mxCell;var e=c(a),p=new mxGeometry(p,0,0,0),y="11",f="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var f=g(a.Value.m),x=0;x<a.Value.m.length;x++)"s"==a.Value.m[x].n?y=.6*parseFloat(a.Value.m[x].v):"c"==a.Value.m[x].n&&(f+="fontColor="+a.Value.m[x].v+";");a=new d(e,p,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+ -(f+";fontSize="+y+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function ca(a,b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function ia(a,b,d,g){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(g?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function Ea(a,b,d,g,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var g=null!=d.Endpoint1.Block?y[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block? -y[d.Endpoint2.Block]:null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;ga(c,b,a,g,p);var e=n(b).Properties,f=null!=e?e.TextAreas:b.TextAreas;if(null!=f){for(var l=0;null!=f["t"+l];){var x=f["t"+l];c=Y(x,c);l++}for(l=0;null!=f["m"+l]||1>l;)x=f["m"+l],null!=x&&(c=Y(x,c,b)),l++;null!=f.Text&&(c=Y(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=Y(f.Message,c,b))}null==g&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6* -d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);h.push(a.addCell(c,null,null,g,p))},h=[],y={},f=[],x=[],z=0;if(null!=b.Groups)for(var k in b.Groups){var A=b.Groups[k];A.id=k;if(1==A.Hidden&&null!=A.Members){0>mxUtils.indexOf(x,k)&&x.push(k);for(var m in A.Members)x=Eb(m,b.Groups,x)}}if(null!=b.Blocks)for(k in b.Blocks)A=b.Blocks[k],A.id=k,0>mxUtils.indexOf(x,k)&&(m=!1, -null!=Da[A.Class]&&"mxCompositeShape"==Da[A.Class]&&(y[A.id]=Pa(A,h,a),f.push(A),m=!0),m||(y[A.id]=Z(A,a),f.push(A)));else for(z=0;z<b.Objects.length;z++)A=b.Objects[z],null!=A.Action&&"mxCompositeShape"==Da[A.Action.Class]?y[A.id]=Pa(A,h,a):A.IsBlock&&null!=A.Action&&null!=A.Action.Properties&&(y[A.id]=Z(A,a)),f.push(A);if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(x,k)&&(A=b.Lines[k],A.id=k,f.push(A));f.sort(function(a,b){a=n(a);b=n(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder, -g=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=g?d-g:0});for(z=0;z<f.length;z++){var A=f[z],u=y[A.id];null!=u?h.push(a.addCell(u)):A.IsLine&&null!=A.Action&&null!=A.Action.Properties?e(A,A.Action.Properties):null!=A.StrokeStyle&&e(A,A)}if(p&&null!=d&&null!=g){a.isGridEnabled()&&(d=a.snap(d),g=a.snap(g));var l=a.getBoundingBoxFromGeometry(h,!0);null!=l&&a.moveCells(h,d-l.x,g-l.y)}c||a.setSelectionCells(h)}finally{a.getModel().endUpdate()}}function da(){var a=new Graph;a.setExtendParents(!1); -a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function Ka(a,b,d,g,p,c,e,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);g.push(p.addCell(d,null,null,null,null))}function oa(a,b,d,g,p,c,e,y,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("", -new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);y=[d];p=p.clone();a.insertEdge(p,!0);d.insertEdge(p,!1);y.push(p);c.push(e.addCell(p,null,null,null,null))}function fa(a,b,d,g,p,e){g.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";g.style+=f(g.style,p,e,g);b=c(p);g.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;"); -a.style+=f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;g.insert(a)}function ja(a,b,d,g,p,e,y,x){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,y,x,e);e.value=c(y);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*g*b,.7*g*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;"); -a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*g*.35,10+(1-d)*g*.35);a.vertex=!0;a.style+=f(a.style,y,x,a);e.insert(a)}function Pa(g,e,m){var u=n(g),h=u.Properties,O=h.BoundingBox,t=Math.round(.6*O.w),r=Math.round(.6*O.h),Z=Math.round(.6*O.x+0),Y=Math.round(.6*O.y+0);null==g.Class||"GCPInputDatabase"!==g.Class&&"GCPInputRecord"!==g.Class&&"GCPInputPayment"!==g.Class&&"GCPInputGateway"!==g.Class&&"GCPInputLocalCompute"!==g.Class&&"GCPInputBeacon"!==g.Class&&"GCPInputStorage"!==g.Class&&"GCPInputList"!== -g.Class&&"GCPInputStream"!==g.Class&&"GCPInputMobileDevices"!==g.Class&&"GCPInputCircuitBoard"!==g.Class&&"GCPInputLive"!==g.Class&&"GCPInputUsers"!==g.Class&&"GCPInputLaptop"!==g.Class&&"GCPInputApplication"!==g.Class&&"GCPInputLightbulb"!==g.Class&&"GCPInputGame"!==g.Class&&"GCPInputDesktop"!==g.Class&&"GCPInputDesktopAndMobile"!==g.Class&&"GCPInputWebcam"!==g.Class&&"GCPInputSpeaker"!==g.Class&&"GCPInputRetail"!==g.Class&&"GCPInputReport"!==g.Class&&"GCPInputPhone"!==g.Class&&"GCPInputBlank"!== -g.Class||(r+=20);v=new mxCell("",new mxGeometry(Z,Y,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(null!=g.Class?g.Class:null!=u?u.Class:null){case "BraceNoteBlock":case "UI2BraceNoteBlock":var ia=!1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(ia=!0);var Ea=null,da=null;ia?(Ea=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),da=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(Ea=new mxCell("",new mxGeometry(0,0,.125*r, -r),"shape=curlyBracket;rounded=1;flipH=1;"),da=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);Ea.vertex=!0;v.insert(Ea);Ea.style+=f(Ea.style,h,u,Ea);da.vertex=!0;da.value=c(h);v.insert(da);da.style+=f(da.style,h,u,da);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var ca=0;null!=h.Lanes&&(ca=h.Lanes.length);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style, -h,u,v);for(var tb=0,Da=[],l=0;l<ca;l++){var Pa=parseFloat(h.Lanes[l].p);Da.push(new mxCell("",new mxGeometry(t*tb,0,t*Pa,r),"shape=swimlane;startSize=25;"));Da[l].vertex=!0;v.insert(Da[l]);Da[l].value=c(h["Lane_"+l]);Da[l].style+=f(Da[l].style,h,u,Da[l])+b(h["Lane_"+l])+a(h["Lane_"+l])+d(h["Lane_"+l])+p(h["Lane_"+l],Da[l])+y(h["Lane_"+l])+z(h["Lane_"+l])+x(h["Lane_"+l])+A(h["Lane_"+l])+C(h["Lane_"+l])+H(h["Lane_"+l]);tb+=Pa}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; -var Ja=null,ob=null,Db=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ja=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(ob=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Db=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"== -h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ja=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&(ob=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Db=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));Ja.vertex=!0;v.insert(Ja);"Dark"==h.Scheme?Ja.style+= -"fillColor=#111111;":"Light"==h.Scheme&&(Ja.style+="fillColor=#ffffff;");null!=ob&&(ob.vertex=!0,v.insert(ob));null!=Db&&(Db.vertex=!0,v.insert(Db))}v.style+=f(v.style,h,u,v);break;case "AndroidAlertDialog":var Oa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Oa.vertex=!0;v.insert(Oa);var ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");ma.vertex=!0;v.insert(ma);var pb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); -pb.vertex=!0;v.insert(pb);var qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);var ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);Oa.value=c(h.DialogTitle);Oa.style+=k(h.DialogTitle);pb.value=c(h.DialogText);pb.style+=k(h.DialogText);qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+= -"strokeColor=#353535;",ra.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,h,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Oa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(h.DialogTitle);Oa.style+=k(h.DialogTitle);ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;"); -ma.vertex=!0;v.insert(ma);qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);var sb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");sb.vertex=!0;v.insert(sb);var ub=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;"); -ub.vertex=!0;v.insert(ub);var vb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");vb.vertex=!0;v.insert(vb);var Fb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(h.Label_1);Fb.style+=k(h.Label_1);var Gb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(h.Label_0);Gb.style+=k(h.Label_0);var wb=null;"AndroidDateDialog"==g.Class&& -(wb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),wb.vertex=!0,v.insert(wb),wb.value=c(h.Label_2),wb.style+=k(h.Label_2));var Qa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var Ra=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ra.vertex=!0;v.insert(Ra);var Eb=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Eb.vertex=!0;v.insert(Eb); -var Hb=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(h.Label_4);Hb.style+=k(h.Label_4);var xb=null;"AndroidTimeDialog"==g.Class&&(xb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),xb.vertex=!0,v.insert(xb),xb.value=c(h.Label_Colon),xb.style+=k(h.Label_Colon));var Ib=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(h.Label_3); -Ib.style+=k(h.Label_3);var Jb=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=c(h.Label_5);Jb.style+=k(h.Label_5);var jc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");jc.vertex=!0;v.insert(jc);var kc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var lc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;"); -lc.vertex=!0;v.insert(lc);var Kb=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=c(h.Label_7);Kb.style+=k(h.Label_7);var Lb=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Lb.vertex=!0;v.insert(Lb);Lb.value=c(h.Label_6);Lb.style+=k(h.Label_6);var Mb=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(h.Label_8);Mb.style+=k(h.Label_8); -var yb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");yb.vertex=!0;v.insert(yb);var zb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");zb.vertex=!0;v.insert(zb);var Ab=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Ab.vertex=!0;v.insert(Ab);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+="strokeColor=#353535;",ra.style+="strokeColor=#353535;",sb.style+="strokeColor=none;fillColor=#7E7E7E;", -ub.style+="strokeColor=none;fillColor=#7E7E7E;",vb.style+="strokeColor=none;fillColor=#7E7E7E;",yb.style+="strokeColor=none;fillColor=#7E7E7E;",zb.style+="strokeColor=none;fillColor=#7E7E7E;",Ab.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;",sb.style+="strokeColor=none;fillColor=#939393;",ub.style+="strokeColor=none;fillColor=#939393;",vb.style+="strokeColor=none;fillColor=#939393;", -yb.style+="strokeColor=none;fillColor=#939393;",zb.style+="strokeColor=none;fillColor=#939393;",Ab.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,h,u,v);break;case "AndroidListItems":var xa=r,gb=0;if(h.ShowHeader){var gb=8,Nb=new mxCell("",new mxGeometry(0,0,t,gb),"strokeColor=none;fillColor=none;");Nb.vertex=!0;v.insert(Nb);Nb.value=c(h.Header);Nb.style+=k(h.Header);var xa=xa-gb,mc=new mxCell("",new mxGeometry(0,gb-2,t,4),"shape=line;strokeColor=#999999;");mc.vertex=!0;v.insert(mc)}var Sa= -parseInt(h.Items);0<Sa&&(xa/=Sa);for(var G=[],ma=[],l=0;l<Sa;l++)G[l]=new mxCell("",new mxGeometry(0,gb+l*xa,t,xa),"strokeColor=none;fillColor=none;"),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["Item_"+l]),G[l].style+=k(h["Item_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(0,gb+l*xa-2,t,4),"shape=line;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+"strokeColor=#ffffff;":ma[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;": -v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidTabs":var Ta=parseInt(h.Tabs),Fa=t;0<Ta&&(Fa/=Ta);for(var ea=[],ma=[],l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;fillColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(l*Fa-2,.2*r,4,.6*r),"shape=line;direction=north;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+ -"strokeColor=#484848;":ma[l].style+"strokeColor=#CCCCCC;");var nc=new mxCell("",new mxGeometry(h.Selected*Fa+2,r-3,Fa-4,3),"strokeColor=none;fillColor=#33B5E5;");nc.vertex=!0;v.insert(nc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=f(v.style,h,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Ob= -new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");Ob.vertex=!0;v.insert(Ob);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=f(v.style,h,u,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;"; +if(null!=a)for(var g=0;!d&&g<a.length;){var p=a[g];"b"==p.n?null!=p.v&&p.v&&(d=!0,b+=1):"fc"==p.n&&"Bold"==p.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"i"==p.n&&null!=p.v&&p.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"u"==p.n&&null!=p.v&&p.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function p(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function y(a){var b=m(a);if(null!= +b)for(var d=0;d<b.length;){var g=b[d];if(null!=g.v){if("il"==g.n)return"spacingLeft="+.6*g.v+";";p(a)}d++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function A(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+ +";";b++}return""}function C(a){return"number"===typeof a.InsetMargin?"spacing="+Math.max(0,Math.round(.6*parseInt(a.InsetMargin)))+";":""}function H(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":S(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function B(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":S(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function E(a,b,d){b="";if("string"===typeof a.LineColor&& +7<a.LineColor.length){var g="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length);b+="strokeOpacity="+Math.round(parseInt(g)/2.55)+";"}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function F(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function M(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!= +a.FillColor.cs&&1<a.FillColor.cs.length)return S(mxConstants.STYLE_FILLCOLOR,a.FillColor.cs[0].c.substring(0,7))+S(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?S(mxConstants.STYLE_FILLCOLOR,a.FillColor.substring(0,7),"#FFFFFF"):S(mxConstants.STYLE_FILLCOLOR,"none");return""}function ca(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;": +null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function Q(a){return S(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function O(a,b,d,g){for(var p=b,c=0;null!=g.getAttributeForCell(a,p);)c++,p=b+"_"+c;g.setAttributeForCell(a,p,null!=d?d:"")}function fa(a,b,d,g,p,e){var h=n(b);if(null!=h){var y=ob[h.Class];null!=y&&(a.style+=y+";");y=null!=h.Properties?h.Properties:h;if(null!=y){a.value=e?"":c(y);a.style+=f(a.style,y,h,a);a.style.includes("strokeColor")|| +(a.style+=B(y,h));if(null!=y.Link&&0<y.Link.length&&"ext"==y.Link[0].tp)d.setAttributeForCell(a,"link",y.Link[0].url);else if(null!=y.Text){a:{e=m(y.Text);if(null!=e)for(h=0;h<e.length;h++)if(e[h].n=null!=e[h].v&&0<e[h].v.length&&"ext"==e[h].v[0].tp){e=e[h].v[0].url;break a}e=null}null!=e&&d.setAttributeForCell(a,"link",e)}e=[];var h=d.convertValueToString(a),x=!1;if(null!=h){for(var z=0;match=Zb.exec(h);){var k=match[0],x=!0;if(2<k.length){var A=k.substring(2,k.length-2);"documentName"==A?A="filename": +"date:"==A.substring(0,5)?A="date{"+A.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==A.substring(0,9)&&(A="date{"+A.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");A="%"+A+"%";e.push(h.substring(z,match.index)+(null!=A?A:k));z=match.index+k.length}}x&&(e.push(h.substring(z)),d.setAttributeForCell(a,"label",e.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var u in y)if(y.hasOwnProperty(u)&&u.toString().startsWith("ShapeData_"))try{var C= +y[u],H=mxUtils.trim(C.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");O(a,H,C.Value,d)}catch(Bc){window.console&&console.log("Ignored "+u+":",Bc)}if(a.edge){a.style=null!=y.Rounding?a.style+("rounded=1;arcSize="+y.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=y.Shape)if(null!=y.ElbowPoints)for(a.geometry.points=[],u=0;u<y.ElbowPoints.length;u++)a.geometry.points.push(new mxPoint(Math.round(.6*y.ElbowPoints[u].x+Q),Math.round(.6*y.ElbowPoints[u].y+E)));else"elbow"==y.Shape? +a.style=null!=y.Endpoint1.Block&&null!=y.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=y.Endpoint1.Block&&null!=y.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==y.Shape&&(a.style+="curved=1;"));null!=y.Endpoint1.Style&&(null!=pb[y.Endpoint1.Style]?a.style+="startArrow="+pb[y.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+y.Endpoint1.Style));null!=y.Endpoint2.Style&&(null!=pb[y.Endpoint2.Style]? +a.style+="endArrow="+pb[y.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+y.Endpoint2.Style));E=!1;if(null==y.ElbowPoints&&null!=y.Endpoint1.Block&&y.Endpoint1.Block==y.Endpoint2.Block)if(null!=y.ElbowControlPoints)for(a.geometry.points=[],u=0;u<y.ElbowControlPoints.length;u++)p=y.ElbowControlPoints[u],a.geometry.points.push(new mxPoint(Math.round(.6*p.x+Q),Math.round(.6*p.y+Q)));else if(null!=g&&null!=p){g=new mxPoint(Math.round(g.geometry.x+ +g.geometry.width*y.Endpoint1.LinkX),Math.round(g.geometry.y+g.geometry.height*y.Endpoint1.LinkY));p=new mxPoint(Math.round(p.geometry.x+p.geometry.width*y.Endpoint2.LinkX),Math.round(p.geometry.y+p.geometry.height*y.Endpoint2.LinkY));var Q=g.x==p.x?20:0,E=0;a.geometry.points=[new mxPoint(g.x+Q,g.y+E),new mxPoint(p.x+Q,p.y+E)];implicitX=g.y==p.y;E=g.x==p.x}ha(a,y.Endpoint1,!0,E);ha(a,y.Endpoint2,!1,E)}}}null!=b.id&&O(a,"lucidchartObjectId",b.id,d)}function aa(a,b){var d=n(a).Properties.BoundingBox; +null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+0),Math.round(.6*d.y+0),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;fa(v,a,b);return v}function Z(a,b,d){var p=2*(parseFloat(a.Location)-.5);isNaN(p)&&null!=a.Text&&null!=a.Text.Location&&(p=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var e=c(a),p=new mxGeometry(isNaN(p)?0:p,0,0,0),y="11",f="";if(null!= +a&&null!=a.Value&&null!=a.Value.m)for(var f=g(a.Value.m),x=0;x<a.Value.m.length;x++)"s"==a.Value.m[x].n?y=.6*parseFloat(a.Value.m[x].v):"c"==a.Value.m[x].n&&(f+="fontColor="+a.Value.m[x].v+";");a=new d(e,p,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(f+";fontSize="+y+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function S(a,b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function ha(a,b,d,g,p){null!=b&&null!=b.LinkX&& +null!=b.LinkY&&(a.style+=(g?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(p?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function ib(a,b,d,g,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var g=null!=d.Endpoint1.Block?y[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block?y[d.Endpoint2.Block]:null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;fa(c,b,a,g,p,!0);var e=n(b).Properties,f=null!=e?e.TextAreas: +b.TextAreas;if(null!=f){for(var x=0;null!=f["t"+x];){var z=f["t"+x];c=Z(z,c);x++}for(x=0;null!=f["m"+x]||1>x;)z=f["m"+x],null!=z&&(c=Z(z,c,b)),x++;null!=f.Text&&(c=Z(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=Z(f.Message,c,b))}null==g&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)), +!1);h.push(a.addCell(c,null,null,g,p))},h=[],y={},f=[],x=[],z=0;if(null!=b.Groups)for(var k in b.Groups){var A=b.Groups[k];A.id=k;if(1==A.Hidden&&null!=A.Members){0>mxUtils.indexOf(x,k)&&x.push(k);for(var m in A.Members)x=$b(m,b.Groups,x)}}if(null!=b.Blocks)for(k in b.Blocks)A=b.Blocks[k],A.id=k,0>mxUtils.indexOf(x,k)&&(m=!1,null!=ob[A.Class]&&"mxCompositeShape"==ob[A.Class]&&(y[A.id]=sa(A,h,a),f.push(A),m=!0),m||(y[A.id]=aa(A,a),f.push(A)));else for(z=0;z<b.Objects.length;z++)A=b.Objects[z],null!= +A.Action&&"mxCompositeShape"==ob[A.Action.Class]?y[A.id]=sa(A,h,a):A.IsBlock&&null!=A.Action&&null!=A.Action.Properties&&(y[A.id]=aa(A,a)),f.push(A);if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(x,k)&&(A=b.Lines[k],A.id=k,f.push(A));f.sort(function(a,b){a=n(a);b=n(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,g=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=g?d-g:0});for(z=0;z<f.length;z++){var A=f[z],u=y[A.id];null!=u?h.push(a.addCell(u)):A.IsLine&&null!=A.Action&& +null!=A.Action.Properties?e(A,A.Action.Properties):null!=A.StrokeStyle&&e(A,A)}if(p&&null!=d&&null!=g){a.isGridEnabled()&&(d=a.snap(d),g=a.snap(g));var C=a.getBoundingBoxFromGeometry(h,!0);null!=C&&a.moveCells(h,d-C.x,g-C.y)}c||a.setSelectionCells(h)}finally{a.getModel().endUpdate()}}function ra(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function Ja(a,b,d,g,p,c,e,y){a=new mxCell("", +new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);g.push(p.addCell(d,null,null,null,null))}function na(a,b,d,g,p,c,e,y,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("",new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);y=[d];p=p.clone();a.insertEdge(p,!0);d.insertEdge(p,!1);y.push(p);c.push(e.addCell(p, +null,null,null,null))}function ea(a,b,d,g,p,e){g.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";g.style+=f(g.style,p,e,g);b=c(p);g.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+=f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5, +-12);a.vertex=!0;g.insert(a)}function ia(a,b,d,g,p,e,y,x){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,y,x,e);e.value=c(y);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*g*b,.7*g*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b* +g*.35,10+(1-d)*g*.35);a.vertex=!0;a.style+=f(a.style,y,x,a);e.insert(a)}function sa(g,e,m){var u=n(g),h=u.Properties,O=h.BoundingBox,t=Math.round(.6*O.w),r=Math.round(.6*O.h),aa=Math.round(.6*O.x+0),Z=Math.round(.6*O.y+0);null==g.Class||"GCPInputDatabase"!==g.Class&&"GCPInputRecord"!==g.Class&&"GCPInputPayment"!==g.Class&&"GCPInputGateway"!==g.Class&&"GCPInputLocalCompute"!==g.Class&&"GCPInputBeacon"!==g.Class&&"GCPInputStorage"!==g.Class&&"GCPInputList"!==g.Class&&"GCPInputStream"!==g.Class&&"GCPInputMobileDevices"!== +g.Class&&"GCPInputCircuitBoard"!==g.Class&&"GCPInputLive"!==g.Class&&"GCPInputUsers"!==g.Class&&"GCPInputLaptop"!==g.Class&&"GCPInputApplication"!==g.Class&&"GCPInputLightbulb"!==g.Class&&"GCPInputGame"!==g.Class&&"GCPInputDesktop"!==g.Class&&"GCPInputDesktopAndMobile"!==g.Class&&"GCPInputWebcam"!==g.Class&&"GCPInputSpeaker"!==g.Class&&"GCPInputRetail"!==g.Class&&"GCPInputReport"!==g.Class&&"GCPInputPhone"!==g.Class&&"GCPInputBlank"!==g.Class||(r+=20);v=new mxCell("",new mxGeometry(aa,Z,t,r),"html=1;whiteSpace=wrap;"); +v.vertex=!0;var ha=!1;switch(null!=g.Class?g.Class:null!=u?u.Class:null){case "BraceNoteBlock":case "UI2BraceNoteBlock":var ib=!1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(ib=!0);var ra=null,S=null;ib?(ra=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),S=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(ra=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),S=new mxCell("",new mxGeometry(.125* +r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);ra.vertex=!0;v.insert(ra);ra.style+=f(ra.style,h,u,ra);S.vertex=!0;S.value=c(h);v.insert(S);S.style+=f(S.style,h,u,S);break;case "AdvancedSwimLaneBlockRotated":ha=!0;case "AdvancedSwimLaneBlock":var sb=0;null!=h.Lanes&&(sb=h.Lanes.length);v.style="html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;horizontalStack=0;resizeParent=1;strokeColor=none;fillColor=none;dropTarget=0;"; +v.style+=f(v.style,h,u,v);var ob=0,sa=[],pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize=25;dropTarget=0;";if(ha)pb+="horizontal=0;";else{var zc=v;v=new mxCell("",new mxGeometry(aa,Z,t,r),"html=1;whiteSpace=wrap;container=1;collapsible=0;strokeColor=none;fillColor=none;dropTarget=0;");v.vertex=!0;zc.insert(v)}for(var Ea=0;Ea<sb;Ea++){var mc=parseFloat(h.Lanes[Ea].p),l=parseInt(h.Lanes[Ea].tid)||Ea;sa.push(new mxCell("",new mxGeometry(t*ob,0,t*mc,r),pb));sa[Ea].vertex= +!0;v.insert(sa[Ea]);sa[Ea].value=c(h["Lane_"+l]);var Zb=sa[Ea],Ac=Zb.style,$b=f(sa[Ea].style,h,u,sa[Ea])+b(h["Lane_"+l])+a(h["Lane_"+l])+d(h["Lane_"+l])+p(h["Lane_"+l],sa[Ea])+y(h["Lane_"+l])+z(h["Lane_"+l])+x(h["Lane_"+l])+A(h["Lane_"+l])+C(h["Lane_"+l])+H(h["Lane_"+l]),nc;var oc=h["HeaderFill_"+l];nc=null!=oc?mxConstants.STYLE_FILLCOLOR+"="+oc.substring(0,7)+";":"";Zb.style=Ac+($b+nc);ob+=mc}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;"; +var jb=null,Db=null,Eb=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",jb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(Db=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Eb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"== +h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",jb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&(Db=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Eb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));jb.vertex=!0;v.insert(jb);"Dark"==h.Scheme?jb.style+= +"fillColor=#111111;":"Light"==h.Scheme&&(jb.style+="fillColor=#ffffff;");null!=Db&&(Db.vertex=!0,v.insert(Db));null!=Eb&&(Eb.vertex=!0,v.insert(Eb))}v.style+=f(v.style,h,u,v);break;case "AndroidAlertDialog":var Na=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Na.vertex=!0;v.insert(Na);var la=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");la.vertex=!0;v.insert(la);var Fb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;"); +Fb.vertex=!0;v.insert(Fb);var pa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");pa.vertex=!0;v.insert(pa);var qa=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);Na.value=c(h.DialogTitle);Na.style+=k(h.DialogTitle);Fb.value=c(h.DialogText);Fb.style+=k(h.DialogText);pa.value=c(h.Button_0);pa.style+=k(h.Button_0);qa.value=c(h.Button_1);qa.style+=k(h.Button_1);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",pa.style+= +"strokeColor=#353535;",qa.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",pa.style+="strokeColor=#E2E2E2;",qa.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,h,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Na=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Na.vertex=!0;v.insert(Na);Na.value=c(h.DialogTitle);Na.style+=k(h.DialogTitle);la=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;"); +la.vertex=!0;v.insert(la);pa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");pa.vertex=!0;v.insert(pa);pa.value=c(h.Button_0);pa.style+=k(h.Button_0);qa=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(h.Button_1);qa.style+=k(h.Button_1);var tb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");tb.vertex=!0;v.insert(tb);var ub=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;"); +ub.vertex=!0;v.insert(ub);var vb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");vb.vertex=!0;v.insert(vb);var Gb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(h.Label_1);Gb.style+=k(h.Label_1);var Hb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(h.Label_0);Hb.style+=k(h.Label_0);var wb=null;"AndroidDateDialog"==g.Class&& +(wb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),wb.vertex=!0,v.insert(wb),wb.value=c(h.Label_2),wb.style+=k(h.Label_2));var Oa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Oa.vertex=!0;v.insert(Oa);var Pa=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Pa.vertex=!0;v.insert(Pa);var pc=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");pc.vertex=!0;v.insert(pc); +var Ib=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(h.Label_4);Ib.style+=k(h.Label_4);var xb=null;"AndroidTimeDialog"==g.Class&&(xb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),xb.vertex=!0,v.insert(xb),xb.value=c(h.Label_Colon),xb.style+=k(h.Label_Colon));var Jb=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=c(h.Label_3); +Jb.style+=k(h.Label_3);var Kb=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=c(h.Label_5);Kb.style+=k(h.Label_5);var qc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");qc.vertex=!0;v.insert(qc);var rc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");rc.vertex=!0;v.insert(rc);var sc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;"); +sc.vertex=!0;v.insert(sc);var Lb=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Lb.vertex=!0;v.insert(Lb);Lb.value=c(h.Label_7);Lb.style+=k(h.Label_7);var Mb=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(h.Label_6);Mb.style+=k(h.Label_6);var Nb=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Nb.vertex=!0;v.insert(Nb);Nb.value=c(h.Label_8);Nb.style+=k(h.Label_8); +var yb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");yb.vertex=!0;v.insert(yb);var zb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");zb.vertex=!0;v.insert(zb);var Ab=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Ab.vertex=!0;v.insert(Ab);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",pa.style+="strokeColor=#353535;",qa.style+="strokeColor=#353535;",tb.style+="strokeColor=none;fillColor=#7E7E7E;", +ub.style+="strokeColor=none;fillColor=#7E7E7E;",vb.style+="strokeColor=none;fillColor=#7E7E7E;",yb.style+="strokeColor=none;fillColor=#7E7E7E;",zb.style+="strokeColor=none;fillColor=#7E7E7E;",Ab.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",pa.style+="strokeColor=#E2E2E2;",qa.style+="strokeColor=#E2E2E2;",tb.style+="strokeColor=none;fillColor=#939393;",ub.style+="strokeColor=none;fillColor=#939393;",vb.style+="strokeColor=none;fillColor=#939393;", +yb.style+="strokeColor=none;fillColor=#939393;",zb.style+="strokeColor=none;fillColor=#939393;",Ab.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,h,u,v);break;case "AndroidListItems":var ya=r,eb=0;if(h.ShowHeader){var eb=8,Ob=new mxCell("",new mxGeometry(0,0,t,eb),"strokeColor=none;fillColor=none;");Ob.vertex=!0;v.insert(Ob);Ob.value=c(h.Header);Ob.style+=k(h.Header);var ya=ya-eb,tc=new mxCell("",new mxGeometry(0,eb-2,t,4),"shape=line;strokeColor=#999999;");tc.vertex=!0;v.insert(tc)}var Qa= +parseInt(h.Items);0<Qa&&(ya/=Qa);for(var G=[],la=[],l=0;l<Qa;l++)G[l]=new mxCell("",new mxGeometry(0,eb+l*ya,t,ya),"strokeColor=none;fillColor=none;"),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["Item_"+l]),G[l].style+=k(h["Item_"+l]),0<l&&(la[l]=new mxCell("",new mxGeometry(0,eb+l*ya-2,t,4),"shape=line;"),la[l].vertex=!0,v.insert(la[l]),la[l].style="Dark"==h.Scheme?la[l].style+"strokeColor=#ffffff;":la[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;": +v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidTabs":var Ra=parseInt(h.Tabs),Fa=t;0<Ra&&(Fa/=Ra);for(var da=[],la=[],l=0;l<Ra;l++)da[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;fillColor=none;"),da[l].vertex=!0,v.insert(da[l]),da[l].value=c(h["Tab_"+l]),da[l].style+=k(h["Tab_"+l]),0<l&&(la[l]=new mxCell("",new mxGeometry(l*Fa-2,.2*r,4,.6*r),"shape=line;direction=north;"),la[l].vertex=!0,v.insert(la[l]),la[l].style="Dark"==h.Scheme?la[l].style+ +"strokeColor=#484848;":la[l].style+"strokeColor=#CCCCCC;");var uc=new mxCell("",new mxGeometry(h.Selected*Fa+2,r-3,Fa-4,3),"strokeColor=none;fillColor=#33B5E5;");uc.vertex=!0;v.insert(uc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=f(v.style,h,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),Math.round(Z+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Pb= +new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");Pb.vertex=!0;v.insert(Pb);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=f(v.style,h,u,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;"; v.style+=f(v.style,h,u,v);break;case "AndroidTextBlock":v.style="Dark"==h.Scheme?h.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(h.Label);v.style+=k(h.Label);v.style+=f(v.style,h,u,v);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+= -"fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var hb=null,hb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");hb.vertex=!0;v.insert(hb);switch(h.HighlightColor){case "Blue":hb.style+="fillColor=#33B5E5;";break;case "Dark Gray":hb.style+="fillColor=#B0B0B0;";break;case "White":hb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Bb= +"fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var fb=null,fb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");fb.vertex=!0;v.insert(fb);switch(h.HighlightColor){case "Blue":fb.style+="fillColor=#33B5E5;";break;case "Dark Gray":fb.style+="fillColor=#B0B0B0;";break;case "White":fb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Bb= new mxCell("",new mxGeometry(20,5,2,r-10),"shape=line;direction=north;");Bb.vertex=!0;v.insert(Bb);switch(h.VlignColor){case "Blue":Bb.style+="strokeColor=#244C5A;";break;case "White":Bb.style+="strokeColor=#ffffff;"}}v.style+=f(v.style,h,u,v);break;case "AndroidButton":v.value=c(h.Label);v.style+=k(h.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=f(v.style, -h,u,v);break;case "AndroidTextBox":v.value=c(h.Label);v.style+=k(h.Label);var Pb=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");Pb.vertex=!0;v.insert(Pb);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Pb.style=h.TextFocused?Pb.style+"strokeColor=#33B5E5;":Pb.style+"strokeColor=#A9A9A9;";v.style+=f(v.style,h,u,v);break;case "AndroidRadioButton":var qb=null;h.Checked&&(qb=new mxCell("",new mxGeometry(.15* -t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),qb.vertex=!0,v.insert(qb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",h.Checked?(qb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(qb.style+="strokeColor=#999999;"));v.style+=f(v.style,h,u,v);break;case "AndroidCheckBox":var cc=null;h.Checked&&(cc=new mxCell("", -new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),cc.vertex=!0,v.insert(cc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked? -v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=f(v.style,h,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,h,u,v);break;case "iOSSegmentedControl":Ta=parseInt(h.Tabs);Fa=t;v.style+="strokeColor=none;fillColor=none;";0<Ta&&(Fa/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor="+ -h.FillColor+";"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),ea[l].style=h.Selected==l?ea[l].style+M(h,u):ea[l].style+"fillColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=f(v.style,h,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5* -r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ob=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+M(h,u));Ob.vertex=!0;v.insert(Ob);v.style+=f(v.style,h,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=f(v.style,h,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var R=new mxCell(c(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;"); -R.vertex=!0;v.insert(R);R.style+=k(h.Text);var za=new mxCell(c(h.Carrier),new mxGeometry(.09*t,0,.2*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.Carrier);v.style+=f(v.style,h,u,v);break;case "iOSSearchBar":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v)+k(h.Search);v.value=c(h.Search);var V=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");V.vertex=!0;v.insert(V);break;case "iOSNavBar":v.style+= -"shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title);R=new mxCell(c(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=k(h.LeftText);za=new mxCell(c(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.RightText);V=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;"); -V.vertex=!0;v.insert(V);break;case "iOSTabs":Ta=parseInt(h.Tabs);Fa=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,h,u,v);0<Ta&&(Fa/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=b(h["Tab_"+l]),ea[l].style+=a(h["Tab_"+l])+d(h["Tab_"+l])+p(h["Tab_"+l])+y(h["Tab_"+l])+z(h["Tab_"+l])+x(h["Tab_"+l])+A(h["Tab_"+l])+C(h["Tab_"+ -l]),ea[l].style+="verticalAlign=bottom;",ea[l].style=h.Selected==l?ea[l].style+"fillColor=#BBBBBB;":ea[l].style+"fillColor=none;";break;case "iOSDatePicker":var Ua=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);var Va=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21);Va.style+=k(h.Option21);var Wa=new mxCell("", -new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);var Xa=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);var Ya=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);var Za=new mxCell("",new mxGeometry(.65* -t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);var sa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);var ta=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);var $a=new mxCell("",new mxGeometry(.65*t,.4* -r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);var ua=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);var va=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);var ab=new mxCell("",new mxGeometry(.5*t,.6*r,.15* -t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option24);ab.style+=k(h.Option24);var bb=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);var cb=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option44);cb.style+=k(h.Option44);var wa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2* -r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);var db=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=c(h.Option25);db.style+=k(h.Option25);var eb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;"); -Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSTimePicker":Ua=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);Va=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21); -Va.style+=k(h.Option21);Xa=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);Ya=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13); -ta=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);ua=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option33);ua.style+=k(h.Option33);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);ab=new mxCell("", -new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option24);ab.style+=k(h.Option24);cb=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option34);cb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);db=new mxCell("",new mxGeometry(.25* -t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=c(h.Option25);db.style+=k(h.Option25);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSCountdownPicker":Wa=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;"); -Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);Za=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);ta=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta); -ta.value=c(h.Option23);ta.style+=k(h.Option23);$a=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);ua=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14); -va.style+=k(h.Option14);bb=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);eb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35); -Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.text)+a(h.text)+d(h.text)+H(h.text);v.style+= -f(v.style,h,u,v);v.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);var la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); -la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+ -.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);var na=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); -V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex= -!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);na=null;switch(h.AccessoryIndicatorType){case "Disclosure":V= -new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);na=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); -la.vertex=!0;v.insert(la);na=new mxCell("",new mxGeometry(.45*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);na=new mxCell("",new mxGeometry(.52*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"); -V.vertex=!0;v.insert(V);na=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:na=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=f(v.style,h,u,v);var Ma=new mxCell("", -new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ma.vertex=!0;v.insert(Ma);Ma.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);Ma.value=c(h.subtext);na=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("", -new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25* -r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";R=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;"); -R.vertex=!0;v.insert(R);R.style+=b(h.text)+a(h.text)+d(h.text);R.value=c(h.text);za=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");za.vertex=!0;v.insert(za);za.style+=b(h["bottom-text"])+a(h["bottom-text"])+d(h["bottom-text"]);za.value=c(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=b(h.text)+a(h.text)+d(h.text);v.value=c(h.text);v.style+=f(v.style, -h,u,v);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var q=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=B(h,u)+M(h,u)+E(h,u,q)+F(h)+T(h);var w=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=B(h,u)+M(h,u)+E(h,u,w)+F(h)+T(h)+k(h);w.value=c(h.Text);h.Future&&(q.style+="dashed=1;",w.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.style+=B(h,u)+M(h,u)+E(h,u,v)+F(h)+T(h)+k(h), +h,u,v);break;case "AndroidTextBox":v.value=c(h.Label);v.style+=k(h.Label);var Qb=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");Qb.vertex=!0;v.insert(Qb);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Qb.style=h.TextFocused?Qb.style+"strokeColor=#33B5E5;":Qb.style+"strokeColor=#A9A9A9;";v.style+=f(v.style,h,u,v);break;case "AndroidRadioButton":var qb=null;h.Checked&&(qb=new mxCell("",new mxGeometry(.15* +t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=1;"),qb.vertex=!0,v.insert(qb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=1;strokeColor=#272727;",h.Checked?(qb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(qb.style+="strokeColor=#999999;"));v.style+=f(v.style,h,u,v);break;case "AndroidCheckBox":var fc=null;h.Checked&&(fc=new mxCell("", +new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),fc.vertex=!0,v.insert(fc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked? +v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=f(v.style,h,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,h,u,v);break;case "iOSSegmentedControl":Ra=parseInt(h.Tabs);Fa=t;v.style+="strokeColor=none;fillColor=none;";0<Ra&&(Fa/=Ra);da=[];la=[];for(l=0;l<Ra;l++)da[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor="+ +h.FillColor+";"),da[l].vertex=!0,v.insert(da[l]),da[l].value=c(h["Tab_"+l]),da[l].style+=k(h["Tab_"+l]),da[l].style=h.Selected==l?da[l].style+M(h,u):da[l].style+"fillColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=f(v.style,h,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(aa),Math.round(Z+.25*r),Math.round(t),Math.round(.5* +r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Pb=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+M(h,u));Pb.vertex=!0;v.insert(Pb);v.style+=f(v.style,h,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=f(v.style,h,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var T=new mxCell(c(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;"); +T.vertex=!0;v.insert(T);T.style+=k(h.Text);var Aa=new mxCell(c(h.Carrier),new mxGeometry(.09*t,0,.2*t,r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.style+=k(h.Carrier);v.style+=f(v.style,h,u,v);break;case "iOSSearchBar":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v)+k(h.Search);v.value=c(h.Search);var W=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");W.vertex=!0;v.insert(W);break;case "iOSNavBar":v.style+= +"shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title);T=new mxCell(c(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");T.vertex=!0;v.insert(T);T.style+=k(h.LeftText);Aa=new mxCell(c(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.style+=k(h.RightText);W=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;"); +W.vertex=!0;v.insert(W);break;case "iOSTabs":Ra=parseInt(h.Tabs);Fa=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,h,u,v);0<Ra&&(Fa/=Ra);da=[];la=[];for(l=0;l<Ra;l++)da[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;"),da[l].vertex=!0,v.insert(da[l]),da[l].value=c(h["Tab_"+l]),da[l].style+=b(h["Tab_"+l]),da[l].style+=a(h["Tab_"+l])+d(h["Tab_"+l])+p(h["Tab_"+l])+y(h["Tab_"+l])+z(h["Tab_"+l])+x(h["Tab_"+l])+A(h["Tab_"+l])+C(h["Tab_"+ +l]),da[l].style+="verticalAlign=bottom;",da[l].style=h.Selected==l?da[l].style+"fillColor=#BBBBBB;":da[l].style+"fillColor=none;";break;case "iOSDatePicker":var Sa=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(h.Option11);Sa.style+=k(h.Option11);var Ta=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(h.Option21);Ta.style+=k(h.Option21);var Ua=new mxCell("", +new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option31);Ua.style+=k(h.Option31);var Va=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option12);Va.style+=k(h.Option12);var Wa=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option22);Wa.style+=k(h.Option22);var Xa=new mxCell("",new mxGeometry(.65* +t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option32);Xa.style+=k(h.Option32);var ta=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option13);ta.style+=k(h.Option13);var ua=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option23);ua.style+=k(h.Option23);var Ya=new mxCell("",new mxGeometry(.65*t,.4* +r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option33);Ya.style+=k(h.Option33);var va=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option43);va.style+=k(h.Option43);var wa=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option14);wa.style+=k(h.Option14);var Za=new mxCell("",new mxGeometry(.5*t,.6*r,.15* +t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option24);Za.style+=k(h.Option24);var $a=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option34);$a.style+=k(h.Option34);var ab=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option44);ab.style+=k(h.Option44);var xa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2* +r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=c(h.Option15);xa.style+=k(h.Option15);var bb=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option25);bb.style+=k(h.Option25);var cb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option35);cb.style+=k(h.Option35);Oa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;"); +Oa.vertex=!0;v.insert(Oa);Pa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Pa.vertex=!0;v.insert(Pa);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSTimePicker":Sa=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Sa.vertex=!0;v.insert(Sa);Sa.value=c(h.Option11);Sa.style+=k(h.Option11);Ta=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ta.vertex=!0;v.insert(Ta);Ta.value=c(h.Option21); +Ta.style+=k(h.Option21);Va=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option12);Va.style+=k(h.Option12);Wa=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option22);Wa.style+=k(h.Option22);ta=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option13);ta.style+=k(h.Option13); +ua=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option23);ua.style+=k(h.Option23);va=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option33);va.style+=k(h.Option33);wa=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option14);wa.style+=k(h.Option14);Za=new mxCell("", +new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option24);Za.style+=k(h.Option24);ab=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option34);ab.style+=k(h.Option34);xa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=c(h.Option15);xa.style+=k(h.Option15);bb=new mxCell("",new mxGeometry(.25* +t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option25);bb.style+=k(h.Option25);Oa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Oa.vertex=!0;v.insert(Oa);Pa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Pa.vertex=!0;v.insert(Pa);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSCountdownPicker":Ua=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;"); +Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option31);Ua.style+=k(h.Option31);Xa=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option32);Xa.style+=k(h.Option32);ta=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option13);ta.style+=k(h.Option13);ua=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua); +ua.value=c(h.Option23);ua.style+=k(h.Option23);Ya=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option33);Ya.style+=k(h.Option33);va=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option43);va.style+=k(h.Option43);wa=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option14); +wa.style+=k(h.Option14);$a=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option34);$a.style+=k(h.Option34);xa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=c(h.Option15);xa.style+=k(h.Option15);cb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option35);cb.style+=k(h.Option35); +Oa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Oa.vertex=!0;v.insert(Oa);Pa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Pa.vertex=!0;v.insert(Pa);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.text)+a(h.text)+d(h.text)+H(h.text);v.style+= +f(v.style,h,u,v);v.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);break;case "DetailDisclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);var ka=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); +ka.vertex=!0;v.insert(ka);break;case "DetailIndicator":ka=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex=!0;v.insert(ka);break;case "CheckMark":W=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),W.vertex=!0,v.insert(W)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+ +.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);var ma=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");ma.vertex=!0;v.insert(ma);ma.style+=b(h.text)+a(h.text)+d(h.text);ma.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;"); +W.vertex=!0;v.insert(W);break;case "DetailDisclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);ka=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex=!0;v.insert(ka);break;case "DetailIndicator":ka=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex= +!0;v.insert(ka);break;case "CheckMark":W=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),W.vertex=!0,v.insert(W)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);ma=null;switch(h.AccessoryIndicatorType){case "Disclosure":W= +new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);ma=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);ka=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;"); +ka.vertex=!0;v.insert(ka);ma=new mxCell("",new mxGeometry(.45*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":ka=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex=!0;v.insert(ka);ma=new mxCell("",new mxGeometry(.52*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":W=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"); +W.vertex=!0;v.insert(W);ma=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:ma=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}ma.vertex=!0;v.insert(ma);ma.style+=b(h.text)+a(h.text)+d(h.text);ma.value=c(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=f(v.style,h,u,v);var La=new mxCell("", +new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");La.vertex=!0;v.insert(La);La.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);La.value=c(h.subtext);ma=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");ma.vertex=!0;v.insert(ma);ma.style+=b(h.text)+a(h.text)+d(h.text);ma.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":W=new mxCell("", +new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);break;case "DetailDisclosure":W=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");W.vertex=!0;v.insert(W);ka=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex=!0;v.insert(ka);break;case "DetailIndicator":ka=new mxCell("",new mxGeometry(.87*t,.25* +r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");ka.vertex=!0;v.insert(ka);break;case "CheckMark":W=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),W.vertex=!0,v.insert(W)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";T=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;"); +T.vertex=!0;v.insert(T);T.style+=b(h.text)+a(h.text)+d(h.text);T.value=c(h.text);Aa=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");Aa.vertex=!0;v.insert(Aa);Aa.style+=b(h["bottom-text"])+a(h["bottom-text"])+d(h["bottom-text"]);Aa.value=c(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=b(h.text)+a(h.text)+d(h.text);v.value=c(h.text);v.style+=f(v.style, +h,u,v);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var q=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=B(h,u)+M(h,u)+E(h,u,q)+F(h)+Q(h);var w=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=B(h,u)+M(h,u)+E(h,u,w)+F(h)+Q(h)+k(h);w.value=c(h.Text);h.Future&&(q.style+="dashed=1;",w.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.style+=B(h,u)+M(h,u)+E(h,u,v)+F(h)+Q(h)+k(h), v.value=c(h.Text);v.style+=f(v.style,h,u,v);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":q=null;switch(g.Class){case "SMHome":q=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":q= new mxCell("",new mxGeometry(.5*t-.4*r,.19*r,.8*r,.62*r),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":q=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":q=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); break;case "SMSitemap":q=new mxCell("",new mxGeometry(.5*t-.35*r,.2*r,.7*r,.6*r),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":q=new mxCell("",new mxGeometry(.5*t-.3*r,.25*r,.6*r,.5*r),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); break;case "SMAudio":q=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=M(h,u),I=""==I?"#ffffff;":I.replace("fillColor=",""),q=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+ I);break;case "SMCloud":q=new mxCell("",new mxGeometry(.5*t-.4*r,.27*r,.8*r,.46*r),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":q=new mxCell("",new mxGeometry(.5*t-.25*r,.15*r,.5*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":q=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;"); break;case "SMGame":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":q=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}q.vertex=!0;v.insert(q);q.style+=k(h);q.value=c(h.Text);v.style+=f(v.style,h,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;"; -q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(h.Text);w.style+=f(w.style,h,u,w);w.value=c(h.Text);break;case "UMLConstraintBlock":var ib=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");ib.vertex=!0;v.insert(ib);var jb=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");jb.vertex= -!0;v.insert(jb);da=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");da.vertex=!0;da.value=c(h);v.insert(da);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);ib.style+=E(h,u,ib);jb.style+=E(h,u,jb);da.style+=a(h,da);ib.style+=f(ib.style,h,u,ib);jb.style+=f(jb.style,h,u,jb);da.style+=f(da.style,h,u,da);break;case "UMLTextBlock":v.style+="strokeColor=none;"+k(h.Text);v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "BPMNActivity":switch(h.bpmnActivityType){case 1:v.style+= +q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(h.Text);w.style+=f(w.style,h,u,w);w.value=c(h.Text);break;case "UMLConstraintBlock":var gb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");gb.vertex=!0;v.insert(gb);var hb=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");hb.vertex= +!0;v.insert(hb);S=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");S.vertex=!0;S.value=c(h);v.insert(S);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);gb.style+=E(h,u,gb);hb.style+=E(h,u,hb);S.style+=a(h,S);gb.style+=f(gb.style,h,u,gb);hb.style+=f(hb.style,h,u,hb);S.style+=f(S.style,h,u,S);break;case "UMLTextBlock":v.style+="strokeColor=none;"+k(h.Text);v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "BPMNActivity":switch(h.bpmnActivityType){case 1:v.style+= k(h.Text);v.value=c(h.Text);break;case 2:v.style+="shape=ext;double=1;"+k(h.Text);v.value=c(h.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+k(h.Text);v.value=c(h.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+k(h.Text),v.value=c(h.Text)}if(0!=h.bpmnTaskType){switch(h.bpmnTaskType){case 1:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=new mxPoint(4,7);break;case 2:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset= new mxPoint(4,7);break;case 3:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");q.geometry.offset=new mxPoint(4,5);break;case 4:q=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");q.geometry.offset=new mxPoint(4,7);break;case 5:q=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");q.geometry.offset=new mxPoint(4,7);break;case 6:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");q.geometry.offset= -new mxPoint(4,5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Qb=M(h,u),I=B(h,u),I=I.replace("strokeColor","fillColor"),Qb=Qb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Qb&&(Qb="strokeColor=#ffffff;");q.style+=Qb+I+"part=1;"}else q.style+=M(h,u)+B(h,u)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var Rb=0;0!=h.bpmnActivityMarker1&&Rb++;0!=h.bpmnActivityMarker2&& -Rb++;var Aa=0;1==Rb?Aa=-7.5:2==Rb&&(Aa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Aa, --20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Aa,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"), -q.geometry.offset=new mxPoint(Aa,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}2==Rb&&(Aa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5, -1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Aa,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;"); -q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),q.geometry.offset=new mxPoint(Aa,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}v.style+=f(v.style,h,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break; +new mxPoint(4,5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Rb=M(h,u),I=B(h,u),I=I.replace("strokeColor","fillColor"),Rb=Rb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Rb&&(Rb="strokeColor=#ffffff;");q.style+=Rb+I+"part=1;"}else q.style+=M(h,u)+B(h,u)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var Sb=0;0!=h.bpmnActivityMarker1&&Sb++;0!=h.bpmnActivityMarker2&& +Sb++;var Ba=0;1==Sb?Ba=-7.5:2==Sb&&(Ba=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Ba, +-20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Ba,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"), +q.geometry.offset=new mxPoint(Ba,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}2==Sb&&(Ba=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5, +1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Ba,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Ba,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;"); +q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),q.geometry.offset=new mxPoint(Ba,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}v.style+=f(v.style,h,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break; case 2:v.style+="outline=end;"}else switch(h.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(h.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;"; -break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=f(v.style,h,u,v);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=c(h.Text);v.style=0==h.bpmnConversationType?v.style+T(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(q=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),q.geometry.offset=new mxPoint(-6,-17), +break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=f(v.style,h,u,v);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=c(h.Text);v.style=0==h.bpmnConversationType?v.style+Q(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(q=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),q.geometry.offset=new mxPoint(-6,-17), q.style+=M(h,u)+B(h,u),q.geometry.relative=!0,q.vertex=!0,v.insert(q));v.style+=f(v.style,h,u,v);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;";switch(h.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;"; break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=f(v.style,h,u,v);break;case "BPMNData":v.style+="shape=note;size=14;";switch(h.bpmnDataType){case 1:q=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(-6,-15);q.style+=M(h,u)+B(h,u);q.geometry.relative=!0;q.vertex=!0;v.insert(q);break;case 2:q=new mxCell("",new mxGeometry(0, -0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");q.geometry.offset=new mxPoint(3,3);q.style+=M(h,u)+B(h,u);q.geometry.relative=!0;q.vertex=!0;v.insert(q);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";R=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");R.geometry.offset=new mxPoint(0,14);R.geometry.relative=!0;R.vertex=!0;v.insert(R);R.value=c(h.Text);R.style+=k(h);break;case 3:q=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"), -q.geometry.offset=new mxPoint(3,3),q.style+=B(h,u),q.geometry.relative=!0,q.vertex=!0,v.insert(q),I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),q.style+=I,R=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),R.geometry.offset=new mxPoint(0,14),R.geometry.relative=!0,R.vertex=!0,v.insert(R),R.value=c(h.Text),R.style+=k(h)}v.style+=f(v.style,h,u,v);break;case "BPMNBlackPool":v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0, +0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");q.geometry.offset=new mxPoint(3,3);q.style+=M(h,u)+B(h,u);q.geometry.relative=!0;q.vertex=!0;v.insert(q);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";T=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");T.geometry.offset=new mxPoint(0,14);T.geometry.relative=!0;T.vertex=!0;v.insert(T);T.value=c(h.Text);T.style+=k(h);break;case 3:q=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"), +q.geometry.offset=new mxPoint(3,3),q.style+=B(h,u),q.geometry.relative=!0,q.vertex=!0,v.insert(q),I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),q.style+=I,T=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),T.geometry.offset=new mxPoint(0,14),T.geometry.relative=!0,T.vertex=!0,v.insert(T),T.value=c(h.Text),T.style+=k(h)}v.style+=f(v.style,h,u,v);break;case "BPMNBlackPool":v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0, 0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");q.vertex=!0;v.insert(q);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=k(h.Text);w.style+=f(w.style,h,u,w);w.value=c(h.Text);break;case "GSDFDDataStoreBlock":v.style+="shape=partialRectangle;right=0;"+ k(h.Text);v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");q.vertex=!0;v.insert(q);q.style+=k(h.Number);q.style+=f(q.style,h,u,q);q.value=c(h.Number);break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==g.Class?v.value=c(h.Text):"VSMProductionControlBlock"==g.Class&&(v.value=c(h.Resources));v.style+=f(v.style,h,u,v);"VSMDedicatedProcessBlock"== -g.Class&&(q=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),q.geometry.relative=!0,q.geometry.offset=new mxPoint(4,-13),q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q));R=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");R.vertex=!0;v.insert(R);R.value=c(h.Title);R.style+=k(h.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(h.Text); -v.style+=f(v.style,h,u,v);R=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");R.vertex=!0;v.insert(R);R.value=c(h.Resource);R.style+=k(h.Resource);R.style+=f(R.style,h,u,R);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);var xa=r,Sa=parseInt(h.Cells), -N=f("part=1;",h,u,v);0<Sa&&(xa/=Sa);G=[];ma=[];for(l=1;l<=Sa;l++)G[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),N),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["cell_"+l]),G[l].style+=k(h["cell_"+l]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);xa=r;Sa=parseInt(h.Cells);N=f("part=1;fillColor=none;", -h,u,v);0<Sa&&(xa/=Sa);G=[];Ma=[];for(l=1;l<=Sa;l++)G[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*xa,.5*t,xa),"shape=partialRectangle;left=0;"+N),G[l].vertex=!0,v.insert(G[l]),Ma[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),"strokeColor=none;fillColor=none;part=1;"),Ma[l].vertex=!0,v.insert(Ma[l]),Ma[l].value=c(h["cell_"+l]),Ma[l].style+=k(h["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,h,u,v);v.value= +g.Class&&(q=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),q.geometry.relative=!0,q.geometry.offset=new mxPoint(4,-13),q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q));T=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");T.vertex=!0;v.insert(T);T.value=c(h.Title);T.style+=k(h.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(h.Text); +v.style+=f(v.style,h,u,v);T=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");T.vertex=!0;v.insert(T);T.value=c(h.Resource);T.style+=k(h.Resource);T.style+=f(T.style,h,u,T);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);var ya=r,Qa=parseInt(h.Cells), +N=f("part=1;",h,u,v);0<Qa&&(ya/=Qa);G=[];la=[];for(l=1;l<=Qa;l++)G[l]=new mxCell("",new mxGeometry(0,(l-1)*ya,t,ya),N),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["cell_"+l]),G[l].style+=k(h["cell_"+l]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);ya=r;Qa=parseInt(h.Cells);N=f("part=1;fillColor=none;", +h,u,v);0<Qa&&(ya/=Qa);G=[];La=[];for(l=1;l<=Qa;l++)G[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*ya,.5*t,ya),"shape=partialRectangle;left=0;"+N),G[l].vertex=!0,v.insert(G[l]),La[l]=new mxCell("",new mxGeometry(0,(l-1)*ya,t,ya),"strokeColor=none;fillColor=none;part=1;"),La[l].vertex=!0,v.insert(La[l]),La[l].value=c(h["cell_"+l]),La[l].style+=k(h["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,h,u,v);v.value= "FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ N);q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);var D=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);D.value=c(h.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+= "strokeColor=none;fillColor=none;";h.Spotfleet?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30, @@ -129,55 +131,55 @@ new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=ce 0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30,0),w.vertex=!0,v.insert(w)):h.Corporate?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"), q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30,0),w.vertex=!0,v.insert(w)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.style+=f(v.style,h,u,v),v.value=c(h.Title)); break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;"; -v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var W=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");W.vertex=!0;v.insert(W);var aa=[W];W.style+=M(h,u);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;Ka(.5*t,0,S,e,m,aa, -v,W);Ka(.855*t,.145*r,S,e,m,aa,v,W);Ka(t,.5*r,S,e,m,aa,v,W);Ka(.855*t,.855*r,S,e,m,aa,v,W);Ka(.5*t,r,S,e,m,aa,v,W);Ka(.145*t,.855*r,S,e,m,aa,v,W);Ka(0,.5*r,S,e,m,aa,v,W);Ka(.145*t,.145*r,S,e,m,aa,v,W);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";W=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");W.vertex= -!0;v.insert(W);aa=[W];S=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;for(var aa=[W],Sb=t/h.NumTopNodes,l=0;l<h.NumTopNodes;l++)Ka(.5*Sb+l*Sb,0,S,e,m,aa,v,W);Sb=t/h.NumBottomNodes;for(l=0;l<h.NumBottomNodes;l++)Ka(.5*Sb+l*Sb,r,S,e,m,aa,v,W);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);h.ToggleCharge&&(v.style+= +v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var X=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");X.vertex=!0;v.insert(X);var ba=[X];X.style+=M(h,u);var U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");U.geometry.relative=!0;U.edge=!0;Ja(.5*t,0,U,e,m,ba, +v,X);Ja(.855*t,.145*r,U,e,m,ba,v,X);Ja(t,.5*r,U,e,m,ba,v,X);Ja(.855*t,.855*r,U,e,m,ba,v,X);Ja(.5*t,r,U,e,m,ba,v,X);Ja(.145*t,.855*r,U,e,m,ba,v,X);Ja(0,.5*r,U,e,m,ba,v,X);Ja(.145*t,.145*r,U,e,m,ba,v,X);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";X=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");X.vertex= +!0;v.insert(X);ba=[X];U=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");U.geometry.relative=!0;U.edge=!0;for(var ba=[X],Tb=t/h.NumTopNodes,l=0;l<h.NumTopNodes;l++)Ja(.5*Tb+l*Tb,0,U,e,m,ba,v,X);Tb=t/h.NumBottomNodes;for(l=0;l<h.NumBottomNodes;l++)Ja(.5*Tb+l*Tb,r,U,e,m,ba,v,X);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);h.ToggleCharge&&(v.style+= "flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);"EIMessageChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDatatypeChannelBlock"==g.Class?(q= new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIInvalidMessageChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDeadLetterChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),q.geometry.offset= -new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"==g.Class&&(q=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(-10,-7));q.geometry.relative=!0;q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");S.geometry.relative=!0;S.edge=!0;oa(.15*t,.25*r,.85*t,.25*r,S,e,m,aa,v,W);break;case "EIChannelAdapterBlock":v.style+= +new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"==g.Class&&(q=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(-10,-7));q.geometry.relative=!0;q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");U.geometry.relative=!0;U.edge=!0;na(.15*t,.25*r,.85*t,.25*r,U,e,m,ba,v,X);break;case "EIChannelAdapterBlock":v.style+= "verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"); D.geometry.relative=!0;D.geometry.offset=new mxPoint(.4*-t,-10);D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!0);w.insertEdge(K,!1);K.style+=B(h,u);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;"); -J.geometry.relative=!0;J.edge=!0;w.insertEdge(J,!0);D.insertEdge(J,!1);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var Tb= -h.Messages,dc=(r-17)/Tb,w=[],S=[],l=0;l<Tb;l++){var Ub=dc*(l+1)-3;w[l]=new mxCell("",new mxGeometry(t-20,Ub,20,20),"part=1;");w[l].vertex=!0;v.insert(w[l]);switch(g.Class){case "EIMessageBlock":w[l].value=c(h["message_"+(l+1)]);w.style+=k(h["message_"+(l+1)]);break;case "EICommandMessageBlock":w[l].value="C";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":w[l].value="D";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":w[l].value="E",w[l].style+="fontStyle=1;fontSize=11;"}w[l].style+= -f(w[l].style,h,u,w[l]);S[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S[l].geometry.relative=!0;S[l].edge=!0;q.insertEdge(S[l],!1);w[l].insertEdge(S[l],!0);S[l].style+=f(S[l].style,h,u,S[l]);var kb=[];kb.push(new mxPoint(Z+8.5,Y+Ub+10));S[l].geometry.points=kb;e.push(m.addCell(S[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style, -h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");S.geometry.relative=!0;S.edge=!0;oa(0,.5*r,.4*t,.5*r,S,e,m,aa,v,W);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h, -u,v);v.value=c(h.Text);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.85*t,.5*r,K,e,m,aa,v,W);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.85*t,.15*r,J,e,m,aa,v,W);var Q=new mxCell("", -new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");Q.geometry.relative=!0;Q.edge=!0;oa(.05*t,.5*r,.85*t,.85*r,Q,e,m,aa,v,W);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -K.geometry.relative=!0;K.edge=!0;K.style+=B(h,u);oa(.05*t,.5*r,.95*t,.5*r,K,e,m,aa,v,W);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");J.geometry.relative=!0;J.edge=!0;J.style+=B(h,u);oa(.3*t,.1*r,.3*t,.5*r,J,e,m,aa,v,W);Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); -Q.geometry.relative=!0;Q.edge=!0;Q.style+=B(h,u);oa(.7*t,.1*r,.7*t,.5*r,Q,e,m,aa,v,W);var ka=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ka.geometry.relative=!0;ka.edge=!0;ka.style+=B(h,u);oa(.5*t,.5*r,.5*t,.9*r,ka,e,m,aa,v,W);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text); -q=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.45*t,.33*r,.8*t,.33*r,K,e,m,aa,v,W);w=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);J=new mxCell("", -new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.55*t,.67*r,.2*t,.67*r,J,e,m,aa,v,W);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h, +J.geometry.relative=!0;J.edge=!0;w.insertEdge(J,!0);D.insertEdge(J,!1);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var Ub= +h.Messages,gc=(r-17)/Ub,w=[],U=[],l=0;l<Ub;l++){var Vb=gc*(l+1)-3;w[l]=new mxCell("",new mxGeometry(t-20,Vb,20,20),"part=1;");w[l].vertex=!0;v.insert(w[l]);switch(g.Class){case "EIMessageBlock":w[l].value=c(h["message_"+(l+1)]);w.style+=k(h["message_"+(l+1)]);break;case "EICommandMessageBlock":w[l].value="C";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":w[l].value="D";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":w[l].value="E",w[l].style+="fontStyle=1;fontSize=11;"}w[l].style+= +f(w[l].style,h,u,w[l]);U[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");U[l].geometry.relative=!0;U[l].edge=!0;q.insertEdge(U[l],!1);w[l].insertEdge(U[l],!0);U[l].style+=f(U[l].style,h,u,U[l]);var kb=[];kb.push(new mxPoint(aa+8.5,Z+Vb+10));U[l].geometry.points=kb;e.push(m.addCell(U[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style, +h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");U.geometry.relative=!0;U.edge=!0;na(0,.5*r,.4*t,.5*r,U,e,m,ba,v,X);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h, +u,v);v.value=c(h.Text);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;na(.05*t,.5*r,.85*t,.5*r,K,e,m,ba,v,X);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;na(.05*t,.5*r,.85*t,.15*r,J,e,m,ba,v,X);var R=new mxCell("", +new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");R.geometry.relative=!0;R.edge=!0;na(.05*t,.5*r,.85*t,.85*r,R,e,m,ba,v,X);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +K.geometry.relative=!0;K.edge=!0;K.style+=B(h,u);na(.05*t,.5*r,.95*t,.5*r,K,e,m,ba,v,X);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");J.geometry.relative=!0;J.edge=!0;J.style+=B(h,u);na(.3*t,.1*r,.3*t,.5*r,J,e,m,ba,v,X);R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;"); +R.geometry.relative=!0;R.edge=!0;R.style+=B(h,u);na(.7*t,.1*r,.7*t,.5*r,R,e,m,ba,v,X);var ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ja.geometry.relative=!0;ja.edge=!0;ja.style+=B(h,u);na(.5*t,.5*r,.5*t,.9*r,ja,e,m,ba,v,X);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text); +q=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;na(.45*t,.33*r,.8*t,.33*r,K,e,m,ba,v,X);w=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);J=new mxCell("", +new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;na(.55*t,.67*r,.2*t,.67*r,J,e,m,ba,v,X);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h, u,q);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.04*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.2*t,.56*r,.2*t,.32*r),"part=1;");w.vertex=!0;v.insert(w);w.value="A";w.style+="fontStyle=1;fontSize=11;";q.style+=f(q.style,h,u,q);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;"); -K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!1);w.insertEdge(K,!0);K.style+=f(K.style,h,u,K);kb=[];kb.push(new mxPoint(Z+.13*t,Y+.72*r));K.geometry.points=kb;e.push(m.addCell(K,null,null,null,null));D=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");D.vertex=!0;v.insert(D);D.style+=B(h,u)+T(h);D.style+=f(D.style,h,u,D);P=new mxCell("",new mxGeometry(.76*t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=B(h,u)+E(h,u,P)+T(h)+ba(h);P.value= -"B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=f(P.style,h,u,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;D.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=f(J.style,h,u,J);var oc=[];oc.push(new mxPoint(Z+.69*t,Y+.72*r));J.geometry.points=oc;e.push(m.addCell(J,null,null,null,null));Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;"); -Q.geometry.relative=!0;Q.edge=!0;q.insertEdge(Q,!1);D.insertEdge(Q,!0);Q.style+=f(Q.style,h,u,Q);e.push(m.addCell(Q,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;"); -w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.geometry.points=[new mxPoint(Z+.375*t,Y+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("", -new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");w.insertEdge(J,!1);D.insertEdge(J,!0);J.geometry.points=[new mxPoint(Z+.675*t,Y+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;"); +K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!1);w.insertEdge(K,!0);K.style+=f(K.style,h,u,K);kb=[];kb.push(new mxPoint(aa+.13*t,Z+.72*r));K.geometry.points=kb;e.push(m.addCell(K,null,null,null,null));D=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");D.vertex=!0;v.insert(D);D.style+=B(h,u)+Q(h);D.style+=f(D.style,h,u,D);P=new mxCell("",new mxGeometry(.76*t,.56*r,.2*t,.32*r),"part=1;");P.vertex=!0;v.insert(P);P.style+=B(h,u)+E(h,u,P)+Q(h)+ca(h);P.value= +"B";P.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";P.style+=f(P.style,h,u,P);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;D.insertEdge(J,!1);P.insertEdge(J,!0);J.style+=f(J.style,h,u,J);var vc=[];vc.push(new mxPoint(aa+.69*t,Z+.72*r));J.geometry.points=vc;e.push(m.addCell(J,null,null,null,null));R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;"); +R.geometry.relative=!0;R.edge=!0;q.insertEdge(R,!1);D.insertEdge(R,!0);R.style+=f(R.style,h,u,R);e.push(m.addCell(R,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;"); +w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.geometry.points=[new mxPoint(aa+.375*t,Z+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("", +new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");w.insertEdge(J,!1);D.insertEdge(J,!0);J.geometry.points=[new mxPoint(aa+.675*t,Z+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;"); q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("",new mxGeometry(.76* -t,.23*r,.24*t,.16*r),"");D.vertex=!0;v.insert(D);D.style=w.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=w.style;var Yb=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Yb.vertex=!0;v.insert(Yb);Yb.style=w.style;var Zb=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");Zb.vertex=!0;v.insert(Zb);Zb.style=w.style;var $b=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");$b.vertex=!0;v.insert($b);$b.style=w.style;K=new mxCell("", -new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(J,!1);D.insertEdge(J,!0);J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));Q=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(Q,!1);P.insertEdge(Q,!0);Q.edge=!0;Q.style+=f(Q.style,h,u,Q);e.push(m.addCell(Q, -null,null,null,null));ka=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(ka,!1);Yb.insertEdge(ka,!0);ka.edge=!0;ka.style+=f(ka.style,h,u,ka);e.push(m.addCell(ka,null,null,null,null));var lb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(lb,!1);Zb.insertEdge(lb,!0);lb.edge=!0;lb.style+=f(lb.style,h,u,lb);e.push(m.addCell(lb,null,null,null,null));var mb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(mb,!1);$b.insertEdge(mb, -!0);mb.edge=!0;mb.style+=f(mb.style,h,u,mb);e.push(m.addCell(mb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.6*t,.25*r,K,e,m,aa,v,W);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); -J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.6*t,.75*r,J,e,m,aa,v,W);q=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");q.vertex=!0;v.insert(q);q.style+= -f(q.style,h,u,q);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);D=new mxCell("",new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);Q=new mxCell("",new mxGeometry(0, -0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Q.geometry.relative=!0;Q.edge=!0;q.insertEdge(Q,!1);D.insertEdge(Q,!0);Q.style+=f(Q.style,h,u,Q);Q.geometry.points=[new mxPoint(Z+8.5,Y+40)];e.push(m.addCell(Q,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20,20),"part=1;");P.vertex=!0;v.insert(P);P.value=c(h.message_0);P.style+=k(h.message_0);P.style+=f(P.style,h,u,P);ka=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"); -ka.geometry.relative=!0;ka.edge=!0;q.insertEdge(ka,!1);P.insertEdge(ka,!0);ka.style+=f(ka.style,h,u,ka);ka.geometry.points=[new mxPoint(Z+8.5,Y+r-10)];e.push(m.addCell(ka,null,null,null,null));Tb=h.HistoryMessages;dc=(r-75)/Tb;w=[];S=[];for(l=0;l<Tb;l++)Ub=dc*(l+1)+30,w[l]=new mxCell("",new mxGeometry(t-20,Ub,20,20),"part=1;"),w[l].vertex=!0,w[l].value=c(h["message_"+(l+1)]),w.style+=k(h["message_"+(l+1)]),v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]),S[l]=new mxCell("",new mxGeometry(0,0,0,0), -"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),S[l].geometry.relative=!0,S[l].edge=!0,D.insertEdge(S[l],!1),w[l].insertEdge(S[l],!0),S[l].style+=f(S[l].style,h,u,S[l]),kb=[],kb.push(new mxPoint(Z+t-30,Y+Ub+10)),S[l].geometry.points=kb,e.push(m.addCell(S[l],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"; -0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var w=[],pc=.02*t,ec=(t-2*pc)/h.LightCount,qc=.8*ec,l=0;l<h.LightCount;l++)w[l]=new mxCell("",new mxGeometry(pc+ec*l+(ec-qc)/2,.25*r,qc,.75*r),"part=1;shape=ellipse;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]); -break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);for(var q=[],rc=t/h.SinkCount,l=0;l<h.SinkCount;l++)q[l]=new mxCell("",new mxGeometry(rc*l,0,rc,r),"part=1;shape=mxgraph.floorplan.sink_2;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ba=.1*t/h.StallCount,q=new mxCell("",new mxGeometry(0,0,Ba,r),"fillColor=#000000;part=1;");q.vertex=!0;v.insert(q);q.style+= -f(q.style,h,u,q);for(var La=(t-Ba)/h.StallCount,fc=[],Vb=[],Wb=[],Xb=[],I=B(h,u),I=""==I?"#000000;":I.replace("stokreColor=",""),ac="part=1;fillColor="+I,ac=ac+f(ac,h,u,v),gc=f("",h,u,v),l=0;l<h.StallCount;l++)fc[l]=new mxCell("",new mxGeometry((l+1)*La,0,Ba,r),ac),fc[l].vertex=!0,v.insert(fc[l]),Wb[l]=new mxCell("",new mxGeometry(Ba+l*La+.05*(La-Ba),r-.92*(La-Ba),.9*(La-Ba),.92*(La-Ba)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Wb[l].vertex=!0,v.insert(Wb[l]),Wb[l].style+=gc,Vb[l]=new mxCell("", -new mxGeometry(Ba+l*La+.2*(La-Ba),0,.6*(La-Ba),.8*(La-Ba)),"shape=mxgraph.floorplan.toilet;part=1;"),Vb[l].vertex=!0,v.insert(Vb[l]),Vb[l].style+=gc,Xb[l]=new mxCell("",new mxGeometry(Ba+l*La,.42*r,.15*(La-Ba),.12*(La-Ba)),"part=1;"),Xb[l].vertex=!0,v.insert(Xb[l]),Xb[l].style+=gc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Na="edgeStyle=none;endArrow=none;part=1;";Na.style+=f(Na.style,h,u,Na);var I=B(h,u),I=""==I?"#000000;":I.replace("strokeColor=",""),nb="shape=triangle;part=1;fillColor="+ -I,nb=nb+f(nb,h,u,v),K=new mxCell("",new mxGeometry(0,0,0,0),Na);K.geometry.relative=!0;K.edge=!0;oa(0,.5*r,.65*t,.5*r,K,e,m,aa,v,W);for(var L=r/h.numLines,J=[],rb=[],l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Na),J[l].geometry.relative=!0,J[l].edge=!0,oa(.65*t,.5*r,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Na="edgeStyle=none;endArrow=none;part=1;"; -Na.style+=f(Na.style,h,u,Na);I=B(h,u);I=""==I?"#000000;":I.replace("strokeColor=","");nb="shape=triangle;part=1;fillColor="+I;nb+=f(nb,h,u,v);L=r/h.numLines;J=[];rb=[];for(l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Na),J[l].geometry.relative=!0,J[l].edge=!0,oa(0,(l+.5)*L,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; +t,.23*r,.24*t,.16*r),"");D.vertex=!0;v.insert(D);D.style=w.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=w.style;var ac=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");ac.vertex=!0;v.insert(ac);ac.style=w.style;var bc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");bc.vertex=!0;v.insert(bc);bc.style=w.style;var cc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");cc.vertex=!0;v.insert(cc);cc.style=w.style;K=new mxCell("", +new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(J,!1);D.insertEdge(J,!0);J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));R=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(R,!1);P.insertEdge(R,!0);R.edge=!0;R.style+=f(R.style,h,u,R);e.push(m.addCell(R, +null,null,null,null));ja=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(ja,!1);ac.insertEdge(ja,!0);ja.edge=!0;ja.style+=f(ja.style,h,u,ja);e.push(m.addCell(ja,null,null,null,null));var lb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(lb,!1);bc.insertEdge(lb,!0);lb.edge=!0;lb.style+=f(lb.style,h,u,lb);e.push(m.addCell(lb,null,null,null,null));var mb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(mb,!1);cc.insertEdge(mb, +!0);mb.edge=!0;mb.style+=f(mb.style,h,u,mb);e.push(m.addCell(mb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;na(.05*t,.5*r,.6*t,.25*r,K,e,m,ba,v,X);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;"); +J.geometry.relative=!0;J.edge=!0;na(.05*t,.5*r,.6*t,.75*r,J,e,m,ba,v,X);q=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");q.vertex=!0;v.insert(q);q.style+= +f(q.style,h,u,q);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);D=new mxCell("",new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);R=new mxCell("",new mxGeometry(0, +0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");R.geometry.relative=!0;R.edge=!0;q.insertEdge(R,!1);D.insertEdge(R,!0);R.style+=f(R.style,h,u,R);R.geometry.points=[new mxPoint(aa+8.5,Z+40)];e.push(m.addCell(R,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20,20),"part=1;");P.vertex=!0;v.insert(P);P.value=c(h.message_0);P.style+=k(h.message_0);P.style+=f(P.style,h,u,P);ja=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"); +ja.geometry.relative=!0;ja.edge=!0;q.insertEdge(ja,!1);P.insertEdge(ja,!0);ja.style+=f(ja.style,h,u,ja);ja.geometry.points=[new mxPoint(aa+8.5,Z+r-10)];e.push(m.addCell(ja,null,null,null,null));Ub=h.HistoryMessages;gc=(r-75)/Ub;w=[];U=[];for(l=0;l<Ub;l++)Vb=gc*(l+1)+30,w[l]=new mxCell("",new mxGeometry(t-20,Vb,20,20),"part=1;"),w[l].vertex=!0,w[l].value=c(h["message_"+(l+1)]),w.style+=k(h["message_"+(l+1)]),v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]),U[l]=new mxCell("",new mxGeometry(0,0,0, +0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),U[l].geometry.relative=!0,U[l].edge=!0,D.insertEdge(U[l],!1),w[l].insertEdge(U[l],!0),U[l].style+=f(U[l].style,h,u,U[l]),kb=[],kb.push(new mxPoint(aa+t-30,Z+Vb+10)),U[l].geometry.points=kb,e.push(m.addCell(U[l],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;"; +0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var w=[],wc=.02*t,hc=(t-2*wc)/h.LightCount,xc=.8*hc,l=0;l<h.LightCount;l++)w[l]=new mxCell("",new mxGeometry(wc+hc*l+(hc-xc)/2,.25*r,xc,.75*r),"part=1;shape=ellipse;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]); +break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);for(var q=[],yc=t/h.SinkCount,l=0;l<h.SinkCount;l++)q[l]=new mxCell("",new mxGeometry(yc*l,0,yc,r),"part=1;shape=mxgraph.floorplan.sink_2;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ca=.1*t/h.StallCount,q=new mxCell("",new mxGeometry(0,0,Ca,r),"fillColor=#000000;part=1;");q.vertex=!0;v.insert(q);q.style+= +f(q.style,h,u,q);for(var Ka=(t-Ca)/h.StallCount,ic=[],Wb=[],Xb=[],Yb=[],I=B(h,u),I=""==I?"#000000;":I.replace("stokreColor=",""),dc="part=1;fillColor="+I,dc=dc+f(dc,h,u,v),jc=f("",h,u,v),l=0;l<h.StallCount;l++)ic[l]=new mxCell("",new mxGeometry((l+1)*Ka,0,Ca,r),dc),ic[l].vertex=!0,v.insert(ic[l]),Xb[l]=new mxCell("",new mxGeometry(Ca+l*Ka+.05*(Ka-Ca),r-.92*(Ka-Ca),.9*(Ka-Ca),.92*(Ka-Ca)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Xb[l].vertex=!0,v.insert(Xb[l]),Xb[l].style+=jc,Wb[l]=new mxCell("", +new mxGeometry(Ca+l*Ka+.2*(Ka-Ca),0,.6*(Ka-Ca),.8*(Ka-Ca)),"shape=mxgraph.floorplan.toilet;part=1;"),Wb[l].vertex=!0,v.insert(Wb[l]),Wb[l].style+=jc,Yb[l]=new mxCell("",new mxGeometry(Ca+l*Ka,.42*r,.15*(Ka-Ca),.12*(Ka-Ca)),"part=1;"),Yb[l].vertex=!0,v.insert(Yb[l]),Yb[l].style+=jc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Ma="edgeStyle=none;endArrow=none;part=1;";Ma.style+=f(Ma.style,h,u,Ma);var I=B(h,u),I=""==I?"#000000;":I.replace("strokeColor=",""),nb="shape=triangle;part=1;fillColor="+ +I,nb=nb+f(nb,h,u,v),K=new mxCell("",new mxGeometry(0,0,0,0),Ma);K.geometry.relative=!0;K.edge=!0;na(0,.5*r,.65*t,.5*r,K,e,m,ba,v,X);for(var L=r/h.numLines,J=[],rb=[],l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Ma),J[l].geometry.relative=!0,J[l].edge=!0,na(.65*t,.5*r,.96*t,(l+.5)*L,J[l],e,m,ba,v,X),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Ma="edgeStyle=none;endArrow=none;part=1;"; +Ma.style+=f(Ma.style,h,u,Ma);I=B(h,u);I=""==I?"#000000;":I.replace("strokeColor=","");nb="shape=triangle;part=1;fillColor="+I;nb+=f(nb,h,u,v);L=r/h.numLines;J=[];rb=[];for(l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Ma),J[l].geometry.relative=!0,J[l].edge=!0,na(0,(l+.5)*L,.96*t,(l+.5)*L,J[l],e,m,ba,v,X),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;"; v.value=c(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=f(v.style,h,u,v);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);1==h.peakedRoof&&0==h.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==h.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=f(v.style, h,u,v);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);v.style=0==h.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=f(v.style,h,u,v);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;"); -q.vertex=!0;v.insert(q);q.style+=N;q.style+=f(q.style,h,u,q);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=f(K.style,h,u,K),oa(0,0,0,.2*r,K,e,m,aa,v,W),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=f(J.style,h,u,J),oa(t,.67*r,t,r,J,e,m,aa,v,W)):(q.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge= -!0,K.style+=N,K.style+=f(K.style,h,u,K),oa(0,0,0,.33*r,K,e,m,aa,v,W),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=f(J.style,h,u,J),oa(t,.8*r,t,r,J,e,m,aa,v,W));1==h.centerLineType&&(Q=new mxCell("",new mxGeometry(0,0,0,0),""),Q.geometry.relative=!0,Q.edge=!0,Q.style+=N,Q.style+=f(Q.style,h,u,Q),oa(.2*t,.5*r,.8*t,.5*r,Q,e,m,aa,v,W));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("", +q.vertex=!0;v.insert(q);q.style+=N;q.style+=f(q.style,h,u,q);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=f(K.style,h,u,K),na(0,0,0,.2*r,K,e,m,ba,v,X),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=f(J.style,h,u,J),na(t,.67*r,t,r,J,e,m,ba,v,X)):(q.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge= +!0,K.style+=N,K.style+=f(K.style,h,u,K),na(0,0,0,.33*r,K,e,m,ba,v,X),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=f(J.style,h,u,J),na(t,.8*r,t,r,J,e,m,ba,v,X));1==h.centerLineType&&(R=new mxCell("",new mxGeometry(0,0,0,0),""),R.geometry.relative=!0,R.edge=!0,R.style+=N,R.style+=f(R.style,h,u,R),na(.2*t,.5*r,.8*t,.5*r,R,e,m,ba,v,X));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("", new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(g.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;"; break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=f(v.style,h,u,v);"PEIndicator2Block"==g.Class||"PESharedIndicator2Block"==g.Class?(q=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"), q.vertex=!0,v.insert(q),q.style+=k(h.TopText),q.style+=f(q.style,h,u,q),q.value=c(h.TopText),w=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(q=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),q.vertex=!0,v.insert(q),q.style+=k(h.TopText),q.style+=f(q.style,h,u,q),q.value=c(h.TopText),w=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));w.vertex=!0;v.insert(w);w.style+=k(h.BotText);w.style+= -f(w.style,h,u,w);w.value=c(h.BotText);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var hc=!1;"PEPoweredValveBlock"==g.Class?1!=h.poweredHandOperated&&(hc=!0):1!=h.handOperated&&(hc=!0);if(hc){var h=n(g).Properties,O=h.BoundingBox, -tc=O.h;O.h="PEAngleValveBlock"==g.Class||"PEAngleGlobeValveBlock"==g.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.6*O.x+0),Math.round(.6*(O.y+tc-O.h)+0),Math.round(.6*O.w),Math.round(.6*O.h)),"");v.vertex=!0;ga(v,g)}if("PEPoweredValveBlock"==g.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=f(v.style,h,u,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",q=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35* +f(w.style,h,u,w);w.value=c(h.BotText);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var kc=!1;"PEPoweredValveBlock"==g.Class?1!=h.poweredHandOperated&&(kc=!0):1!=h.handOperated&&(kc=!0);if(kc){var h=n(g).Properties,O=h.BoundingBox, +Cc=O.h;O.h="PEAngleValveBlock"==g.Class||"PEAngleGlobeValveBlock"==g.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.6*O.x+0),Math.round(.6*(O.y+Cc-O.h)+0),Math.round(.6*O.w),Math.round(.6*O.h)),"");v.vertex=!0;fa(v,g)}if("PEPoweredValveBlock"==g.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=f(v.style,h,u,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",q=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35* r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),q.vertex=!0,v.insert(q),q.style+="fontSize=6;"+a(h.PoweredText)+d(h.PoweredText)+p(h.PoweredText)+y(h.PoweredText)+z(h.PoweredText)+A(h.PoweredText)+C(h.PoweredText)+H(h.PoweredText),q.style+=f(q.style,h,u,q),q.value=c(h.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=c(h.Text);switch(g.Class){case "PEGateValveBlock":v.style+="valveType=gate;"; break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==h.handOperated&&(v.style+="actuator=man;")}v.style+=f(v.style,h,u,v);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==h.vScroll&&(D=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): new mxCell("",new mxGeometry(1,0,20,r-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,110),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"), @@ -186,62 +188,62 @@ P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=f(v.style,h,u,v);break;case "UI2DialogBlock":v.style+=k(h.Text);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");q.vertex=!0;v.insert(q);q.style+=k(h.Title);q.style+=f(q.style,h,u,q);q.value=c(h.Title);w=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-25,-10);w.vertex=!0;q.insert(w);1== h.vScroll&&(D=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(-20,30),D.vertex=!0,v.insert(D),v.style+="spacingRight=20;");1==h.hScroll&&(P=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),P.geometry.relative=!0,P.geometry.offset=new mxPoint(0,-20),P.vertex=!0,v.insert(P));v.style+=f(v.style,h,u,v);break;case "UI2AccordionBlock":q=[];L=25;for(l=0;l<=h.Panels-1;l++)q[l]=l<h.Selected-1?new mxCell("",new mxGeometry(0,l*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"):l==h.Selected-1?new mxCell("",new mxGeometry(0,l*L,t,L),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0, -r-(h.Panels-h.Selected)*L+(l-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Panel_"+(l+1)]),q[l].value=c(h["Panel_"+(l+1)]),0>q[l].style.indexOf(";align=")&&(q[l].style+="align=left;spacingLeft=5;");var ha=B(h,u),ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): -new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,h.Selected*L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0, -1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));P=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;"); -P.vertex=!0;v.insert(P);P.style+=k(h.Content_1);0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");P.value=c(h.Content_1);v.style+=f(v.style,h,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var q=[],w=[],L=25,Ga=3,U=(t+Ga)/(h.Tabs+1),pa=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ga,L),""),w[l].vertex= -!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2"); -""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&& -(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];L=25;Ga=3;U=(t+Ga)/h.Tabs;pa=new mxCell("", -new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*U,0,U-Ga,L),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*U,0,U-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+= -f(w[l].style,h,u,w[l]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;");ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"), -w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+= -ha,D.style+=f(D.style,h,u,D));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Ga=3;L=25+Ga;U=80;gb=10;pa=new mxCell("",new mxGeometry(U,0,t-U,r),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ga),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ga),"strokeColor=none;"), -q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U,L-Ga),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)])),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1, -0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,0),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(U,1,t-20-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): -new mxCell("",new mxGeometry(U,1,t-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(0,l*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), +r-(h.Panels-h.Selected)*L+(l-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Panel_"+(l+1)]),q[l].value=c(h["Panel_"+(l+1)]),0>q[l].style.indexOf(";align=")&&(q[l].style+="align=left;spacingLeft=5;");var ga=B(h,u),ga=ga.replace("strokeColor","fillColor2");""==ga&&(ga="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"): +new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,h.Selected*L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ga,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0, +1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),D.vertex=!0,v.insert(D),D.style+=ga,D.style+=f(D.style,h,u,D));P=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;"); +P.vertex=!0;v.insert(P);P.style+=k(h.Content_1);0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");P.value=c(h.Content_1);v.style+=f(v.style,h,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var q=[],w=[],L=25,Ga=3,V=(t+Ga)/(h.Tabs+1),oa=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");oa.vertex=!0;v.insert(oa);oa.style+=f(oa.style,h,u,oa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(10+l*V,0,V-Ga,L),""),w[l].vertex= +!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(10+l*V,0,V-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,V-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ga=B(h,u);ga=ga.replace("strokeColor","fillColor2"); +""==ga&&(ga="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ga,w.style+=f(w.style,h,u,w));1==h.hScroll&& +(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ga,D.style+=f(D.style,h,u,D));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];L=25;Ga=3;V=(t+Ga)/h.Tabs;oa=new mxCell("", +new mxGeometry(0,L,t,r-L),"part=1;");oa.vertex=!0;v.insert(oa);oa.style+=f(oa.style,h,u,oa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*V,0,V-Ga,L),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*V,0,V-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,V-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+= +f(w[l].style,h,u,w[l]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;");ga=B(h,u);ga=ga.replace("strokeColor","fillColor2");""==ga&&(ga="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"), +w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ga,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+= +ga,D.style+=f(D.style,h,u,D));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Ga=3;L=25+Ga;V=80;eb=10;oa=new mxCell("",new mxGeometry(V,0,t-V,r),"part=1;");oa.vertex=!0;v.insert(oa);oa.style+=f(oa.style,h,u,oa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,eb+l*L,V,L-Ga),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,eb+l*L,V,L-Ga),"strokeColor=none;"), +q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,V,L-Ga),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)])),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ga=B(h,u);ga=ga.replace("strokeColor","fillColor2");""==ga&&(ga="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1, +0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,0),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ga,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(V,1,t-20-V,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"): +new mxCell("",new mxGeometry(V,1,t-V,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ga,D.style+=f(D.style,h,u,D));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(0,l*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u,q[l]),null!=h.Selected[l+1]&&1==h.Selected[l+1]&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;"; -U=t/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(l*U,.5*r-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u,q[l]),null!=h.Selected[l+1]&&1==h.Selected[l+1]&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"), +V=t/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(l*V,.5*r-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u,q[l]),null!=h.Selected[l+1]&&1==h.Selected[l+1]&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"), w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(0,l*L+.5*L-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u, -q[l]),null!=h.Selected&&h.Selected==l+1&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";U=t/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(l*U,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), +q[l]),null!=h.Selected&&h.Selected==l+1&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";V=t/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(l*V,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"), q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u,q[l]),null!=h.Selected&&h.Selected==l+1&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;"; "UI2VSliderBlock"==g.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*h.ScrollVal+";";v.style+=f(v.style,h,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";q=new mxCell("",new mxGeometry(0,0,.6*t,r),"part=1;");q.vertex=!0;v.insert(q);q.style+=k(h.Date);v.style+=f(v.style,h,u,v);q.value=c(h.Date);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");w=new mxCell("",new mxGeometry(.75*t,0,.25*t,r),"part=1;shape=mxgraph.gmdl.calendar;"); w.vertex=!0;v.insert(w);w.style+=I;w.style+=f(w.style,h,u,w);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+b(h.Search)+a(h.Search)+d(h.Search);v.style+=f(v.style,h,u,v);v.value=c(h.Search);break;case "UI2NumericStepperBlock":I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+ -I+b(h.Number)+a(h.Number)+d(h.Number);v.style+=f(v.style,h,u,v);v.value=c(h.Number);break;case "UI2ButtonBarBlock":v.style+=f(v.style,h,u,v);q=[];w=[];U=t/h.Buttons;for(l=0;l<=h.Buttons-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*U,0,U,r),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*U,0,U,r),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U,r),"fillColor=#000000;fillOpacity=25;"), +I+b(h.Number)+a(h.Number)+d(h.Number);v.style+=f(v.style,h,u,v);v.value=c(h.Number);break;case "UI2ButtonBarBlock":v.style+=f(v.style,h,u,v);q=[];w=[];V=t/h.Buttons;for(l=0;l<=h.Buttons-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*V,0,V,r),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*V,0,V,r),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,V,r),"fillColor=#000000;fillOpacity=25;"), w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Button_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l]),w[l].value=c(h["Button_"+(l+1)]);break;case "UI2VerticalButtonBarBlock":v.style+=f(v.style,h,u,v);q=[];w=[];L=r/h.Buttons;for(l=0;l<=h.Buttons-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,l*L,t,L),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(0,l*L,t,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0, -0,t,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Button_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l]),w[l].value=c(h["Button_"+(l+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=[];w=[];U=t/h.Links;for(l=0;l<h.Links;l++)0!=l?(w[l]=new mxCell("",new mxGeometry(l*U,0,U,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),w[l].style+=f(w[l].style,h,u,w[l])):w[l]=new mxCell("",new mxGeometry(l* -U,0,U,r),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Link_"+(l+1)]),w[l].value=c(h["Link_"+(l+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=[];w=[];U=t/h.Links;for(l=0;l<h.Links;l++)q[l]=new mxCell("",new mxGeometry(l*U,0,U,r),"fillColor=none;strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Link_"+(l+1)]),q[l].value=c(h["Link_"+(l+1)]);for(l=1;l<h.Links;l++)w[l]=new mxCell("",new mxGeometry(l/ -h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),w[l].geometry.relative=!0,w[l].geometry.offset=new mxPoint(-3,-5),w[l].vertex=!0,v.insert(w[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);q=[];U=t/(h.Buttons+1);for(l=0;l<=h.Buttons-1;l++)q[l]=l!=h.Selected-1?new mxCell("",new mxGeometry(0,0,U,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,U,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),q[l].geometry.relative= -!0,q[l].geometry.offset=new mxPoint(l*U,0),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["MenuItem_"+(l+1)]),q[l].value=c(h["MenuItem_"+(l+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_prev);v.value=c(h.Text_prev)+" ";for(l=0;l<h.Links;l++)v.value+=c(h["Link_"+(l+1)])+" ";v.value+=c(h.Text_next);break;case "UI2ContextMenuBlock":v.style+= -f(v.style,h,u,v);for(var G=[],fb=[],Cb=[],L=r/h.Lines,N=null,l=0;l<h.Lines;l++)null!=h["Item_"+(l+1)]&&(null==N&&(N=""+b(h["Item_"+(l+1)])+a(h["Item_"+(l+1)])+d(h["Item_"+(l+1)])),G[l]=new mxCell("",new mxGeometry(0,l*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N,G[l].value=c(h["Item_"+(l+1)])),null!=h.Icons[l+1]&&null!=G[l]&&("dot"==h.Icons[l+1]?(fb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"), -fb[l].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[l+1]&&(fb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),fb[l].geometry.offset=new mxPoint(6.5,-4)),null!=fb[l]&&(fb[l].geometry.relative=!0,fb[l].vertex=!0,G[l].insert(fb[l]),I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),fb[l].style+=I)),null!=h["Shortcut_"+(l+1)]&&(null==N&&(N=""+b(h["Shortcut_"+(l+1)])+a(h["Shortcut_"+(l+1)])+d(h["Shortcut_"+(l+1)])), -Cb[l]=new mxCell("",new mxGeometry(.6*t,l*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Cb[l].vertex=!0,v.insert(Cb[l]),Cb[l].style+=N,Cb[l].value=c(h["Shortcut_"+(l+1)])),null!=h.Dividers[l+1]&&(G[l]=new mxCell("",new mxGeometry(.05*t,l*r/h.Lines,.9*t,L),"shape=line;strokeWidth=0.25;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=B(h,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+ +0,t,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Button_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l]),w[l].value=c(h["Button_"+(l+1)]);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=[];w=[];V=t/h.Links;for(l=0;l<h.Links;l++)0!=l?(w[l]=new mxCell("",new mxGeometry(l*V,0,V,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),w[l].style+=f(w[l].style,h,u,w[l])):w[l]=new mxCell("",new mxGeometry(l* +V,0,V,r),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Link_"+(l+1)]),w[l].value=c(h["Link_"+(l+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=[];w=[];V=t/h.Links;for(l=0;l<h.Links;l++)q[l]=new mxCell("",new mxGeometry(l*V,0,V,r),"fillColor=none;strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Link_"+(l+1)]),q[l].value=c(h["Link_"+(l+1)]);for(l=1;l<h.Links;l++)w[l]=new mxCell("",new mxGeometry(l/ +h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),w[l].geometry.relative=!0,w[l].geometry.offset=new mxPoint(-3,-5),w[l].vertex=!0,v.insert(w[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);q=[];V=t/(h.Buttons+1);for(l=0;l<=h.Buttons-1;l++)q[l]=l!=h.Selected-1?new mxCell("",new mxGeometry(0,0,V,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,V,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),q[l].geometry.relative= +!0,q[l].geometry.offset=new mxPoint(l*V,0),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["MenuItem_"+(l+1)]),q[l].value=c(h["MenuItem_"+(l+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_prev);v.value=c(h.Text_prev)+" ";for(l=0;l<h.Links;l++)v.value+=c(h["Link_"+(l+1)])+" ";v.value+=c(h.Text_next);break;case "UI2ContextMenuBlock":v.style+= +f(v.style,h,u,v);for(var G=[],db=[],Cb=[],L=r/h.Lines,N=null,l=0;l<h.Lines;l++)null!=h["Item_"+(l+1)]&&(null==N&&(N=""+b(h["Item_"+(l+1)])+a(h["Item_"+(l+1)])+d(h["Item_"+(l+1)])),G[l]=new mxCell("",new mxGeometry(0,l*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N,G[l].value=c(h["Item_"+(l+1)])),null!=h.Icons[l+1]&&null!=G[l]&&("dot"==h.Icons[l+1]?(db[l]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"), +db[l].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[l+1]&&(db[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),db[l].geometry.offset=new mxPoint(6.5,-4)),null!=db[l]&&(db[l].geometry.relative=!0,db[l].vertex=!0,G[l].insert(db[l]),I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),db[l].style+=I)),null!=h["Shortcut_"+(l+1)]&&(null==N&&(N=""+b(h["Shortcut_"+(l+1)])+a(h["Shortcut_"+(l+1)])+d(h["Shortcut_"+(l+1)])), +Cb[l]=new mxCell("",new mxGeometry(.6*t,l*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Cb[l].vertex=!0,v.insert(Cb[l]),Cb[l].style+=N,Cb[l].value=c(h["Shortcut_"+(l+1)])),null!=h.Dividers[l+1]&&(G[l]=new mxCell("",new mxGeometry(.05*t,l*r/h.Lines,.9*t,L),"shape=line;strokeWidth=1;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=B(h,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+ ";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+k(h.Tip);v.style+=f(v.style,h,u,v);v.value=c(h.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+k(h.Txt);v.style+=f(v.style,h,u,v);v.value=c(h.Txt);break;case "UI2AlertBlock":v.style+=k(h.Txt);v.style+=f(v.style,h,u,v);v.value=c(h.Txt);q=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");q.vertex=!0;v.insert(q);q.style+= -k(h.Title);q.style+=f(q.style,h,u,q);q.value=c(h.Title);w=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-25,-10);w.vertex=!0;q.insert(w);for(var uc=45*h.Buttons+(10*h.Buttons-1),D=[],l=0;l<h.Buttons;l++)D[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),D[l].geometry.relative=!0,D[l].geometry.offset=new mxPoint(.5*-uc+55*l,-40),D[l].vertex=!0,v.insert(D[l]),D[l].style+= -k(h["Button_"+(l+1)]),D[l].style+=f(D[l].style,h,u,D[l]),D[l].value=c(h["Button_"+(l+1)]);break;case "UMLClassBlock":if(0==h.Simple){var N=M(h,u),Ca=Math.round(.6*h.TitleHeight),N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title); -for(var G=[],ic=[],ya=Ca/r,l=0;l<=h.Attributes;l++)0<l&&(ic[l]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),ic[l].vertex=!0,v.insert(ic[l])),L=0,l<h.Attributes?(L=h["Text"+(l+1)+"Percent"],ya+=L):L=1-ya,G[l]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ca)*L)),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+E(h,u,G[l])+b(h["Text"+(l+1)])+a(h["Text"+(l+1)])+d(h["Text"+(l+1)]),G[l].value=c(h["Text"+(l+1)])}else v.style+=k(h.Title),v.style+=f(v.style,h,u,v),v.value=c(h.Title);break;case "ERDEntityBlock":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ -N+"startSize="+Ca+";"+k(h.Name);v.style+=f(v.style,h,u,v);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.value=c(h.Name);G=[];ya=Ca/r;for(l=0;l<h.Fields;l++)L=0,G[l]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(l+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+ -(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;opacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]);break;case "ERDEntityBlock2":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ -M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],ya=Ca,Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&& -0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+ -1)]),v.style+=f(v.style,h,u,v),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]),ya+=.6*h["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+ -"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);G=[];X=[];ya=Ca;Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+ -(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Field"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]), -G[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Type"+(l+1)]),ya+=.6*h["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ -N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],Ia=[],ya=Ca,Ha=30,bc=40;null!=h.Column1&&(Ha=.6*h.Column1);null!=h.Column2&&(bc=.6*h.Column2);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha-bc,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Field"+(l+1)]),Ia[l]=new mxCell("",new mxGeometry(t-bc,ya,bc,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), -Ia[l].vertex=!0,v.insert(Ia[l]),Ia[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),Ia[l].style=1==h.AltRows&&0!=l%2?Ia[l].style+"fillColor=#000000;fillOpacity=5;":Ia[l].style+("fillColor=none;"+E(h,u,Ia[l])),Ia[l].style+=f(Ia[l].style,h,u,Ia[l]),Ia[l].value=c(h["Type"+(l+1)]),ya+=.6*h["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":fa("application_system",t,r,v,h,u);break;case "GCPServiceCardAuthorizationBlock":fa("internal_payment_authorization",t,r,v,h,u); -break;case "GCPServiceCardBlankBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardReallyBlankBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardBucketBlock":fa("bucket",t,r,v,h,u);break;case "GCPServiceCardCDNInterconnectBlock":fa("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardCloudDNSBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardClusterBlock":fa("cluster",t,r,v,h,u);break;case "GCPServiceCardDiskSnapshotBlock":fa("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardEdgePopBlock":fa("google_network_edge_cache", -t,r,v,h,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":fa("frontend_platform_services",t,r,v,h,u);break;case "GCPServiceCardGatewayBlock":fa("gateway",t,r,v,h,u);break;case "GCPServiceCardGoogleNetworkBlock":fa("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardImageServicesBlock":fa("image_services",t,r,v,h,u);break;case "GCPServiceCardLoadBalancerBlock":fa("network_load_balancer",t,r,v,h,u);break;case "GCPServiceCardLocalComputeBlock":fa("dedicated_game_server",t,r,v, -h,u);break;case "GCPServiceCardLocalStorageBlock":fa("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardLogsAPIBlock":fa("logs_api",t,r,v,h,u);break;case "GCPServiceCardMemcacheBlock":fa("memcache",t,r,v,h,u);break;case "GCPServiceCardNATBlock":fa("nat",t,r,v,h,u);break;case "GCPServiceCardPaymentFormBlock":fa("external_payment_form",t,r,v,h,u);break;case "GCPServiceCardPushNotificationsBlock":fa("push_notification_service",t,r,v,h,u);break;case "GCPServiceCardScheduledTasksBlock":fa("scheduled_tasks", -t,r,v,h,u);break;case "GCPServiceCardServiceDiscoveryBlock":fa("service_discovery",t,r,v,h,u);break;case "GCPServiceCardSquidProxyBlock":fa("squid_proxy",t,r,v,h,u);break;case "GCPServiceCardTaskQueuesBlock":fa("task_queues",t,r,v,h,u);break;case "GCPServiceCardVirtualFileSystemBlock":fa("virtual_file_system",t,r,v,h,u);break;case "GCPServiceCardVPNGatewayBlock":fa("gateway",t,r,v,h,u);break;case "GCPInputDatabase":ja("database",1,.9,t,r,v,h,u);break;case "GCPInputRecord":ja("record",1,.66,t,r,v, -h,u);break;case "GCPInputPayment":ja("payment",1,.8,t,r,v,h,u);break;case "GCPInputGateway":ja("gateway_icon",1,.44,t,r,v,h,u);break;case "GCPInputLocalCompute":ja("compute_engine_icon",1,.89,t,r,v,h,u);break;case "GCPInputBeacon":ja("beacon",.73,1,t,r,v,h,u);break;case "GCPInputStorage":ja("storage",1,.8,t,r,v,h,u);break;case "GCPInputList":ja("list",.89,1,t,r,v,h,u);break;case "GCPInputStream":ja("stream",1,.82,t,r,v,h,u);break;case "GCPInputMobileDevices":ja("mobile_devices",1,.73,t,r,v,h,u);break; -case "GCPInputCircuitBoard":ja("circuit_board",1,.9,t,r,v,h,u);break;case "GCPInputLive":ja("live",.74,1,t,r,v,h,u);break;case "GCPInputUsers":ja("users",1,.63,t,r,v,h,u);break;case "GCPInputLaptop":ja("laptop",1,.66,t,r,v,h,u);break;case "GCPInputApplication":ja("application",1,.8,t,r,v,h,u);break;case "GCPInputLightbulb":ja("lightbulb",.7,1,t,r,v,h,u);break;case "GCPInputGame":ja("game",1,.54,t,r,v,h,u);break;case "GCPInputDesktop":ja("desktop",1,.9,t,r,v,h,u);break;case "GCPInputDesktopAndMobile":ja("desktop_and_mobile", -1,.66,t,r,v,h,u);break;case "GCPInputWebcam":ja("webcam",.5,1,t,r,v,h,u);break;case "GCPInputSpeaker":ja("speaker",.7,1,t,r,v,h,u);break;case "GCPInputRetail":ja("retail",1,.89,t,r,v,h,u);break;case "GCPInputReport":ja("report",1,1,t,r,v,h,u);break;case "GCPInputPhone":ja("phone",.64,1,t,r,v,h,u);break;case "GCPInputBlank":ja("transparent",1,1,t,r,v,h,u)}return v}var tb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],ob=["fpDoor"],Ja={None:"none;",Arrow:"block;endFill=1;", +k(h.Title);q.style+=f(q.style,h,u,q);q.value=c(h.Title);w=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-25,-10);w.vertex=!0;q.insert(w);for(var Dc=45*h.Buttons+(10*h.Buttons-1),D=[],l=0;l<h.Buttons;l++)D[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),D[l].geometry.relative=!0,D[l].geometry.offset=new mxPoint(.5*-Dc+55*l,-40),D[l].vertex=!0,v.insert(D[l]),D[l].style+= +k(h["Button_"+(l+1)]),D[l].style+=f(D[l].style,h,u,D[l]),D[l].value=c(h["Button_"+(l+1)]);break;case "UMLClassBlock":if(0==h.Simple){var N=M(h,u),Da=Math.round(.6*h.TitleHeight),N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Da+";"+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title); +for(var G=[],lc=[],za=Da/r,l=0;l<=h.Attributes;l++)0<l&&(lc[l]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),lc[l].vertex=!0,v.insert(lc[l])),L=0,l<h.Attributes?(L=h["Text"+(l+1)+"Percent"],za+=L):L=1-za,G[l]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Da)*L)),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+E(h,u,G[l])+b(h["Text"+(l+1)])+a(h["Text"+(l+1)])+d(h["Text"+(l+1)]),G[l].value=c(h["Text"+(l+1)])}else v.style+=k(h.Title),v.style+=f(v.style,h,u,v),v.value=c(h.Title);break;case "ERDEntityBlock":N=M(h,u);Da=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +N+"startSize="+Da+";"+k(h.Name);v.style+=f(v.style,h,u,v);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.value=c(h.Name);G=[];za=Da/r;for(l=0;l<h.Fields;l++)L=0,G[l]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(l+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+ +(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;opacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]);break;case "ERDEntityBlock2":N=M(h,u);Da=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Da+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ +M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],Y=[],za=Da,Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,Y[l]=new mxCell("",new mxGeometry(0,za,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Y[l].vertex=!0,v.insert(Y[l]),Y[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),Y[l].style=1==h.AltRows&& +0!=l%2?Y[l].style+"fillColor=#000000;fillOpacity=5;":Y[l].style+("fillColor=none;"+E(h,u,Y[l])),Y[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,za,t-Ha,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+ +1)]),v.style+=f(v.style,h,u,v),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]),za+=.6*h["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":N=M(h,u);Da=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Da+";"+k(h.Name);v.style=h.ShadedHeader?v.style+ +"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);G=[];Y=[];za=Da;Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,Y[l]=new mxCell("",new mxGeometry(0,za,Ha,.6*h["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Y[l].vertex=!0,v.insert(Y[l]),Y[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+ +(l+1)]),Y[l].style=1==h.AltRows&&0!=l%2?Y[l].style+"fillColor=#000000;fillOpacity=5;":Y[l].style+("fillColor=none;"+E(h,u,Y[l])),Y[l].style+=f(Y[l].style,h,u,Y[l]),Y[l].value=c(h["Field"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,za,t-Ha,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]), +G[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Type"+(l+1)]),za+=.6*h["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":N=M(h,u);Da=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+ +N+"startSize="+Da+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],Y=[],Ia=[],za=Da,Ha=30,ec=40;null!=h.Column1&&(Ha=.6*h.Column1);null!=h.Column2&&(ec=.6*h.Column2);for(l=0;l<h.Fields;l++)L=0,Y[l]=new mxCell("",new mxGeometry(0,za,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +Y[l].vertex=!0,v.insert(Y[l]),Y[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),Y[l].style=1==h.AltRows&&0!=l%2?Y[l].style+"fillColor=#000000;fillOpacity=5;":Y[l].style+("fillColor=none;"+E(h,u,Y[l])),Y[l].style+=f(Y[l].style,h,u,Y[l]),Y[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,za,t-Ha-ec,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Field"+(l+1)]),Ia[l]=new mxCell("",new mxGeometry(t-ec,za,ec,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"), +Ia[l].vertex=!0,v.insert(Ia[l]),Ia[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),Ia[l].style=1==h.AltRows&&0!=l%2?Ia[l].style+"fillColor=#000000;fillOpacity=5;":Ia[l].style+("fillColor=none;"+E(h,u,Ia[l])),Ia[l].style+=f(Ia[l].style,h,u,Ia[l]),Ia[l].value=c(h["Type"+(l+1)]),za+=.6*h["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":ea("application_system",t,r,v,h,u);break;case "GCPServiceCardAuthorizationBlock":ea("internal_payment_authorization",t,r,v,h,u); +break;case "GCPServiceCardBlankBlock":ea("blank",t,r,v,h,u);break;case "GCPServiceCardReallyBlankBlock":ea("blank",t,r,v,h,u);break;case "GCPServiceCardBucketBlock":ea("bucket",t,r,v,h,u);break;case "GCPServiceCardCDNInterconnectBlock":ea("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardCloudDNSBlock":ea("blank",t,r,v,h,u);break;case "GCPServiceCardClusterBlock":ea("cluster",t,r,v,h,u);break;case "GCPServiceCardDiskSnapshotBlock":ea("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardEdgePopBlock":ea("google_network_edge_cache", +t,r,v,h,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":ea("frontend_platform_services",t,r,v,h,u);break;case "GCPServiceCardGatewayBlock":ea("gateway",t,r,v,h,u);break;case "GCPServiceCardGoogleNetworkBlock":ea("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardImageServicesBlock":ea("image_services",t,r,v,h,u);break;case "GCPServiceCardLoadBalancerBlock":ea("network_load_balancer",t,r,v,h,u);break;case "GCPServiceCardLocalComputeBlock":ea("dedicated_game_server",t,r,v, +h,u);break;case "GCPServiceCardLocalStorageBlock":ea("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardLogsAPIBlock":ea("logs_api",t,r,v,h,u);break;case "GCPServiceCardMemcacheBlock":ea("memcache",t,r,v,h,u);break;case "GCPServiceCardNATBlock":ea("nat",t,r,v,h,u);break;case "GCPServiceCardPaymentFormBlock":ea("external_payment_form",t,r,v,h,u);break;case "GCPServiceCardPushNotificationsBlock":ea("push_notification_service",t,r,v,h,u);break;case "GCPServiceCardScheduledTasksBlock":ea("scheduled_tasks", +t,r,v,h,u);break;case "GCPServiceCardServiceDiscoveryBlock":ea("service_discovery",t,r,v,h,u);break;case "GCPServiceCardSquidProxyBlock":ea("squid_proxy",t,r,v,h,u);break;case "GCPServiceCardTaskQueuesBlock":ea("task_queues",t,r,v,h,u);break;case "GCPServiceCardVirtualFileSystemBlock":ea("virtual_file_system",t,r,v,h,u);break;case "GCPServiceCardVPNGatewayBlock":ea("gateway",t,r,v,h,u);break;case "GCPInputDatabase":ia("database",1,.9,t,r,v,h,u);break;case "GCPInputRecord":ia("record",1,.66,t,r,v, +h,u);break;case "GCPInputPayment":ia("payment",1,.8,t,r,v,h,u);break;case "GCPInputGateway":ia("gateway_icon",1,.44,t,r,v,h,u);break;case "GCPInputLocalCompute":ia("compute_engine_icon",1,.89,t,r,v,h,u);break;case "GCPInputBeacon":ia("beacon",.73,1,t,r,v,h,u);break;case "GCPInputStorage":ia("storage",1,.8,t,r,v,h,u);break;case "GCPInputList":ia("list",.89,1,t,r,v,h,u);break;case "GCPInputStream":ia("stream",1,.82,t,r,v,h,u);break;case "GCPInputMobileDevices":ia("mobile_devices",1,.73,t,r,v,h,u);break; +case "GCPInputCircuitBoard":ia("circuit_board",1,.9,t,r,v,h,u);break;case "GCPInputLive":ia("live",.74,1,t,r,v,h,u);break;case "GCPInputUsers":ia("users",1,.63,t,r,v,h,u);break;case "GCPInputLaptop":ia("laptop",1,.66,t,r,v,h,u);break;case "GCPInputApplication":ia("application",1,.8,t,r,v,h,u);break;case "GCPInputLightbulb":ia("lightbulb",.7,1,t,r,v,h,u);break;case "GCPInputGame":ia("game",1,.54,t,r,v,h,u);break;case "GCPInputDesktop":ia("desktop",1,.9,t,r,v,h,u);break;case "GCPInputDesktopAndMobile":ia("desktop_and_mobile", +1,.66,t,r,v,h,u);break;case "GCPInputWebcam":ia("webcam",.5,1,t,r,v,h,u);break;case "GCPInputSpeaker":ia("speaker",.7,1,t,r,v,h,u);break;case "GCPInputRetail":ia("retail",1,.89,t,r,v,h,u);break;case "GCPInputReport":ia("report",1,1,t,r,v,h,u);break;case "GCPInputPhone":ia("phone",.64,1,t,r,v,h,u);break;case "GCPInputBlank":ia("transparent",1,1,t,r,v,h,u)}return v}var sb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],Ea=["fpDoor"],pb={None:"none;",Arrow:"block;endFill=1;", "Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10;","CFN ERD One Arrow":"ERone;startSize=16;",Generalization:"block;endFill=0;startSize=12;","Big Open Arrow":"open;startSize=10;",Asynch1:"openAsync;flipH=1;startSize=10;",Asynch2:"openAsync;startSize=10;", -Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},Da={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"", +Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},ob={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"", DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;", DirectAccessStorageBlock:"shape=cylinder;direction=south;size=0.1;anchorPointDirection=0;boundedLbl=1;",InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",ManualOperationBlockNew:"shape=trapezoid;perimeter=trapezoidPerimeter;anchorPointDirection=0;flipV=1",DelayBlock:"shape=delay",StoredDataBlock:"shape=dataStorage",MergeBlock:"triangle;direction=south;anchorPointDirection=0",ConnectorBlock:"ellipse",OrBlock:"shape=mxgraph.flowchart.summing_function",SummingJunctionBlock:"shape=mxgraph.flowchart.or", DisplayBlock:"shape=display",OffPageLinkBlock:"shape=offPageConnector",BraceNoteBlock:"mxCompositeShape",NoteBlock:"shape=mxgraph.flowchart.annotation_1",AdvancedSwimLaneBlock:"mxCompositeShape",AdvancedSwimLaneBlockRotated:"mxCompositeShape",RectangleContainerBlock:"fillColor=none;container=1",DiamondContainerBlock:"shape=rhombus;fillColor=none;container=1",RoundedRectangleContainerBlock:"fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24",CircleContainerBlock:"shape=ellipse;fillColor=none;container=1", @@ -709,26 +711,26 @@ GCPInputPhone:"mxCompositeShape",GCPInputBlank:"mxCompositeShape",SMHome:"shape= SMPrint:"shape=mxgraph.sitemap.print;strokeColor=#000000;fillColor=#E6E6E6",SMScript:"shape=mxgraph.sitemap.script;strokeColor=#000000;fillColor=#E6E6E6",SMSearch:"shape=mxgraph.sitemap.search;strokeColor=#000000;fillColor=#E6E6E6",SMSettings:"shape=mxgraph.sitemap.settings;strokeColor=#000000;fillColor=#E6E6E6",SMSitemap:"shape=mxgraph.sitemap.sitemap;strokeColor=#000000;fillColor=#E6E6E6",SMSuccess:"shape=mxgraph.sitemap.success;strokeColor=#000000;fillColor=#E6E6E6",SMVideo:"shape=mxgraph.sitemap.video;strokeColor=#000000;fillColor=#E6E6E6", SMAudio:"shape=mxgraph.sitemap.audio;strokeColor=#000000;fillColor=#E6E6E6",SMBlog:"shape=mxgraph.sitemap.blog;strokeColor=#000000;fillColor=#E6E6E6",SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6",SMChart:"shape=mxgraph.sitemap.chart;strokeColor=#000000;fillColor=#E6E6E6",SMCloud:"shape=mxgraph.sitemap.cloud;strokeColor=#000000;fillColor=#E6E6E6",SMDocument:"shape=mxgraph.sitemap.document;strokeColor=#000000;fillColor=#E6E6E6",SMDownload:"shape=mxgraph.sitemap.download;strokeColor=#000000;fillColor=#E6E6E6", SMError:"shape=mxgraph.sitemap.error;strokeColor=#000000;fillColor=#E6E6E6",SMForm:"shape=mxgraph.sitemap.form;strokeColor=#000000;fillColor=#E6E6E6",SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6", -SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6"},pb=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),Eb=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a); -if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var p in g.Members)d=Eb(p,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)g.push(a.Pages[b]);g.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],g=[];null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):g.push(a);a=da();for(var p=new mxCodec,e=0;e<g.length;e++){d.push("<diagram"); -null!=g[e].Properties&&null!=g[e].Properties.Title&&d.push(' name="'+mxUtils.htmlEntities(g[e].Properties.Title)+'"');Ea(a,g[e],null,null,null,!0);var c=p.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(c))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(c){function n(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", +SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6"},Zb=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),$b=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a); +if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var p in g.Members)d=$b(p,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)g.push(a.Pages[b]);g.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],g=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?b(JSON.parse(a.state)): +null==a.Page&&null!=a.Pages?b(a):g.push(a);a=ra();for(var p=new mxCodec,e=0;e<g.length;e++){d.push("<diagram");null!=g[e].Properties&&null!=g[e].Properties.Title&&d.push(' name="'+mxUtils.htmlEntities(g[e].Properties.Title)+'"');ib(a,g[e],null,null,null,!0);var c=p.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(c))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(c){function n(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>", "_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>", "docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>", "docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>", "visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>", "visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>", "visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"}, -g;for(g in d)if(1<b&&g==E.CONTENT_TYPES_XML){for(var p=mxUtils.parseXml(d[g]),e=p.documentElement,c=e.children,y=null,f=0;f<c.length;f++){var x=c[f];"/visio/pages/page1.xml"==x.getAttribute(E.PART_NAME)&&(y=x)}for(f=2;f<=b;f++)c=y.cloneNode(),c.setAttribute(E.PART_NAME,"/visio/pages/page"+f+".xml"),e.appendChild(c);C(a,g,p,!0)}else a.file(g,d[g])}function m(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function k(a){var b=M[a];null==b&&(b=ba++,M[a]=b);return b}function f(a){var b= +g;for(g in d)if(1<b&&g==E.CONTENT_TYPES_XML){for(var p=mxUtils.parseXml(d[g]),e=p.documentElement,c=e.children,y=null,f=0;f<c.length;f++){var x=c[f];"/visio/pages/page1.xml"==x.getAttribute(E.PART_NAME)&&(y=x)}for(f=2;f<=b;f++)c=y.cloneNode(),c.setAttribute(E.PART_NAME,"/visio/pages/page"+f+".xml"),e.appendChild(c);C(a,g,p,!0)}else a.file(g,d[g])}function m(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function k(a){var b=M[a];null==b&&(b=ca++,M[a]=b);return b}function f(a){var b= {};try{var d=a.getGraphBounds().clone(),g=a.view.scale,p=a.view.translate,e=Math.round(d.x/g)-p.x,c=Math.round(d.y/g)-p.y,y=a.pageFormat.width,f=a.pageFormat.height;0>e&&(e+=Math.ceil((p.x-d.x/g)/y)*y);0>c&&(c+=Math.ceil((p.y-d.y/g)/f)*f);var x=Math.max(1,Math.ceil((d.width/g+e)/y)),z=Math.max(1,Math.ceil((d.height/g+c)/f));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width* -x;b.pageHeight=a.pageFormat.height*z;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(fa){}return b}function e(a,d,g,p){return b(a,d/E.CONVERSION_FACTOR,g,p)}function b(a,b,d,g){d=m(d,E.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);g&&d.setAttribute("F",g);return d}function a(a,b,d,g,p){var c=m(p,E.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(e("X",d,p));c.appendChild(e("Y",g,p));return c}function d(a,d,g){var p= +x;b.pageHeight=a.pageFormat.height*z;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(ea){}return b}function e(a,d,g,p){return b(a,d/E.CONVERSION_FACTOR,g,p)}function b(a,b,d,g){d=m(d,E.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);g&&d.setAttribute("F",g);return d}function a(a,b,d,g,p){var c=m(p,E.XMLNS,"Row");c.setAttribute("T",a);c.setAttribute("IX",b);c.appendChild(e("X",d,p));c.appendChild(e("Y",g,p));return c}function d(a,d,g){var p= a.style[mxConstants.STYLE_FILLCOLOR];if(p&&"none"!=p){if(d.appendChild(b("FillForegnd",p,g)),(p=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=p){d.appendChild(b("FillBkgnd",p,g));var p=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],c=28;if(p)switch(p){case mxConstants.DIRECTION_EAST:c=25;break;case mxConstants.DIRECTION_WEST:c=27;break;case mxConstants.DIRECTION_NORTH:c=30}d.appendChild(b("FillPattern",c,g))}}else d.appendChild(b("FillPattern",0,g));(p=a.style[mxConstants.STYLE_STROKECOLOR])&& "none"!=p?d.appendChild(b("LineColor",p,g)):d.appendChild(b("LinePattern",0,g));(p=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(e("LineWeight",p,g));(c=a.style[mxConstants.STYLE_OPACITY])?p=c:(p=a.style[mxConstants.STYLE_FILL_OPACITY],c=a.style[mxConstants.STYLE_STROKE_OPACITY]);p&&d.appendChild(b("FillForegndTrans",1-parseInt(p)/100,g));c&&d.appendChild(b("LineColorTrans",1-parseInt(c)/100,g));if(1==a.style[mxConstants.STYLE_DASHED]){p=a.style[mxConstants.STYLE_DASH_PATTERN];c=9;if(p)switch(p){case "1 1":c= 10;break;case "1 2":c=3;break;case "1 4":c=17}d.appendChild(b("LinePattern",c,g))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,g)),d.appendChild(b("ShdwForegnd","#000000",g)),d.appendChild(b("ShdwForegndTrans",.6,g)),d.appendChild(b("ShapeShdwType",1,g)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",g)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",g)),d.appendChild(b("ShapeShdwScaleFactor","1",g)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555", g)),d.appendChild(b("ShapeShdwShow",2,g)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,g));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,g));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(e("Rounding",.1*a.cell.geometry.width,g));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,g))}function g(a,d,g,p,c,y){var f=m(p,E.XMLNS,"Shape");f.setAttribute("ID",a);f.setAttribute("NameU","Shape"+a);f.setAttribute("LineStyle","0");f.setAttribute("FillStyle", "0");f.setAttribute("TextStyle","0");a=d.width/2;var x=d.height/2;f.appendChild(e("PinX",d.x+a+(y?0:F.shiftX),p));f.appendChild(e("PinY",c-d.y-x-(y?0:F.shiftY),p));f.appendChild(e("Width",d.width,p));f.appendChild(e("Height",d.height,p));f.appendChild(e("LocPinX",a,p));f.appendChild(e("LocPinY",x,p));f.appendChild(b("LayerMember",g+"",p));return f}function p(a,b){var d=E.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function y(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a? -3:9>=a?4:22>=a?5:6}function z(g,c,f,x,z,A){var n=f.view.getState(g,!0);if(null==n||null==n.absolutePoints||null==n.cellBounds)return null;f=m(x,E.XMLNS,"Shape");var C=k(g.id);f.setAttribute("ID",C);f.setAttribute("NameU","Dynamic connector."+C);f.setAttribute("Name","Dynamic connector."+C);f.setAttribute("Type","Shape");f.setAttribute("Master","4");var H=F.state,C=n.absolutePoints,B=n.cellBounds,M=B.width/2,T=B.height/2;f.appendChild(e("PinX",B.x+M,x));f.appendChild(e("PinY",z-B.y-T,x));f.appendChild(e("Width", -B.width,x));f.appendChild(e("Height",B.height,x));f.appendChild(e("LocPinX",M,x));f.appendChild(e("LocPinY",T,x));F.newEdge(f,n,x);M=function(a,b){var d=a.x,g=a.y,d=d*H.scale-B.x+H.dx+(A?0:F.shiftX),g=(b?0:B.height)-g*H.scale+B.y-H.dy-(A?0:F.shiftY);return{x:d,y:g}};T=M(C[0],!0);f.appendChild(e("BeginX",B.x+T.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));f.appendChild(e("BeginY",z-B.y+T.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));T=M(C[C.length-1],!0);f.appendChild(e("EndX", -B.x+T.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));f.appendChild(e("EndY",z-B.y+T.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));f.appendChild(b("BegTrigger","2",x,g.source?"_XFTRIGGER(Sheet."+k(g.source.id)+"!EventXFMod)":null));f.appendChild(b("EndTrigger","2",x,g.target?"_XFTRIGGER(Sheet."+k(g.target.id)+"!EventXFMod)":null));f.appendChild(b("ConFixedCode","6",x));f.appendChild(b("LayerMember",c+"",x));d(n,f,x);c=n.style[mxConstants.STYLE_STARTSIZE];g=p(n.style[mxConstants.STYLE_STARTARROW], +3:9>=a?4:22>=a?5:6}function z(g,c,f,x,z,A){var n=f.view.getState(g,!0);if(null==n||null==n.absolutePoints||null==n.cellBounds)return null;f=m(x,E.XMLNS,"Shape");var C=k(g.id);f.setAttribute("ID",C);f.setAttribute("NameU","Dynamic connector."+C);f.setAttribute("Name","Dynamic connector."+C);f.setAttribute("Type","Shape");f.setAttribute("Master","4");var H=F.state,C=n.absolutePoints,B=n.cellBounds,M=B.width/2,Q=B.height/2;f.appendChild(e("PinX",B.x+M,x));f.appendChild(e("PinY",z-B.y-Q,x));f.appendChild(e("Width", +B.width,x));f.appendChild(e("Height",B.height,x));f.appendChild(e("LocPinX",M,x));f.appendChild(e("LocPinY",Q,x));F.newEdge(f,n,x);M=function(a,b){var d=a.x,g=a.y,d=d*H.scale-B.x+H.dx+(A?0:F.shiftX),g=(b?0:B.height)-g*H.scale+B.y-H.dy-(A?0:F.shiftY);return{x:d,y:g}};Q=M(C[0],!0);f.appendChild(e("BeginX",B.x+Q.x,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));f.appendChild(e("BeginY",z-B.y+Q.y,x,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));Q=M(C[C.length-1],!0);f.appendChild(e("EndX", +B.x+Q.x,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));f.appendChild(e("EndY",z-B.y+Q.y,x,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));f.appendChild(b("BegTrigger","2",x,g.source?"_XFTRIGGER(Sheet."+k(g.source.id)+"!EventXFMod)":null));f.appendChild(b("EndTrigger","2",x,g.target?"_XFTRIGGER(Sheet."+k(g.target.id)+"!EventXFMod)":null));f.appendChild(b("ConFixedCode","6",x));f.appendChild(b("LayerMember",c+"",x));d(n,f,x);c=n.style[mxConstants.STYLE_STARTSIZE];g=p(n.style[mxConstants.STYLE_STARTARROW], n.style[mxConstants.STYLE_STARTFILL]);f.appendChild(b("BeginArrow",g,x));f.appendChild(b("BeginArrowSize",y(c),x));c=n.style[mxConstants.STYLE_ENDSIZE];g=p(n.style[mxConstants.STYLE_ENDARROW],n.style[mxConstants.STYLE_ENDFILL]);f.appendChild(b("EndArrow",g,x));f.appendChild(b("EndArrowSize",y(c),x));null!=n.text&&n.text.checkBounds()&&(F.save(),n.text.paint(F),F.restore());n=m(x,E.XMLNS,"Section");n.setAttribute("N","Geometry");n.setAttribute("IX","0");for(g=0;g<C.length;g++)c=M(C[g]),n.appendChild(a(0== g?"MoveTo":"LineTo",g+1,c.x,c.y,x));n.appendChild(b("NoFill","1",x));n.appendChild(b("NoLine","0",x));f.appendChild(n);return f}function x(a,b,p,c,e,y,f){var A=a.geometry;if(null!=A){A.relative&&y&&(A=A.clone(),A.x*=y.width,A.y*=y.height,A.relative=0);y=k(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){e=g(y+"10000",A,b,c,e,f);e.setAttribute("Type","Group");f=m(c,E.XMLNS,"Shapes");F.save();F.translate(-A.x,-A.y);y=A.clone();y.x=0;y.y=0;a.setGeometry(y);a.treatAsSingle=!0;y=x(a,b,p,c,A.height,A,!0); a.treatAsSingle=!1;a.setGeometry(A);null!=y&&f.appendChild(y);for(var n=0;n<a.getChildCount();n++)y=x(a.children[n],b,p,c,A.height,A,!0),null!=y&&f.appendChild(y);e.appendChild(f);F.restore();return e}return a.vertex?(e=g(y,A,b,c,e,f),a=p.view.getState(a,!0),d(a,e,c),F.newShape(e,a,c),null!=a.text&&a.text.checkBounds()&&(F.save(),a.text.paint(F),F.restore()),null!=a.shape&&a.shape.checkBounds()&&(F.save(),a.shape.paint(F),F.restore()),e.appendChild(F.getShapeGeo()),F.endShape(),e.setAttribute("Type", @@ -736,12 +738,12 @@ F.getShapeType()),e):z(a,b,p,c,e,f)}return null}function A(a,b){var d=mxUtils.cr Math.ceil((e.y-f.y/y)/a.pageFormat.height)*a.pageFormat.height;F.save();F.translate(-e.x,-e.y);F.scale(1/y);F.newPage();y=a.model.getChildCells(a.model.root);e={};for(f=0;f<y.length;f++)e[y[f].id]=f;for(var z in c.cells)y=c.cells[z],f=null!=y.parent?e[y.parent.id]:null,null!=f&&(y=x(y,f,a,d,b.pageHeight),null!=y&&p.appendChild(y));p=m(d,E.XMLNS,"Connects");g.appendChild(p);for(z in c.cells)y=c.cells[z],y.edge&&(y.source&&(e=m(d,E.XMLNS,"Connect"),e.setAttribute("FromSheet",k(y.id)),e.setAttribute("FromCell", "BeginX"),e.setAttribute("ToSheet",k(y.source.id)),p.appendChild(e)),y.target&&(e=m(d,E.XMLNS,"Connect"),e.setAttribute("FromSheet",k(y.id)),e.setAttribute("FromCell","EndX"),e.setAttribute("ToSheet",k(y.target.id)),p.appendChild(e)));d.appendChild(g);F.restore();return d}function C(a,b,d,g){a.file(b,(g?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function H(a,d,g,p){var c=mxUtils.createXmlDocument(),y=mxUtils.createXmlDocument(),f=m(c,E.XMLNS,"Pages");f.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",E.XMLNS);f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",E.XMLNS_R);var x=m(y,E.RELS_XMLNS,"Relationships"),z=1,k;for(k in d){var A="page"+z+".xml",n=m(c,E.XMLNS,"Page");n.setAttribute("ID",z-1);n.setAttribute("NameU",k);n.setAttribute("Name",k);var H=m(c,E.XMLNS,"PageSheet"),B=p[k];H.appendChild(e("PageWidth",B.pageWidth,c));H.appendChild(e("PageHeight",B.pageHeight,c));H.appendChild(b("PageScale",B.pageScale,c));H.appendChild(b("DrawingScale",1,c));B=m(c,E.XMLNS,"Rel");B.setAttributeNS(E.XMLNS_R, -"r:id","rId"+z);var M=m(c,E.XMLNS,"Section");M.setAttribute("N","Layer");for(var T=g[k],F=0;F<T.length;F++){var O=m(c,E.XMLNS,"Row");O.setAttribute("IX",F+"");M.appendChild(O);O.appendChild(b("Name",T[F].name,c));O.appendChild(b("Color","255",c));O.appendChild(b("Status","0",c));O.appendChild(b("Visible",T[F].visible?"1":"0",c));O.appendChild(b("Print","1",c));O.appendChild(b("Active","0",c));O.appendChild(b("Lock",T[F].locked?"1":"0",c));O.appendChild(b("Snap","1",c));O.appendChild(b("Glue","1", -c));O.appendChild(b("NameUniv",T[F].name,c));O.appendChild(b("ColorTrans","0",c))}H.appendChild(M);n.appendChild(H);n.appendChild(B);f.appendChild(n);n=m(y,E.RELS_XMLNS,"Relationship");n.setAttribute("Id","rId"+z);n.setAttribute("Type",E.PAGES_TYPE);n.setAttribute("Target",A);x.appendChild(n);C(a,E.VISIO_PAGES+A,d[k]);z++}c.appendChild(f);y.appendChild(x);C(a,E.VISIO_PAGES+"pages.xml",c);C(a,E.VISIO_PAGES+"_rels/pages.xml.rels",y)}function B(a,b){var d=E.VISIO_PAGES_RELS+"page"+b+".xml.rels",g=mxUtils.createXmlDocument(), +"r:id","rId"+z);var M=m(c,E.XMLNS,"Section");M.setAttribute("N","Layer");for(var Q=g[k],F=0;F<Q.length;F++){var O=m(c,E.XMLNS,"Row");O.setAttribute("IX",F+"");M.appendChild(O);O.appendChild(b("Name",Q[F].name,c));O.appendChild(b("Color","255",c));O.appendChild(b("Status","0",c));O.appendChild(b("Visible",Q[F].visible?"1":"0",c));O.appendChild(b("Print","1",c));O.appendChild(b("Active","0",c));O.appendChild(b("Lock",Q[F].locked?"1":"0",c));O.appendChild(b("Snap","1",c));O.appendChild(b("Glue","1", +c));O.appendChild(b("NameUniv",Q[F].name,c));O.appendChild(b("ColorTrans","0",c))}H.appendChild(M);n.appendChild(H);n.appendChild(B);f.appendChild(n);n=m(y,E.RELS_XMLNS,"Relationship");n.setAttribute("Id","rId"+z);n.setAttribute("Type",E.PAGES_TYPE);n.setAttribute("Target",A);x.appendChild(n);C(a,E.VISIO_PAGES+A,d[k]);z++}c.appendChild(f);y.appendChild(x);C(a,E.VISIO_PAGES+"pages.xml",c);C(a,E.VISIO_PAGES+"_rels/pages.xml.rels",y)}function B(a,b){var d=E.VISIO_PAGES_RELS+"page"+b+".xml.rels",g=mxUtils.createXmlDocument(), p=m(g,E.RELS_XMLNS,"Relationships"),c=m(g,E.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");p.appendChild(c);var e=F.images;if(0<e.length)for(var y=0;y<e.length;y++)c=m(g,E.RELS_XMLNS,"Relationship"),c.setAttribute("Type",E.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(y+2)),c.setAttribute("Target","../media/"+e[y]),p.appendChild(c);g.appendChild(p);C(a,d,g)} -var E=this,F=new mxVsdxCanvas2D,M={},ba=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);g[b]=[];for(var p=0;p<d.length;p++)d[p].visible&&g[b].push({name:d[p].value||"Background",visible:d[p].visible,locked:d[p].style&&0<=d[p].style.indexOf("locked=1")})},b=new JSZip;F.init(b);M={};ba=1;var d={},g={},p={},e=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var y=c.editor.graph.getSelectionCells(), -x=c.currentPage,z=0;z<c.pages.length;z++){var k=c.pages[z];c.currentPage!=k&&c.selectPage(k,!0);var m=k.getName(),C=c.editor.graph,E=null;null!=C.themes&&"darkTheme"==C.defaultThemeName&&(E=C.stylesheet,C.stylesheet=C.getDefaultStylesheet(),C.refresh());try{var Pa=f(C);d[m]=A(C,Pa);a(C,m);B(b,z+1);p[m]=Pa}finally{null!=E&&(C.stylesheet=E,C.refresh())}}x!=c.currentPage&&c.selectPage(x,!0);c.editor.graph.setSelectionCells(y)}else C=c.editor.graph,Pa=f(C),m="Page1",d[m]=A(C,Pa),a(C,m),B(b,1),p[m]=Pa; -n(b,e);H(b,d,g,p);a=function(){b.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<F.filesLoading?F.onFilesLoaded=a:a()}return!0}catch(tb){return console.log(tb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships"; +var E=this,F=new mxVsdxCanvas2D,M={},ca=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);g[b]=[];for(var p=0;p<d.length;p++)d[p].visible&&g[b].push({name:d[p].value||"Background",visible:d[p].visible,locked:d[p].style&&0<=d[p].style.indexOf("locked=1")})},b=new JSZip;F.init(b);M={};ca=1;var d={},g={},p={},e=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var y=c.editor.graph.getSelectionCells(), +x=c.currentPage,z=0;z<c.pages.length;z++){var k=c.pages[z];c.currentPage!=k&&c.selectPage(k,!0);var m=k.getName(),C=c.editor.graph,E=null;null!=C.themes&&"darkTheme"==C.defaultThemeName&&(E=C.stylesheet,C.stylesheet=C.getDefaultStylesheet(),C.refresh());try{var sa=f(C);d[m]=A(C,sa);a(C,m);B(b,z+1);p[m]=sa}finally{null!=E&&(C.stylesheet=E,C.refresh())}}x!=c.currentPage&&c.selectPage(x,!0);c.editor.graph.setSelectionCells(y)}else C=c.editor.graph,sa=f(C),m="Page1",d[m]=A(C,sa),a(C,m),B(b,1),p[m]=sa; +n(b,e);H(b,d,g,p);a=function(){b.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<F.filesLoading?F.onFilesLoaded=a:a()}return!0}catch(sb){return console.log(sb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships"; VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml"; VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/"; VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)}; @@ -765,16 +767,16 @@ mxVsdxCanvas2D.prototype.image=function(c,n,m,k,f,e,b,a){var d=this,g="image"+(t !1;0==p.indexOf("svg")&&(p="png",y=!0);g+=p;e=new XMLHttpRequest;e.open("GET",f,!0);e.responseType="arraybuffer";e.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(y?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+g,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+g,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};e.send()}this.images.push(g);this.shapeImg={type:p,id:this.images.length+1};f=this.state;m*=f.scale;k*=f.scale; p=this.xmGeo;c=(c-p.x+f.dx)*f.scale;n=(p.height-n+p.y-f.dy)*f.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",c));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",n-k));this.shape.appendChild(this.createCellElemScaled("ImgWidth",m));this.shape.appendChild(this.createCellElemScaled("ImgHeight",k))}; mxVsdxCanvas2D.prototype.text=function(c,n,m,k,f,e,b,a,d,g,p,y,z){var x=this;if(this.textEnabled&&null!=f){mxUtils.isNode(f)&&(f=mxUtils.getOuterHtml(f));0==m&&0==k&&(k=mxUtils.getSizeForString(f,x.cellState.style.fontSize,x.cellState.style.fontFamily),m=1.2*k.width,k=1.2*k.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML= -f,f=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));g=this.state;p=this.xmGeo;m*=g.scale;k*=g.scale;var A=this.createElt("Section");A.setAttribute("N","Character");var C=this.createElt("Section");C.setAttribute("N","Paragraph");var H=this.createElt("Text"),B=0,E=0,F=0,M=0,ba=0,T=0,O=0,ga=function(b,d,g,p,c){var e=b.fontSize,y=b.fontFamily,f=mxUtils.getSizeForString(c,e,y);a&&f.width>m&&(f=mxUtils.getSizeForString(c,e,y,m));b.blockElem?(ba+=f.width,F=Math.min(Math.max(F,ba),m),ba=0, -T=Math.max(T,f.height),M+=T+O,O=T,T=0):(ba+=f.width,F=Math.min(Math.max(F,ba),m),T=Math.max(T,f.height),M=Math.max(M,T));f=x.createElt("Row");f.setAttribute("IX",B);b.fontColor&&f.appendChild(x.createCellElem("Color",b.fontColor));e&&f.appendChild(x.createCellElemScaled("Size",.97*e));y&&f.appendChild(x.createCellElem("Font",y));e=0;b.bold&&(e|=17);b.italic&&(e|=34);b.underline&&(e|=4);f.appendChild(x.createCellElem("Style",e));f.appendChild(x.createCellElem("Case","0"));f.appendChild(x.createCellElem("Pos", +f,f=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));g=this.state;p=this.xmGeo;m*=g.scale;k*=g.scale;var A=this.createElt("Section");A.setAttribute("N","Character");var C=this.createElt("Section");C.setAttribute("N","Paragraph");var H=this.createElt("Text"),B=0,E=0,F=0,M=0,ca=0,Q=0,O=0,fa=function(b,d,g,p,c){var e=b.fontSize,y=b.fontFamily,f=mxUtils.getSizeForString(c,e,y);a&&f.width>m&&(f=mxUtils.getSizeForString(c,e,y,m));b.blockElem?(ca+=f.width,F=Math.min(Math.max(F,ca),m),ca=0, +Q=Math.max(Q,f.height),M+=Q+O,O=Q,Q=0):(ca+=f.width,F=Math.min(Math.max(F,ca),m),Q=Math.max(Q,f.height),M=Math.max(M,Q));f=x.createElt("Row");f.setAttribute("IX",B);b.fontColor&&f.appendChild(x.createCellElem("Color",b.fontColor));e&&f.appendChild(x.createCellElemScaled("Size",.97*e));y&&f.appendChild(x.createCellElem("Font",y));e=0;b.bold&&(e|=17);b.italic&&(e|=34);b.underline&&(e|=4);f.appendChild(x.createCellElem("Style",e));f.appendChild(x.createCellElem("Case","0"));f.appendChild(x.createCellElem("Pos", "0"));f.appendChild(x.createCellElem("FontScale","1"));f.appendChild(x.createCellElem("Letterspace","0"));d.appendChild(f);d=x.createElt("Row");d.setAttribute("IX",E);switch(b.align){case "left":e=0;break;case "center":e=1;break;case "right":e=2;break;case "start":e=0;break;case "end":e=2;break;case "justify":e=0;break;default:e=1}d.appendChild(x.createCellElem("HorzAlign",e));g.appendChild(d);g=x.createElt("cp");g.setAttribute("IX",B++);p.appendChild(g);b=x.xmlDoc.createTextNode(c+(b.blockElem?"\n": -""));p.appendChild(b)},Z=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var g=a[d];if(3==g.nodeType){var p=x.cellState.style.fontStyle,c={fontColor:b.fontColor||x.cellState.style.fontColor,fontSize:b.fontSize||x.cellState.style.fontSize,fontFamily:b.fontFamily||x.cellState.style.fontFamily,align:b.align||x.cellState.style.align,bold:b.bold||p&1,italic:b.italic||p&2,underline:b.underline||p&4},p=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(p=!0,d++);ga(c,A,C,H,(b.OL?b.LiIndex+". ":"")+ +""));p.appendChild(b)},aa=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var g=a[d];if(3==g.nodeType){var p=x.cellState.style.fontStyle,c={fontColor:b.fontColor||x.cellState.style.fontColor,fontSize:b.fontSize||x.cellState.style.fontSize,fontFamily:b.fontFamily||x.cellState.style.fontFamily,align:b.align||x.cellState.style.align,bold:b.bold||p&1,italic:b.italic||p&2,underline:b.underline||p&4},p=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(p=!0,d++);fa(c,A,C,H,(b.OL?b.LiIndex+". ":"")+ g.textContent+(p?"\n":""))}else if(1==g.nodeType){var p=g.nodeName.toUpperCase(),e=g.childNodes.length,c=window.getComputedStyle(g,null),y="bold"==c.getPropertyValue("font-weight")||b.bold,f="italic"==c.getPropertyValue("font-style")||b.italic,z=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,k=c.getPropertyValue("text-align"),m;m=c.getPropertyValue("color");m=(m=m.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===m.length?"#"+("0"+parseInt(m[1], 10).toString(16)).slice(-2)+("0"+parseInt(m[2],10).toString(16)).slice(-2)+("0"+parseInt(m[3],10).toString(16)).slice(-2):"";c={bold:y,italic:f,underline:z,align:k,fontColor:m,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==p||"LI"==p,OL:b.OL,LiIndex:b.LiIndex};"UL"==p?(y=x.createElt("Row"),y.setAttribute("IX",E),y.appendChild(x.createCellElem("HorzAlign","0")),y.appendChild(x.createCellElem("Bullet", -"1")),C.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",E++),H.appendChild(y)):"OL"==p?c.OL=!0:"LI"==p&&(c.LiIndex=d+1);0<e?(Z(g.childNodes,c),"UL"==p&&(y=x.createElt("Row"),y.setAttribute("IX",E),y.appendChild(x.createCellElem("Bullet","0")),C.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",E++),H.appendChild(y)),ga(c,A,C,H,"")):ga(c,A,C,H,(b.OL?b.LiIndex+". ":"")+g.textContent)}}};"html"==d&&mxClient.IS_SVG?(f=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1], -null!=f&&Z(f.childNodes,{})):ga({fontColor:x.cellState.style.fontColor,fontSize:x.cellState.style.fontSize,fontFamily:x.cellState.style.fontFamily},A,C,H,f);d=f=0;k=Math.max(k,M);m=Math.max(m,F);z=m/2;var Y=k/2,ca=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ia=ca*Math.PI/180;switch(e){case "right":0!=ca?(c-=z*Math.cos(ia),n-=z*Math.sin(ia)):f=F/2;break;case "left":0!=ca?(c+=z*Math.cos(ia),n+=z*Math.sin(ia)):f=-F/2}switch(b){case "top":0!=ca?(c+=Y*Math.sin(ia),n+=Y*Math.cos(ia)): -d=M/2;break;case "bottom":0!=ca?(c-=Y*Math.sin(ia),n-=Y*Math.cos(ia)):d=-M/2}c=(c-p.x+g.dx)*g.scale;n=(p.height-n+p.y-g.dy)*g.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",n));this.shape.appendChild(this.createCellElemScaled("TxtWidth",m));this.shape.appendChild(this.createCellElemScaled("TxtHeight",k));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",z+f));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", -Y+d));y-=ca;0!=y&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-y)*Math.PI/180));this.shape.appendChild(A);this.shape.appendChild(C);this.shape.appendChild(H)}};mxVsdxCanvas2D.prototype.rotate=function(c,n,m,k,f){0!=c&&(n=this.state,k+=n.dx,f+=n.dy,k*=n.scale,f*=n.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),n.rotation+=c,n.rotationCx=k,n.rotationCy=f)}; +"1")),C.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",E++),H.appendChild(y)):"OL"==p?c.OL=!0:"LI"==p&&(c.LiIndex=d+1);0<e?(aa(g.childNodes,c),"UL"==p&&(y=x.createElt("Row"),y.setAttribute("IX",E),y.appendChild(x.createCellElem("Bullet","0")),C.appendChild(y),y=x.createElt("pp"),y.setAttribute("IX",E++),H.appendChild(y)),fa(c,A,C,H,"")):fa(c,A,C,H,(b.OL?b.LiIndex+". ":"")+g.textContent)}}};"html"==d&&mxClient.IS_SVG?(f=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0: +1],null!=f&&aa(f.childNodes,{})):fa({fontColor:x.cellState.style.fontColor,fontSize:x.cellState.style.fontSize,fontFamily:x.cellState.style.fontFamily},A,C,H,f);d=f=0;k=Math.max(k,M);m=Math.max(m,F);z=m/2;var Z=k/2,S=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),ha=S*Math.PI/180;switch(e){case "right":0!=S?(c-=z*Math.cos(ha),n-=z*Math.sin(ha)):f=F/2;break;case "left":0!=S?(c+=z*Math.cos(ha),n+=z*Math.sin(ha)):f=-F/2}switch(b){case "top":0!=S?(c+=Z*Math.sin(ha),n+=Z*Math.cos(ha)): +d=M/2;break;case "bottom":0!=S?(c-=Z*Math.sin(ha),n-=Z*Math.cos(ha)):d=-M/2}c=(c-p.x+g.dx)*g.scale;n=(p.height-n+p.y-g.dy)*g.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",c));this.shape.appendChild(this.createCellElemScaled("TxtPinY",n));this.shape.appendChild(this.createCellElemScaled("TxtWidth",m));this.shape.appendChild(this.createCellElemScaled("TxtHeight",k));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",z+f));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", +Z+d));y-=S;0!=y&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-y)*Math.PI/180));this.shape.appendChild(A);this.shape.appendChild(C);this.shape.appendChild(H)}};mxVsdxCanvas2D.prototype.rotate=function(c,n,m,k,f){0!=c&&(n=this.state,k+=n.dx,f+=n.dy,k*=n.scale,f*=n.scale,this.shape.appendChild(this.createCellElem("Angle",(360-c)*Math.PI/180)),n.rotation+=c,n.rotationCx=k,n.rotationCy=f)}; mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(c,n){this.pos=0;this.buffer=c;this.is_with_alpha=!!n;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()} BmpDecoder.prototype.parseHeader=function(){var c=this.buffer;this.fileSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.reserved=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.offset=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.headerSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.width=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos]; this.pos+=4;this.height=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.planes=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.bitPP=c[this.pos+1]<<8|c[this.pos];this.pos+=2;this.compress=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.rawSize=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.hr=c[this.pos+3]<<24|c[this.pos+2]<<16|c[this.pos+1]<<8|c[this.pos];this.pos+=4;this.vr=c[this.pos+3]<<24|c[this.pos+ @@ -793,7 +795,7 @@ Base64.decode("dmlzaW8=",!0));return f.vsdxPlaceholder};f.parsererrorNS_$LI$=fun d){var g=this,p={},y={},z=function(){for(var a=f.vsdxPlaceholder+"/document.xml",d=p[a]?p[a]:null,e=d.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling;if(null!=e&&1==e.nodeType)g.importNodes(d,e,a,p);else return null;g.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,p,y);for(var a=g.vsdxModel.getPages(),x=g.RESPONSE_HEADER,z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=z[a].getValue();var b=k.createMxGraph();b.getModel().beginUpdate();k.importPage(a,b,b.getDefaultParent()); k.scaleGraph(b,a.getPageScale()/a.getDrawingScale());b.getModel().endUpdate();x=x.concat(g.RESPONSE_DIAGRAM_START);x=x.concat(g.processPage(b,a));x=x.concat(g.RESPONSE_DIAGRAM_END)},k=g,d=0;d<z.length;d++)a(d);x=x.concat(g.RESPONSE_END);b&&b(x)},x=0,k=0,m=function(){if(k==x)try{z()}catch(H){console.log(H),null!=d?d():b("")}};JSZip.loadAsync(e).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),e=c.length;c.indexOf(".xml")==e-4||c.indexOf(".xml.rels")== e-9?(x++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=f.parseXml(a);null==b&&0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5)&&(b=f.parseXml(f.decodeUTF16LE(a)));null!=b&&(b.vsdxFileName=d,p[d]=b)}k++;m()})):0===c.indexOf(f.vsdxPlaceholder+"/media")&&(x++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(c,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData; -b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var p=new XMLHttpRequest;p.open("POST",EMF_CONVERT_URL);p.responseType="blob";g.editorUi.addRemoteServiceSecurityCheck(p);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var a=new FileReader;a.readAsDataURL(p.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;y[d]=a.result.substr(b);k++;m()}}catch(Y){console.log(Y),k++,m()}else k++,m()});p.send(b)}): +b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var p=new XMLHttpRequest;p.open("POST",EMF_CONVERT_URL);p.responseType="blob";g.editorUi.addRemoteServiceSecurityCheck(p);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var a=new FileReader;a.readAsDataURL(p.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;y[d]=a.result.substr(b);k++;m()}}catch(Z){console.log(Z),k++,m()}else k++,m()});p.send(b)}): (k++,m()):function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");y[d]=a.substr(23);k++;m()}):b.async("base64").then(function(a){y[d]=a;k++;m()}))})},function(a){null!=d&&d(a)})};f.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1); c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};f.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var g=mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":""),d=d+('<diagram name="'+g+'" id="'+g.replace(/\s/g,"_")+'">');return d+=Graph.compress(a)};f.prototype.scalePoint=function(c,b){null!=c&&(c.x*= b,c.y*=b);return c};f.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};f.prototype.importNodes=function(c,b,a,d){var g=a.lastIndexOf("/"),p=a,e=a;if(-1!==g&&(p=a.substring(0,g),e=a.substring(g+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,p+"/_rels/"+e+".rels"),null!=a)){var f=a.getElementsByTagName("Relationship");a={};for(g=0;g<f.length;g++){var e=f.item(g),x=e.getAttribute("Id"),e=e.getAttribute("Target");a[x]=e}b=b.getElementsByTagName("Rel"); @@ -840,7 +842,7 @@ m.mxVssxCodec=k;k.__class="com.mxgraph.io.mxVssxCodec"})(n.io||(n.io={}))})(c.mx (function(c){(function(c){(function(c){(function(c){(function(c){var e=function(){function b(a,b,g){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=g}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA= function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();c.Row=e;e.__class="com.mxgraph.io.vsdx.geometry.Row"})(c.geometry||(c.geometry={}))})(c.vsdx||(c.vsdx={}))})(c.io||(c.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(g){}return null};b.getRowObj=function(a,d){var g=a.getAttribute("T"),p=b.getIndex(a),e;e=(e=a.getAttribute("Del"))&&e.equals?e.equals("1"):"1"===e;if(!e){var f=null;p<=d.length&&(f=d[p-1]);var x=e=null,k=null, -m=null,n=null,B=null,E=null,F=null;null!=f&&(e=f.x,x=f.y,k=f.getA(),m=f.getB(),n=f.getC(),B=f.getD(),F=f.getFormulaA(),E=f.getFormulaE());for(var f=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),M=0;M<f.length;M++){var ba=f[M],T=ba.getAttribute("N"),O=ba.getAttribute("V");switch(T){case "X":e=b.getDoubleVal(O);break;case "Y":x=b.getDoubleVal(O);break;case "A":k=b.getDoubleVal(O);F=ba.getAttribute("V");break;case "B":m=b.getDoubleVal(O);break;case "C":n=b.getDoubleVal(O);break;case "D":B= +m=null,n=null,B=null,E=null,F=null;null!=f&&(e=f.x,x=f.y,k=f.getA(),m=f.getB(),n=f.getC(),B=f.getD(),F=f.getFormulaA(),E=f.getFormulaE());for(var f=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),M=0;M<f.length;M++){var ca=f[M],Q=ca.getAttribute("N"),O=ca.getAttribute("V");switch(Q){case "X":e=b.getDoubleVal(O);break;case "Y":x=b.getDoubleVal(O);break;case "A":k=b.getDoubleVal(O);F=ca.getAttribute("V");break;case "B":m=b.getDoubleVal(O);break;case "C":n=b.getDoubleVal(O);break;case "D":B= b.getDoubleVal(O);break;case "E":E=O}}switch(g){case "MoveTo":return new c.mxgraph.io.vsdx.geometry.MoveTo(p,e,x);case "LineTo":return new c.mxgraph.io.vsdx.geometry.LineTo(p,e,x);case "ArcTo":return new c.mxgraph.io.vsdx.geometry.ArcTo(p,e,x,k);case "Ellipse":return new c.mxgraph.io.vsdx.geometry.Ellipse(p,e,x,k,m,n,B);case "EllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.EllipticalArcTo(p,e,x,k,m,n,B);case "InfiniteLine":return new c.mxgraph.io.vsdx.geometry.InfiniteLine(p,e,x,k,m);case "NURBSTo":return new c.mxgraph.io.vsdx.geometry.NURBSTo(p, e,x,k,m,n,B,E);case "PolylineTo":return new c.mxgraph.io.vsdx.geometry.PolylineTo(p,e,x,F);case "RelCubBezTo":return new c.mxgraph.io.vsdx.geometry.RelCubBezTo(p,e,x,k,m,n,B);case "RelEllipticalArcTo":return new c.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(p,e,x,k,m,n,B);case "RelLineTo":return new c.mxgraph.io.vsdx.geometry.RelLineTo(p,e,x);case "RelMoveTo":return new c.mxgraph.io.vsdx.geometry.RelMoveTo(p,e,x);case "RelQuadBezTo":return new c.mxgraph.io.vsdx.geometry.RelQuadBezTo(p,e,x,k,m);case "SplineKnot":return new c.mxgraph.io.vsdx.geometry.SplineKnot(p, e,x,k);case "SplineStart":return new c.mxgraph.io.vsdx.geometry.SplineStart(p,e,x,k,m,n,B)}}return new c.mxgraph.io.vsdx.geometry.DelRow(p)};return b}();f.RowFactory=e;e.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); @@ -1027,10 +1029,10 @@ m=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),m=d-m,n=this.c*c. '" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(e)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(g)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(n)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(c.mxgraph.io.vsdx.geometry.Row);f.Ellipse= e;e.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,g,c,e,f,k,m){a=b.call(this,a,g,c)||this;a.a=e;a.b=f;a.c=k;a.d=m;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),e=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=d-f,k=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(), -m=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.c,B=this.d,e=100*e/g,f=100*f/d,E=b.getLastX()*g/100,F=b.getLastY()*d/100,M=e*g/100,ba=f*d/100,T=d-m,O=-n,n=Math.sqrt(E*E+F*F)*Math.cos(Math.atan2(F,E)-O),m=Math.sqrt(E*E+F*F)*Math.sin(Math.atan2(F,E)-O),ga=Math.sqrt(M*M+ba*ba)*Math.cos(Math.atan2(ba,M)-O),Z=Math.sqrt(M*M+ba*ba)*Math.sin(Math.atan2(ba,M)-O),Y=Math.sqrt(k*k+T*T)*Math.cos(Math.atan2(T,k)-O),ca=Math.sqrt(k*k+T*T)*Math.sin(Math.atan2(T,k)-O),ia=((n-ga)*(n+ga)*(Z-ca)- -(ga-Y)*(ga+Y)*(m-Z)+B*B*(m-Z)*(Z-ca)*(m-ca))/(2*((n-ga)*(Z-ca)-(ga-Y)*(m-Z))),Ea=((n-ga)*(ga-Y)*(n-Y)/(B*B)+(ga-Y)*(m-Z)*(m+Z)-(n-ga)*(Z-ca)*(Z+ca))/(2*((ga-Y)*(m-Z)-(n-ga)*(Z-ca))),da=n-ia,Ka=m-Ea,da=Math.sqrt(da*da+Ka*Ka*B*B),B=da/B,O=180*O/Math.PI,e=Math.round(100*e)/100,f=Math.round(100*f)/100,da=Math.round(100*da/g*100)/100,B=Math.round(100*B/d*100)/100,O=Math.round(100*O)/100,d=0<(M-E)*(T-F)-(ba-F)*(k-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ia,Ea,n,m,ga,Z,Y,ca)&&this.isReflexAngle(ia, -Ea,n,m,ga,Z,Y,ca)&&(g="1");b.setLastX(e);b.setLastY(f);return'<arc rx="'+(new String(da)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(e)).toString()+'" y="'+(new String(f)).toString()+'" x-axis-rotation="'+(new String(O)).toString()+'" large-arc-flag="'+g+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,e,f,k,m,n){c-=a;e-=b;k-=b;f=m-a;n-=b;b=a=0;c=180*(Math.atan2(e,c)-Math.atan2(b,a))/Math.PI;f=180*(Math.atan2(k,f)-Math.atan2(b,a))/Math.PI;a=180*(Math.atan2(n, -m)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;f=(f-a)%360;180<c?c-=360:-180>c&&(c+=360);180<f?f-=360:-180>f&&(f+=360);return(0<c&&0>f||0>c&&0<f)&&180<Math.abs(c-f)?!0:!1};return a}(c.mxgraph.io.vsdx.geometry.Row);f.EllipticalArcTo=e;e.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +m=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.c,B=this.d,e=100*e/g,f=100*f/d,E=b.getLastX()*g/100,F=b.getLastY()*d/100,M=e*g/100,ca=f*d/100,Q=d-m,O=-n,n=Math.sqrt(E*E+F*F)*Math.cos(Math.atan2(F,E)-O),m=Math.sqrt(E*E+F*F)*Math.sin(Math.atan2(F,E)-O),fa=Math.sqrt(M*M+ca*ca)*Math.cos(Math.atan2(ca,M)-O),aa=Math.sqrt(M*M+ca*ca)*Math.sin(Math.atan2(ca,M)-O),Z=Math.sqrt(k*k+Q*Q)*Math.cos(Math.atan2(Q,k)-O),S=Math.sqrt(k*k+Q*Q)*Math.sin(Math.atan2(Q,k)-O),ha=((n-fa)*(n+fa)*(aa-S)- +(fa-Z)*(fa+Z)*(m-aa)+B*B*(m-aa)*(aa-S)*(m-S))/(2*((n-fa)*(aa-S)-(fa-Z)*(m-aa))),ib=((n-fa)*(fa-Z)*(n-Z)/(B*B)+(fa-Z)*(m-aa)*(m+aa)-(n-fa)*(aa-S)*(aa+S))/(2*((fa-Z)*(m-aa)-(n-fa)*(aa-S))),ra=n-ha,Ja=m-ib,ra=Math.sqrt(ra*ra+Ja*Ja*B*B),B=ra/B,O=180*O/Math.PI,e=Math.round(100*e)/100,f=Math.round(100*f)/100,ra=Math.round(100*ra/g*100)/100,B=Math.round(100*B/d*100)/100,O=Math.round(100*O)/100,d=0<(M-E)*(Q-F)-(ca-F)*(k-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ha,ib,n,m,fa,aa,Z,S)&& +this.isReflexAngle(ha,ib,n,m,fa,aa,Z,S)&&(g="1");b.setLastX(e);b.setLastY(f);return'<arc rx="'+(new String(ra)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(e)).toString()+'" y="'+(new String(f)).toString()+'" x-axis-rotation="'+(new String(O)).toString()+'" large-arc-flag="'+g+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,e,f,k,m,n){c-=a;e-=b;k-=b;f=m-a;n-=b;b=a=0;c=180*(Math.atan2(e,c)-Math.atan2(b,a))/Math.PI;f=180*(Math.atan2(k,f)-Math.atan2(b, +a))/Math.PI;a=180*(Math.atan2(n,m)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;f=(f-a)%360;180<c?c-=360:-180>c&&(c+=360);180<f?f-=360:-180>f&&(f+=360);return(0<c&&0>f||0>c&&0<f)&&180<Math.abs(c-f)?!0:!1};return a}(c.mxgraph.io.vsdx.geometry.Row);f.EllipticalArcTo=e;e.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,g,c,e,f){a=b.call(this,a,g,c)||this;a.a=e;a.b=f;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);f.InfiniteLine=e;e.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,g,c){return b.call(this,a,g,c)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,g=a.y,e=b.getHeight(),f=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/f*100)/100;g=Math.round(100*(100-100*g/e))/100;a.x=d;a.y=g;b.setLastX(d);b.setLastY(g);return'<line x="'+ (new String(d)).toString()+'" y="'+(new String(g)).toString()+'"/>'};return a}(c.mxgraph.io.vsdx.geometry.Row);f.LineTo=e;e.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); @@ -1257,8 +1259,8 @@ com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.ar com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$(); EditorUi.prototype.doImportVisio=function(c,n,m,k){k=k||c.name;null!=k&&/(\.vs(x|sx?))($|\?)/i.test(k)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(c,n,null,m):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(c,n,null,m)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y\:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x\:Static\s+(.+)\.(.+)\}$/; mxGraphMlCodec.prototype.decode=function(c,n,m){try{var k=mxUtils.parseXml(c),f=this.getDirectChildNamedElements(k.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(k.documentElement);c='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(k=0;k<f.length;k++){var e=f[k],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(e,b,b.getDefaultParent()),k=0;k<this.edges.length;k++)for(var d=this.edges[k],g=d.edges,p=d.parent,y=d.dx,z=d.dy, -x=0;x<g.length;x++)this.importEdge(g[x],b,p,y,z)}catch(ia){throw console.log(ia),ia;}finally{a.endUpdate()}a.beginUpdate();try{var A=b.getModel().cells,C;for(C in A){var H=A[C];if(H.edge&&0<H.getChildCount())for(k=0;k<H.getChildCount();k++){var B=H.children[k].geometry;if(B.adjustIt){var E=b.view.getState(H),F=E.absolutePoints,M=F[0],ba=F[F.length-1],T=B.x,O=B.y,y=ba.x-M.x,z=ba.y-M.y,ga=M.x+T*y,Z=M.y+T*z,Y=Math.sqrt(y*y+z*z),y=y/Y,z=z/Y,ga=ga-O*z,Z=Z+O*y,ca=b.view.getRelativePoint(E,ga,Z);B.x=ca.x; -B.y=ca.y}}}}catch(ia){throw console.log(ia),ia;}finally{a.endUpdate()}c+=this.processPage(b,k+1)}n&&n(c+"</mxfile>")}catch(ia){m&&m(ia)}}; +x=0;x<g.length;x++)this.importEdge(g[x],b,p,y,z)}catch(ha){throw console.log(ha),ha;}finally{a.endUpdate()}a.beginUpdate();try{var A=b.getModel().cells,C;for(C in A){var H=A[C];if(H.edge&&0<H.getChildCount())for(k=0;k<H.getChildCount();k++){var B=H.children[k].geometry;if(B.adjustIt){var E=b.view.getState(H),F=E.absolutePoints,M=F[0],ca=F[F.length-1],Q=B.x,O=B.y,y=ca.x-M.x,z=ca.y-M.y,fa=M.x+Q*y,aa=M.y+Q*z,Z=Math.sqrt(y*y+z*z),y=y/Z,z=z/Z,fa=fa-O*z,aa=aa+O*y,S=b.view.getRelativePoint(E,fa,aa);B.x= +S.x;B.y=S.y}}}}catch(ha){throw console.log(ha),ha;}finally{a.endUpdate()}c+=this.processPage(b,k+1)}n&&n(c+"</mxfile>")}catch(ha){m&&m(ha)}}; mxGraphMlCodec.prototype.initializeKeys=function(c){var n=this.getDirectChildNamedElements(c,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]= {};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var m,k=0;k<n.length;k++){var f=this.dataElem2Obj(n[k]),e=f[mxGraphMlConstants.ID],b=f[mxGraphMlConstants.KEY_FOR],a=f[mxGraphMlConstants.KEY_NAME],d=f[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(m=e);a=a?a:d;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]= {key:e,keyObj:f};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:e,keyObj:f};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:e,keyObj:f};break;case mxGraphMlConstants.ALL:f={key:e,keyObj:f},this.nodesKeys[a]=f,this.edgesKeys[a]=f,this.portsKeys[a]=f}}c=this.getDirectChildNamedElements(c,mxGraphMlConstants.DATA);for(k=0;k<c.length;k++)if(c[k].getAttribute(mxGraphMlConstants.KEY)==m)for(b=this.getDirectChildNamedElements(c[k],mxGraphMlConstants.Y_SHARED_DATA),n=0;n<b.length;n++)for(a= @@ -1283,9 +1285,9 @@ var b=mxUtils.clone(c);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a= mxUtils.clone(c);y.defaults={shape:"js:BpmnChoreography"};var z=mxUtils.clone(c);z.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};z.inset="strokeWidth";z.radius="arcSize";z.drawShadow={key:"shadow",mod:"bool"};z.color={key:"fillColor",mod:"color",addGradient:"north"};z["color.yjs:Color.value"]=z.color;var x=mxUtils.clone(c);x.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};x.drawShadow={key:"shadow",mod:"bool"};var A=mxUtils.clone(c);A.defaults={shape:"swimlane", startSize:20,strokeWidth:4,spacingLeft:10};A.isCollapsible={key:"collapsible",mod:"bool"};A.borderColor={key:"strokeColor",mod:"color"};A.folderFrontColor={key:"fillColor",mod:"color"};var C=mxUtils.clone(c);C.defaults={shape:"swimlane",startSize:20,spacingLeft:10};C["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}}; var H=mxUtils.clone(c);H.defaults={shape:"js:table"};var B=mxUtils.clone(c);B.defaults={shape:"image"};B.image=function(a,b){b.image=a};var E=mxUtils.clone(c);E.defaults={shape:"image"};E["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(a,b){b.image="data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a))};var F=mxUtils.clone(c);F.defaults={shape:"swimlane",startSize:20};F["y:Shape.type"]=function(a,b){"roundrectangle"==a&&(b.rounded=1,b.arcSize=5)};var M=mxUtils.clone(c);M.defaults={shape:"js:table2"}; -var ba=mxUtils.clone(c);ba.defaults={gradientDirection:"east"};ba["y:Fill"].color2={key:"gradientColor",mod:"color"};ba["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"}, +var ca=mxUtils.clone(c);ca.defaults={gradientDirection:"east"};ca["y:Fill"].color2={key:"gradientColor",mod:"color"};ca["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"}, "com.yworks.sbgn.style.radius":{key:"arcSize",mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(n,{"yjs:ShapeNodeStyle":c,"demostyle:FlowchartNodeStyle":c,"demostyle:AssetNodeStyle":k,"bpmn:ActivityNodeStyle":f,"bpmn:GatewayNodeStyle":e,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":g,"bpmn:GroupNodeStyle":p,"bpmn:ChoreographyNodeStyle":y,"yjs:BevelNodeStyle":z,"yjs:ShinyPlateNodeStyle":x,"demostyle:DemoGroupStyle":A, -"yjs:CollapsibleNodeStyleDecorator":C,"bpmn:PoolNodeStyle":H,"yjs:TableNodeStyle":H,"demotablestyle:DemoTableStyle":H,"yjs:ImageNodeStyle":B,"y:ShapeNode":c,"y:GenericNode":ba,"y:GenericGroupNode":ba,"y:TableNode":M,"y:SVGNode":E,"y:GroupNode":F},m)}; +"yjs:CollapsibleNodeStyleDecorator":C,"bpmn:PoolNodeStyle":H,"yjs:TableNodeStyle":H,"demotablestyle:DemoTableStyle":H,"yjs:ImageNodeStyle":B,"y:ShapeNode":c,"y:GenericNode":ca,"y:GenericGroupNode":ca,"y:TableNode":M,"y:SVGNode":E,"y:GroupNode":F},m)}; mxGraphMlCodec.prototype.handleTemplates=function(c,n,m,k){if(c){for(var f=m.geometry.width,e=m.geometry.height,b='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+f+" "+e+'"><g>',a,d=[],g=/\{TemplateBinding\s+([^}]+)\}/g;null!=(a=g.exec(c));){var p="";switch(a[1]){case "width":p=f;break;case "height":p=e}d.push({match:a[0],repl:p})}if(n&&n["y:Json"])for(e=JSON.parse(n["y:Json"]["#text"]),g=/\{Binding\s+([^}]+)\}/g;null!=(a=g.exec(c));)if(p=a[1].split(","), f=e[p[0]]){if(1<p.length&&p[1].indexOf("Converter=")){var y=mxGraphMlConverters[p[1].substr(11)];y&&(arguments=[f],p[2]&&arguments.push(p[2].substr(11)),f=y.apply(null,arguments))}d.push({match:a[0],repl:mxUtils.htmlEntities(f)})}for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);d=[];for(e=/\<text.+data-content="([^"]+).+\<\/text\>/g;null!=(a=e.exec(c));)f=a[0].substr(0,a[0].length-7)+a[1]+"</text>",d.push({match:a[0],repl:f});for(a=0;a<d.length;a++)c=c.replace(d[a].match,d[a].repl);b=b+c+ "</g></svg>";k.shape="image";k.image="data:image/svg+xml,"+(window.btoa?btoa(b):Base64.encode(b))}}; diff --git a/src/main/webapp/js/mxgraph/Editor.js b/src/main/webapp/js/mxgraph/Editor.js index 71f08db4e..54c8f41dd 100644 --- a/src/main/webapp/js/mxgraph/Editor.js +++ b/src/main/webapp/js/mxgraph/Editor.js @@ -97,6 +97,12 @@ Editor.pageCounter = 0; */ Editor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS; +/** + * + */ +Editor.moveImage = (mxClient.IS_SVG) ? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==' : + IMAGE_PATH + '/move.png'; + /** * Images below are for lightbox and embedding toolbars. */ diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js index 515ea83e7..9ac58786a 100644 --- a/src/main/webapp/js/mxgraph/Graph.js +++ b/src/main/webapp/js/mxgraph/Graph.js @@ -599,9 +599,17 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone) if (mxUtils.getValue(style, 'part', '0') == '1') { - var parent = this.graph.model.getParent(cells[i]); - - if (this.graph.model.isVertex(parent) && mxUtils.indexOf(cells, parent) < 0) + var parent = cells[i]; + + do + { + parent = this.graph.model.getParent(parent); + state = this.graph.view.getState(parent); + style = (state != null) ? state.style : this.graph.getCellStyle(parent); + } while (parent != null && mxUtils.getValue(style, 'part', '0') == '1') + + if (this.graph.model.isVertex(parent) && + mxUtils.indexOf(cells, parent) < 0) { newCells.push(parent); } @@ -1882,11 +1890,7 @@ Graph.prototype.initLayoutManager = function() { this.layoutManager = new mxLayoutManager(this); - // Using shared instances for some layouts - var organicLayout = new mxFastOrganicLayout(this); - var stackLayout = new mxStackLayout(this, true); - var treeLayout = new mxCompactTreeLayout(this); - var circleLayout = new mxCircleLayout(this); + // Using shared instances for table layouts var rowLayout = new TableRowLayout(this); var tableLayout = new TableLayout(this); @@ -1901,6 +1905,7 @@ Graph.prototype.initLayoutManager = function() { if (style['childLayout'] == 'stackLayout') { + var stackLayout = new mxStackLayout(this.graph, true); stackLayout.resizeParentMax = mxUtils.getValue(style, 'resizeParentMax', '1') == '1'; stackLayout.horizontal = mxUtils.getValue(style, 'horizontalStack', '1') == '1'; stackLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1'; @@ -1917,6 +1922,7 @@ Graph.prototype.initLayoutManager = function() } else if (style['childLayout'] == 'treeLayout') { + var treeLayout = new mxCompactTreeLayout(this.graph); treeLayout.horizontal = mxUtils.getValue(style, 'horizontalTree', '1') == '1'; treeLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1'; treeLayout.groupPadding = mxUtils.getValue(style, 'parentPadding', 20); @@ -1949,13 +1955,14 @@ Graph.prototype.initLayoutManager = function() } else if (style['childLayout'] == 'circleLayout') { - return circleLayout; + return new mxCircleLayout(this.graph); } else if (style['childLayout'] == 'organicLayout') { - return organicLayout; + return new mxFastOrganicLayout(this.graph); } - else if (this.graph.isTableRow(cell)) + else if (this.graph.isTableRow(cell) || + this.graph.isTableCell(cell)) { return rowLayout; } @@ -4304,12 +4311,10 @@ Graph.prototype.createTable = function(rowCount, colCount, w, h) return this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, rowCount * h, 'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;'), this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, h, - 'html=1;whiteSpace=wrap;container=1;collapsible=0;' + - 'childLayout=rowLayout;points=[[0,0.5],[1,0.5]];'), + 'html=1;whiteSpace=wrap;container=1;collapsible=0;points=[[0,0.5],[1,0.5]];part=1;'), this.createVertex(null, null, '', 0, 0, w, h, - 'html=1;whiteSpace=wrap;connectable=0;'), - colCount), - rowCount); + 'html=1;whiteSpace=wrap;connectable=0;part=1;'), + colCount), rowCount); }; /** @@ -4320,20 +4325,22 @@ Graph.prototype.createCrossFunctionalSwimlane = function(rowCount, colCount, w, w = (w != null) ? w : 120; h = (h != null) ? h : 120; - var table = this.createVertex(null, null, '', 0, 0, colCount * w, rowCount * h, - 'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;'); + var s = 'swimlane;html=1;whiteSpace=wrap;container=1;' + + 'collapsible=0;recursiveResize=0;expand=0;'; + + var table = this.createVertex(null, null, '', + 0, 0, colCount * w, rowCount * h, + s + 'childLayout=tableLayout;'); var row = this.createVertex(null, null, '', 0, 0, colCount * w, h, - 'swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;' + - 'childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;'); - table.insert(this.createParent(row, this.createVertex(null, null, '', 0, 0, w, h, - 'swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;'), - colCount)); + s + 'horizontal=0;points=[[0,0.5],[1,0.5]];part=1;'); + table.insert(this.createParent(row, this.createVertex(null, null, '', + 0, 0, w, h, s + 'connectable=0;part=1;'), colCount)); if (rowCount > 1) { return this.createParent(table, this.createParent(row, this.createVertex(null, null, '', 0, 0, w, h, - 'html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;'), + s + 'connectable=0;part=1;startSize=0;'), colCount), rowCount - 1); } else @@ -4466,7 +4473,7 @@ Graph.prototype.tableResized = function(table) { var row = model.getChildAt(table, i); - if (row != null) + if (row != null && model.isVertex(row)) { var rowGeo = this.getCellGeometry(row); @@ -4511,13 +4518,17 @@ Graph.prototype.setRowHeight = function(row, height) for (var i = 0; i < model.getChildCount(row); i++) { var child = model.getChildAt(row, i); - var childGeo = this.getCellGeometry(child); - if (childGeo != null) + if (model.isVertex(child)) { - childGeo = childGeo.clone(); - childGeo.height = height; - model.setGeometry(child, childGeo); + var childGeo = this.getCellGeometry(child); + + if (childGeo != null) + { + childGeo = childGeo.clone(); + childGeo.height = height; + model.setGeometry(child, childGeo); + } } } } @@ -4546,7 +4557,7 @@ Graph.prototype.tableRowResized = function(row, bounds, prev) { var cell = model.getChildAt(row, i); - if (cell != null) + if (cell != null && model.isVertex(cell)) { var geo = this.getCellGeometry(cell); @@ -4622,33 +4633,37 @@ Graph.prototype.tableCellResized = function(cell, bounds, prev) for (var i = 0; i < model.getChildCount(table); i++) { var currentRow = model.getChildAt(table, i); - var child = model.getChildAt(currentRow, index); - - if (cell != child) + + if (model.isVertex(currentRow)) { - var childGeo = this.getCellGeometry(child); - - if (childGeo != null) + var child = model.getChildAt(currentRow, index); + + if (cell != child) { - childGeo = childGeo.clone(); - childGeo.width = geo.width; - model.setGeometry(child, childGeo); + var childGeo = this.getCellGeometry(child); + + if (childGeo != null) + { + childGeo = childGeo.clone(); + childGeo.width = geo.width; + model.setGeometry(child, childGeo); + } } - } - - // Updates previous row height - if (bounds.y != prev.y && currentRow == row && previousRow != null) - { - var prg = this.getCellGeometry(previousRow); - if (prg != null) + // Updates previous row height + if (bounds.y != prev.y && currentRow == row && previousRow != null) { - this.setRowHeight(previousRow, - prg.height - prev.y + bounds.y); + var prg = this.getCellGeometry(previousRow); + + if (prg != null) + { + this.setRowHeight(previousRow, + prg.height - prev.y + bounds.y); + } } + + previousRow = currentRow; } - - previousRow = currentRow; } // Updates previous column width @@ -4729,7 +4744,7 @@ TableLayout.prototype.execute = function(table) { var row = model.getChildAt(table, i); - if (row != null) + if (row != null && model.isVertex(row)) { var rowGeo = this.graph.getCellGeometry(row); @@ -4845,17 +4860,20 @@ TableRowLayout.prototype.execute = function(row) try { // Swimlane rotation requires resize of last row element - if (off.width != off0.width || off.x != off0.x) + if (this.graph.isTableRow(row)) { - var cell = model.getChildAt(row, model.getChildCount(row) - 1); - var geo = this.graph.getCellGeometry(cell); - - if (geo != null) + if (off.width != off0.width || off.x != off0.x) { - geo = geo.clone(); - geo.width += off0.width - off.width - off.x - off0.x; - geo.width = Math.max(Graph.minTableColumnWidth, geo.width); - model.setGeometry(cell, geo); + var cell = model.getChildAt(row, model.getChildCount(row) - 1); + var geo = this.graph.getCellGeometry(cell); + + if (geo != null) + { + geo = geo.clone(); + geo.width += off0.width - off.width - off.x - off0.x; + geo.width = Math.max(Graph.minTableColumnWidth, geo.width); + model.setGeometry(cell, geo); + } } } @@ -6207,7 +6225,8 @@ if (typeof mxVertexHandler != 'undefined') var state = this.view.getState(cell); var style = (state != null) ? state.style : this.getCellStyle(cell); - return mxUtils.getValue(style, 'part', '0') != '1' && + return (mxUtils.getValue(style, 'part', '0') != '1' || + this.isContainer(cell)) && mxUtils.getValue(style, 'dropTarget', '1') != '0' && (mxGraph.prototype.isValidDropTarget.apply(this, arguments) || this.isContainer(cell)); @@ -6405,25 +6424,33 @@ if (typeof mxVertexHandler != 'undefined') if (change instanceof mxValueChange && change.cell != null && change.cell.value != null && typeof(change.cell.value) == 'object') { - // Invalidates all descendants with placeholders - var desc = this.model.getDescendants(change.cell); - - // LATER: Check if only label or tooltip have changed - if (desc.length > 0) + this.invalidateDescendantsWithPlaceholders(change.cell); + } + }; + + /** + * Replaces the given element with a span. + */ + Graph.prototype.invalidateDescendantsWithPlaceholders = function(cell) + { + // Invalidates all descendants with placeholders + var desc = this.model.getDescendants(cell); + + // LATER: Check if only label or tooltip have changed + if (desc.length > 0) + { + for (var i = 0; i < desc.length; i++) { - for (var i = 0; i < desc.length; i++) + var state = this.view.getState(desc[i]); + + if (state != null && state.shape != null && state.shape.stencil != null && + this.stencilHasPlaceholders(state.shape.stencil)) { - var state = this.view.getState(desc[i]); - - if (state != null && state.shape != null && state.shape.stencil != null && - this.stencilHasPlaceholders(state.shape.stencil)) - { - this.removeStateForCell(desc[i]); - } - else if (this.isReplacePlaceholders(desc[i])) - { - this.view.invalidate(desc[i], false, false); - } + this.removeStateForCell(desc[i]); + } + else if (this.isReplacePlaceholders(desc[i])) + { + this.view.invalidate(desc[i], false, false); } } } @@ -9085,7 +9112,7 @@ if (typeof mxVertexHandler != 'undefined') this.hint = null; } }; - + /** * Moves rotation handle to top, right corner. */ @@ -9908,6 +9935,38 @@ if (typeof mxVertexHandler != 'undefined') this.rotationShape.node.setAttribute('title', mxResources.get('rotateTooltip')); } + this.rowState = null; + + if (this.graph.isTableRow(this.state.cell)) + { + this.rowState = this.state; + } + else if (this.graph.isTableCell(this.state.cell)) + { + this.rowState = this.graph.view.getState( + this.graph.model.getParent(this.state.cell)); + } + + if (this.rowState != null) + { + this.rowMoveHandle = mxUtils.createImage(Editor.moveImage); + this.rowMoveHandle.style.position = 'absolute'; + this.rowMoveHandle.style.cursor = 'pointer'; + this.rowMoveHandle.style.width = '18px'; + this.rowMoveHandle.style.height = '18px'; + this.graph.container.appendChild(this.rowMoveHandle); + + mxEvent.addGestureListeners(this.rowMoveHandle, mxUtils.bind(this, function(evt) + { + this.graph.graphHandler.start(this.state.cell, + mxEvent.getClientX(evt), mxEvent.getClientY(evt), [this.rowState.cell]); + this.graph.graphHandler.cellWasClicked = true; + this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt); + this.graph.isMouseDown = true; + mxEvent.consume(evt); + })); + } + var update = mxUtils.bind(this, function() { if (this.specialHandle != null) @@ -9950,7 +10009,19 @@ if (typeof mxVertexHandler != 'undefined') this.redrawHandles(); } }; - + + var vertexHandlerSetHandlesVisible = mxVertexHandler.prototype.setHandlesVisible; + + mxVertexHandler.prototype.setHandlesVisible = function(visible) + { + vertexHandlerSetHandlesVisible.apply(this, arguments); + + if (this.rowMoveHandle != null) + { + this.rowMoveHandle.style.display = (visible) ? '' : 'none'; + } + }; + mxVertexHandler.prototype.updateLinkHint = function(link, links) { try @@ -10062,7 +10133,9 @@ if (typeof mxVertexHandler != 'undefined') if (this.labelShape != null) { - this.labelShape.node.style.display = (this.graph.isEnabled() && this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? '' : 'none'; + this.labelShape.node.style.display = (this.graph.isEnabled() && + this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? + '' : 'none'; } }); @@ -10102,14 +10175,21 @@ if (typeof mxVertexHandler != 'undefined') var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles; mxVertexHandler.prototype.redrawHandles = function() - { + { + if (this.rowMoveHandle != null && this.rowState != null) + { + this.rowMoveHandle.style.left = (this.rowState.x + this.rowState.width) + 'px'; + this.rowMoveHandle.style.top = (this.rowState.y + this.rowState.height) + 'px'; + } + // Shows rotation handle only if one vertex is selected if (this.rotationShape != null && this.rotationShape.node != null) { - this.rotationShape.node.style.display = (this.graph.getSelectionCount() == 1 && - (this.index == null || this.index == mxEvent.ROTATION_HANDLE)) ? '' : 'none'; + this.rotationShape.node.style.display = (this.rowMoveHandle == null && + (this.graph.getSelectionCount() == 1 && (this.index == null || + this.index == mxEvent.ROTATION_HANDLE))) ? '' : 'none'; } - + vertexHandlerRedrawHandles.apply(this); if (this.state != null && this.linkHint != null) @@ -10143,6 +10223,13 @@ if (typeof mxVertexHandler != 'undefined') { vertexHandlerDestroy.apply(this, arguments); + if (this.rowMoveHandle != null) + { + this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle); + this.rowMoveHandle = null; + this.rowState = null; + } + if (this.linkHint != null) { this.linkHint.parentNode.removeChild(this.linkHint); diff --git a/src/main/webapp/js/mxgraph/Toolbar.js b/src/main/webapp/js/mxgraph/Toolbar.js index aeb06931e..178879cad 100644 --- a/src/main/webapp/js/mxgraph/Toolbar.js +++ b/src/main/webapp/js/mxgraph/Toolbar.js @@ -188,10 +188,10 @@ Toolbar.prototype.init = function() { this.editorUi.menus.addInsertTableItem(menu, mxUtils.bind(this, function(evt, rows, cols) { - var table = graph.createTable(rows, cols); + var table = (mxEvent.isShiftDown(evt)) ? graph.createCrossFunctionalSwimlane(rows, cols) : + graph.createTable(rows, cols); var pt = (mxEvent.isAltDown(evt)) ? graph.getFreeInsertPoint() : graph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry([table], true)); - var select = graph.importCells([table], pt.x, pt.y); if (select != null && select.length > 0) diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js index 343b92824..fc2d570a5 100644 --- a/src/main/webapp/js/viewer.min.js +++ b/src/main/webapp/js/viewer.min.js @@ -96,11 +96,11 @@ ea;m.wa=m.normalizeRCData=e;m.xa=m.sanitize=function(a,b,d,e){return Q(a,ea(b,d, !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d="function"==typeof require&&require,t=0;t<l.length;t++)h(l[t]);return h}({1:[function(t,e,a){"use strict";var s=t("./zlib/deflate"),o=t("./utils/common"),l=t("./utils/strings"),n=t("./zlib/messages"),r=t("./zlib/zstream"),h=Object.prototype.toString,d=0,f=-1,_=0,u=8;function c(t){if(!(this instanceof c))return new c(t);this.options=o.assign({level:f,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:_,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==d)throw new Error(n[a]);if(e.header&&s.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?l.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(n[a]);this._dict_set=!0}}function i(t,e){var a=new c(e);if(a.push(t,!0),a.err)throw a.msg||n[a.err];return a.result}c.prototype.push=function(t,e){var a,i,n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,"string"==typeof t?n.input=l.string2buf(t):"[object ArrayBuffer]"===h.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(r),n.next_out=0,n.avail_out=r),1!==(a=s.deflate(n,i))&&a!==d)return this.onEnd(a),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||("string"===this.options.to?this.onData(l.buf2binstring(o.shrinkBuf(n.output,n.next_out))):this.onData(o.shrinkBuf(n.output,n.next_out)))}while((0<n.avail_in||0===n.avail_out)&&1!==a);return 4===i?(a=s.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===d):2!==i||(this.onEnd(d),!(n.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=c,a.deflate=i,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,i(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,i(t,e)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(t,e,a){"use strict";var f=t("./zlib/inflate"),_=t("./utils/common"),u=t("./utils/strings"),c=t("./zlib/constants"),i=t("./zlib/messages"),n=t("./zlib/zstream"),r=t("./zlib/gzheader"),b=Object.prototype.toString;function s(t){if(!(this instanceof s))return new s(t);this.options=_.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var a=f.inflateInit2(this.strm,e.windowBits);if(a!==c.Z_OK)throw new Error(i[a]);if(this.header=new r,f.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=u.string2buf(e.dictionary):"[object ArrayBuffer]"===b.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=f.inflateSetDictionary(this.strm,e.dictionary))!==c.Z_OK))throw new Error(i[a])}function o(t,e){var a=new s(e);if(a.push(t,!0),a.err)throw a.msg||i[a.err];return a.result}s.prototype.push=function(t,e){var a,i,n,r,s,o=this.strm,l=this.options.chunkSize,h=this.options.dictionary,d=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof t?o.input=u.binstring2buf(t):"[object ArrayBuffer]"===b.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new _.Buf8(l),o.next_out=0,o.avail_out=l),(a=f.inflate(o,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&h&&(a=f.inflateSetDictionary(this.strm,h)),a===c.Z_BUF_ERROR&&!0===d&&(a=c.Z_OK,d=!1),a!==c.Z_STREAM_END&&a!==c.Z_OK)return this.onEnd(a),!(this.ended=!0);o.next_out&&(0!==o.avail_out&&a!==c.Z_STREAM_END&&(0!==o.avail_in||i!==c.Z_FINISH&&i!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(n=u.utf8border(o.output,o.next_out),r=o.next_out-n,s=u.buf2string(o.output,n),o.next_out=r,o.avail_out=l-r,r&&_.arraySet(o.output,o.output,n,r,0),this.onData(s)):this.onData(_.shrinkBuf(o.output,o.next_out)))),0===o.avail_in&&0===o.avail_out&&(d=!0)}while((0<o.avail_in||0===o.avail_out)&&a!==c.Z_STREAM_END);return a===c.Z_STREAM_END&&(i=c.Z_FINISH),i===c.Z_FINISH?(a=f.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===c.Z_OK):i!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(o.avail_out=0))},s.prototype.onData=function(t){this.chunks.push(t)},s.prototype.onEnd=function(t){t===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=_.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=s,a.inflate=o,a.inflateRaw=function(t,e){return(e=e||{}).raw=!0,o(t,e)},a.ungzip=o},{"./utils/common":3,"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(t,e,a){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e,a,i=Array.prototype.slice.call(arguments,1);i.length;){var n=i.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)e=n,a=r,Object.prototype.hasOwnProperty.call(e,a)&&(t[r]=n[r])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+i),n);else for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){var e,a,i,n,r,s;for(e=i=0,a=t.length;e<a;e++)i+=t[e].length;for(s=new Uint8Array(i),e=n=0,a=t.length;e<a;e++)r=t[e],s.set(r,n),n+=r.length;return s}},r={arraySet:function(t,e,a,i,n){for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,n)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,r))},a.setTyped(i)},{}],4:[function(t,e,a){"use strict";var l=t("./common"),n=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}for(var h=new l.Buf8(256),i=0;i<256;i++)h[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function d(t,e){if(e<65534&&(t.subarray&&r||!t.subarray&&n))return String.fromCharCode.apply(null,l.shrinkBuf(t,e));for(var a="",i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a}h[254]=h[254]=1,a.string2buf=function(t){var e,a,i,n,r,s=t.length,o=0;for(n=0;n<s;n++)55296==(64512&(a=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(a=65536+(a-55296<<10)+(i-56320),n++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new l.Buf8(o),n=r=0;r<o;n++)55296==(64512&(a=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(a=65536+(a-55296<<10)+(i-56320),n++),a<128?e[r++]=a:(a<2048?e[r++]=192|a>>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a<i;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,i,n,r,s=e||t.length,o=new Array(2*s);for(a=i=0;a<s;)if((n=t[a++])<128)o[i++]=n;else if(4<(r=h[n]))o[i++]=65533,a+=r-1;else{for(n&=2===r?31:3===r?15:7;1<r&&a<s;)n=n<<6|63&t[a++],r--;1<r?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":3}],5:[function(t,e,a){"use strict";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3<a?2e3:a;r=r+(n=n+e[i++]|0)|0,--s;);n%=65521,r%=65521}return n|r<<16|0}},{}],6:[function(t,e,a){"use strict";e.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(t,e,a){"use strict";var o=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s<r;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){"use strict";var l,_=t("../utils/common"),h=t("./trees"),u=t("./adler32"),c=t("./crc32"),i=t("./messages"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0}function I(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,s<i){if(t.match_start=e,o<=(s=i))break;u=h[r+s-1],c=h[r+s]}}}while((e=f[e&d])>l&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h<d&&(d=h),a=0===d?0:(s.avail_in-=d,_.arraySet(o,s.input,s.next_in,d,l),1===s.state.wrap?s.adler=u(s.adler,o,d,l):2===s.state.wrap&&(s.adler=c(s.adler,o,d,l)),s.next_in+=d,s.total_in+=d,d),t.lookahead+=a,t.lookahead+t.insert>=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<<t.hash_shift^t.window[r+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[r+x-1])&t.hash_mask,t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<B&&0!==t.strm.avail_in)}function j(t,e){for(var a,i;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===d)return A;if(0===t.lookahead)break}if(a=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-B&&(t.match_length=L(t,a)),t.match_length>=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}function K(t,e){for(var a,i,n;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===d)return A;if(0===t.lookahead)break}if(a=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-B&&(t.match_length=L(t,a),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(U(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=h._tr_tally(t,0,t.window[t.strstart-1]))&&U(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=h._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}function M(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}function P(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new _.Buf16(2*k),this.dyn_dtree=new _.Buf16(2*(2*s+1)),this.bl_tree=new _.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _.Buf16(y+1),this.heap=new _.Buf16(2*r+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _.Buf16(2*r+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=n,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?S:E,t.adler=2===e.wrap?0:1,e.last_flush=d,h._tr_init(e),b):N(t,g)}function q(t){var e,a=Y(t);return a===b&&((e=t.state).window_size=2*e.w_size,D(e.head),e.max_lazy_match=l[e.level].max_lazy,e.good_match=l[e.level].good_length,e.nice_match=l[e.level].nice_length,e.max_chain_length=l[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0),a}function G(t,e,a,i,n,r){if(!t)return g;var s=1;if(e===m&&(e=6),i<0?(s=0,i=-i):15<i&&(s=2,i-=16),n<1||v<n||a!==p||i<8||15<i||e<0||9<e||r<0||w<r)return N(t,g);8===i&&(i=9);var o=new P;return(t.state=o).strm=t,o.wrap=s,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new _.Buf8(2*o.w_size),o.head=new _.Buf16(o.hash_size),o.prev=new _.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new _.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=r,o.method=a,q(t)}l=[new M(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5<e||e<0)return t?N(t,g):g;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==f)return N(t,0===t.avail_out?-5:g);if(i.strm=t,a=i.last_flush,i.last_flush=e,i.status===S)if(2===i.wrap)t.adler=0,T(i,31),T(i,139),T(i,8),i.gzhead?(T(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),T(i,255&i.gzhead.time),T(i,i.gzhead.time>>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){r=t.strstart+z;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<r);t.match_length=z-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?b:1)},a.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==S&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?N(t,g):(t.state=null,e===E?N(t,-3):b):g},a.deflateSetDictionary=function(t,e){var a,i,n,r,s,o,l,h,d=e.length;if(!t||!t.state)return g;if(2===(r=(a=t.state).wrap)||1===r&&a.status!==S||a.lookahead)return g;for(1===r&&(t.adler=u(t.adler,e,d,0)),a.wrap=0,d>=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<<a.hash_shift^a.window[i+x-1])&a.hash_mask,a.prev[i&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=i,i++,--n;);a.strstart=i,a.lookahead=x-1,H(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=x-1,a.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,a.wrap=r,b},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(t,e,a){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],10:[function(t,e,a){"use strict";e.exports=function(t,e){var a,i,n,r,s,o,l,h,d,f,_,u,c,b,g,m,w,p,v,k,y,x,z,B,S;a=t.state,i=t.next_in,B=t.input,n=i+(t.avail_in-5),r=t.next_out,S=t.output,s=r-(e-t.avail_out),o=r+(t.avail_out-257),l=a.dmax,h=a.wsize,d=a.whave,f=a.wnext,_=a.window,u=a.hold,c=a.bits,b=a.lencode,g=a.distcode,m=(1<<a.lenbits)-1,w=(1<<a.distbits)-1;t:do{c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),p=b[u&m];e:for(;;){if(u>>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<<v)-1)];continue e}if(32&v){a.mode=12;break t}t.msg="invalid literal/length code",a.mode=30;break t}k=65535&p,(v&=15)&&(c<v&&(u+=B[i++]<<c,c+=8),k+=u&(1<<v)-1,u>>>=v,c-=v),c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),p=g[u&w];a:for(;;){if(u>>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<<v)-1)];continue a}t.msg="invalid distance code",a.mode=30;break t}if(y=65535&p,c<(v&=15)&&(u+=B[i++]<<c,(c+=8)<v&&(u+=B[i++]<<c,c+=8)),l<(y+=u&(1<<v)-1)){t.msg="invalid distance too far back",a.mode=30;break t}if(u>>>=v,c-=v,(v=r-s)<y){if(d<(v=y-v)&&a.sane){t.msg="invalid distance too far back",a.mode=30;break t}if(z=_,(x=0)===f){if(x+=h-v,v<k){for(k-=v;S[r++]=_[x++],--v;);x=r-y,z=S}}else if(f<v){if(x+=h+f-v,(v-=f)<k){for(k-=v;S[r++]=_[x++],--v;);if(x=0,f<k){for(k-=v=f;S[r++]=_[x++],--v;);x=r-y,z=S}}}else if(x+=f-v,v<k){for(k-=v;S[r++]=_[x++],--v;);x=r-y,z=S}for(;2<k;)S[r++]=z[x++],S[r++]=z[x++],S[r++]=z[x++],k-=3;k&&(S[r++]=z[x++],1<k&&(S[r++]=z[x++]))}else{for(x=r-y;S[r++]=S[x++],S[r++]=S[x++],S[r++]=S[x++],2<(k-=3););k&&(S[r++]=S[x++],1<k&&(S[r++]=S[x++]))}break}}break}}while(i<n&&r<o);i-=k=c>>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=r<o?o-r+257:257-(r-o),a.hold=u,a.bits=c}},{}],11:[function(t,e,a){"use strict";var Z=t("../utils/common"),R=t("./adler32"),C=t("./crc32"),N=t("./inffast"),O=t("./inftrees"),D=1,I=2,U=0,T=-2,F=1,i=852,n=592;function L(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?T:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,o(t))):T}function h(t,e){var a,i;return t?(i=new r,(t.state=i).window=null,(a=l(t,e))!==U&&(t.state=null),a):T}var d,f,_=!0;function H(t){if(_){var e;for(d=new Z.Buf32(512),f=new Z.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(O(D,t.lens,0,288,d,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;O(I,t.lens,0,32,f,0,t.work,{bits:5}),_=!1}t.lencode=d,t.lenbits=9,t.distcode=f,t.distbits=5}function j(t,e,a,i){var n,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Z.Buf8(r.wsize)),i>=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=n))),0}a.inflateReset=o,a.inflateReset2=l,a.inflateResetKeep=s,a.inflateInit=function(t){return h(t,15)},a.inflateInit2=h,a.inflate=function(t,e){var a,i,n,r,s,o,l,h,d,f,_,u,c,b,g,m,w,p,v,k,y,x,z,B,S=0,E=new Z.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return T;12===(a=t.state).mode&&(a.mode=13),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,f=o,_=l,x=U;t:for(;;)switch(a.mode){case F:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(2&a.wrap&&35615===h){E[a.check=0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=30;break}if(8!=(15&h)){t.msg="unknown compression method",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=30;break}a.dmax=1<<y,t.adler=a.check=1,a.mode=512&h?10:12,d=h=0;break;case 2:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(a.flags=h,8!=(255&a.flags)){t.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=30;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u<o;);if(512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y)),y&&u<o;);if(512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=30;break}d=h=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}t.adler=a.check=L(h),d=h=0,a.mode=11;case 11:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,2;t.adler=a.check=1,a.mode=12;case 12:if(5===e||6===e)break t;case 13:if(a.last){h>>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o<u&&(u=o),l<u&&(u=l),0===u)break t;Z.arraySet(n,i,r,u,s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=12;break;case 17:for(;d<14;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286<a.nlen||30<a.ndist){t.msg="too many length or distance symbols",a.mode=30;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.lens[A[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;m=(S=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(w<16)h>>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h>>>=g,d-=g,0===a.have){t.msg="invalid bit length repeat",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}d-=g,y=0,u=3+(7&(h>>>=g)),h>>>=3,d-=3}else{for(B=g+7;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}d-=g,y=0,u=11+(127&(h>>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(m&&0==(240&m)){for(p=g,v=m,k=w;m=(S=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg="invalid literal/length code",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<<a.distbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(0==(240&m)){for(p=g,v=m,k=w;m=(S=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg="invalid distance code",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(l<u&&(u=l),l-=u,a.length-=u;n[s++]=b[c++],--u;);0===a.length&&(a.mode=21);break;case 26:if(0===l)break t;n[s++]=a.length,l--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[r++]<<d,d+=8}if(_-=l,t.total_out+=_,a.total+=_,_&&(t.adler=a.check=a.flags?C(a.check,n,_,s-_):R(a.check,n,_,s-_)),_=l,(a.flags?h:L(h))!==a.check){t.msg="incorrect data check",a.mode=30;break}d=h=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=30;break}d=h=0}a.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return-4;case 32:default:return T}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||_!==t.avail_out&&a.mode<30&&(a.mode<27||4!==e))&&j(t,t.output,t.next_out,_-t.avail_out)?(a.mode=31,-4):(f-=t.avail_in,_-=t.avail_out,t.total_in+=f,t.total_out+=_,a.total+=_,a.wrap&&_&&(t.adler=a.check=a.flags?C(a.check,n,_,t.next_out-_):R(a.check,n,_,t.next_out-_)),t.data_type=a.bits+(a.last?64:0)+(12===a.mode?128:0)+(20===a.mode||15===a.mode?256:0),(0===f&&0===_||4===e)&&x===U&&(x=-5),x)},a.inflateEnd=function(t){if(!t||!t.state)return T;var e=t.state;return e.window&&(e.window=null),t.state=null,U},a.inflateGetHeader=function(t,e){var a;return t&&t.state?0==(2&(a=t.state).wrap)?T:((a.head=e).done=!1,U):T},a.inflateSetDictionary=function(t,e){var a,i=e.length;return t&&t.state?0!==(a=t.state).wrap&&11!==a.mode?T:11===a.mode&&R(1,e,i,0)!==a.check?-3:j(t,e,i,i)?(a.mode=31,-4):(a.havedict=1,U):T},a.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(t,e,a){"use strict";var D=t("../utils/common"),I=[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],U=[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],T=[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],F=[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];e.exports=function(t,e,a,i,n,r,s,o){var l,h,d,f,_,u,c,b,g,m=o.bits,w=0,p=0,v=0,k=0,y=0,x=0,z=0,B=0,S=0,E=0,A=null,Z=0,R=new D.Buf16(16),C=new D.Buf16(16),N=null,O=0;for(w=0;w<=15;w++)R[w]=0;for(p=0;p<i;p++)R[e[a+p]]++;for(y=m,k=15;1<=k&&0===R[k];k--);if(k<y&&(y=k),0===k)return n[r++]=20971520,n[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===R[v];v++);for(y<v&&(y=v),w=B=1;w<=15;w++)if(B<<=1,(B-=R[w])<0)return-1;if(0<B&&(0===t||1!==k))return-1;for(C[1]=0,w=1;w<15;w++)C[w+1]=C[w]+R[w];for(p=0;p<i;p++)0!==e[a+p]&&(s[C[e[a+p]]++]=p);if(0===t?(A=N=s,u=19):1===t?(A=I,Z-=257,N=U,O-=257,u=256):(A=T,N=F,u=-1),w=v,_=r,z=p=E=0,d=-1,f=(S=1<<(x=y))-1,1===t&&852<S||2===t&&592<S)return 1;for(;;){for(c=w-z,s[p]<u?(b=0,g=s[p]):s[p]>u?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<<w-z,v=h=1<<x;n[_+(E>>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<<w-1;E&l;)l>>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y<w&&(E&f)!==d){for(0===z&&(z=y),_+=v,B=1<<(x=w-z);x+z<k&&!((B-=R[x+z])<=0);)x++,B<<=1;if(S+=1<<x,1===t&&852<S||2===t&&592<S)return 1;n[d=E&f]=y<<24|x<<16|_-r|0}}return 0!==E&&(n[_+E]=w-z<<24|64<<16|0),o.bits=y,0}},{"../utils/common":3}],13:[function(t,e,a){"use strict";e.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(t,e,a){"use strict";var l=t("../utils/common"),o=0,h=1;function i(t){for(var e=t.length;0<=--e;)t[e]=0}var d=0,s=29,f=256,_=f+1+s,u=30,c=19,g=2*_+1,m=15,n=16,b=7,w=256,p=16,v=17,k=18,y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],x=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=new Array(2*(_+2));i(S);var E=new Array(2*u);i(E);var A=new Array(512);i(A);var Z=new Array(256);i(Z);var R=new Array(s);i(R);var C,N,O,D=new Array(u);function I(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function r(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function U(t){return t<256?A[t]:A[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<<t.bi_valid&65535,T(t,t.bi_buf),t.bi_buf=e>>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function L(t,e,a){F(t,a[2*e],a[2*e+1])}function H(t,e){for(var a=0;a|=1&t,t>>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e<u;e++)t.dyn_dtree[2*e]=0;for(e=0;e<c;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function M(t){8<t.bi_valid?T(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function P(t,e,a,i){var n=2*e,r=2*a;return t[n]<t[r]||t[n]===t[r]&&i[e]<=i[a]}function Y(t,e,a){for(var i=t.heap[a],n=a<<1;n<=t.heap_len&&(n<t.heap_len&&P(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!P(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i}function q(t,e,a){var i,n,r,s,o=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?L(t,n,e):(L(t,(r=Z[n])+f+1,e),0!==(s=y[r])&&F(t,n-=R[r],s),L(t,r=U(--i),a),0!==(s=x[r])&&F(t,i-=D[r],s)),o<t.last_lit;);L(t,w,e)}function G(t,e){var a,i,n,r=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=g,a=0;a<l;a++)0!==r[2*a]?(t.heap[++t.heap_len]=h=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)r[2*(n=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=s[2*n+1]);for(e.max_code=h,a=t.heap_len>>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<g;a++)c<(r=l[2*l[2*(i=t.heap[a])+1]+1]+1)&&(r=c,b++),l[2*i+1]=r,h<i||(t.bl_count[r]++,s=0,u<=i&&(s=_[i-u]),o=l[2*i],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==b){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,b-=2}while(0<b);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)h<(n=t.heap[--a])||(l[2*n+1]!==r&&(t.opt_len+=(r-l[2*n+1])*l[2*n],l[2*n+1]=r),i--)}}(t,e),j(r,h,t.bl_count)}function X(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=s,s=e[2*(i+1)+1],++o<l&&n===s||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[2*p]++):o<=10?t.bl_tree[2*v]++:t.bl_tree[2*k]++,r=n,(o=0)===s?(l=138,h=3):n===s?(l=6,h=3):(l=7,h=4))}function W(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),i=0;i<=a;i++)if(n=s,s=e[2*(i+1)+1],!(++o<l&&n===s)){if(o<h)for(;L(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==r&&(L(t,n,t.bl_tree),o--),L(t,p,t.bl_tree),F(t,o-3,2)):o<=10?(L(t,v,t.bl_tree),F(t,o-3,3)):(L(t,k,t.bl_tree),F(t,o-11,7));r=n,(o=0)===s?(l=138,h=3):n===s?(l=6,h=3):(l=7,h=4)}}i(D);var J=!1;function Q(t,e,a,i){var n,r,s,o;F(t,(d<<1)+(i?1:0),3),r=e,s=a,o=!0,M(n=t),o&&(T(n,s),T(n,~s)),l.arraySet(n.pending_buf,n.window,r,s,n.pending),n.pending+=s}a._tr_init=function(t){J||(function(){var t,e,a,i,n,r=new Array(m+1);for(i=a=0;i<s-1;i++)for(R[i]=a,t=0;t<1<<y[i];t++)Z[a++]=i;for(Z[a-1]=i,i=n=0;i<16;i++)for(D[i]=n,t=0;t<1<<x[i];t++)A[n++]=i;for(n>>=7;i<u;i++)for(D[i]=n<<7,t=0;t<1<<x[i]-7;t++)A[256+n++]=i;for(e=0;e<=m;e++)r[e]=0;for(t=0;t<=143;)S[2*t+1]=8,t++,r[8]++;for(;t<=255;)S[2*t+1]=9,t++,r[9]++;for(;t<=279;)S[2*t+1]=7,t++,r[7]++;for(;t<=287;)S[2*t+1]=8,t++,r[8]++;for(j(S,_+1,r),t=0;t<u;t++)E[2*t+1]=5,E[2*t]=H(t,5);C=new I(S,y,f+1,_,m),N=new I(E,x,0,u,m),O=new I(new Array(0),z,0,c,b)}(),J=!0),t.l_desc=new r(t.dyn_ltree,C),t.d_desc=new r(t.dyn_dtree,N),t.bl_desc=new r(t.bl_tree,O),t.bi_buf=0,t.bi_valid=0,K(t)},a._tr_stored_block=Q,a._tr_flush_block=function(t,e,a,i){var n,r,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e<f;e++)if(0!==t.dyn_ltree[2*e])return h;return o}(t)),G(t,t.l_desc),G(t,t.d_desc),s=function(t){var e;for(X(t,t.dyn_ltree,t.l_desc.max_code),X(t,t.dyn_dtree,t.d_desc.max_code),G(t,t.bl_desc),e=c-1;3<=e&&0===t.bl_tree[2*B[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n<i;n++)F(t,t.bl_tree[2*B[n]+1],3);W(t,t.dyn_ltree,e-1),W(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),q(t,t.dyn_ltree,t.dyn_dtree)),K(t),i&&M(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":3}],15:[function(t,e,a){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/":[function(t,e,a){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+= -String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||"https://app.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2"; -window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44"; -window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch"); -window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1; -window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); +String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export"; +window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2";window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com"; +window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; +window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia"; +window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català ",cs:"ÄŒeÅ¡tina",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"РуÑÑкий",sr:"СрпÑки",uk:"УкраїнÑька",he:"עברית",ar:"العربية", th:"ไทย",ko:"í•œêµì–´",ja:"日本語",zh:"简体ä¸æ–‡","zh-tw":"ç¹é«”ä¸æ–‡"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)} window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&414>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(a="min")}catch(c){}return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)} @@ -2004,10 +2004,11 @@ this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b), 2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement), y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install(); Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus= -function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; +function(){return this.status};this.graphChangeListener=function(a,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0; (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS; -Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+":IMAGE_PATH+ -"/help.png"; +Editor.moveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png"; +Editor.helpImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+": +IMAGE_PATH+"/help.png"; Editor.checkmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+ "/checkmark.gif";Editor.maximizeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAADgKxmiAAAABXRSTlMA758vX1Pw3BoAAABJSURBVAjXY8AJQkODGBhUQ0MhbAUGBiYY24CBgRnGFmZgMISwgwwDGRhEhVVBbAVmEQYGRwMmBjIAQi/CTIRd6G5AuA3dzYQBAHj0EFdHkvV4AAAAAElFTkSuQmCC";Editor.zoomOutImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCxxcXEhISFgYGChjTUxAAAAAXRSTlMAQObYZgAAAEdJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITgLJZXFxgbIQ4Qj3CHIT5ggoIe5kgNkM1KSDYKBKqxPkDAPo5BAZBE54hAAAAAElFTkSuQmCC"; Editor.zoomInImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAElBMVEUAAAAAAAAsLCwhISFxcXFgYGBavKaoAAAAAXRSTlMAQObYZgAAAElJREFUCNdjIAMwCQrB2YKCggJQJqMIA4sglK3owMzgqABVwsDMwCgAZTMbG8PYCHGEeoQ5CPMFFRD2MkFshmpSQLBRJFSJ8wcAEqcEM2uhl2MAAAAASUVORK5CYII=";Editor.zoomFitImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAwMDBwcHBgYGC1xl09AAAAAXRSTlMAQObYZgAAAEFJREFUCNdjIAMwCQrB2YKCggJQJqMwA7MglK1owMBgqABVApITwMdGqEeYgzBfUAFhLxPEZqgmBQQbRUKFOH8AAK5OA3lA+FFOAAAAAElFTkSuQmCC"; @@ -2040,15 +2041,15 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width); a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a}; Editor.prototype.setFilename=function(a){this.filename=a}; -Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){var c=a.getSelectionCellsForChanges(e.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<c.length){a.getModel();for(var k=[],u=0;u< -c.length;u++)null!=a.view.getState(c[u])&&k.push(c[u]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()}; +Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],t=0;t< +e.length;t++)null!=a.view.getState(e[t])&&k.push(e[t]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()}; OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)}; -function Dialog(a,b,e,c,k,m,p,u,x,A,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,q=c,n=mxUtils.getDocumentSize();null!=window.innerHeight&&(n.height=window.innerHeight);var l=n.height,B=Math.max(1,Math.round((n.width-e-64)/2)),v=Math.max(1,Math.round((l-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,l-64);0<a.dialogs.length&&(this.zIndex+= -2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=l+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";B+=n.x;v+=n.y;k&&document.body.appendChild(this.bg);var y=a.createDiv(x?"geTransDialog": -"geDialog");k=this.getPosition(B,v,e,c);B=k.x;v=k.y;y.style.width=e+"px";y.style.height=c+"px";y.style.left=B+"px";y.style.top=v+"px";y.style.zIndex=this.zIndex;y.appendChild(b);document.body.appendChild(y);!u&&b.clientHeight>y.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=v+14+"px",m.style.left=B+e+38-f+"px",m.style.zIndex= -this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!d)){var H=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(d){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var d=A();null!=d&&(g=e=d.w,q=c=d.h)}d=mxUtils.getDocumentSize();l=d.height;this.bg.style.height=l+"px";B=Math.max(1,Math.round((d.width-e-64)/2));v=Math.max(1, -Math.round((l-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(q,l-64);d=this.getPosition(B,v,e,c);B=d.x;v=d.y;y.style.left=B+"px";y.style.top=v+"px";y.style.width=e+"px";y.style.height=c+"px";!u&&b.clientHeight>y.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=v+14+"px",this.dialogImg.style.left=B+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container= -y;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,c,k,m,p,t,y,A,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,q=c,l=mxUtils.getDocumentSize();null!=window.innerHeight&&(l.height=window.innerHeight);var n=l.height,B=Math.max(1,Math.round((l.width-e-64)/2)),z=Math.max(1,Math.round((n-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,n-64);0<a.dialogs.length&&(this.zIndex+= +2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";B+=l.x;z+=l.y;k&&document.body.appendChild(this.bg);var u=a.createDiv(y?"geTransDialog": +"geDialog");k=this.getPosition(B,z,e,c);B=k.x;z=k.y;u.style.width=e+"px";u.style.height=c+"px";u.style.left=B+"px";u.style.top=z+"px";u.style.zIndex=this.zIndex;u.appendChild(b);document.body.appendChild(u);!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=B+e+38-f+"px",m.style.zIndex= +this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!d)){var G=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){G=!0}),null,mxUtils.bind(this,function(d){G&&(a.hideDialog(!0),G=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var d=A();null!=d&&(g=e=d.w,q=c=d.h)}d=mxUtils.getDocumentSize();n=d.height;this.bg.style.height=n+"px";B=Math.max(1,Math.round((d.width-e-64)/2));z=Math.max(1, +Math.round((n-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(q,n-64);d=this.getPosition(B,z,e,c);B=d.x;z=d.y;u.style.left=B+"px";u.style.top=z+"px";u.style.width=e+"px";u.style.height=c+"px";!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=B+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container= +u;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+ "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png"; Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+ @@ -2057,46 +2058,46 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA "/locked.png"; Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+ "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)}; -var ErrorDialog=function(a,b,e,c,k,m,p,u,x,A,d){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b= -document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=d&&d()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(c,function(){x&&a.hideDialog();null!=k&&k()}); -q.className="geBtn";e.appendChild(q);null!=p&&(c=mxUtils.button(p,function(){x&&a.hideDialog();null!=u&&u()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)}; -PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||A.checked,c=parseInt(f.value)/100;isNaN(c)&&(c=1,f.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var y=u.checked?1:parseInt(d.value);isNaN(y)||(q=mxUtils.getScaleForPageCount(y,e,g))}e.getGraphBounds();var k=y=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);q*=c;!b&&e.pageVisible?(c=e.getPageLayout(),y-=c.x*g.width,k-=c.y*g.height): -b=!0;b=PrintDialog.createPrintPreview(e,q,g,0,y,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,c,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(u);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage")); -k.appendChild(x);mxEvent.addListener(x,"click",function(a){u.checked=!u.checked;A.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){A.checked=!u.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(A);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");k.appendChild(x);mxEvent.addListener(x, -"click",function(a){A.checked=!A.checked;u.checked=!A.checked;mxEvent.consume(a)});c.appendChild(k);var d=document.createElement("input");d.setAttribute("value","1");d.setAttribute("type","number");d.setAttribute("min","1");d.setAttribute("size","4");d.setAttribute("disabled","disabled");d.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(A,"change", -function(){A.checked?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled");u.checked=!A.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; -k.style.paddingTop="20px";k.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&k.appendChild(x);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst|| -k.appendChild(x);c.appendChild(k);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; -PrintDialog.createPrintPreview=function(a,b,e,c,k,m,p){b=new mxPrintPreview(a,b,e,c,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; +var ErrorDialog=function(a,b,e,c,k,m,p,t,y,A,d){y=null!=y?y:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b= +document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=d&&d()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(c,function(){y&&a.hideDialog();null!=k&&k()}); +q.className="geBtn";e.appendChild(q);null!=p&&(c=mxUtils.button(p,function(){y&&a.hideDialog();null!=t&&t()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)}; +PrintDialog.prototype.create=function(a){function b(a){var c=t.checked||A.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(c){var u=t.checked?1:parseInt(d.value);isNaN(u)||(q=mxUtils.getScaleForPageCount(u,e,g))}e.getGraphBounds();var k=u=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);q*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*g.width,k-=b.y*g.height): +c=!0;c=PrintDialog.createPrintPreview(e,q,g,0,u,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var t=document.createElement("input");t.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(t);var y=document.createElement("span");mxUtils.write(y," "+mxResources.get("fitPage")); +k.appendChild(y);mxEvent.addListener(y,"click",function(a){t.checked=!t.checked;A.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){A.checked=!t.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(A);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("posterPrint")+":");k.appendChild(y);mxEvent.addListener(y, +"click",function(a){A.checked=!A.checked;t.checked=!A.checked;mxEvent.consume(a)});c.appendChild(k);var d=document.createElement("input");d.setAttribute("value","1");d.setAttribute("type","number");d.setAttribute("min","1");d.setAttribute("size","4");d.setAttribute("disabled","disabled");d.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(A,"change", +function(){A.checked?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled");t.checked=!A.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2; +k.style.paddingTop="20px";k.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst&&k.appendChild(y);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst|| +k.appendChild(y);c.appendChild(k);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}}; +PrintDialog.createPrintPreview=function(a,b,e,c,k,m,p){b=new mxPrintPreview(a,b,e,c,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var t=b.writeHead;b.writeHead=function(a){t.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b}; PrintDialog.previewEnabled=!0; var PageSetupDialog=function(a){function b(){null==d||d==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=d,A.style.backgroundImage="")}function e(){null==q?(g.removeAttribute("title"),g.style.fontSize="",g.innerHTML=mxResources.get("change")+"..."):(g.setAttribute("title",q.src),g.style.fontSize="11px",g.innerHTML=q.src.substring(0,42)+"...")}var c=a.editor.graph,k,m,p=document.createElement("table");p.style.width= -"100%";p.style.height="100%";var u=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td"); +"100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var y=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td"); mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var A=document.createElement("button");A.style.width="18px";A.style.height="18px";A.style.marginRight="20px";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var d=c.background;b();mxEvent.addListener(A,"click",function(f){a.pickColor(d||"none",function(a){d=a;b()});mxEvent.consume(f)}); -m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ -":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var q=c.backgroundImage;mxEvent.addListener(g,"click",function(d){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(d)});e();m.appendChild(g);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n= -mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,d,q,x.get());b.ignoreColor=c.background==d;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=q?q.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&& -b.ignoreColor&&b.ignoreImage||c.model.execute(b)});l.className="geBtn gePrimaryBtn";m.appendChild(l);a.editor.cancelFirst||m.appendChild(n);k.appendChild(m);u.appendChild(k);p.appendChild(u);this.container=p}; -PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,b,c){if(c||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<n.length;b++)c=n[b],y?"custom"==c.key&&(u.value=c.key,y=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&& -e.height==c.format.height?(u.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(u.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(x.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"), -u.value="custom",x.style.display="none",d.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px"; -x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";x.appendChild(p);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));x.appendChild(A);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input"); -f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");x.style.display="none";d.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),l=0;l<n.length;l++){var B=n[l];q[B.key]=B;var v=document.createElement("option");v.setAttribute("value",B.key);mxUtils.write(v,B.title);u.appendChild(v)}var y=!1;k();a.appendChild(u);mxUtils.br(a); -a.appendChild(x);a.appendChild(d);var H=e,z=function(a,b){var l=q[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",x.style.display=""):(x.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&p.checked&&(l=new mxRectangle(0,0, -l.height,l.width));b&&y||l.width==H.width&&l.height==H.height||(H=l,null!=c&&c(H))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(u,"change",function(a){y="custom"==u.value; -z(a,!0)});z();return{set:function(a){e=a;k(null,null,!0)},get:function(){return H},widthInput:f,heightInput:g}}; +m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+ +":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var q=c.backgroundImage;mxEvent.addListener(g,"click",function(d){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(d)});e();m.appendChild(g);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l= +mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,d,q,y.get());b.ignoreColor=c.background==d;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=q?q.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&& +b.ignoreColor&&b.ignoreImage||c.model.execute(b)});n.className="geBtn gePrimaryBtn";m.appendChild(n);a.editor.cancelFirst||m.appendChild(l);k.appendChild(m);t.appendChild(k);p.appendChild(t);this.container=p}; +PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,b,c){if(c||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<l.length;b++)c=l[b],u?"custom"==c.key&&(t.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&& +e.height==c.format.height?(t.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(t.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(y.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"), +t.value="custom",y.style.display="none",d.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var t=document.createElement("select");t.style.marginBottom="8px";t.style.width="202px";var y=document.createElement("div");y.style.marginLeft="4px";y.style.width="210px"; +y.style.height="24px";m.style.marginRight="6px";y.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";y.appendChild(p);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));y.appendChild(A);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input"); +f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");y.style.display="none";d.style.display="none";for(var q={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var B=l[n];q[B.key]=B;var z=document.createElement("option");z.setAttribute("value",B.key);mxUtils.write(z,B.title);t.appendChild(z)}var u=!1;k();a.appendChild(t);mxUtils.br(a); +a.appendChild(y);a.appendChild(d);var G=e,x=function(a,b){var l=q[t.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",y.style.display=""):(y.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=t.value&&p.checked&&(l=new mxRectangle(0,0, +l.height,l.width));b&&u||l.width==G.width&&l.height==G.height||(G=l,null!=c&&c(G))};mxEvent.addListener(b,"click",function(a){m.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){p.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",x);mxEvent.addListener(f,"click",x);mxEvent.addListener(g,"blur",x);mxEvent.addListener(g,"click",x);mxEvent.addListener(p,"change",x);mxEvent.addListener(m,"change",x);mxEvent.addListener(t,"change",function(a){u="custom"==t.value; +x(a,!0)});x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return G},widthInput:f,heightInput:g}}; PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)", format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)}, {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]}; (function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var b=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect= mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){a.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}), mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=b,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape= -null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=a.gridSize*this.scale*this.gridSteps): -d="url("+this.gridImage+")";var g=c=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),c=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-c,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor= -b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=f,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],f=1;f<this.gridSteps;f++){var g=f*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+ +null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,b=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(b))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=a.gridSize*this.scale*this.gridSteps): +d="url("+this.gridImage+")";var g=b=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),b=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-b,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}b=a.view.canvas;null!=b.ownerSVGElement&&(b=b.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor= +c,a.container.className="geDiagramContainer geDiagramBackdrop",b.style.backgroundImage="none",b.style.backgroundColor=""):(a.container.className="geDiagramContainer",b.style.backgroundPosition=f,b.style.backgroundColor=c,b.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],f=1;f<this.gridSteps;f++){var g=f*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+ c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var e= -this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,e=d*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;c=n.height;var l= -new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,v=a?Math.ceil(b/l.width)-1:0,y=n.x+b,u=n.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:v,b=0;b<=d;b++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(b+1)*l.height)), -new mxPoint(Math.round(y),Math.round(n.y+(b+1)*l.height))]:[new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(u))];null!=a[b]?(a[b].points=c,a[b].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[b]=c)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; +this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,e=d*this.pageScale,l=this.view.getBackgroundPageBounds();b=l.width;c=l.height;var n= +new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(c/n.height)-1:0,m=a?Math.ceil(b/n.width)-1:0,u=l.x+b,t=l.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<m&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:m,b=0;b<=d;b++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(b+1)*n.height)), +new mxPoint(Math.round(u),Math.round(l.y+(b+1)*n.height))]:[new mxPoint(Math.round(l.x+(b+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(b+1)*n.width),Math.round(t))];null!=a[b]?(a[b].points=c,a[b].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[b]=c)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)}; var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var f=this.graph.getCellGeometry(c[d]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()? !0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,g=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,b)/g),e=Math.floor(Math.min(0, c)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-e)*d)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft= @@ -2109,18 +2110,18 @@ k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this (b=function(a){if(null!=a){var d=mxEvent.getSource(a);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position= "absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent= function(a,d){return m||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||c.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(m=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup", -this.keyupHandler);var u=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var x=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return x.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&& -mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var A=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return m||A.apply(this,arguments)};var d=!1,f=null,g=null,q=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu; -e=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var l=0;l<q.length;l++)this.toolbar.container.appendChild(q[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;q=b}}),l=this,B=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){B.apply(this,arguments);n();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d= -d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=l.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));l.toolbar.setFontName(b);l.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var v= -c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{v.apply(this,arguments),n()}catch(N){l.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(M){}var y=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod= -mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var H="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b= -a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var t=l[e],n=t.indexOf("=");if(0<=n){g=t.substring(0,n);var q=t.substring(n+1);null!=f[g]&&"none"==q&&(a.push(q),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}}; -this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),t=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], -["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<t.length;a++)for(b=0;b<t[a].length;b++)H.push(t[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(H,z[a])&&H.push(z[a]);var I=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=H.slice();for(var q=0;q<n.length;q++){var y=n[q],k=y.indexOf("=");if(0<=k){var v=y.substring(0,k),B=mxUtils.indexOf(e, -v);0<=B&&e.splice(B,1);for(var U=0;U<t.length;U++){var I=t[U];if(0<=mxUtils.indexOf(I,v))for(var u=0;u<I.length;u++){var m=mxUtils.indexOf(e,I[u]);0<=m&&e.splice(m,1)}}}}}for(var J=b.isEdge(g),p=J?c.currentEdgeStyle:c.currentVertexStyle,x=b.getStyle(g),q=0;q<e.length;q++){var v=e[q],M=p[v];null==M||"shape"==v&&!J||J&&!(0>mxUtils.indexOf(z,v))||(x=mxUtils.setStyle(x,v,M))}b.setStyle(g,x)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){I(d.getProperty("cells"))});c.addListener("textInserted", -function(a,d){I(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));I(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"), -e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(z,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(H,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(H,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null== +this.keyupHandler);var t=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var y=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return y.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&& +mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var A=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return m||A.apply(this,arguments)};var d=!1,f=null,g=null,q=null,l=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu; +e=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var l=0;l<q.length;l++)this.toolbar.container.appendChild(q[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;q=b}}),n=this,B=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){B.apply(this,arguments);l();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d= +d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=n.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var z= +c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{z.apply(this,arguments),l()}catch(O){n.handleError(O)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(L){}var u=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod= +mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var G="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b= +a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var n=l[e],v=n.indexOf("=");if(0<=v){g=n.substring(0,v);var q=n.substring(v+1);null!=f[g]&&"none"==q&&(a.push(q),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(U){this.handleError(U)}}; +this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),v=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"], +["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)G.push(v[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(G,x[a])&&G.push(x[a]);var H=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=G.slice();for(var q=0;q<n.length;q++){var u=n[q],k=u.indexOf("=");if(0<=k){var m=u.substring(0,k),z=mxUtils.indexOf(e, +m);0<=z&&e.splice(z,1);for(var B=0;B<v.length;B++){var N=v[B];if(0<=mxUtils.indexOf(N,m))for(var H=0;H<N.length;H++){var I=mxUtils.indexOf(e,N[H]);0<=I&&e.splice(I,1)}}}}}for(var t=b.isEdge(g),L=t?c.currentEdgeStyle:c.currentVertexStyle,C=b.getStyle(g),q=0;q<e.length;q++){var m=e[q],y=L[m];null==y||"shape"==m&&!t||t&&!(0>mxUtils.indexOf(x,m))||(C=mxUtils.setStyle(C,m,y))}b.setStyle(g,C)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){H(d.getProperty("cells"))});c.addListener("textInserted", +function(a,d){H(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));H(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"), +e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(E,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(G,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(G,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null== l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle|| "none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"), null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW], @@ -2144,36 +2145,36 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb 0),g=0;g<m.length;g++)d.add(f,m[g]);b.updateCustomLinks(b.createCellMapping(e,k),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return c};var e=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=e.apply(this,arguments);a.updatePasteActionStates();return c};var c=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){c.apply(this,arguments);a.updatePasteActionStates()}; var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600; EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width, -this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,t=mxRectangle.fromRectangle(g); -t.x=t.x/n-l.x;t.y=t.y/n-l.y;t.width/=n;t.height/=n;var l=a.container.scrollTop,q=a.container.scrollLeft,E=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)E+=3;var y=a.container.offsetWidth-E,E=a.container.offsetHeight-E;d=d?Math.max(.3,Math.min(b||1,y/t.width)):n;b=(y-d*t.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(E-d*t.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||g.width<y||g.height<E)a.view.scaleAndTranslate(d, -Math.floor(b-t.x),Math.floor(k-t.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=q*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView", +this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,v=mxRectangle.fromRectangle(g); +v.x=v.x/n-l.x;v.y=v.y/n-l.y;v.width/=n;v.height/=n;var l=a.container.scrollTop,q=a.container.scrollLeft,N=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)N+=3;var k=a.container.offsetWidth-N,N=a.container.offsetHeight-N;d=d?Math.max(.3,Math.min(b||1,k/v.width)):n;b=(k-d*v.width)/2/d;var u=0==this.lightboxVerticalDivider?0:(N-d*v.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),u=Math.max(u,0));if(e||g.width<k||g.height<N)a.view.scaleAndTranslate(d, +Math.floor(b-v.x),Math.floor(u-v.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=q*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView", mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden"; this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var d= mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,d,b){p++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title", -b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div"); -x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily="Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages, -this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",u.style.display="",x.style.display="inline-block"):(A.style.display="none",u.style.display="none",x.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);m(mxUtils.bind(this, +b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var t=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),y=document.createElement("div"); +y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily="Helvetica,Arial";y.style.marginTop="8px";y.style.fontSize="14px";y.style.color="#ffffff";this.chromelessToolbar.appendChild(y);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(y.innerHTML="",mxUtils.write(y,mxUtils.indexOf(this.pages, +this.currentPage)+1+" / "+this.pages.length))});t.style.paddingLeft="0px";t.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",t.style.display="",y.style.display="inline-block"):(A.style.display="none",t.style.display="none",y.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);m(mxUtils.bind(this, function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage, -mxResources.get("fit"));var g=null,q=null,n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q), +mxResources.get("fit"));var g=null,q=null,l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q), fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=m(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog= null}));var b=B.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ -this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){B.style.display=1<v.getChildCount(v.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(d){null!= -this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var y=this.lightboxToolbarActions[f];m(y.fn,y.icon,y.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url: +this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),z=a.getModel();z.addListener(mxEvent.CHANGE,function(){B.style.display=1<z.getChildCount(z.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(d){null!= +this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var u=this.lightboxToolbarActions[f];m(u.fn,u.icon,u.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url: window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(d){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this, function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)|| -l(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| -l(30)}));var H=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<H&&Math.abs(this.scrollTop-a.container.scrollTop)<H&&Math.abs(this.startX-b.getGraphX())<H&&Math.abs(this.startY-b.getGraphY())< -H&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}z.apply(this,arguments)};if(!a.isViewer()){var F=a.sizeDidChange;a.sizeDidChange= -function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?F.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0= -d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),t=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,M=null,J=null,N=null,D=function(d){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this, -function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),t.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(t.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){t.style.transform="";C.style.transform=""},0)):(t.style.transform= -"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=M&&(g=a.container.offsetWidth/2-M.x+c.x,l=a.container.offsetHeight/2-M.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=J&&(g+=d.x-J.x,l+=d.y-J.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)|| -0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&t.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=M=J=I=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= +n(30),l())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)|| +n(30)}));var G=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<G&&Math.abs(this.scrollTop-a.container.scrollTop)<G&&Math.abs(this.startX-b.getGraphX())<G&&Math.abs(this.startY-b.getGraphY())< +G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?l():n(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}x.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange= +function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0= +d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),v=a.view.getDrawPane();a.cumulativeZoomFactor=1;var H=null,L=null,I=null,O=null,D=function(d){null!=H&&window.clearTimeout(H);window.setTimeout(function(){a.isMouseDown||(H=window.setTimeout(mxUtils.bind(this, +function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),v.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(v.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){v.style.transform="";C.style.transform=""},0)):(v.style.transform= +"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=L&&(g=a.container.offsetWidth/2-L.x+c.x,l=a.container.offsetHeight/2-L.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=I&&(g+=d.x-I.x,l+=d.y-I.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)|| +0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=O&&v.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=L=I=H=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(L=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*= (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale* -this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=t.getAttribute("filter")&&(N=t.getAttribute("filter"),t.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;t.style.transformOrigin=d+"px "+f+"px";t.style.transform="scale("+ -this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":M.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":M.y+ -a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&& -D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),M=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b), +this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==O&&""!=v.getAttribute("filter")&&(O=v.getAttribute("filter"),v.removeAttribute("filter"));I=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:L.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:L.y+a.container.scrollTop-a.container.offsetTop;v.style.transformOrigin=d+"px "+f+"px";v.style.transform="scale("+ +this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":L.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":L.y+ +a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=H&&window.clearTimeout(H)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){H&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&& +D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),L=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b), mxEvent.consume(d),!1;c=c.parentNode}}),a.container);a.panningHandler.zoomGraph=function(d){a.cumulativeZoomFactor=d.scale;a.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))}; EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))}; @@ -2204,12 +2205,12 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell( this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&& e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset}; EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&& -(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var x= -this.footerHeight+k,u=Math.max(0,Math.min(c-p-x,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=x+"px"}x=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=x+"px";this.formatContainer.style.display=null!=this.format?"":"none";var A=this.getDiagramContainerOffset(), +(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var t=0;if(null!=this.sidebarFooterContainer){var y= +this.footerHeight+k,t=Math.max(0,Math.min(c-p-y,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=t+"px";this.sidebarFooterContainer.style.bottom=y+"px"}y=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=y+"px";this.formatContainer.style.display=null!=this.format?"":"none";var A=this.getDiagramContainerOffset(), d=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=d+A.x+"px";this.diagramContainer.style.top=p+A.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");b?(this.menubarContainer.style.width=e+"px", -this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-x)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width= -this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=x+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom= -this.footerHeight+u+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; +this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-t+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-y)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,t=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width= +this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",t-=this.tabContainer.clientHeight),this.diagramContainer.style.height=t+"px",this.hsplit.style.height=t+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=y+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom= +this.footerHeight+t+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null}; EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand")); this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom= "0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null}; @@ -2218,10 +2219,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)}; EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b}; -EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,u+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);u!=d()&&(x=!0,A=null)}}function m(a){k(a);p=u=null}var p=null,u=null,x=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var d=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), -mxEvent.getClientY(a));u=d();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var b=null!=A?A-e:0;A=d();c(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})}; +EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,t+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);t!=d()&&(y=!0,A=null)}}function m(a){k(a);p=t=null}var p=null,t=null,y=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var d=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a), +mxEvent.getClientY(a));t=d();y=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!y&&this.hsplitClickEnabled){var b=null!=A?A-e:0;A=d();c(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})}; EditorUi.prototype.handleError=function(a,b,e,c,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,c?e:null)}else null!=e&&e()}; -EditorUi.prototype.showError=function(a,b,e,c,k,m,p,u,x,A,d,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),c,k,m,p,f,u,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,d||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,c,k,m,p,u,x,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,m,p,u,x,A);this.dialogs.push(this.dialog)}; +EditorUi.prototype.showError=function(a,b,e,c,k,m,p,t,y,A,d,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),c,k,m,p,f,t,y);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,d||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,c,k,m,p,t,y,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,m,p,t,y,A);this.dialogs.push(this.dialog)}; EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus(): (mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(m.container,230,k,!0,!1);m.init()}; EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})}; @@ -2237,11 +2238,11 @@ EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bin EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()}; EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"}; EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else{var e= -c.getSelectionCell(),n=c.model.getParent(e),f=null;1==c.getSelectionCount()&&c.model.isVertex(e)&&null!=c.layoutManager&&!c.isCellLocked(e)&&(f=c.layoutManager.getLayout(n));if(null!=f&&f.constructor==mxStackLayout)f=n.getIndex(e),37==a||38==a?c.model.add(n,e,Math.max(0,f-1)):39!=a&&40!=a||c.model.add(n,e,Math.min(c.model.getChildCount(n),f+1));else{f=c.getMovableCells(c.getSelectionCells());e=[];for(g=0;g<f.length;g++)n=c.view.getState(f[g]),n=null!=n?n.style:c.getCellStyle(f[g]),"1"==mxUtils.getValue(n, -"part","0")?(n=c.model.getParent(f[g]),c.model.isVertex(n)&&0>mxUtils.indexOf(f,n)&&e.push(n)):e.push(f[g]);0<e.length&&(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(e,f,g))}}});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&& +c.getSelectionCell(),l=c.model.getParent(e),f=null;1==c.getSelectionCount()&&c.model.isVertex(e)&&null!=c.layoutManager&&!c.isCellLocked(e)&&(f=c.layoutManager.getLayout(l));if(null!=f&&f.constructor==mxStackLayout)f=l.getIndex(e),37==a||38==a?c.model.add(l,e,Math.max(0,f-1)):39!=a&&40!=a||c.model.add(l,e,Math.min(c.model.getChildCount(l),f+1));else{f=c.getMovableCells(c.getSelectionCells());e=[];for(g=0;g<f.length;g++)l=c.view.getState(f[g]),l=null!=l?l.style:c.getCellStyle(f[g]),"1"==mxUtils.getValue(l, +"part","0")?(l=c.model.getParent(f[g]),c.model.isVertex(l)&&0>mxUtils.indexOf(f,l)&&e.push(l)):e.push(f[g]);0<e.length&&(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(e,f,g))}}});null!=t&&window.clearTimeout(t);t=window.setTimeout(function(){if(0<p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&& 9==a.keyCode)&&(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)|| -mxClient.IS_MAC&&a.metaKey};var p=[],u=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return c.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}: -mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=x[a.keyCode]&&!c.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),x[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()), +mxClient.IS_MAC&&a.metaKey};var p=[],t=null,y={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return c.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}: +mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=y[a.keyCode]&&!c.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),y[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()), null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return A.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var d= this,f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35, function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){if(c.isEnabled())try{c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}catch(g){d.handleError(g)}}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"), @@ -2256,54 +2257,54 @@ mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHAD mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor; mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null}; Graph=function(a,b,e,c,k,m){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a= -null!=d?d.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,x=null,A=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(p=new mxPoint(c.getGraphX(),c.getGraphY()), -d=this.isCellSelected(f.cell),x=f,u=c,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?A=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(A=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&& -!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=x&&null!=u){if(c=x,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(u),l=this.view.getEdgeStyle(c);f=l==mxEdgeStyle.EntityRelation;d||A!=mxEvent.LABEL_HANDLE||(g=A); +null!=d?d.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,t=null,y=null,A=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(p=new mxPoint(c.getGraphX(),c.getGraphY()), +d=this.isCellSelected(f.cell),y=f,t=c,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?A=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(A=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&& +!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=y&&null!=t){if(c=y,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(t),l=this.view.getEdgeStyle(c);f=l==mxEdgeStyle.EntityRelation;d||A!=mxEvent.LABEL_HANDLE||(g=A); if(f&&0!=g&&g!=e.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!f||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=c.visibleSourceState||g==e.bends.length-1||null!=c.visibleTargetState)f||g==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==l&&null==g||l==mxEdgeStyle.OrthConnector)&&(g=A,null==g&&(g=new mxRectangle(p.x,p.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,f[0].x,f[0].y)? -g=0:mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y)?g=e.bends.length-1:null!=l&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?g=2:(g=mxUtils.findNearestSegment(c,p.x,p.y),g=null==l?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),A=p=u=x=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e= +g=0:mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y)?g=e.bends.length-1:null!=l&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?g=2:(g=mxUtils.findNearestSegment(c,p.x,p.y),g=null==l?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),A=p=t=y=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e= null;f=c.absolutePoints;if(null!=f)if(g=new mxRectangle(b.getGraphX(),b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(g,f[0].x,f[0].y)||mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)l=this.view.getEdgeStyle(c),e="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&& -(l=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,d){A=p=u=x=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0); +(l=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,d){A=p=t=y=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0); this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates; -this.graphHandler.getGuideStates=function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,e=b.width*c,b=b.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),t=0;t<l.width;t++)d.push(new mxRectangle(((l.x+t)*e+c.x)*g,(l.y*b+c.y)*g,e*g,b*g));for(t=1;t<l.height;t++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+t)*b+c.y)*g,e*g,b*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex= +this.graphHandler.getGuideStates=function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,e=b.width*c,b=b.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)d.push(new mxRectangle(((l.x+n)*e+c.x)*g,(l.y*b+c.y)*g,e*g,b*g));for(n=1;n<l.height;n++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+n)*b+c.y)*g,e*g,b*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex= mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var g=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var d=g.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]), -f=null!=f?f.style:this.graph.getCellStyle(d[c]);"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};var q=this.graphHandler.start;this.graphHandler.start=function(a,d,b,c){var f=this.graph.view.getState(a);null!=f&&mxUtils.getValue(f.style,"part",!1)&&(a=this.graph.model.getParent(a));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d), -b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);this.getRubberband=function(){return n};var l=(new Date).getTime(),B=0,v=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;v.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),B=0): -B=(new Date).getTime()-l};var y=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<B||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&y.apply(this,arguments)};var H=this.isToggleEvent;this.isToggleEvent=function(a){return H.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=n.isForceRubberbandEvent;n.isForceRubberbandEvent= -function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var F=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(F=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=F)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return C.apply(this,arguments);var b=d?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)? -this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var t=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer"; -if(this.isCellLocked(a))return"default"}return t.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,e){e=null!=e?e:[];if(0<b||0<c){var g=this.getModel(),l=a+b,t=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=g.getRoot()));if(null!=f)for(var n=g.getChildCount(f),q=0;q<n;q++){var U=g.getChildAt(f,q),k=this.view.getState(U);if(null!=k&&this.isCellVisible(U)&&"1"!=mxUtils.getValue(k.style, -"locked","0")){var y=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(k=mxUtils.getBoundingBox(k,y));(g.isEdge(U)||g.isVertex(U))&&k.x>=a&&k.y+k.height<=t&&k.y>=d&&k.x+k.width<=l&&e.push(U);this.getAllCells(a,d,b,c,U,e)}}}return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, -"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var M=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();M=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell"); -null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),n.start(b.x,b.y)):null!=M?this.addSelectionCells(M):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);M=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this, -function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)}; -Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1"; -Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.handlePadding={}; +f=null!=f?f.style:this.graph.getCellStyle(d[c]);if("1"==mxUtils.getValue(f,"part","0")){var e=d[c];do e=this.graph.model.getParent(e),f=this.graph.view.getState(e),f=null!=f?f.style:this.graph.getCellStyle(e);while(null!=e&&"1"==mxUtils.getValue(f,"part","0"));this.graph.model.isVertex(e)&&0>mxUtils.indexOf(d,e)&&b.push(e)}else b.push(d[c])}return b};var q=this.graphHandler.start;this.graphHandler.start=function(a,d,b,c){var f=this.graph.view.getState(a);null!=f&&mxUtils.getValue(f.style,"part",!1)&& +(a=this.graph.model.getParent(a));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var l=new mxRubberband(this);this.getRubberband=function(){return l};var n=(new Date).getTime(),B=0,z=this.connectionHandler.mouseMove; +this.connectionHandler.mouseMove=function(){var a=this.currentState;z.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),B=0):B=(new Date).getTime()-n};var u=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<B||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&u.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent= +function(a){return G.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var x=l.isForceRubberbandEvent;l.isForceRubberbandEvent=function(a){return x.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START, +mxUtils.bind(this,function(){this.isEnabled()&&(E=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=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&& +!d||a.isConsumed())return C.apply(this,arguments);var b=d?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())}; +var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,e){e=null!=e?e:[];if(0<b||0<c){var g=this.getModel(),l=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f= +g.getRoot()));if(null!=f)for(var v=g.getChildCount(f),q=0;q<v;q++){var k=g.getChildAt(f,q),N=this.view.getState(k);if(null!=N&&this.isCellVisible(k)&&"1"!=mxUtils.getValue(N.style,"locked","0")){var u=mxUtils.getValue(N.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(N=mxUtils.getBoundingBox(N,u));(g.isEdge(k)||g.isVertex(k))&&N.x>=a&&N.y+N.height<=n&&N.y>=d&&N.x+N.width<=l&&e.push(k);this.getAllCells(a,d,b,c,k,e)}}}return e};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent= +function(a,d,b){return this.graph.isCellSelected(a)?!1:H.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var L=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();L=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null: +this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),l.start(b.x,b.y)):null!=L?this.addSelectionCells(L):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);L=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d|| +a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var I=this.updateMouseEvent;this.updateMouseEvent=function(a){a=I.apply(this, +arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6; +Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.handlePadding={}; Graph.createSvgImage=function(a,b,e,c,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=c&&null!=k?'viewBox="0 0 '+c+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)}; Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&65535!=c&&65534!=c&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))}; Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)}; mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff"; Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default"; Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1; -Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,p=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),x=mxUtils.bind(this,function(b){if(k)for(var d=mxEvent.getSource(b);null!= -d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,u,x);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()}; -(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,p,u,x){this.useCssTransforms&& -(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,p,u,x){p=null!=p?p:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,p,u,x);if(null!=f)return f;if(this.isCellVisible(d)&&(u&&this.model.isEdge(d)|| -p&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==x||!x(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale); +Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,p=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),t=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),y=mxUtils.bind(this,function(b){if(k)for(var d=mxEvent.getSource(b);null!= +d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,t,y);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()}; +(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,p,t,y){this.useCssTransforms&& +(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,p,t,y){p=null!=p?p:!0;t=null!=t?t:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,p,t,y);if(null!=f)return f;if(this.isCellVisible(d)&&(t&&this.model.isEdge(d)|| +p&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale); return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale= this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b= -a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(u){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage; -mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var c=this.useCssTransforms,k=this.view.scale,x=this.view.translate;c&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms= -!1);e.apply(this,arguments);c&&(this.view.scale=k,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1}; +a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(t){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage; +mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var c=this.useCssTransforms,k=this.view.scale,y=this.view.translate;c&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms= +!1);e.apply(this,arguments);c&&(this.view.scale=k,this.view.translate=y,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1}; Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}}; Graph.prototype.openLink=function(a,b,e){var c=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else c=window.open(a,null!=b?b:"_blank"),null==c||e||(c.opener=null)}catch(m){}return c}; Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)}; Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a}; -Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new mxFastOrganicLayout(this),b=new mxStackLayout(this,!0),e=new mxCompactTreeLayout(this),c=new mxCircleLayout(this),k=new TableRowLayout(this),m=new TableLayout(this);this.layoutManager.getLayout=function(p,u){if(u!=mxEvent.BEGIN_UPDATE){var x=this.graph.getCellStyle(p);if(null!=x){if("stackLayout"==x.childLayout)return b.resizeParentMax="1"==mxUtils.getValue(x,"resizeParentMax","1"),b.horizontal="1"== -mxUtils.getValue(x,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(x,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(x,"resizeLast","0"),b.spacing=x.stackSpacing||b.spacing,b.border=x.stackBorder||b.border,b.marginLeft=x.marginLeft||0,b.marginRight=x.marginRight||0,b.marginTop=x.marginTop||0,b.marginBottom=x.marginBottom||0,b.fill=!0,b;if("treeLayout"==x.childLayout)return e.horizontal="1"==mxUtils.getValue(x,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(x,"resizeParent", -"1"),e.groupPadding=mxUtils.getValue(x,"parentPadding",20),e.levelDistance=mxUtils.getValue(x,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==x.childLayout){var A=new mxHierarchicalLayout(this.graph,mxUtils.getValue(x,"flowOrientation",mxConstants.DIRECTION_EAST));A.resizeParent="1"==mxUtils.getValue(x,"resizeParent","1");A.parentBorder=mxUtils.getValue(x,"parentPadding",20);A.maintainParentLocation=!0;A.intraCellSpacing=mxUtils.getValue(x,"intraCellSpacing", -mxHierarchicalLayout.prototype.intraCellSpacing);A.interRankCellSpacing=mxUtils.getValue(x,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing);A.interHierarchySpacing=mxUtils.getValue(x,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing);A.parallelEdgeSpacing=mxUtils.getValue(x,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing);return A}if("circleLayout"==x.childLayout)return c;if("organicLayout"==x.childLayout)return a;if(this.graph.isTableRow(p))return k; -if(this.graph.isTable(p))return m}}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; +Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new TableRowLayout(this),b=new TableLayout(this);this.layoutManager.getLayout=function(e,c){if(c!=mxEvent.BEGIN_UPDATE){var k=this.graph.getCellStyle(e);if(null!=k){if("stackLayout"==k.childLayout){var m=new mxStackLayout(this.graph,!0);m.resizeParentMax="1"==mxUtils.getValue(k,"resizeParentMax","1");m.horizontal="1"==mxUtils.getValue(k,"horizontalStack","1");m.resizeParent="1"==mxUtils.getValue(k,"resizeParent", +"1");m.resizeLast="1"==mxUtils.getValue(k,"resizeLast","0");m.spacing=k.stackSpacing||m.spacing;m.border=k.stackBorder||m.border;m.marginLeft=k.marginLeft||0;m.marginRight=k.marginRight||0;m.marginTop=k.marginTop||0;m.marginBottom=k.marginBottom||0;m.fill=!0;return m}if("treeLayout"==k.childLayout)return m=new mxCompactTreeLayout(this.graph),m.horizontal="1"==mxUtils.getValue(k,"horizontalTree","1"),m.resizeParent="1"==mxUtils.getValue(k,"resizeParent","1"),m.groupPadding=mxUtils.getValue(k,"parentPadding", +20),m.levelDistance=mxUtils.getValue(k,"treeLevelDistance",30),m.maintainParentLocation=!0,m.edgeRouting=!1,m.resetEdges=!1,m;if("flowLayout"==k.childLayout)return m=new mxHierarchicalLayout(this.graph,mxUtils.getValue(k,"flowOrientation",mxConstants.DIRECTION_EAST)),m.resizeParent="1"==mxUtils.getValue(k,"resizeParent","1"),m.parentBorder=mxUtils.getValue(k,"parentPadding",20),m.maintainParentLocation=!0,m.intraCellSpacing=mxUtils.getValue(k,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing), +m.interRankCellSpacing=mxUtils.getValue(k,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),m.interHierarchySpacing=mxUtils.getValue(k,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),m.parallelEdgeSpacing=mxUtils.getValue(k,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),m;if("circleLayout"==k.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==k.childLayout)return new mxFastOrganicLayout(this.graph); +if(this.graph.isTableRow(e)||this.graph.isTableCell(e))return a;if(this.graph.isTable(e))return b}}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize}; Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),c=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(e,c,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-e,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)- c)};Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")}; Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)}; @@ -2312,27 +2313,27 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b}; Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy", shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)|| -/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",x=a[u+"Date"](),A=a[u+"Day"](),d=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),l=e?0:a.getTimezoneOffset(),B={d:x,dd:p(x),ddd:c.i18n.dayNames[A],dddd:c.i18n.dayNames[A+7],m:d+1,mm:p(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+ -12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:p(g%12||12),H:g,HH:p(g),M:q,MM:p(q),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<l?"-":"+")+p(100*Math.floor(Math.abs(l)/60)+Math.abs(l)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in B?B[a]:a.slice(1, +/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var t=e?"getUTC":"get",y=a[t+"Date"](),A=a[t+"Day"](),d=a[t+"Month"](),f=a[t+"FullYear"](),g=a[t+"Hours"](),q=a[t+"Minutes"](),l=a[t+"Seconds"](),t=a[t+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),B={d:y,dd:p(y),ddd:c.i18n.dayNames[A],dddd:c.i18n.dayNames[A+7],m:d+1,mm:p(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+ +12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:p(g%12||12),H:g,HH:p(g),M:q,MM:p(q),s:l,ss:p(l),l:p(t,3),L:p(99<t?Math.round(t/10):t),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<n?"-":"+")+p(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<y%10?0:(10!=y%100-y%10)*y%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in B?B[a]:a.slice(1, a.length-1)})}; Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)mxUtils.bind(this,function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"), -k.defaultChecked=!0);e.appendChild(k);var u=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a}; -Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(p)?null!=u.getAttribute(p)?u.getAttribute(p):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c, +k.defaultChecked=!0);e.appendChild(k);var t=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",t);mxUtils.write(e,t);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a}; +Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var t=a;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(m=t.hasAttribute(p)?null!=t.getAttribute(p)?t.getAttribute(p):"":null),t=this.model.getParent(t);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c, match.index)+(null!=m?m:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var c=this.model.getCell(a[e].id);null!=c&&b.push(c)}this.setSelectionCells(b)}else this.clearSelection()}; Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)}; Graph.prototype.connectVertex=function(a,b,e,c,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+ -e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,x=this.view.translate,A=x.x*u,x=x.y*u;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(A+p.x*u,x+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a), -u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; -this.model.beginUpdate();try{var d=null!=m&&this.isSwimlane(m),u=d?null:m;if(null==u&&k){for(var A=a,f=this.getCellGeometry(a);null!=f&&f.relative;)A=this.getModel().getParent(A),f=this.getCellGeometry(A);var g=this.view.getState(A),q=null!=g?g.style:this.getCellStyle(A);if(mxUtils.getValue(q,"part",!1)){var n=this.model.getParent(A);this.model.isVertex(n)&&(A=n)}u=this.duplicateCells([A],!1)[0];f=this.getCellGeometry(u);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2);d&&(this.addCells([u],m,null, -null,null,!0),m=null)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(c)&&k||null==m&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var B=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&& -(B=c.parent.getIndex(c),this.model.add(c.parent,l,B))}null==m&&null!=u&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(B=a.parent.getIndex(a),this.model.add(a.parent,u,B));null!=l&&e.push(l);null==m&&null!=u&&e.push(u);null==u&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e}; +e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var t=this.view.scale,y=this.view.translate,A=y.x*t,y=y.y*t;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,y=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(A+p.x*t,y+p.y*t);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a), +t=this.view.getState(m),null!=e&&null!=t&&mxUtils.intersects(e,t)&&(m=null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[]; +this.model.beginUpdate();try{var d=null!=m&&this.isSwimlane(m),t=d?null:m;if(null==t&&k){for(var A=a,f=this.getCellGeometry(a);null!=f&&f.relative;)A=this.getModel().getParent(A),f=this.getCellGeometry(A);var g=this.view.getState(A),q=null!=g?g.style:this.getCellStyle(A);if(mxUtils.getValue(q,"part",!1)){var l=this.model.getParent(A);this.model.isVertex(l)&&(A=l)}t=this.duplicateCells([A],!1)[0];f=this.getCellGeometry(t);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2);d&&(this.addCells([t],m,null, +null,null,!0),m=null)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var n=mxEvent.isControlDown(c)&&k||null==m&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,t,this.createCurrentEdgeStyle());if(null!=n&&this.connectionHandler.insertBeforeSource){var B=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=n.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==n.parent&& +(B=c.parent.getIndex(c),this.model.add(c.parent,n,B))}null==m&&null!=t&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(B=a.parent.getIndex(a),this.model.add(a.parent,t,B));null!=n&&e.push(n);null==m&&null!=t&&e.push(t);null==t&&null!=n&&n.geometry.setTerminalPoint(p,!1);null!=n&&this.fireEvent(new mxEventObject("cellsInserted","cells",[n]))}finally{this.model.endUpdate()}return e}; Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")}; Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)}; Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null}; Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b}; Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")}; -Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=p&&null!=u){var x=Math.round(u.width-p.width/this.view.scale),A=Math.round(u.height-p.height/this.view.scale);if(0!=A||0!=x){var d=this.model.getParent(e[m]),f=this.layoutManager.getLayout(d); -null==f?null!=k&&this.isMoveCellsEvent(k,p)&&this.moveSiblings(p,d,x,A):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(d,f,x,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; +Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),t=this.getCellGeometry(e[m]);if(null!=p&&null!=t){var y=Math.round(t.width-p.width/this.view.scale),A=Math.round(t.height-p.height/this.view.scale);if(0!=A||0!=y){var d=this.model.getParent(e[m]),f=this.layoutManager.getLayout(d); +null==f?null!=k&&this.isMoveCellsEvent(k,p)&&this.moveSiblings(p,d,y,A):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(d,f,y,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}}; Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}}; Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=c+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a, m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container}; @@ -2378,42 +2379,43 @@ HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabl this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(c=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||c>this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox, b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}}; HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e){a=this.cloneCell(a);for(var c=0;c<e;c++)a.insert(this.cloneCell(b));return a}; -Graph.prototype.createTable=function(a,b,e,c){e=null!=e?e:40;c=null!=c?c:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];"),this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;"),b),a)}; -Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,c){e=null!=e?e:120;c=null!=c?c:120;var k=this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;"),m=this.createVertex(null,null,"",0,0,b*e,c,"swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;");k.insert(this.createParent(m,this.createVertex(null,null,"",0,0,e,c,"swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;"), -b));return 1<a?this.createParent(k,this.createParent(m,this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;"),b),a-1):k};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout}; -Graph.prototype.getActualStartSize=function(a,b){var e=new mxRectangle;if(this.isSwimlane(a)){var c=b?null:this.view.getState(a),k=null!=c?c.style:this.getCellStyle(a);if(null!=k){var m=parseInt(mxUtils.getValue(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),c=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPH,0),p=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPV,0),u=0;mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,!0)||u++;k=mxUtils.getValue(k,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST); -k==mxConstants.DIRECTION_NORTH?u++:k==mxConstants.DIRECTION_WEST?u+=2:k==mxConstants.DIRECTION_SOUTH&&(u+=3);u=mxUtils.mod(u,4);0==u?e.y=m:1==u?e.x=m:2==u?e.height=m:3==u&&(e.width=m);p&&(m=e.y,e.y=e.height,e.height=m);c&&(m=e.x,e.x=e.width,e.width=m)}}return e}; -Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var b=this.getModel(),e=b.getChildCount(a),c=this.getCellGeometry(a);if(null!=c&&0<e)for(var k=this.getActualStartSize(a),m=k.y,p=0;p<e;p++){var u=b.getChildAt(a,p);if(null!=u){var x=this.getCellGeometry(u);if(null!=x){if(p==e-1){var A=x.clone();A.width=c.width-k.x;m<c.height?A.height=c.height-m:m>c.height&&(c.height=m+Graph.minTableRowHeight,A.height=Graph.minTableRowHeight);b.setGeometry(u,A);this.tableRowResized(u, -A,x)}m+=x.height}}}};Graph.prototype.setRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{for(var c=0;c<e.getChildCount(a);c++){var k=e.getChildAt(a,c),m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height=b,e.setGeometry(k,m))}}finally{e.endUpdate()}}; -Graph.prototype.tableRowResized=function(a,b,e){console.log("tableLayout.tableRowResized",a);var c=this.getModel(),k=this.getCellGeometry(a),m=c.getChildCount(a);if(null!=k&&0<m)for(var p=this.getActualStartSize(a),u=p.x,x=0;x<m;x++){var A=c.getChildAt(a,x);if(null!=A){var d=this.getCellGeometry(A);if(null!=d){var f=d.clone();f.height=k.height-p.y;c.setGeometry(A,f);x==m-1&&(u<k.width?f.width=k.width-u:u>k.width&&(k.width=u+Graph.minTableColumnWidth,f.width=Graph.minTableColumnWidth),this.tableCellResized(A, -f,d));u+=d.width}}}k=c.getParent(a);a=k.getIndex(a);b.y!=e.y&&0<a&&(a=c.getChildAt(k,a-1),k=this.getCellGeometry(a),null!=k&&(k=k.clone(),k.height-=e.y-b.y,c.setGeometry(a,k)))}; -Graph.prototype.tableCellResized=function(a,b,e){console.log("tableLayout.tableCellResized",a,b,e);var c=this.getCellGeometry(a);if(null!=c){var k=this.getModel(),m=k.getParent(a),p=k.getParent(m),u=m.getIndex(a);b.height!=e.height&&this.setRowHeight(m,c.height);for(var x=null,A=0;A<k.getChildCount(p);A++){var d=k.getChildAt(p,A),f=k.getChildAt(d,u);if(a!=f){var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width=c.width,k.setGeometry(f,g))}b.y!=e.y&&d==m&&null!=x&&(f=this.getCellGeometry(x), -null!=f&&this.setRowHeight(x,f.height-e.y+b.y));x=d}b.x!=e.x&&0<u&&(f=k.getChildAt(m,u-1),g=this.getCellGeometry(f),null!=g&&(a=g.clone(),a.width-=e.x-b.x,k.setGeometry(f,a),this.tableCellResized(f,a,g)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,b,e){console.log("tableLayout.moveCell",a,b,e)}; +Graph.prototype.createTable=function(a,b,e,c){e=null!=e?e:40;c=null!=c?c:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,c,"html=1;whiteSpace=wrap;container=1;collapsible=0;points=[[0,0.5],[1,0.5]];part=1;"),this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;part=1;"),b),a)}; +Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,c){e=null!=e?e:120;c=null!=c?c:120;var k=this.createVertex(null,null,"",0,0,b*e,a*c,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;childLayout=tableLayout;"),m=this.createVertex(null,null,"",0,0,b*e,c,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;");k.insert(this.createParent(m,this.createVertex(null,null,"",0,0,e, +c,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),b));return 1<a?this.createParent(k,this.createParent(m,this.createVertex(null,null,"",0,0,e,c,"swimlane;html=1;whiteSpace=wrap;container=1;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),b),a-1):k};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))}; +Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout}; +Graph.prototype.getActualStartSize=function(a,b){var e=new mxRectangle;if(this.isSwimlane(a)){var c=b?null:this.view.getState(a),k=null!=c?c.style:this.getCellStyle(a);if(null!=k){var m=parseInt(mxUtils.getValue(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),c=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPH,0),p=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPV,0),t=0;mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,!0)||t++;k=mxUtils.getValue(k,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST); +k==mxConstants.DIRECTION_NORTH?t++:k==mxConstants.DIRECTION_WEST?t+=2:k==mxConstants.DIRECTION_SOUTH&&(t+=3);t=mxUtils.mod(t,4);0==t?e.y=m:1==t?e.x=m:2==t?e.height=m:3==t&&(e.width=m);p&&(m=e.y,e.y=e.height,e.height=m);c&&(m=e.x,e.x=e.width,e.width=m)}}return e}; +Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var b=this.getModel(),e=b.getChildCount(a),c=this.getCellGeometry(a);if(null!=c&&0<e)for(var k=this.getActualStartSize(a),m=k.y,p=0;p<e;p++){var t=b.getChildAt(a,p);if(null!=t&&b.isVertex(t)){var y=this.getCellGeometry(t);if(null!=y){if(p==e-1){var A=y.clone();A.width=c.width-k.x;m<c.height?A.height=c.height-m:m>c.height&&(c.height=m+Graph.minTableRowHeight,A.height=Graph.minTableRowHeight);b.setGeometry(t,A);this.tableRowResized(t, +A,y)}m+=y.height}}}};Graph.prototype.setRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{for(var c=0;c<e.getChildCount(a);c++){var k=e.getChildAt(a,c);if(e.isVertex(k)){var m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height=b,e.setGeometry(k,m))}}}finally{e.endUpdate()}}; +Graph.prototype.tableRowResized=function(a,b,e){console.log("tableLayout.tableRowResized",a);var c=this.getModel(),k=this.getCellGeometry(a),m=c.getChildCount(a);if(null!=k&&0<m)for(var p=this.getActualStartSize(a),t=p.x,y=0;y<m;y++){var A=c.getChildAt(a,y);if(null!=A&&c.isVertex(A)){var d=this.getCellGeometry(A);if(null!=d){var f=d.clone();f.height=k.height-p.y;c.setGeometry(A,f);y==m-1&&(t<k.width?f.width=k.width-t:t>k.width&&(k.width=t+Graph.minTableColumnWidth,f.width=Graph.minTableColumnWidth), +this.tableCellResized(A,f,d));t+=d.width}}}k=c.getParent(a);a=k.getIndex(a);b.y!=e.y&&0<a&&(a=c.getChildAt(k,a-1),k=this.getCellGeometry(a),null!=k&&(k=k.clone(),k.height-=e.y-b.y,c.setGeometry(a,k)))}; +Graph.prototype.tableCellResized=function(a,b,e){console.log("tableLayout.tableCellResized",a,b,e);var c=this.getCellGeometry(a);if(null!=c){var k=this.getModel(),m=k.getParent(a),p=k.getParent(m),t=m.getIndex(a);b.height!=e.height&&this.setRowHeight(m,c.height);for(var y=null,A=0;A<k.getChildCount(p);A++){var d=k.getChildAt(p,A);if(k.isVertex(d)){var f=k.getChildAt(d,t);if(a!=f){var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width=c.width,k.setGeometry(f,g))}b.y!=e.y&&d==m&&null!=y&&(f=this.getCellGeometry(y), +null!=f&&this.setRowHeight(y,f.height-e.y+b.y));y=d}}b.x!=e.x&&0<t&&(f=k.getChildAt(m,t-1),g=this.getCellGeometry(f),null!=g&&(a=g.clone(),a.width-=e.x-b.x,k.setGeometry(f,a),this.tableCellResized(f,a,g)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,b,e){console.log("tableLayout.moveCell",a,b,e)}; TableLayout.prototype.resizeCell=function(a,b,e){this.graph.isTable(a)?this.graph.tableResized(a,b,e):this.graph.isTableRow(a)?this.graph.tableRowResized(a,b,e):this.graph.isTableCell(a)&&this.graph.tableCellResized(a,b,e)}; -TableLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getModel(),c=b.y,k=[],m=0,p=0;console.log("tableLayout.execute",a,b);for(var u=0;u<e.getChildCount(a);u++){var x=e.getChildAt(a,u);if(null!=x){var A=this.graph.getCellGeometry(x);if(null!=A){for(var A=A.clone(),d=this.graph.getActualStartSize(x,!0),f=e.getChildCount(x),p=d.x,g=0;g<f;g++){var q=e.getChildAt(x,g);if(null!=q){var n=this.graph.getCellGeometry(q);null!=n&&(n=n.clone(),A.height=n.height+d.y+ -d.height,n.x=p,n.y=d.y,e.setGeometry(q,n),p+=n.width,g==f-1&&(k.push([n,A,d]),m=Math.max(p,m)))}}A.width=p+d.width;A.y=c;A.x=b.x;e.setGeometry(x,A);c+=A.height}}}u=this.graph.getCellGeometry(a);if(null!=u)for(u=u.clone(),u.width=p+b.x+b.width,u.height=c+b.height,e.setGeometry(a,u),u=0;u<k.length;u++)k[u][1].width<m&&(k[u][0].width+=m-k[u][1].width,k[u][1].width+=m-k[u][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout; +TableLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getModel(),c=b.y,k=[],m=0,p=0;console.log("tableLayout.execute",a,b);for(var t=0;t<e.getChildCount(a);t++){var y=e.getChildAt(a,t);if(null!=y&&e.isVertex(y)){var A=this.graph.getCellGeometry(y);if(null!=A){for(var A=A.clone(),d=this.graph.getActualStartSize(y,!0),f=e.getChildCount(y),p=d.x,g=0;g<f;g++){var q=e.getChildAt(y,g);if(null!=q){var l=this.graph.getCellGeometry(q);null!=l&&(l=l.clone(),A.height= +l.height+d.y+d.height,l.x=p,l.y=d.y,e.setGeometry(q,l),p+=l.width,g==f-1&&(k.push([l,A,d]),m=Math.max(p,m)))}}A.width=p+d.width;A.y=c;A.x=b.x;e.setGeometry(y,A);c+=A.height}}}t=this.graph.getCellGeometry(a);if(null!=t)for(t=t.clone(),t.width=p+b.x+b.width,t.height=c+b.height,e.setGeometry(a,t),t=0;t<k.length;t++)k[t][1].width<m&&(k[t][0].width+=m-k[t][1].width,k[t][1].width+=m-k[t][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout; TableRowLayout.prototype.constructor=TableRowLayout;TableRowLayout.prototype.moveCell=function(a,b,e){console.log("TableRowLayout.moveCell",a,b,e)}; -TableRowLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getActualStartSize(a),c=this.graph.getCellStyle(a),k=this.graph.getModel(),m=k.getParent(a);console.log("tableRowLayout.execute",a,b,e);if(null!=c&&null!=m){c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.beginUpdate();try{if(b.width!=e.width||b.x!=e.x){var p=k.getChildAt(a,k.getChildCount(a)-1),u=this.graph.getCellGeometry(p);null!=u&&(u=u.clone(),u.width+= -e.width-b.width-b.x-e.x,u.width=Math.max(Graph.minTableColumnWidth,u.width),k.setGeometry(p,u))}for(e=0;e<k.getChildCount(m);e++){var x=k.getChildAt(m,e);if(x!=a){var A=this.graph.getActualStartSize(x);(0<b.x&&0<A.x||0<b.y&&0<A.y||0<b.width&&0<A.width||0<b.height&&0<A.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,c,[x])}}}finally{k.endUpdate()}}}; +TableRowLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getActualStartSize(a),c=this.graph.getCellStyle(a),k=this.graph.getModel(),m=k.getParent(a);console.log("tableRowLayout.execute",a,b,e);if(null!=c&&null!=m){c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.beginUpdate();try{if(this.graph.isTableRow(a)&&(b.width!=e.width||b.x!=e.x)){var p=k.getChildAt(a,k.getChildCount(a)-1),t=this.graph.getCellGeometry(p); +null!=t&&(t=t.clone(),t.width+=e.width-b.width-b.x-e.x,t.width=Math.max(Graph.minTableColumnWidth,t.width),k.setGeometry(p,t))}for(e=0;e<k.getChildCount(m);e++){var y=k.getChildAt(m,e);if(y!=a){var A=this.graph.getActualStartSize(y);(0<b.x&&0<A.x||0<b.y&&0<A.y||0<b.width&&0<A.width||0<b.height&&0<A.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,c,[y])}}}finally{k.endUpdate()}}}; (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var d=this.getState(a);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this, arguments);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&& -1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var c=function(d,b,c){var e=new mxPoint(b,c);e.type=d;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=c},e=.5*this.scale,d=!1,f=[],n=0;n<b.length-1;n++){for(var l= -b[n+1],k=b[n],v=[],y=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,y.x,y.y,l.x,l.y)<1*this.scale*this.scale;)l=y,n++,y=b[n+2];for(var d=c(0,k.x,k.y)||d,u=0;u<this.validEdges.length;u++){var z=this.validEdges[u],m=z.absolutePoints;if(null!=m&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<m.length-1;z++){for(var C=m[z+1],t=m[z],y=m[z+2];z<m.length-2&&mxUtils.ptSegDistSq(t.x,t.y,y.x,y.y,C.x,C.y)<1*this.scale*this.scale;)C=y,z++,y=m[z+2];y=mxUtils.intersection(k.x,k.y,l.x,l.y,t.x,t.y,C.x, -C.y);if(null!=y&&(Math.abs(y.x-k.x)>e||Math.abs(y.y-k.y)>e)&&(Math.abs(y.x-l.x)>e||Math.abs(y.y-l.y)>e)&&(Math.abs(y.x-t.x)>e||Math.abs(y.y-t.y)>e)&&(Math.abs(y.x-C.x)>e||Math.abs(y.y-C.y)>e)){C=y.x-k.x;t=y.y-k.y;y={distSq:C*C+t*t,x:y.x,y:y.y};for(C=0;C<v.length;C++)if(v[C].distSq>y.distSq){v.splice(C,0,y);y=null;break}null==y||0!=v.length&&v[v.length-1].x===y.x&&v[v.length-1].y===y.y||v.push(y)}}}for(z=0;z<v.length;z++)d=c(1,v[z].x,v[z].y)||d}y=b[b.length-1];d=c(0,y.x,y.y)||d}a.routedPoints=f;return d}return!1}; +1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,c=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var e=new mxPoint(b,f);e.type=d;c.push(e);e=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=f},q=.5*this.scale,d=!1,c=[],l=0;l<b.length-1;l++){for(var n= +b[l+1],k=b[l],m=[],u=b[l+2];l<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,u.x,u.y,n.x,n.y)<1*this.scale*this.scale;)n=u,l++,u=b[l+2];for(var d=e(0,k.x,k.y)||d,t=0;t<this.validEdges.length;t++){var x=this.validEdges[t],y=x.absolutePoints;if(null!=y&&mxUtils.intersects(a,x)&&"1"!=x.style.noJump)for(x=0;x<y.length-1;x++){for(var C=y[x+1],v=y[x],u=y[x+2];x<y.length-2&&mxUtils.ptSegDistSq(v.x,v.y,u.x,u.y,C.x,C.y)<1*this.scale*this.scale;)C=u,x++,u=y[x+2];u=mxUtils.intersection(k.x,k.y,n.x,n.y,v.x,v.y,C.x, +C.y);if(null!=u&&(Math.abs(u.x-k.x)>q||Math.abs(u.y-k.y)>q)&&(Math.abs(u.x-n.x)>q||Math.abs(u.y-n.y)>q)&&(Math.abs(u.x-v.x)>q||Math.abs(u.y-v.y)>q)&&(Math.abs(u.x-C.x)>q||Math.abs(u.y-C.y)>q)){C=u.x-k.x;v=u.y-k.y;u={distSq:C*C+v*v,x:u.x,y:u.y};for(C=0;C<m.length;C++)if(m[C].distSq>u.distSq){m.splice(C,0,u);u=null;break}null==u||0!=m.length&&m[m.length-1].x===u.x&&m[m.length-1].y===u.y||m.push(u)}}}for(x=0;x<m.length;x++)d=e(1,m[x].x,m[x].y)||d}u=b[b.length-1];d=e(0,u.x,u.y)||d}a.routedPoints=c;return d}return!1}; var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,q=mxUtils.getValue(this.style, -"jumpStyle","none"),n=!0,l=null,B=null,v=[],y=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],m=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var C=!1;if(null!=l&&1==z.type){var t=this.state.routedPoints[u+1],z=t.x/this.scale-m.x,t=t.y/this.scale-m.y,z=z*z+t*t;null==y&&(y=new mxPoint(m.x-l.x,m.y-l.y),B=Math.sqrt(y.x*y.x+y.y*y.y),0<B?(y.x=y.x*e/B,y.y=y.y*e/B):y=null);z>e*e&&0<B&&(z=l.x- -m.x,t=l.y-m.y,z=z*z+t*t,z>e*e&&(C=new mxPoint(m.x-y.x,m.y-y.y),z=new mxPoint(m.x+y.x,m.y+y.y),v.push(C),this.addPoints(a,v,d,c,!1,null,n),v=0>Math.round(y.x)||0==Math.round(y.x)&&0>=Math.round(y.y)?1:-1,n=!1,"sharp"==q?(a.lineTo(C.x-y.y*v,C.y+y.x*v),a.lineTo(z.x-y.y*v,z.y+y.x*v),a.lineTo(z.x,z.y)):"arc"==q?(v*=1.3,a.curveTo(C.x-y.y*v,C.y+y.x*v,z.x-y.y*v,z.y+y.x*v,z.x,z.y)):(a.moveTo(z.x,z.y),n=!0),v=[z],C=!0))}else y=null;C||(v.push(m),l=m)}this.addPoints(a,v,d,c,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint; -mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var k=Math.cos(-n),v=Math.sin(-n),f=mxUtils.getRotatedPoint(f,k,v,l);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| -0);k+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==n&&e,k);0!=n&&(k=Math.cos(n),v=Math.sin(n),f=mxUtils.getRotatedPoint(f,k,v,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b, -a[f]);if(null!=g){var l=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||l<c)d=g,c=l}}null!=d&&(e=d)}return e};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b= -mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; +"jumpStyle","none"),l=!0,n=null,m=null,z=[],u=null;a.begin();for(var t=0;t<this.state.routedPoints.length;t++){var x=this.state.routedPoints[t],y=new mxPoint(x.x/this.scale,x.y/this.scale);0==t?y=b[0]:t==this.state.routedPoints.length-1&&(y=b[b.length-1]);var C=!1;if(null!=n&&1==x.type){var v=this.state.routedPoints[t+1],x=v.x/this.scale-y.x,v=v.y/this.scale-y.y,x=x*x+v*v;null==u&&(u=new mxPoint(y.x-n.x,y.y-n.y),m=Math.sqrt(u.x*u.x+u.y*u.y),0<m?(u.x=u.x*e/m,u.y=u.y*e/m):u=null);x>e*e&&0<m&&(x=n.x- +y.x,v=n.y-y.y,x=x*x+v*v,x>e*e&&(C=new mxPoint(y.x-u.x,y.y-u.y),x=new mxPoint(y.x+u.x,y.y+u.y),z.push(C),this.addPoints(a,z,d,c,!1,null,l),z=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,l=!1,"sharp"==q?(a.lineTo(C.x-u.y*z,C.y+u.x*z),a.lineTo(x.x-u.y*z,x.y+u.x*z),a.lineTo(x.x,x.y)):"arc"==q?(z*=1.3,a.curveTo(C.x-u.y*z,C.y+u.x*z,x.x-u.y*z,x.y+u.x*z,x.x,x.y)):(a.moveTo(x.x,x.y),l=!0),z=[x],C=!0))}else u=null;C||(z.push(y),n=y)}this.addPoints(a,z,d,c,!1,null,l);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint; +mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var k=Math.cos(-l),z=Math.sin(-l),f=mxUtils.getRotatedPoint(f,k,z,n);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]|| +0);k+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==l&&e,k);0!=l&&(k=Math.cos(l),z=Math.sin(l),f=mxUtils.getRotatedPoint(f,k,z,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b, +a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||n<c)d=g,c=n}}null!=d&&(e=d)}return e};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var t=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b= +mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return t.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[]; mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m= mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b}; mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,m=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!= k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)}; mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"), -u=c.getAttribute("h"),p=null==p?80:parseInt(p,10),u=null==u?80:parseInt(u,10);b(k,m,a,p,u)}}c=c.nextSibling}}}; +t=c.getAttribute("h"),p=null==p?80:parseInt(p,10),t=null==t?80:parseInt(t,10);b(k,m,a,p,t)}}c=c.nextSibling}}}; "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,d){switch(d){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR= "#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents= !0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview= @@ -2423,139 +2425,142 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg (a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&& (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+ "/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,d){d=null!=d?d:{};for(var b=0;b<a.length;b++){var c=a[b];d[mxObjectIdentity.get(c)]=c.getId();for(var f=this.model.getChildCount(c),e=0;e<f;e++)this.createCellLookup([this.model.getChildAt(c,e)],d)}return d};Graph.prototype.createCellMapping=function(a,d,b){b=null!=b?b:{};for(var c in a){var f=d[c];null==b[f]&&(b[f]=a[c].getId()||"")}return b}; -Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var t=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var n=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=n&& -(a=a.concat(n))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,t,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var q=this.getBoundingBoxFromGeometry(a,!0);null!=q&&this.moveCells(a,d-q.x,b-q.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary, +Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var v=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=v&& +(a=a.concat(v))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var q=this.getBoundingBoxFromGeometry(a,!0);null!=q&&this.moveCells(a,d-q.x,b-q.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary, f=0;f<a.length;f++)c.put(a[f],!0);for(f=0;f<b.length;f++){var e=this.view.getState(a[f]);if(null!=e){var g=this.getCellGeometry(b[f]);null==g||!g.relative||this.model.isEdge(a[f])||c.get(this.model.getParent(a[f]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(f=0;f<b.length;f++)e.add(g,b[f]);this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(a)),b);return c.encode(e)}; var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,d,b,c,f,e,g){g=null!=g?g:{};var l=m.apply(this,arguments);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};Graph.prototype.updateCustomLinks=function(a,d){for(var b=0;b<d.length;b++)null!=d[b]&&this.updateCustomLinksForCell(a,d[b])};Graph.prototype.updateCustomLinksForCell=function(a,d){};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style, -"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(aa){}return c}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;c=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=c,c=f,f=e;b=a.shape.getConstraints(a.style,c,f);if(null!=b)return b;if(null!= +"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(ca){}return c}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;c=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=c,c=f,f=e;b=a.shape.getConstraints(a.style,c,f);if(null!=b)return b;if(null!= a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}};Graph.prototype.isValidRoot= -function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell= -function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this, -arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var t=b.getGeometry(e);if(null!=t){t=t.clone();null!=t.points&&t.points.reverse();var n=t.getTerminalPoint(!0),q=t.getTerminalPoint(!1); -t.setTerminalPoint(n,!1);t.setTerminalPoint(q,!0);b.setGeometry(e,t);var k=this.view.getState(e),y=this.view.getState(g),v=this.view.getState(l);if(null!=k){var U=null!=y?this.getConnectionConstraint(k,y,!0):null,z=null!=v?this.getConnectionConstraint(k,v,!1):null;this.setConnectionConstraint(e,g,!0,z);this.setConnectionConstraint(e,l,!1,U)}c.push(e)}}else if(b.isVertex(e)&&(t=this.getCellGeometry(e),null!=t)){t=t.clone();t.x+=t.width/2-t.height/2;t.y+=t.height/2-t.width/2;var I=t.width;t.width=t.height; -t.height=I;b.setGeometry(e,t);var B=this.view.getState(e);if(null!=B){var u=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],m=mxUtils.getValue(B.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,u[mxUtils.mod(mxUtils.indexOf(u,m)+(d?-1:1),u.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a= -a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);if(0<d.length)for(var b=0;b<d.length;b++){var c=this.view.getState(d[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)? -this.removeStateForCell(d[b]):this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,d){if(null!=a)for(var b=a.getElementsByTagName("*"),c=0;c<b.length;c++)d(b[c])};Graph.prototype.updateLabelElements= -function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)d(g[l]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&& -null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0); -for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)&&this.isTransparentState(f)){for(var e=!0,g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup= -function(a){for(var d=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&this.isTransparentState(this.view.getState(a[b]))&&d.push(a[b]);a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.getAttributeForCell=function(a,d,b){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(d):null; -return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null; -return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!= -f||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(b.x,b.y))),d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this, -a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x, -d.x/a.scale-a.translate.x+(0==d.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale- -this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){c.style+= -"labelBackgroundColor=#ffffff;";c.geometry.relative=!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y);c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else f=this.view.translate,c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x-(null!=b?b.origin.x:0),c.geometry.y=Math.round(d/ -this.view.scale)-f.y-(null!=b?b.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("rel", -this.linkRelation),a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var d=a.sourceState;if(null==d||null==g.getLinkForCell(d.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(), -null,null,null,function(a,d,b){return null==g.getLinkForCell(a.cell)}),d=g.view.getState(a);d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)}, -mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!g.intersects(this.currentState, -d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(a,c){for(var f=c.getSource(),l=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink), -"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell)); -null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells(); -d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),t=this.moveCells([e[g]],c,c,!1)[0];f.push(t);if(d)b.add(l,e[g]);else{var n=l.getIndex(a[g]);b.add(l,e[g],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]); -document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),b=[],c=0;c<d.length;c++)b.push(d[c]);document.execCommand("createlink", -!1,mxUtils.trim(a));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==b.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=b[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(b=d[0].parentNode;null!=d[0].firstChild;)b.insertBefore(d[0].firstChild,d[0]);b.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style: -this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,f=null!=f?Math.min(f,l):l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a? -d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var t=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),c=c+t;null!=q&&null!=n&&(q=q.clone(),a?q.x=Math.round(c-q.width/2)-n.origin.x:q.y=Math.round(c-q.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent= -function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,t,n){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var k=e||c? -this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,v=mxUtils.createXmlDocument(),z=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=z.style?z.style.backgroundColor=a:z.setAttribute("style","background-color:"+a));null==v.createElementNS?(z.setAttribute("xmlns",mxConstants.NS_SVG),z.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):z.setAttributeNS("http://www.w3.org/2000/xmlns/", -"xmlns:xlink",mxConstants.NS_XLINK);a=d/y;var I=Math.max(1,Math.ceil(k.width*a)+2*b)+(n?5:0),B=Math.max(1,Math.ceil(k.height*a)+2*b)+(n?5:0);z.setAttribute("version","1.1");z.setAttribute("width",I+"px");z.setAttribute("height",B+"px");z.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+I+" "+B);v.appendChild(z);var u=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"g"):v.createElement("g");z.appendChild(u);var m=this.createSvgCanvas(u);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset= -f?-.5:0;m.translate(Math.floor((b/d-k.x)/y),Math.floor((b/d-k.y)/y));var J=document.createElement("div"),E=m.getAlternateText;m.getAlternateText=function(a,d,b,c,f,e,g,l,t,n,q,k,y){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(J.innerHTML=e,e=mxUtils.extractTextWithWhitespace(J.childNodes));for(var v=Math.ceil(2*c/this.state.fontSize),z=[],I=0,B=0;(0==v||I<v)&&B<e.length;){var u=e.charCodeAt(B);if(10==u||13==u){if(0<I)break}else z.push(e.charAt(B)),255>u&&I++;B++}z.length< -e.length&&1<e.length-z.length&&(e=mxUtils.trim(z.join(""))+"...");return e}catch(V){return E.apply(this,arguments)}else return E.apply(this,arguments)};var C=this.backgroundImage;if(null!=C){d=y/d;var M=this.view.translate,p=new mxRectangle(M.x*d,M.y*d,C.width*d,C.height*d);mxUtils.intersects(k,p)&&m.image(M.x,M.y,C.width,C.height,C.src,!0)}m.scale(a);m.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var U=l.drawCellState,D=l.getLinkForCellState;l.getLinkForCellState=function(a,d){var b=D.apply(this, -arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&U.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(z,t,!0);this.addForeignObjectWarning(m,z);return z}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning= -function(a,d){if(0<d.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target","_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href", -Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(c);f.appendChild(e);b.appendChild(f);d.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,d,b){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var f=a[c].getAttribute("href"); -null==f&&(f=a[c].getAttribute("xlink:href"));null!=f&&(null!=d&&/^https?:\/\//.test(f)?a[c].setAttribute("target",d):b&&this.isCustomLink(f)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement()); -return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,d,b){for(;null!=a&&!(0<=mxUtils.indexOf(d,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&& -"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=e.getIndex(a);else this.isTableRow(a)&&(c=b.getParent(a)),d||(f=b.getChildCount(b.getChildAt(c,0))-1);for(var g=0;g<b.getChildCount(c);g++){var e=b.getChildAt(c,g),l=b.getChildAt(e,f),t=b.cloneCell(l),n=this.getCellGeometry(t); -t.value=null;if(null!=n){n.width=Graph.minTableColumnWidth;var q=this.getCellGeometry(e);null!=q&&(n.height=q.height)}b.add(e,t,f+(d?0:1))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width+=Graph.minTableColumnWidth,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=c.getIndex(e);else this.isTableRow(a)?(c=b.getParent(a),f=c.getIndex(a)): -d||(f=b.getChildCount(c)-1);e=b.cloneCell(b.getChildAt(c,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var t=this.getCellGeometry(a);null!=t&&(t.height=g.height)}b.add(c,e,f+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=g.height,b.setGeometry(c,n))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var d=this.getModel();d.beginUpdate();try{var b= -a,c=0;if(this.isTableCell(a))var f=d.getParent(a),b=d.getParent(f),c=f.getIndex(a);else this.isTableRow(a)?(b=d.getParent(a),c=d.getChildCount(a)-1):this.isTable(a)&&(c=d.getChildCount(d.getChildAt(a,0))-1);for(var e=a=0;e<d.getChildCount(b);e++){var f=d.getChildAt(b,e),g=d.getChildAt(f,c);d.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width-=a,d.setGeometry(b,t))}finally{d.endUpdate()}};Graph.prototype.deleteTableRow= -function(a){var d=this.getModel();d.beginUpdate();try{var b=a;this.isTableCell(a)?b=d.getParent(a):this.isTable(a)&&(b=d.getChildAt(a,d.getChildCount(a)-1));var c=d.getParent(b);d.remove(b);a=0;var f=this.getCellGeometry(b);null!=f&&(a=f.height);var e=this.getCellGeometry(c);null!=e&&(e=e.clone(),e.height-=a,d.setGeometry(c,e))}finally{d.endUpdate()}};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=b.rows[0].cells,f=0,e=0;e<c.length;e++)var g=c[e].getAttribute("colspan"),f=f+(null!= -g?parseInt(g):1);b=b.insertRow(d);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn= -function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)}; -Graph.prototype.createLinkForHint=function(a,d){function b(a,d){a.length>d&&(a=a.substring(0,Math.round(d/2))+"..."+a.substring(a.length-Math.round(d/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(a)?this.getLinkTitle(a):a;var c=document.createElement("a");c.setAttribute("rel",this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&c.setAttribute("target", -this.linkTarget);mxUtils.write(c,b(d,40));this.isCustomLink(a)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(a);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&& -null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()), -b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, -arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,d){var b=null!=d&&mxEvent.isShiftDown(d);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea, -function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(W){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update; -mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){x.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!= -b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px": -"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var A=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d= -a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}A.apply(this,arguments); -mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell); -if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){t=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<t.length&&"\n"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));t=this.graph.sanitizeHtml(d?t.replace(/\n/g,"<br/>"):t,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY, -mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE, -0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");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=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding= -"0px";this.textarea.innerHTML!=t&&(this.textarea.innerHTML=t,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 t=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(t=mxUtils.replaceTrailingNewlines(t,"<div><br></div>")); -t=this.graph.sanitizeHtml(d?t.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):t,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var 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!=t&&(this.textarea.innerHTML=t);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=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 f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width= -Math.round((this.bounds.width-4)/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="",d.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue= -function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML, -!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(U){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a, -d){this.graph.getModel().beginUpdate();try{g.apply(this,arguments),""==d&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style, -mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText= -function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/f-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/f-c.y);f=this.graph.view.unit;this.hint.innerHTML=b(d,f)+", "+b(c,f);this.hint.style.left=this.pBounds.x+this.currentDx+ -Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+ -a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())|| -mxEvent.isMetaDown(d.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance,b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);(this.graph.cellEditor.getEditingCell()==this.state.cell||Graph.handlePadding[b])&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y= -this.sizers[0].bounds.height+d):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{d=this.state.view.scale;var c=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/d),c)+" x "+b(this.roundLength(this.bounds.height/d),c)}d=mxUtils.getBoundingBox(this.bounds, -null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var l=mxEdgeHandler.prototype.mouseMove; -mxEdgeHandler.prototype.mouseMove=function(a,d){l.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var B=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,d){B.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,c){null==this.hint&& -(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(c.x/e-f.x),f=this.roundLength(c.y/e-f.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(f,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+ -"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),c.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ -HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'): -new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+ -'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5, -5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage= -HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop); -mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src, -(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled= -!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH|| -0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(d)|| -mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var v=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){v.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null== -a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,d){if(this.cancelled)this.cancelled= -!1,d.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&& -this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var t=this.graph.view.getState(l[b]),n=this.graph.getCellGeometry(l[b]);null!=t&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(l[b], -n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null== -this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-this.height)), -this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+ -"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var y=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!= -this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);y.apply(this,arguments)};var H=(new Date).getTime(),z=0,F=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){F.apply(this,arguments);b!=this.currentTerminalState?(H=(new Date).getTime(),z=0):z=(new Date).getTime()-H;this.currentTerminalState=b};var C=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!= -this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&C.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor== -mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; -var t=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return t.apply(this,arguments)};var I=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&& -null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return I.apply(this,arguments)};var M=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=M.apply(this,arguments),d=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds= -function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):J.apply(this,arguments)};var N=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell), -f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&N.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(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&d==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])}; -var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){D.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var E=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,d){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&& -(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var O=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){O.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&& -this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED, -this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){try{if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding= -"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px"; -c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px"; -f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),mxUtils.getTextContent(b[c])));this.linkHint.appendChild(e)}}}catch(ia){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint; -var S=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){S.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"": -"none")});this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()}; -var Z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var X=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE? -"none":"");X.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height; -null!=d&&(b=Math.max(b,d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+Editor.hintOffset)+"px"}};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler), -this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left= -Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ga=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ga.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint= -null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,d){this.canvas= -a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; -this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function l(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function H(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function t(){mxShape.call(this)}function I(){mxShape.call(this)} -function M(){mxEllipse.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function Z(){mxShape.call(this)}function X(){mxShape.call(this)}function G(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ga(){mxRectangleShape.call(this)}function ja(){mxDoubleEllipse.call(this)}function U(){mxDoubleEllipse.call(this)}function ha(){mxArrowConnector.call(this); -this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function ba(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function aa(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function L(){mxActor.call(this)}function ka(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function da(){mxActor.call(this)}function pa(){mxActor.call(this)}function K(){mxEllipse.call(this)} -function ma(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function la(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,l,t,n){g+=t;var qa=c.clone();c.x-=f*(2*g+t);c.y-=e*(2*g+t);f*=g+t;e*=g+t;return function(){a.ellipse(qa.x- -f-g,qa.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),qa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); +function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return("1"!=mxUtils.getValue(d,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))}; +Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this, +arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var v=n.getTerminalPoint(!0),q=n.getTerminalPoint(!1); +n.setTerminalPoint(v,!1);n.setTerminalPoint(q,!0);b.setGeometry(e,n);var k=this.view.getState(e),u=this.view.getState(g),m=this.view.getState(l);if(null!=k){var N=null!=u?this.getConnectionConstraint(k,u,!0):null,D=null!=m?this.getConnectionConstraint(k,m,!1):null;this.setConnectionConstraint(e,g,!0,D);this.setConnectionConstraint(e,l,!1,N)}c.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var x=n.width;n.width=n.height; +n.height=x;b.setGeometry(e,n);var z=this.view.getState(e);if(null!=z){var H=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],B=mxUtils.getValue(z.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,H[mxUtils.mod(mxUtils.indexOf(H,B)+(d?-1:1),H.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a= +a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var d=0;d<a.length;d++){var b= +this.view.getState(a[d]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[d]):this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements= +function(a,d){if(null!=a)for(var b=a.getElementsByTagName("*"),c=0;c<b.length;c++)d(b[c])};Graph.prototype.updateLabelElements=function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)d(g[l]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged= +function(a,d,b){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}}; +Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)&&this.isTransparentState(f)){for(var e=!0,g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e= +!1);e&&a.push(f.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&this.isTransparentState(this.view.getState(a[b]))&&d.push(a[b]);a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.getAttributeForCell= +function(a,d,b){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(d):null;return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,d,b){var c;null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null; +for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)? +this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(b.x, +b.y))),d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view, +d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,d.x/a.scale-a.translate.x+(0==d.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(d.y+d.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/ +2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];"; +c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){c.style+="labelBackgroundColor=#ffffff;";c.geometry.relative=!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y);c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else f=this.view.translate,c.geometry.width=40,c.geometry.height= +20,c.geometry.x=Math.round(a/this.view.scale)-f.x-(null!=b?b.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-f.y-(null!=b?b.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!= +a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var d= +a.sourceState;if(null==d||null==g.getLinkForCell(d.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,d,b){return null==g.getLinkForCell(a.cell)}),d=g.view.getState(a);d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&& +"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(d,!0,this.currentState),(null== +this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!g.intersects(this.currentState,d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(a,c){for(var f=c.getSource(),l=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&& +!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY- +c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document, +"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];f.push(n);if(d)b.add(l,e[g]);else{var v=l.getIndex(a[g]);b.add(l,e[g],v+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!= +a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d= +this.cellEditor.textarea.getElementsByTagName("a"),b=[],c=0;c<d.length;c++)b.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(a));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==b.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=b[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(b=d[0].parentNode;null!=d[0].firstChild;)b.insertBefore(d[0].firstChild,d[0]);b.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable= +function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var l=a?g.getCenterX(): +g.getCenterY(),c=null!=c?Math.max(c,l):l,f=null!=f?Math.min(f,l):l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),c=c+n;null!=q&&null!=v&&(q=q.clone(),a?q.x=Math.round(c-q.width/2)-v.origin.x:q.y=Math.round(c-q.height/ +2)-v.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,n,v){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1, +this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var k=e||c?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var u=this.view.scale,m=mxUtils.createXmlDocument(),D=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=D.style?D.style.backgroundColor=a:D.setAttribute("style","background-color:"+a));null== +m.createElementNS?(D.setAttribute("xmlns",mxConstants.NS_SVG),D.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):D.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=d/u;var x=Math.max(1,Math.ceil(k.width*a)+2*b)+(v?5:0),H=Math.max(1,Math.ceil(k.height*a)+2*b)+(v?5:0);D.setAttribute("version","1.1");D.setAttribute("width",x+"px");D.setAttribute("height",H+"px");D.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+x+" "+H);m.appendChild(D);var z=null!=m.createElementNS? +m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g");D.appendChild(z);var B=this.createSvgCanvas(z);B.foOffset=f?-.5:0;B.textOffset=f?-.5:0;B.imageOffset=f?-.5:0;B.translate(Math.floor((b/d-k.x)/u),Math.floor((b/d-k.y)/u));var t=document.createElement("div"),I=B.getAlternateText;B.getAlternateText=function(a,d,b,c,f,e,g,l,n,v,q,k,u){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(t.innerHTML=e,e=mxUtils.extractTextWithWhitespace(t.childNodes));for(var m=Math.ceil(2* +c/this.state.fontSize),D=[],x=0,H=0;(0==m||x<m)&&H<e.length;){var z=e.charCodeAt(H);if(10==z||13==z){if(0<x)break}else D.push(e.charAt(H)),255>z&&x++;H++}D.length<e.length&&1<e.length-D.length&&(e=mxUtils.trim(D.join(""))+"...");return e}catch(Ga){return I.apply(this,arguments)}else return I.apply(this,arguments)};var L=this.backgroundImage;if(null!=L){d=u/d;var C=this.view.translate,N=new mxRectangle(C.x*d,C.y*d,L.width*d,L.height*d);mxUtils.intersects(k,N)&&B.image(C.x,C.y,L.width,L.height,L.src, +!0)}B.scale(a);B.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var M=l.drawCellState,y=l.getLinkForCellState;l.getLinkForCellState=function(a,d){var b=y.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&M.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(D, +n,!0);this.addForeignObjectWarning(B,D);return D}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,d){if(0<d.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||d.ownerDocument!=document&& +null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target","_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(c);f.appendChild(e); +b.appendChild(f);d.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,d,b){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var f=a[c].getAttribute("href");null==f&&(f=a[c].getAttribute("xlink:href"));null!=f&&(null!=d&&/^https?:\/\//.test(f)?a[c].setAttribute("target",d):b&&this.isCustomLink(f)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a= +null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,d,b){for(;null!=a&&!(0<=mxUtils.indexOf(d,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode= +function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=e.getIndex(a); +else this.isTableRow(a)&&(c=b.getParent(a)),d||(f=b.getChildCount(b.getChildAt(c,0))-1);for(var g=0;g<b.getChildCount(c);g++){var e=b.getChildAt(c,g),l=b.getChildAt(e,f),n=b.cloneCell(l),v=this.getCellGeometry(n);n.value=null;if(null!=v){v.width=Graph.minTableColumnWidth;var q=this.getCellGeometry(e);null!=q&&(v.height=q.height)}b.add(e,n,f+(d?0:1))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width+=Graph.minTableColumnWidth,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.insertTableRow= +function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=c.getIndex(e);else this.isTableRow(a)?(c=b.getParent(a),f=c.getIndex(a)):d||(f=b.getChildCount(c)-1);e=b.cloneCell(b.getChildAt(c,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=g.height)}b.add(c,e,f+(d?0:1)); +var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.height+=g.height,b.setGeometry(c,v))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var d=this.getModel();d.beginUpdate();try{var b=a,c=0;if(this.isTableCell(a))var f=d.getParent(a),b=d.getParent(f),c=f.getIndex(a);else this.isTableRow(a)?(b=d.getParent(a),c=d.getChildCount(a)-1):this.isTable(a)&&(c=d.getChildCount(d.getChildAt(a,0))-1);for(var e=a=0;e<d.getChildCount(b);e++){var f=d.getChildAt(b,e),g=d.getChildAt(f,c); +d.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.width-=a,d.setGeometry(b,n))}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var d=this.getModel();d.beginUpdate();try{var b=a;this.isTableCell(a)?b=d.getParent(a):this.isTable(a)&&(b=d.getChildAt(a,d.getChildCount(a)-1));var c=d.getParent(b);d.remove(b);a=0;var f=this.getCellGeometry(b);null!=f&&(a=f.height);var e=this.getCellGeometry(c);null!=e&&(e= +e.clone(),e.height-=a,d.setGeometry(c,e))}finally{d.endUpdate()}};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=b.rows[0].cells,f=0,e=0;e<c.length;e++)var g=c[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(d);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th"); +b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div"); +b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,d){function b(a,d){a.length>d&&(a=a.substring(0,Math.round(d/2))+"..."+a.substring(a.length-Math.round(d/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(a)?this.getLinkTitle(a):a;var c=document.createElement("a");c.setAttribute("rel", +this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&c.setAttribute("target",this.linkTarget);mxUtils.write(c,b(d,40));this.isCustomLink(a)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(a);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first}; +this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&& +this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&& +(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE", +this.textarea)};mxCellEditor.prototype.alignText=function(a,d){var b=null!=d&&mxEvent.isShiftDown(d);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a= +window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}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 d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(aa){}};var p=mxCellRenderer.prototype.initializeLabel; +mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing= +!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){y.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)? +mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var A=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b} +function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"), +a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}A.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")|| +0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>"))&&b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className= +"mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[]; +(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");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=l.join(" "); +this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,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 n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"").replace(/<br\s*.?>/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var 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!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=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 f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN, +mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/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= +"",d.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue= +function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer= +function(){try{this.graph.container.focus()}catch(N){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{g.apply(this,arguments),""==d&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, +null);null!=d&&d!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells= +function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/f-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/ +f-c.y);f=this.graph.view.unit;this.hint.innerHTML=b(d,f)+", "+b(c,f);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition= +function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,d){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(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var l=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance,b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);(this.graph.cellEditor.getEditingCell()==this.state.cell||Graph.handlePadding[b])&& +null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=l.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"°";else{d=this.state.view.scale;var c=this.state.view.unit;this.hint.innerHTML= +b(this.roundLength(this.bounds.width/d),c)+" x "+b(this.roundLength(this.bounds.height/d),c)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this, +arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var n=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,d){n.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var B=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,d){B.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&& +(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(c.x/e-f.x),f=this.roundLength(c.y/e-f.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(f,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus? +(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),c.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= +mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+ +HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG? +Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+ +"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage= +HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget, +Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src, +(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled= +!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())}; +if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null== +a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var z=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){z.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&& +(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp= +function(a,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&& +(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]); +null!=n&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],v))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y- +b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x< +this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)), +this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var u=mxRubberband.prototype.reset; +mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var G=(new Date).getTime(),x=0,E=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){E.apply(this,arguments);b!=this.currentTerminalState?(G=(new Date).getTime(),x=0):x=(new Date).getTime()-G;this.currentTerminalState=b};var C=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent= +function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<x||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&C.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length- +1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR, +mxConstants.HANDLE_STROKECOLOR)};var v=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return v.apply(this,arguments)};var H=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]); +if(d.isEdge(b)&&null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return H.apply(this,arguments)};var L=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=L.apply(this,arguments),d=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var I=mxVertexHandler.prototype.getSelectionBounds; +mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):I.apply(this,arguments)};var O=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a, +d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&O.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(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&d==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION, +a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){D.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var M=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp= +function(a,d){M.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var R=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){R.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState= +null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor="pointer",this.rowMoveHandle.style.width="18px",this.rowMoveHandle.style.height="18px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle, +mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var d=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()}); +this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c= +this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){S.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.display=a?"":"none")};mxVertexHandler.prototype.updateLinkHint=function(d,b){try{if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint), +this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title", +mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")])); +f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),mxUtils.getTextContent(b[c]))); +this.linkHint.appendChild(e)}}}catch(ba){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Z=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display= +this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),b=this.graph.getLinksForState(this.state); +if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var W=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){W.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var F=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=this.rowState.x+this.rowState.width+ +"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");F.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+ +22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b,d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+Editor.hintOffset)+"px"}}; +var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null); +null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var ga=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(ga.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/ +2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ka=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ka.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler), +this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function A(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function q(){mxActor.call(this)}function l(a,d){this.canvas= +a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo; +this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function z(){mxActor.call(this)}function u(){mxActor.call(this)}function G(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function v(){mxShape.call(this)}function H(){mxShape.call(this)} +function L(){mxEllipse.call(this)}function I(){mxShape.call(this)}function O(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function R(){mxShape.call(this)}function S(){mxShape.call(this)}function Z(){mxShape.call(this)}function W(){mxShape.call(this)}function F(){mxCylinder.call(this)}function U(){mxCylinder.call(this)}function ga(){mxRectangleShape.call(this)}function ha(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function N(){mxArrowConnector.call(this); +this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function X(){mxActor.call(this)}function aa(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function K(){mxActor.call(this)}function ja(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function pa(){mxActor.call(this)}function J(){mxEllipse.call(this)} +function ma(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function la(){mxConnector.call(this)}function Ba(a,d,b,c,f,e,g,l,n,v){g+=n;var qa=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(qa.x- +f-g,qa.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),qa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2)))); a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(e,f);a.lineTo(0,f-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-e,0),a.lineTo(c,e),a.lineTo(e,e),a.close(),a.fill()),0!=qa&&(a.setFillAlpha(Math.abs(qa)),a.setFillColor(0>qa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,f),a.lineTo(0,f- e),a.close(),a.fill()),a.begin(),a.moveTo(e,f),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(c,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),na=(.5-Da)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d= Math.min(c,f/Da);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*na);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-na)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+Da));e?(a.moveTo(0,.25*d),a.lineTo(.5*d,(.5-na)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-na)*d),a.lineTo(.5*d,(1-na)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5* @@ -2564,152 +2569,152 @@ a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.mov Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(0,f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.close(), a.fill()),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c, f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0, -b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0); -a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(x,mxActor);x.prototype.size=.4;x.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl", -!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, +b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0); +a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};y.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl", +!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",y);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, "size",this.size))*a.height):null};A.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};mxCellRenderer.registerShape("document",A);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,d,b,c){var f=mxUtils.getValue(this.style,"size");return null!= f?c*Math.max(0,Math.min(1,f)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*d),0,0)}return null};mxUtils.extend(d,mxActor);d.prototype.size=.2;d.prototype.isRoundable=function(){return!0};d.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size)))); b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",d);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(g,mxActor);g.prototype.size=.5;g.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a, -[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo= -function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};n.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};n.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};n.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas, -arguments);this.lastX=f;this.lastY=e};n.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};n.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),l=this.defaultVariation; -5>g&&(g=5,l/=3);for(var qa=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var t=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,qa*e+this.lastX-t*f,b*e+this.lastY-t*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo; -this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var wa=mxRectangleShape.prototype.isHtmlAllowed; +[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);l.prototype.moveTo= +function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};l.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};l.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};l.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas, +arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};l.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),l=this.defaultVariation; +5>g&&(g=5,l/=3);for(var qa=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,qa*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo; +this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ca=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new l(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ca.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var wa=mxRectangleShape.prototype.isHtmlAllowed; mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&wa.apply(this,arguments)};var xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)xa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!= mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+ -c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,b)),a.close(),a.end(),a.fillAndStroke()}};var Ma=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ma.apply(this,arguments)};mxUtils.extend(l,mxRectangleShape);l.prototype.size=.1;l.prototype.isHtmlAllowed=function(){return!1};l.prototype.getLabelBounds= +c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,b)),a.close(),a.end(),a.fillAndStroke()}};var Ma=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ma.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.prototype.getLabelBounds= function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+= -Math.round(c);a.width-=Math.round(2*c)}return a};l.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this, -arguments)};mxCellRenderer.registerShape("process",l);mxUtils.extend(B,mxRectangleShape);B.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};B.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",B);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, -"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c, -parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize", -"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",y);mxUtils.extend(H,mxHexagon);H.prototype.size= -.25;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",H);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed= -function(){return!1};z.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| -0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ga.apply(this,[a,d,b,c,f]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(1== -this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};F.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1); -var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],qa=this.style["symbol"+e+"VerticalAlign"],t=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,k=this.style["symbol"+e+"VSpacing"]||q,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),q+=y,k+=y);var y=d,v=b,y=l==mxConstants.ALIGN_CENTER?y+(c-t)/2:l==mxConstants.ALIGN_RIGHT?y+ -(c-t-q):y+q,v=qa==mxConstants.ALIGN_MIDDLE?v+(f-n)/2:qa==mxConstants.ALIGN_BOTTOM?v+(f-n-k):v+k;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,y,v,t,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f), -a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(t,mxShape);t.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",t);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/ -6,0,0,0)};I.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", -M);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0, -f/8,c,7*f/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};D.prototype.paintBackground= +Math.round(c);a.width-=Math.round(2*c)}return a};n.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this, +arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(B,mxRectangleShape);B.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};B.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",B);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style, +"size",this.size))*this.scale)};z.prototype.isRoundable=function(){return!0};z.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c, +parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize", +"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",u);mxUtils.extend(G,mxHexagon);G.prototype.size= +.25;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed= +function(){return!1};x.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ha=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]|| +0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ha.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ha.apply(this,[a,d,b,c,f]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1== +this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};E.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1); +var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],qa=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],v=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,k=this.style["symbol"+e+"VSpacing"]||q,u=this.style["symbol"+e+"ArcSpacing"];null!=u&&(u*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),q+=u,k+=u);var u=d,m=b,u=l==mxConstants.ALIGN_CENTER?u+(c-n)/2:l==mxConstants.ALIGN_RIGHT?u+ +(c-n-q):u+q,m=qa==mxConstants.ALIGN_MIDDLE?m+(f-v)/2:qa==mxConstants.ALIGN_BOTTOM?m+(f-v-k):m+k;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,u,m,n,v);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f), +a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(H,mxShape);H.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/ +6,0,0,0)};H.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",H);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity", +L);mxUtils.extend(I,mxShape);I.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(O,mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0, +f/8,c,7*f/8);a.fillAndStroke()};O.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",O);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};D.prototype.paintBackground= function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};D.prototype.paintForeground= -function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, -"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),t=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);t!=mxConstants.NONE&&(a.setFillColor(t),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= -mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,l-1.5*e));a.lineTo(d+Math.max(0,g-e),b+l);a.lineTo(d,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=D.prototype.size; +function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(M,mxShape);M.prototype.width=60;M.prototype.height=30;M.prototype.corner=10;M.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style, +"height",this.height)*this.scale))};M.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!= +mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,l-1.5*e));a.lineTo(d+Math.max(0,g-e),b+l);a.lineTo(d,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",M);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=D.prototype.size; null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter); mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)), -a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size; -null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,t=a.width,n=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l+e),new mxPoint(g+t,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l)]):(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+t,l),new mxPoint(g+t-e,l+n),new mxPoint(g, -l+n),new mxPoint(g+e,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(c.x<g||c.x>g+t?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,t=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; -d==mxConstants.DIRECTION_EAST?(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+t-e,l),new mxPoint(g+t,l+n),new mxPoint(g,l+n),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l),new mxPoint(g+t-e,l+n),new mxPoint(g+e,l+n),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+t,l),new mxPoint(g+t,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l+e)]):(e=n*Math.max(0, -Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l+e),new mxPoint(g+t,l+n-e),new mxPoint(g,l+n),new mxPoint(g,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<g||b.x>g+t?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?y.prototype.fixedSize:y.prototype.size;null!=d&&(e=mxUtils.getValue(d.style, -"size",e));var g=a.x,l=a.y,t=a.width,n=a.height,q=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(t,e)):t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t-f,l),new mxPoint(g+t,a),new mxPoint(g+t-f,l+n),new mxPoint(g,l+n),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(t,e)):t*Math.max(0, -Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+t,l),new mxPoint(g+t-f,a),new mxPoint(g+t,l+n),new mxPoint(g+f,l+n),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(q,l),new mxPoint(g+t,l+f),new mxPoint(g+t,l+n),new mxPoint(q,l+n-f),new mxPoint(g,l+n),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(q,l+f),new mxPoint(g+ -t,l),new mxPoint(g+t,l+n-f),new mxPoint(q,l+n),new mxPoint(g,l+n-f),new mxPoint(g,l)]);q=new mxPoint(q,a);c&&(b.x<g||b.x>g+t?q.y=b.y:q.x=b.x);return mxUtils.getPerimeterPoint(l,q,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=H.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,t=a.height,n=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION, -mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=t*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+t-f),new mxPoint(n,g+t),new mxPoint(e,g+t-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+t),new mxPoint(e+f,g+t),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);c&&(b.x<e||b.x>e+ -l?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(g,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(S,mxShape);S.prototype.size= +a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",z.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size; +null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l)]):(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g, +l+v),new mxPoint(g+e,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(c.x<g||c.x>g+n?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; +d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g+e,l+v),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l+e)]):(e=v*Math.max(0, +Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v-e),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?u.prototype.fixedSize:u.prototype.size;null!=d&&(e=mxUtils.getValue(d.style, +"size",e));var g=a.x,l=a.y,n=a.width,v=a.height,q=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-f,l),new mxPoint(g+n,a),new mxPoint(g+n-f,l+v),new mxPoint(g,l+v),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0, +Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+n,l),new mxPoint(g+n-f,a),new mxPoint(g+n,l+v),new mxPoint(g+f,l+v),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(q,l),new mxPoint(g+n,l+f),new mxPoint(g+n,l+v),new mxPoint(q,l+v-f),new mxPoint(g,l+v),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(q,l+f),new mxPoint(g+ +n,l),new mxPoint(g+n,l+v-f),new mxPoint(q,l+v),new mxPoint(g,l+v-f),new mxPoint(g,l)]);q=new mxPoint(q,a);c&&(b.x<g||b.x>g+n?q.y=b.y:q.x=b.x);return mxUtils.getPerimeterPoint(l,q,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=G.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION, +mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+n-f),new mxPoint(v,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(v,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);v=new mxPoint(v,a);c&&(b.x<e||b.x>e+ +l?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(S,mxShape);S.prototype.size= 10;S.prototype.inset=2;S.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground= -function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.ellipse(0,e,c-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", -X);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=20;G.prototype.jettyHeight=10;G.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),t=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,t),a.lineTo(g,t),a.lineTo(g,t+d),a.lineTo(b,t+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c, -f),a.lineTo(b,f),a.lineTo(b,t+d),a.lineTo(0,t+d),a.lineTo(0,t),a.lineTo(b,t),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",G);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/ -2,t=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,t),a.lineTo(g,t),a.lineTo(g,t+d),a.lineTo(b,t+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,t+d),a.lineTo(0,t+d),a.lineTo(0,t),a.lineTo(b,t),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ga,mxRectangleShape);ga.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style, -mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(d+e,b),new mxPoint(d+c,b+g),new mxPoint(d+e,b+f),new mxPoint(d,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ga);mxUtils.extend(ja,mxDoubleEllipse);ja.prototype.outerStroke=!0;ja.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2* -e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",ja);mxUtils.extend(U,ja);U.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",U);mxUtils.extend(ha,mxArrowConnector);ha.prototype.defaultWidth=4;ha.prototype.isOpenEnded=function(){return!0};ha.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ha.prototype.isArrowRounded=function(){return this.isRounded}; -mxCellRenderer.registerShape("link",ha);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ -Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Y);mxUtils.extend(W,mxActor);W.prototype.size=30;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput", -W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f, -parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ba);mxUtils.extend(ia,mxActor);ia.prototype.dx=20;ia.prototype.dy=20;ia.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))); -parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ia);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c, -f/2);a.end()};mxCellRenderer.registerShape("crossbar",aa);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, +function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(W,mxShape);W.prototype.inset=2;W.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.ellipse(0,e,c-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", +W);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=20;F.prototype.jettyHeight=10;F.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),n=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c, +f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",F);mxUtils.extend(U,mxCylinder);U.prototype.jettyWidth=32;U.prototype.jettyHeight=12;U.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/ +2,n=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",U);mxUtils.extend(ga,mxRectangleShape);ga.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style, +mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(d+e,b),new mxPoint(d+c,b+g),new mxPoint(d+e,b+f),new mxPoint(d,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ga);mxUtils.extend(ha,mxDoubleEllipse);ha.prototype.outerStroke=!0;ha.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2* +e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",ha);mxUtils.extend(ka,ha);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(N,mxArrowConnector);N.prototype.defaultWidth=4;N.prototype.isOpenEnded=function(){return!0};N.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};N.prototype.isArrowRounded=function(){return this.isRounded}; +mxCellRenderer.registerShape("link",N);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+ +Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Y);mxUtils.extend(X,mxActor);X.prototype.size=30;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput", +X);mxUtils.extend(aa,mxRectangleShape);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f, +parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",aa);mxUtils.extend(ia,mxActor);ia.prototype.dx=20;ia.prototype.dy=20;ia.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))); +parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ia);mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c, +f/2);a.end()};mxCellRenderer.registerShape("crossbar",ba);mxUtils.extend(ca,mxActor);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0, 0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ca);mxUtils.extend(P,mxActor);P.prototype.arrowWidth=.3;P.prototype.arrowSize=.2;P.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",P);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth", +"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",P);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth", P.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",P.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow", -L);mxUtils.extend(ka,mxActor);ka.prototype.size=.1;ka.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ka);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or", -Q);mxUtils.extend(R,mxActor);R.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",R);mxUtils.extend(da,mxActor);da.prototype.size=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +K);mxUtils.extend(ja,mxActor);ja.prototype.size=.1;ja.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ja);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or", +Q);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(da,mxActor);da.prototype.size=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",da);mxUtils.extend(pa,mxActor);pa.prototype.size=.375;pa.prototype.isRoundable=function(){return!0};pa.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",pa);mxUtils.extend(K,mxEllipse);K.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",K);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a, +2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",pa);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",J);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a, d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke();a.begin();a.moveTo(d+c/2,b);a.lineTo(d+c/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ma);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d+.145*c,b+.145*f);a.lineTo(d+.855*c,b+.855*f);a.end();a.stroke(); a.begin();a.moveTo(d+.855*c,b+.145*f);a.lineTo(d+.145*c,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,d,b,c,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,d,b,c,f){a.begin();a.moveTo(d,b); a.lineTo(d+c,b);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(d,b+f);a.lineTo(d+c,b+f);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5); -a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")? -a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ca);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+ +a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")? +a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+ c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ra);mxUtils.extend(oa,mxActor);oa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",oa);mxUtils.extend(ta,mxActor);ta.prototype.size=.2;ta.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style, "size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ta);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b, 0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(la,mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,d,b){for(var c=[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&& (a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),la.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",la);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"}); -return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.moveTo(c.x-q/2+k/2,c.y-k/2-q/2);a.lineTo(c.x-k/2-3*q/2,c.y-3*k/2+q/2);a.stroke()}});mxMarker.addMarker("circle", -Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,t,n){var q=c.clone(),k=Aa.apply(this,arguments),y=f*(g+2*t),v=e*(g+2*t);return function(){k.apply(this,arguments);a.begin();a.moveTo(q.x-f*t,q.y-e*t);a.lineTo(q.x-2*y+f*t,q.y-2*v+e*t);a.moveTo(q.x-y-v+e*t,q.y-v+y-f*t);a.lineTo(q.x+v-y-e*t,q.y-v-y+f*t);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1),y=c.clone();c.x-=q;c.y-=k;return function(){a.begin();a.moveTo(y.x-k,y.y+q);a.quadTo(c.x- -k,c.y+q,c.x,c.y);a.quadTo(c.x+k,c.y-q,y.x+k,y.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,t,n){d=f*t*1.118;b=e*t*1.118;f*=g+t;e*=g+t;var q=c.clone();q.x-=d;q.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-f-e/2,q.y-e+f/2):a.lineTo(q.x+e/2-f,q.y-e-f/2);a.lineTo(q.x-f,q.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,t,n,q){e*=l+n;g*=l+n;var k= -f.clone();return function(){d.begin();d.moveTo(k.x,k.y);t?d.lineTo(k.x-e-g/a,k.y-g+e/a):d.lineTo(k.x+g/a-e,k.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,d,b){return Ea(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},Ea=function(a,d,b,c,f){return V(a,d, -function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,t=f.y-l.y,n=Math.sqrt(e*e+t*t),l=c.call(this,n,e/n,t/n,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var t=a.view.scale,n=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-n.x,q=g.y-n.y,k=Math.sqrt(l*l+q*q);c.x=(c.x+d.x)*t;c.y=(c.y+d.y)*t;f.call(this,k,l/k,q/k,n,g,c,e)})},va=function(a){return function(d){return[V(d,["arrowWidth", +return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,l,n,v){var q=f*(g+n+1),k=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,n,v){var q=f*(g+n+1),k=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.moveTo(c.x-q/2+k/2,c.y-k/2-q/2);a.lineTo(c.x-k/2-3*q/2,c.y-3*k/2+q/2);a.stroke()}});mxMarker.addMarker("circle", +Ba);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,n,v){var q=c.clone(),k=Ba.apply(this,arguments),u=f*(g+2*n),m=e*(g+2*n);return function(){k.apply(this,arguments);a.begin();a.moveTo(q.x-f*n,q.y-e*n);a.lineTo(q.x-2*u+f*n,q.y-2*m+e*n);a.moveTo(q.x-u-m+e*n,q.y-m+u-f*n);a.lineTo(q.x+m-u-e*n,q.y-m-u+f*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,d,b,c,f,e,g,l,n,v){var q=f*(g+n+1),k=e*(g+n+1),u=c.clone();c.x-=q;c.y-=k;return function(){a.begin();a.moveTo(u.x-k,u.y+q);a.quadTo(c.x- +k,c.y+q,c.x,c.y);a.quadTo(c.x+k,c.y-q,u.x+k,u.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,n,v){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var q=c.clone();q.x-=d;q.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-f-e/2,q.y-e+f/2):a.lineTo(q.x+e/2-f,q.y-e-f/2);a.lineTo(q.x-f,q.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,n,v,q){e*=l+v;g*=l+v;var k= +f.clone();return function(){d.begin();d.moveTo(k.x,k.y);n?d.lineTo(k.x-e-g/a,k.y-g+e/a):d.lineTo(k.x+g/a-e,k.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,d,b){return Ea(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},Ea=function(a,d,b,c,f){return V(a,d, +function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,v=Math.sqrt(e*e+n*n),l=c.call(this,v,e/v,n/v,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var n=a.view.scale,v=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-v.x,q=g.y-v.y,k=Math.sqrt(l*l+q*q);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,k,l/k,q/k,v,g,c,e)})},va=function(a){return function(d){return[V(d,["arrowWidth", "arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",P.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",P.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},Na=function(a,d,b){return function(c){var f= -[V(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(sa(c));return f}},Ha=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[V(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, +[V(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(sa(c));return f}},Ia=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[V(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style, "fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(e));return g}},Pa=function(a){return function(d){var b= [V(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(d));return b}},Fa=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d}},sa=function(a,d){return V(a, [mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)* f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},V=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])}; -g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ia={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d, -b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale; -a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(t.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()- -a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, -Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(t.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth= +g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ga={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d, +b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale; +a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()- +a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0, +Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth= a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f, -e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(t.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< -d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,t){b= -Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(t.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- +e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))< +d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b= +Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])- parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[V(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(), d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(sa(a,b/2))}return d}, -label:Fa(),ext:Fa(),rectangle:Fa(),triangle:Fa(),rhombus:Fa(),umlLifeline:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, -"width",E.prototype.width))),b=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[V(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, -"size",l.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},cross:function(a){return[V(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ta.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width, +label:Fa(),ext:Fa(),rectangle:Fa(),triangle:Fa(),rhombus:Fa(),umlLifeline:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,["width","height"],function(a){var d=Math.max(M.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style, +"width",M.prototype.width))),b=Math.max(1.5*M.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",M.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(M.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*M.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[V(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style, +"size",n.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},cross:function(a){return[V(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ta.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width, a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d= -[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},dataStorage:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ka.prototype.size)))); -return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[V(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height- -d)},function(a,d){mxUtils.getValue(this.state.style,"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),V(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, -(d.x-a.x)/a.width)))/100}),V(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))); -this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},internalStorage:function(a){var d=[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width, -d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",G.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",G.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth= +[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",X.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},dataStorage:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size)))); +return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[V(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));mxUtils.getValue(this.state.style,"base",z.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height- +d)},function(a,d){mxUtils.getValue(this.state.style,"base",z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),V(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",z.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1, +(d.x-a.x)/a.width)))/100}),V(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",z.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))); +this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},internalStorage:function(a){var d=[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width, +d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",F.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",F.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth= Math.round(2*Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy= Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]}, singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width, d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0, -Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",pa.prototype.size))));return new mxPoint(a.getCenterX(), -a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ha(y.prototype.size,!0,null,!0,y.prototype.fixedSize),hexagon:Ha(H.prototype.size,!0,.5,!0),curlyBracket:Ha(g.prototype.size,!1),display:Ha(ua.prototype.size,!1),cube:Na(1,a.prototype.size,!1),card:Na(.5,u.prototype.size,!0),loopLimit:Na(.5,da.prototype.size,!0),trapezoid:Pa(.5),parallelogram:Pa(1)};Graph.createHandle=V;Graph.handleFactory=Ia;mxVertexHandler.prototype.createCustomHandles= -function(){if(this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ia[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ia[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&& -(a=mxConstants.SHAPE_CONNECTOR);a=Ia[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ja=new mxPoint(1,0),Ka=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a, -c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var t=Ja.x,n=Ja.y,q=Ka.x,k=Ka.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=v.x;var c=d-v.y;d=(k*a-q*c)/(t*k-n*q);a=(n*a-t*c)/(n*q-t*k);y?(b&&(v=new mxPoint(v.x+t*d,v.y+n*d),f.push(v)),v=new mxPoint(v.x+q*a,v.y+k*a)):(b&&(v=new mxPoint(v.x+q*a,v.y+k*a),f.push(v)),v=new mxPoint(v.x+t*d,v.y+n*d));f.push(v)}; -var v=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Qa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)), +Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",pa.prototype.size))));return new mxPoint(a.getCenterX(), +a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ia(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:Ia(G.prototype.size,!0,.5,!0),curlyBracket:Ia(g.prototype.size,!1),display:Ia(ua.prototype.size,!1),cube:Na(1,a.prototype.size,!1),card:Na(.5,t.prototype.size,!0),loopLimit:Na(.5,da.prototype.size,!0),trapezoid:Pa(.5),parallelogram:Pa(1)};Graph.createHandle=V;Graph.handleFactory=Ga;mxVertexHandler.prototype.createCustomHandles= +function(){if(this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ga[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ga[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&& +(a=mxConstants.SHAPE_CONNECTOR);a=Ga[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ja=new mxPoint(1,0),Ka=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a, +c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ja.x,v=Ja.y,q=Ka.x,k=Ka.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=m.x;var c=d-m.y;d=(k*a-q*c)/(n*k-v*q);a=(v*a-n*c)/(v*q-n*k);u?(b&&(m=new mxPoint(m.x+n*d,m.y+v*d),f.push(m)),m=new mxPoint(m.x+q*a,m.y+k*a)):(b&&(m=new mxPoint(m.x+q*a,m.y+k*a),f.push(m)),m=new mxPoint(m.x+n*d,m.y+v*d));f.push(m)}; +var m=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Qa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)), f=(.5-c)/2,c=Math.min(d,b/(.5+c));d=(d-c)/2;b=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+c*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+(1-f)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*c));return a}; -v.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25, +z.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25, 0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0), !1,null,0,.5*(b-c)));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0, .75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1, 0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints; -z.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style, +x.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};t.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style, "size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5, 1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-c)));return a};p.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f)),a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(d-c),f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null, -0,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ba.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints= -mxRectangleShape.prototype.constraints;K.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(a,d,b){a=[];var c=Math.min(d,b/2),f=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style, +0,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};aa.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints= +mxRectangleShape.prototype.constraints;J.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(a,d,b){a=[];var c=Math.min(d,b/2),f=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style, "size",this.size)))*d);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,f,b));return a};G.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,"jettyWidth",G.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",G.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, +0),!1,null,f,b));return a};F.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,"jettyWidth",F.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",F.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1, .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b- .5*a,3.5*a))];b>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));b>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));b>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};da.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0), -new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];t.prototype.constraints= -[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, +new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints= +[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, -.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, +0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0, +.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5, 1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75, -.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, +.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5, 0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1, .5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13, .77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];d.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25, @@ -2718,24 +2723,24 @@ Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0, null,.75*d+.25*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0), !1,null,.5*(d-c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*f));return a};ia.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0), !1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75, +0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75, .5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];P.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));return a};L.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1, +0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));return a};K.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1, parseFloat(mxUtils.getValue(this.style,"arrowWidth",P.prototype.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",P.prototype.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5), !1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};ta.prototype.getConstraints=function(a,d,b){a=[];var c=Math.min(b,d),f=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(b-f)/2,e=c+f,g=(d-f)/2,f=g+f;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+f),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+f),e));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));return a};D.prototype.constraints=null;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, -.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, -.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} +.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7, +.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var e=c.selectParentAfterDelete?c.model.getParents(b):null;c.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)c.model.contains(e[b])&&(c.model.isVertex(e[b])||c.model.isEdge(e[b]))&&a.push(e[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...", function(){c.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+ ": "+d.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container, 620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN? -Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(c)}catch(u){b.handleError(u)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate(); -try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&c.model.isEdge(b[e]);var d=c.view.translate,f=c.view.scale,g=d.x,q=d.y,d=null;if(1==b.length&&a){var n=c.getCellGeometry(b[0]);null!=n&&(d=n.getTerminalPoint(!0))}d=null!=d?d:c.getBoundingBoxFromGeometry(b,a);if(null!=d){var l=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)),k=Math.round(c.snap(c.popupMenuHandler.triggerY/f-q));c.cellsMoved(b,l-d.x,k-d.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("copySize", +Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(c)}catch(t){b.handleError(t)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate(); +try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&c.model.isEdge(b[e]);var d=c.view.translate,f=c.view.scale,g=d.x,q=d.y,d=null;if(1==b.length&&a){var l=c.getCellGeometry(b[0]);null!=l&&(d=l.getTerminalPoint(!0))}d=null!=d?d:c.getBoundingBoxFromGeometry(b,a);if(null!=d){var n=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)),k=Math.round(c.snap(c.popupMenuHandler.triggerY/f-q));c.cellsMoved(b,n-d.x,k-d.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("copySize", function(a){a=c.getSelectionCell();c.isEnabled()&&null!=a&&c.getModel().isVertex(a)&&(a=c.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=b.copiedSize){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(a=0;a<e.length;a++)if(c.getModel().isVertex(e[a])){var k=c.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height= -b.copiedSize.height,c.getModel().setGeometry(e[a],k))}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"), +b.copiedSize.height,c.getModel().setGeometry(e[a],k))}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells())}catch(t){b.handleError(t)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"), function(a){c.turnShapes(c.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A"); this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home", function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack", @@ -2776,8 +2781,8 @@ b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addW d=Math.round(c.snap(c.popupMenuHandler.triggerY/d-k));b.addPointAt(b.state,f,d)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(c.getModel().isEdge(e)){var d=c.getCellGeometry(e);null!=d&&(d=d.clone(),d.points=null,c.getModel().setGeometry(e, d))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("indent", !1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var d=c.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(d),c.insertImage(a,b,e);else{var f=c.getSelectionCells();if(null!=a&&(0< -a.length||0<f.length)){var g=null;c.getModel().beginUpdate();try{if(0==f.length){var q=c.getFreeInsertPoint(),g=f=[c.insertVertex(c.getDefaultParent(),null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=c.view.getState(f[0]),y=null!=k?k.style:c.getCellStyle(f[0]);"image"!=y[mxConstants.STYLE_SHAPE]&&"label"!=y[mxConstants.STYLE_SHAPE]? -c.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=b&&null!=e){var m=f[0],z=c.getModel().getGeometry(m);null!=z&&(z=z.clone(),z.width=b,z.height=e,c.getModel().setGeometry(m,z))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null== +a.length||0<f.length)){var g=null;c.getModel().beginUpdate();try{if(0==f.length){var q=c.getFreeInsertPoint(),g=f=[c.insertVertex(c.getDefaultParent(),null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=c.view.getState(f[0]),u=null!=k?k.style:c.getCellStyle(f[0]);"image"!=u[mxConstants.STYLE_SHAPE]&&"label"!=u[mxConstants.STYLE_SHAPE]? +c.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=b&&null!=e){var m=f[0],x=c.getModel().getGeometry(m);null!=x&&(x=x.clone(),x.width=b,x.height=e,c.getModel().setGeometry(m,x))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null== this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+ "+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth- 260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!= @@ -2788,24 +2793,24 @@ DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.a DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0}; DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)}; DrawioFile.prototype.updateFile=function(a,b,e,c){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,c):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))}; -DrawioFile.prototype.mergeFile=function(a,b,e,c){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=c?c:m,this.shadowPages)];if(!this.ignorePatches(u)){var x=this.ui.patchPages(m, -u[0]);c={};var A=this.ui.getHashValueForPages(x,c),m={},d=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",d==A,A);if(null!=A&&A!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(p)),g=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(c)+ -"\nChecksum: "+A+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); -null!=e&&e(v);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,v);else{var l=this.getCurrentUser(),B=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,v)}}catch(y){}}}; +DrawioFile.prototype.mergeFile=function(a,b,e,c){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var t=[this.ui.diffPages(null!=c?c:m,this.shadowPages)];if(!this.ignorePatches(t)){var y=this.ui.patchPages(m, +t[0]);c={};var A=this.ui.getHashValueForPages(y,c),m={},d=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",t,"checksum",d==A,A);if(null!=A&&A!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(p)),g=this.compressReportData(this.getAnonymizedXmlForPages(y)),q=this.ui.hashValue(a.getCurrentEtag()),l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,t,"Shadow Details: "+JSON.stringify(c)+ +"\nChecksum: "+A+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+l+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(t,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged(); +null!=e&&e(z);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var n=this.getCurrentUser(),B=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,z)}}catch(u){}}}; DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var c=0;c<a.length;c++){var k=b.encode(new mxGraphModel(a[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[c].getId());a[c].viewState&&this.ui.editor.graph.saveViewState(a[c].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)}; DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a}; DrawioFile.prototype.checksumError=function(a,b,e,c,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)), -25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==c?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==c?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); -try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}}; -DrawioFile.prototype.sendErrorReport=function(a,b,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),d=A.lastIndexOf("."),p="xml";0<d&&(p=A.substring(d));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ -":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+x+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+ +25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==c?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==c?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")); +try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(y){}}}catch(y){}}; +DrawioFile.prototype.sendErrorReport=function(a,b,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),t=null!=p?this.ui.hashValue(p.id):"unknown",y=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),d=A.lastIndexOf("."),p="xml";0<d&&(p=A.substring(d));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+ +":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+t+y+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:"")+ (null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+k+"\n\nData:\n"+m,c)}catch(g){}}; DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.stats= this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(c){null!=b&&b(c)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))}; DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b}; -DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,c=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,x=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var d= -0;d<a.length;d++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[d],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=p;e.history=c;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!= -m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}}; +DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,c=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=m.foldingEnabled,y=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var d= +0;d<a.length;d++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[d],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=p;e.history=c;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)y!= +m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(t!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}}; DrawioFile.prototype.save=function(a,b,e,c,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=e)e(p);else throw p;}}; DrawioFile.prototype.updateFileData=function(a){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,null!=a?!a:!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml}; DrawioFile.prototype.decompress=function(){this.updateFileData(!1);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","false");this.fileChanged()};DrawioFile.prototype.compress=function(){this.updateFileData(!0);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","true");this.fileChanged()};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)}; @@ -2842,7 +2847,7 @@ this.synchronizeFile(e,c)}),this.getErrorMessage(a))};DrawioFile.prototype.getEr DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart= this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())}; DrawioFile.prototype.fileSaved=function(a,b,e,c){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,c,a)}catch(p){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=c&&c(p);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,p);else{var k= -this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(u){}}}; +this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(t){}}}; DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this, function(a){null!=c&&c(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)}; DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))}; @@ -2874,16 +2879,16 @@ defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectangle dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}}, {name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&"1"!=mxUtils.getValue(a.style,"part","0")}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null, c=d.editorUi.editor.graph;return null!=b&&(c.isContainer(b)&&"0"!=a.style.collapsible||!c.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&!d.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool", -defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,d){var b=0<a.vertices.length?d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable", -type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"moveCells",dispName:"Move Cells on Fold", -type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; +defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(a,d){var b=d.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,d){var b=0<a.vertices.length? +d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding", +type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,d){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n'; Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,d,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var e=0;e<c.length;e++)if("mxgraph"==c[e].getAttribute("class")){f.push(c[e]);break}0<f.length&& (c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(a=mxUtils.parseXml(f.xml),a=a.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c,null,b),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)), null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||d||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f,b)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,d){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null; 0<b.length?(b=Graph.decompress(b,null,d),null!=b&&0<b.length&&(c=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(b[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var d=mxUtils.getTextContent(a),b=null;0<d.length?b=Graph.decompress(d):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&& -!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var t=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(t>f){d=a.substring(f,t);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(e));null!=d&& +!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(n>f){d=a.substring(f,n);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(e));null!=d&& (d=decodeURIComponent(d.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return d};Editor.extractGraphModelFromXref=function(a){var d=a.trailer,b=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(d=a[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(a=a[d[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var d=null;try{var b=a.substring(a.indexOf(",")+1),c=window.atob&& -!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,f){a=c.substring(a+8,a+8+f);"zTXt"==b?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(d=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(d=a[1]));if(null!=d||"IDAT"==b)return!0}))}catch(N){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)); +!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,f){a=c.substring(a+8,a+8+f);"zTXt"==b?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(d=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(d=a[1]));if(null!=d||"IDAT"==b)return!0}))}catch(O){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)); null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(a,d){var b=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(b=d||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0])));return null!=b?mxUtils.trim(b):b};Editor.configure=function(a,d){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts; ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile= a.templateFile);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!= @@ -2895,9 +2900,9 @@ d)}}}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUI decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==d.nodeName){b=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&& (c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(f=new mxCodec(c.ownerDocument),f.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math"); b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(b=d.getAttribute("extFonts"))try{for(b= -b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<b.length;c++)this.graph.addExtFont(b[c].name,b[c].url)}catch(N){console.log("ExtFonts format error: "+N.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!= +b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<b.length;c++)this.graph.addExtFont(b[c].name,b[c].url)}catch(O){console.log("ExtFonts format error: "+O.message)}}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!= this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var c=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});d.setAttribute("extFonts",c.join("|"))}return d};Editor.prototype.isDataSvg=function(a){try{var d= -mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(J){}return!1};Editor.prototype.extractGraphModel=function(a,d,b){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph; +mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(a,d,b){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph; Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this, arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,d){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset", MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a= @@ -2916,14 +2921,14 @@ function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\" q))));mxUtils.bind(this,function(a){if(null==f[a]){f[a]=a;c++;var d="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))d= "application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){f[a]=d;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[g].substring(0,l)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&& a[0].appendChild(d[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.fontCss;if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c, -d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,d,b,c,f,e,g,l,n,q,k,y,v,z){e=null!=e?e:!0;y=null!=y?y:this.graph;v=null!=v?v:0;var t=n?null:y.background;t==mxConstants.NONE&&(t=null);null==t&&(t=c);null==t&&0==n&&(t=this.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(t, -null,null,z,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=d&&(l=e?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);n=Math.ceil(l*n)+2*v;q=Math.ceil(l*q)+2*v;g.setAttribute("width",n);g.setAttribute("height",q);var k=g.getContext("2d");null!=t&&(k.beginPath(),k.rect(0,0,n,q),k.fillStyle=t,k.fill()); -k.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(c,v/l,v/l);a(g)},0):(k.drawImage(c,v/l,v/l),a(g))}catch(ca){null!=f&&f(ca)}});c.onerror=function(a){null!=f&&f(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}y.mathEnabled&&this.addMathCss(b);c.src=this.createSvgDataUri(mxUtils.getXml(b))}); -this.loadFonts(g)}catch(W){null!=f&&f(W)}}),b,k)};Editor.prototype.writeGraphModelToPng=function(a,d,b,c,f){function e(a,d){var b=n;n+=d;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26, +d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,d,b,c,f,e,g,l,n,q,k,u,m,x){e=null!=e?e:!0;u=null!=u?u:this.graph;m=null!=m?m:0;var v=n?null:u.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(v, +null,null,x,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=d&&(l=e?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);n=Math.ceil(l*n)+2*m;q=Math.ceil(l*q)+2*m;g.setAttribute("width",n);g.setAttribute("height",q);var k=g.getContext("2d");null!=v&&(k.beginPath(),k.rect(0,0,n,q),k.fillStyle=v,k.fill()); +k.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(c,m/l,m/l);a(g)},0):(k.drawImage(c,m/l,m/l),a(g))}catch(ca){null!=f&&f(ca)}});c.onerror=function(a){null!=f&&f(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}u.mathEnabled&&this.addMathCss(b);c.src=this.createSvgDataUri(mxUtils.getXml(b))}); +this.loadFonts(g)}catch(X){null!=f&&f(X)}}),b,k)};Editor.prototype.writeGraphModelToPng=function(a,d,b,c,f){function e(a,d){var b=n;n+=d;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26, 10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,n);do{var q=g(a);if("IDAT"==e(a,4)){f=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,d,0,4);c=EditorUi.prototype.updateCRC(c,b,0,b.length);f+=l(b.length)+d+b+l(c^4294967295);f+=a.substring(n-8,a.length);break}f+=a.substring(n-8,n-4+q);e(a,q);e(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}}; if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell= -function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments): -this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var x=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"), +function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments): +this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var y=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=y.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"), function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var A=DiagramFormatPanel.prototype.addOptions; DiagramFormatPanel.prototype.addOptions=function(a){a=A.apply(this,arguments);var d=this.editorUi,b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var f=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}}); a.appendChild(f)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875"); @@ -2952,21 +2957,21 @@ null;StyleFormatPanel.prototype.findCommonProperties=function(a,d,b){if(null!=d) Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),c(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(D){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var b= {},c=a.vertices,f=a.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],b,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()})); d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d); -mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));d=g.join(",");null!=b.countProperty&& -(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,d,t.getSelectionCells());f.push(a);e.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>d)q=q.slice(0,d);else for(var y=q.length;y<d;y++)q.push(n);q=q.join(",");t.setCellStyles(b.dependentProps[a],q,t.getSelectionCells());f.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(t, -d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(d,b,c){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function e(a,d,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px"; -f.style.border="1px solid black";f.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(e){this.editorUi.pickColor(d,function(d){f.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,d,b,f,e,g,l){null!=d&&(d=d.split(","),y.push({name:a,values:d,type:b,defVal:f,countProperty:e, -parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=g,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,k++;else break;var t={type:b,parentRow:g,index:k,isDeletable:!0,defVal:f,countProperty:e},k=q(a,"",t,0==k%2,l);c(a,f,t);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,d,b,c,f,e,g){if(0<f){var l=Array(f); -d=null!=d?d.split(","):[];for(var n=0;n<f;n++)l[n]=null!=d[n]?d[n]:null!=c?c:"";y.push({name:a,values:l,type:b,defVal:c,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,d,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==d;mxEvent.addListener(f,"change",function(){c(a,f.checked?"1":"0",b)});return f}function q(d,b,q,t,y){var v=q.dispName,z=q.type,B=document.createElement("tr");B.className="gePropRow"+(y?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow"; -B.setAttribute("data-pName",d);B.setAttribute("data-pValue",b);t=!1;null!=q.index&&(B.setAttribute("data-index",q.index),v=(null!=v?v:"")+"["+q.index+"]",t=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(m.style.textAlign="right");B.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==z)m.appendChild(e(d,b,q));else if("bool"==z||"boolean"==z)m.appendChild(n(d,b,q));else if("enum"==z){var E= -q.enumList;for(y=0;y<E.length;y++)if(v=E[y],v.val==b){m.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(k,function(){var e=document.createElement("select");f(m,e);for(var g=0;g<E.length;g++){var l=E[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change", -function(){var a=mxUtils.htmlEntities(e.value);c(d,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==z?m.appendChild(g(d,b,q.subType,q.subDefVal,q.countProperty,B,y)):"staticArr"==z?m.appendChild(l(d,b,q.subType,q.subDefVal,q.size,B,y)):(m.innerHTML=b,mxEvent.addListener(m,"click",mxUtils.bind(k,function(){function e(){var a=g.value,a=0==a.length&&"string"!=z?0:a;q.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",z="string"):(a=parseFloat(a), -a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==z?parseInt(a):a)+"");c(d,a,q)}var g=document.createElement("input");f(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=z&&"float"!=z||q.allowAuto||(g.type="number",g.step="int"==z?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur", -function(){e()})})));q.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",q,q.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",m.appendChild(y));B.appendChild(m);return B}var k=this,t=this.editorUi.editor.graph,y=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var z=document.createElement("tr");z.className="gePropHeader"; -var B=document.createElement("th");B.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;B.appendChild(m);mxUtils.write(B,mxResources.get("property"));z.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(ma){}}else m.src= -Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(z,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;C()});z.appendChild(B);B=document.createElement("th");B.className="gePropHeaderCell";B.innerHTML=mxResources.get("value");z.appendChild(B);v.appendChild(z);var p=!1,F=!1,u;for(u in d)if(z=d[u],"function"!=typeof z.isVisible||z.isVisible(b,this)){var H=null!=b.style[u]?mxUtils.htmlEntities(b.style[u]+""):null!=z.getDefaultValue? -z.getDefaultValue(b,this):z.defVal;if("separator"==z.type)F=!F;else{if("staticArr"==z.type)z.size=parseInt(b.style[z.sizeProperty]||d[z.sizeProperty].defVal)||0;else if(null!=z.dependentProps){for(var I=z.dependentProps,x=[],M=[],B=0;B<I.length;B++){var A=b.style[I[B]];M.push(d[I[B]].subDefVal);x.push(null!=A?A.split(","):[])}z.dependentPropsDefVal=M;z.dependentPropsVals=x}v.appendChild(q(u,H,z,p,F));p=!p}}for(B=0;B<y.length;B++)for(z=y[B],d=z.parentRow,b=0;b<z.values.length;b++)u=q(z.name,z.values[b], -{type:z.type,parentRow:z.parentRow,isDeletable:z.isDeletable,index:b,defVal:z.defVal,countProperty:z.countProperty,size:z.size},0==b%2,z.flipBkg),d.parentNode.insertBefore(u,d.nextSibling),d=u;a.appendChild(v);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f, +mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){u.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));d=g.join(",");null!=b.countProperty&& +(u.setCellStyles(b.countProperty,g.length,u.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}u.setCellStyles(a,d,u.getSelectionCells());f.push(a);e.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>d)q=q.slice(0,d);else for(var m=q.length;m<d;m++)q.push(n);q=q.join(",");u.setCellStyles(b.dependentProps[a],q,u.getSelectionCells());f.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(u, +d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function f(d,b,c){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function e(a,d,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px"; +f.style.border="1px solid black";f.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(e){this.editorUi.pickColor(d,function(d){f.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,d,b,f,e,g,l){null!=d&&(d=d.split(","),m.push({name:a,values:d,type:b,defVal:f,countProperty:e, +parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=g,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,k++;else break;var u={type:b,parentRow:g,index:k,isDeletable:!0,defVal:f,countProperty:e},k=q(a,"",u,0==k%2,l);c(a,f,u);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,d,b,c,f,e,g){if(0<f){var l=Array(f); +d=null!=d?d.split(","):[];for(var n=0;n<f;n++)l[n]=null!=d[n]?d[n]:null!=c?c:"";m.push({name:a,values:l,type:b,defVal:c,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,d,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==d;mxEvent.addListener(f,"change",function(){c(a,f.checked?"1":"0",b)});return f}function q(d,b,q,u,m){var v=q.dispName,x=q.type,z=document.createElement("tr");z.className="gePropRow"+(m?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow"; +z.setAttribute("data-pName",d);z.setAttribute("data-pValue",b);u=!1;null!=q.index&&(z.setAttribute("data-index",q.index),v=(null!=v?v:"")+"["+q.index+"]",u=!0);var B=document.createElement("td");B.className="gePropRowCell";B.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));u&&(B.style.textAlign="right");z.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==x)B.appendChild(e(d,b,q));else if("bool"==x||"boolean"==x)B.appendChild(n(d,b,q));else if("enum"==x){var D= +q.enumList;for(m=0;m<D.length;m++)if(v=D[m],v.val==b){B.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(k,function(){var e=document.createElement("select");f(B,e);for(var g=0;g<D.length;g++){var l=D[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change", +function(){var a=mxUtils.htmlEntities(e.value);c(d,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==x?B.appendChild(g(d,b,q.subType,q.subDefVal,q.countProperty,z,m)):"staticArr"==x?B.appendChild(l(d,b,q.subType,q.subDefVal,q.size,z,m)):(B.innerHTML=b,mxEvent.addListener(B,"click",mxUtils.bind(k,function(){function e(){var a=g.value,a=0==a.length&&"string"!=x?0:a;q.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",x="string"):(a=parseFloat(a), +a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==x?parseInt(a):a)+"");c(d,a,q)}var g=document.createElement("input");f(B,g,!0);g.value=b;g.className="gePropEditor";"int"!=x&&"float"!=x||q.allowAuto||(g.type="number",g.step="int"==x?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur", +function(){e()})})));q.isDeletable&&(m=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",q,q.index);mxEvent.consume(a)})),m.style.height="16px",m.style.width="25px",m.style["float"]="right",m.className="geColorBtn",B.appendChild(m));z.appendChild(B);return z}var k=this,u=this.editorUi.editor.graph,m=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader"; +var z=document.createElement("th");z.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;z.appendChild(B);mxUtils.write(z,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(ma){}}else B.src= +Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(x,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;C()});x.appendChild(z);z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");x.appendChild(z);v.appendChild(x);var E=!1,p=!1,H;for(H in d)if(x=d[H],"function"!=typeof x.isVisible||x.isVisible(b,this)){var G=null!=b.style[H]?mxUtils.htmlEntities(b.style[H]+""):null!=x.getDefaultValue? +x.getDefaultValue(b,this):x.defVal;if("separator"==x.type)p=!p;else{if("staticArr"==x.type)x.size=parseInt(b.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var t=x.dependentProps,y=[],L=[],z=0;z<t.length;z++){var A=b.style[t[z]];L.push(d[t[z]].subDefVal);y.push(null!=A?A.split(","):[])}x.dependentPropsDefVal=L;x.dependentPropsVals=y}v.appendChild(q(H,G,x,E,p));E=!E}}for(z=0;z<m.length;z++)for(x=m[z],d=x.parentRow,b=0;b<x.values.length;b++)H=q(x.name,x.values[b], +{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,index:b,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==b%2,x.flipBkg),d.parentNode.insertBefore(H,d.nextSibling),d=H;a.appendChild(v);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f, e[g]);var l=c.getModel().isVertex(b[d])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR, a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l, mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ @@ -2984,17 +2989,17 @@ a.button,d.relatedTarget=a.relatedTarget}catch(D){}}g.apply(this,arguments);wind this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"== d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop|| 0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return q.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars= -Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var n=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d= -n.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var l=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,n,q,k,y){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& -(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var v=l.apply(this,arguments);if(y&&null!=this.extFonts&&0<this.extFonts.length){var z=v.ownerDocument,B=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"style"):z.createElement("style");null!=z.setAttributeNS?B.setAttributeNS("type","text/css"):B.setAttribute("type","text/css");for(var m="",C="",E=0;E<this.extFonts.length;E++){var p=this.extFonts[E].name,F=this.extFonts[E].url;0==F.indexOf(Editor.GOOGLE_FONTS)? -m+="@import url("+F+");\n":C+='@font-face {\nfont-family: "'+p+'";\nsrc: url("'+F+'");\n}\n'}B.appendChild(z.createTextNode(m+C));v.getElementsByTagName("defs")[0].appendChild(B)}null!=t&&(this.stylesheet=t,this.refresh());return v};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=B.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& -(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= -function(){v.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& -this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== +Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d= +l.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,q,k,u){var m=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&& +(m=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var x=n.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var z=x.ownerDocument,v=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"style"):z.createElement("style");null!=z.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var B="",D="",C=0;C<this.extFonts.length;C++){var E=this.extFonts[C].name,p=this.extFonts[C].url;0==p.indexOf(Editor.GOOGLE_FONTS)? +B+="@import url("+p+");\n":D+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+p+'");\n}\n'}v.appendChild(z.createTextNode(B+D));x.getElementsByTagName("defs")[0].appendChild(v)}null!=m&&(this.stylesheet=m,this.refresh());return x};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=B.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&& +(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var z=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= +function(){z.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& +this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"== a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var d=0;d<a.actions.length;d++){var b=a.actions[d];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(d=0;d<a.actions.length;d++)b=a.actions[d],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide, !0),!1)}finally{this.model.endUpdate()}for(d=0;d<a.actions.length;d++){var b=a.actions[d],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,d){var b=this.getLinkForCell(d); null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(a,b));if(this.isHtmlLabel(d)){var c=document.createElement("div");c.innerHTML=this.getLabel(d);for(var f=c.getElementsByTagName("a"),e=!1,g=0;g<f.length;g++)b=f[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(f[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(d,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,d){if("data:action/json,"==d.substring(0, -17))try{var b=JSON.parse(d.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),d="data:action/json,"+JSON.stringify(b))}catch(J){}return d};Graph.prototype.updateCustomLinkActions=function(a,d){for(var b=0;b<d.length;b++){var c=d[b];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction= +17))try{var b=JSON.parse(d.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),d="data:action/json,"+JSON.stringify(b))}catch(I){}return d};Graph.prototype.updateCustomLinkActions=function(a,d){for(var b=0;b<d.length;b++){var c=d[b];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction= function(a,d){if(null!=d&&null!=d.cells){for(var b=[],c=0;c<d.cells.length;c++)if("*"==d.cells[c])b.push(d.cells[c]);else{var f=a[d.cells[c]];null!=f?""!=f&&b.push(f):b.push(d.cells[c])}d.cells=b}};Graph.prototype.getCellsForAction=function(a,d){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,d))};Graph.prototype.getCellsById=function(a){var d=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var c=this.getDefaultParent(),d=d.concat(this.model.filterDescendants(function(a){return a!= c},c));else{var f=this.model.getCell(a[b]);null!=f&&d.push(f)}return d};Graph.prototype.getCellsForTags=function(a,d,b,c){var f=[];if(null!=a){d=null!=d?d:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<d.length;l++)if(c&&this.model.getParent(d[l])==this.model.root||this.model.isVertex(d[l])||this.model.isEdge(d[l])){var n=null!=d[l].value&&"object"==typeof d[l].value?mxUtils.trim(d[l].value.getAttribute(b)|| ""):"",q=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var k=q=0;k<n.length&&q<e;k++)null!=g[n[k]]&&q++;q=q==e}}else q=0==a.length;q&&f.push(d[l])}}return f};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.model.setVisible(a[d],!this.model.isVisible(a[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,d){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],d)}finally{this.model.endUpdate()}}; @@ -3013,297 +3018,297 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo [SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+ "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d= [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst= -[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var H=mxMarker.createMarker;mxMarker.createMarker= -function(a,d,b,c,f,e,g,l,n,q){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return H.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(l,Math.max(parseInt(z.value),parseInt(v.value))));v.value=Math.max(1,Math.min(l,Math.min(parseInt(z.value),parseInt(v.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,q=d.view.translate,k= -d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var y=d.getGraphBounds(),v=0,z=0,B=pa.get(),t=1/d.pageScale,p=C.checked;if(p)var t=parseInt(R.value),F=parseInt(da.value),t=Math.min(B.height*F/(y.height/d.view.scale),B.width*t/(y.width/d.view.scale));else t=parseInt(m.value)/(100*d.pageScale),isNaN(t)&&(c=1/d.pageScale,m.value="100 %");B=mxRectangle.fromRectangle(B);B.width=Math.ceil(B.width* -c);B.height=Math.ceil(B.height*c);t*=c;!p&&d.pageVisible?(y=d.getPageLayout(),v-=y.x*B.width,z-=y.y*B.height):p=!0;if(null==b){b=PrintDialog.createPrintPreview(d,t,B,0,v,z,p);b.pageSelector=!1;b.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(b.title=v.getTitle());var u=b.writeHead;b.writeHead=function(b){u.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f= -d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; -var n=E.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}v=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(v=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=v&&(f.stylesheet=v,f.refresh())}else{B=d.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";b.backgroundColor=B;b.autoOrigin=p;b.appendGraph(d,t,v,z,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e= -0;e<d.extFonts.length;e++)v=d.extFonts[e].name,z=d.extFonts[e].url,0==z.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+z+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=q,d.view.scale=k);return b}var c=parseInt(K.value)/ -100;isNaN(c)&&(c=1,K.value="100 %");var c=.75*c,e=v.value,g=z.value,l=!k.checked,q=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var y=0,l=a.pages.length-1;k.checked||(y=parseInt(e)-1,l=parseInt(g)-1);for(var B=y;B<=l;B++){var t=a.pages[B],e=t==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,y=!1,p=null,F=null;null==t.viewState&&null==t.root&&a.updatePageRoot(t);null!=t.viewState&&(g=t.viewState.pageVisible,y=t.viewState.mathEnabled,p=t.viewState.background, -F=t.viewState.backgroundImage,e.extFonts=t.viewState.extFonts);e.background=p;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=g;e.mathEnabled=y;var u=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?t.getName():"pagenumber"==d?B+1:"pagecount"==d?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(t);e.model.setRoot(t.root)}q=b(e,q,B!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else q= +[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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var G=mxMarker.createMarker;mxMarker.createMarker= +function(a,d,b,c,f,e,g,l,n,q){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){x.value=Math.max(1,Math.min(l,Math.max(parseInt(x.value),parseInt(m.value))));m.value=Math.max(1,Math.min(l,Math.min(parseInt(x.value),parseInt(m.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,q=d.view.translate,k= +d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var m=d.getGraphBounds(),u=0,x=0,z=pa.get(),B=1/d.pageScale,D=C.checked;if(D)var B=parseInt(T.value),E=parseInt(da.value),B=Math.min(z.height*E/(m.height/d.view.scale),z.width*B/(m.width/d.view.scale));else B=parseInt(v.value)/(100*d.pageScale),isNaN(B)&&(c=1/d.pageScale,v.value="100 %");z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width* +c);z.height=Math.ceil(z.height*c);B*=c;!D&&d.pageVisible?(m=d.getPageLayout(),u-=m.x*z.width,x-=m.y*z.height):D=!0;if(null==b){b=PrintDialog.createPrintPreview(d,B,z,0,u,x,D);b.pageSelector=!1;b.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(b.title=u.getTitle());var p=b.writeHead;b.writeHead=function(b){p.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f= +d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var G=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject; +var n=G.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}u=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(u=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=u&&(f.stylesheet=u,f.refresh())}else{z=d.background;if(null==z||""==z||z==mxConstants.NONE)z="#ffffff";b.backgroundColor=z;b.autoOrigin=D;b.appendGraph(d,B,u,x,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e= +0;e<d.extFonts.length;e++)u=d.extFonts[e].name,x=d.extFonts[e].url,0==x.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+x+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+u+'";\n\tsrc: url("'+x+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=q,d.view.scale=k);return b}var c=parseInt(J.value)/ +100;isNaN(c)&&(c=1,J.value="100 %");var c=.75*c,e=m.value,g=x.value,l=!k.checked,q=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var u=0,l=a.pages.length-1;k.checked||(u=parseInt(e)-1,l=parseInt(g)-1);for(var z=u;z<=l;z++){var B=a.pages[z],e=B==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,u=!1,D=null,E=null;null==B.viewState&&null==B.root&&a.updatePageRoot(B);null!=B.viewState&&(g=B.viewState.pageVisible,u=B.viewState.mathEnabled,D=B.viewState.background, +E=B.viewState.backgroundImage,e.extFonts=B.viewState.extFonts);e.background=D;e.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;e.pageVisible=g;e.mathEnabled=u;var p=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?z+1:"pagecount"==d?null!=a.pages?a.pages.length:1:p.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(B);e.model.setRoot(B.root)}q=b(e,q,z!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else q= b(f);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(l=q.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"), l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),d&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')), q.closeDocument(),!q.mathEnabled&&d&&PrintDialog.printPreview(q))}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var l=1,n=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;"; -k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var y=k.cloneNode(!0);k.setAttribute("checked","checked");y.setAttribute("value","range");q.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;"; -v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";q.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var z=v.cloneNode(!0);q.appendChild(z);mxEvent.addListener(v,"focus",function(){y.checked=!0});mxEvent.addListener(z,"focus",function(){y.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage== -a.pages[g]){n=g+1;v.value=n;z.value=n;break}v.setAttribute("max",l);z.setAttribute("max",l);1<l&&e.appendChild(q);var B=document.createElement("div");B.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");B.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));B.appendChild(g);var m=document.createElement("input");m.style.cssText= -"margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";B.appendChild(m);mxEvent.addListener(m,"focus",function(){t.checked=!0});e.appendChild(B);var q=q.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);q.appendChild(g);B=document.createElement("table");B.style.display="inline-block";var p=document.createElement("tbody"), -F=document.createElement("tr"),u=F.cloneNode(!0),H=document.createElement("td"),x=H.cloneNode(!0),A=H.cloneNode(!0),I=H.cloneNode(!0),ka=H.cloneNode(!0),Q=H.cloneNode(!0);H.style.textAlign="right";I.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var R=document.createElement("input");R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";x.appendChild(R);g=document.createElement("span");mxUtils.write(g, -mxResources.get("fitToSheetsAcross"));A.appendChild(g);mxUtils.write(I,mxResources.get("fitToBy"));var da=R.cloneNode(!0);ka.appendChild(da);mxEvent.addListener(R,"focus",function(){C.checked=!0});mxEvent.addListener(da,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));Q.appendChild(g);F.appendChild(H);F.appendChild(x);F.appendChild(A);u.appendChild(I);u.appendChild(ka);u.appendChild(Q);p.appendChild(F);p.appendChild(u);B.appendChild(p); -q.appendChild(B);e.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g); -var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","100 %");K.style.width="60px";q.appendChild(K);e.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&g.appendChild(q);a.isOffline()||(B=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}), -B.className="geBtn",g.appendChild(B));PrintDialog.previewEnabled&&(B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),B.className="geBtn",g.appendChild(B));B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});B.className="geBtn gePrimaryBtn";g.appendChild(B);a.editor.cancelFirst||g.appendChild(q);e.appendChild(g);this.container=e};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null== -this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(z.apply(this,arguments),null!=this.mathEnabled&& -this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),C=new Image;C.onload=function(){try{F.getContext("2d").drawImage(C,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport= -null!=a&&6<a.length}catch(I){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})(); +k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");q.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.appendChild(g);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;"; +m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.style.width="50px";q.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var x=m.cloneNode(!0);q.appendChild(x);mxEvent.addListener(m,"focus",function(){u.checked=!0});mxEvent.addListener(x,"focus",function(){u.checked=!0});mxEvent.addListener(m,"change",b);mxEvent.addListener(x,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage== +a.pages[g]){n=g+1;m.value=n;x.value=n;break}m.setAttribute("max",l);x.setAttribute("max",l);1<l&&e.appendChild(q);var z=document.createElement("div");z.style.marginBottom="10px";var B=document.createElement("input");B.style.marginRight="8px";B.setAttribute("value","adjust");B.setAttribute("type","radio");B.setAttribute("name","printZoom");z.appendChild(B);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));z.appendChild(g);var v=document.createElement("input");v.style.cssText= +"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";z.appendChild(v);mxEvent.addListener(v,"focus",function(){B.checked=!0});e.appendChild(z);var q=q.cloneNode(!1),C=B.cloneNode(!0);C.setAttribute("value","fit");B.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);q.appendChild(g);z=document.createElement("table");z.style.display="inline-block";var E=document.createElement("tbody"), +p=document.createElement("tr"),G=p.cloneNode(!0),t=document.createElement("td"),y=t.cloneNode(!0),H=t.cloneNode(!0),A=t.cloneNode(!0),ja=t.cloneNode(!0),Q=t.cloneNode(!0);t.style.textAlign="right";A.style.textAlign="right";mxUtils.write(t,mxResources.get("fitTo"));var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","1");T.setAttribute("min","1");T.setAttribute("type","number");T.style.width="40px";y.appendChild(T);g=document.createElement("span");mxUtils.write(g, +mxResources.get("fitToSheetsAcross"));H.appendChild(g);mxUtils.write(A,mxResources.get("fitToBy"));var da=T.cloneNode(!0);ja.appendChild(da);mxEvent.addListener(T,"focus",function(){C.checked=!0});mxEvent.addListener(da,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));Q.appendChild(g);p.appendChild(t);p.appendChild(y);p.appendChild(H);G.appendChild(A);G.appendChild(ja);G.appendChild(Q);E.appendChild(p);E.appendChild(G);z.appendChild(E); +q.appendChild(z);e.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g); +var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","100 %");J.style.width="60px";q.appendChild(J);e.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&g.appendChild(q);a.isOffline()||(z=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}), +z.className="geBtn",g.appendChild(z));PrintDialog.previewEnabled&&(z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),z.className="geBtn",g.appendChild(z));z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});z.className="geBtn gePrimaryBtn";g.appendChild(z);a.editor.cancelFirst||g.appendChild(q);e.appendChild(g);this.container=e};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null== +this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&& +this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),C=new Image;C.onload=function(){try{E.getContext("2d").drawImage(C,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport= +null!=a&&6<a.length}catch(H){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})(); (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars= "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&& !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4, -topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,n,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& -null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=d+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(y){}try{k||null==window.console|| -console.error(l,a,b,c,e,n)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> +topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,l,n,k){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&& +null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";l=null!=l?l:Error(a);(new Image).src=d+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=l&&null!=l.stack?"&stack="+encodeURIComponent(l.stack):"")}}catch(u){}try{k||null==window.console|| +console.error(n,a,b,c,e,l)}catch(u){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length> b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b, e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>'; EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;"; EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile= -null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(n){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c, -0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(l){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{b=document.createElement("canvas");b.width=b.height=1;var e= -b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(n){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled= +null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c, +0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}try{b=document.createElement("canvas");b.width=b.height=1;var e= +b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(l){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&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.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24; var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=d.spin;d.spin=function(c,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft= "10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>= document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};d.pause=function(){return function(){}}; return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&& 3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=a.apply(this,arguments);if(null==b)try{var c= -d.indexOf("<mxfile ");if(0<=c){var e=d.lastIndexOf("</mxfile>");e>c&&(b=d.substring(c,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(d),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=l?mxUtils.getXml(l):""}catch(B){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">'); +d.indexOf("<mxfile ");if(0<=c){var e=d.lastIndexOf("</mxfile>");e>c&&(b=d.substring(c,e+15).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(d),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(B){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">'); 0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&& -c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(c[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,l,0==e?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", -[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,n,l,k,v,y,m,z){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;y=null!=y?y:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? -d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(q);if(Graph.decompress(g)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(q)}m?(g=g.cloneNode(!0),g.removeAttribute("modified"), +c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(c[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,n,0==e?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber", +[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,l,n,k,m,u,p,x){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;u=null!=u?u:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER? +d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(x){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(q);if(Graph.decompress(g)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(q)}p?(g=g.cloneNode(!0),g.removeAttribute("modified"), g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified", -(new Date).toISOString()),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!l&&!n&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(l|| -!n&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,v,y,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)), +(new Date).toISOString()),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));x=x?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!l&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))x=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(n|| +!l&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),x=this.getEmbeddedSvg(x,b,e,null,m,u,f);return x};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)), a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f= (new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var f=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?d.push(f):isNaN(parseInt(f))?f.toLowerCase()!= f?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name", -this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(l){a[EditorUi.DIFF_INSERT][d].data=l.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+ +this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+ "]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!= a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+ "]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum? -d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,n,l,k, -v,y,m){n=null!=n?n:!0;l=null!=l?l:!1;var d=this.editor.graph;if(b||!a&&null!=y&&/(\.svg)$/i.test(y.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(n,l,m);y=null!=y?y:this.getCurrentFile();a=this.createFileData(k, -d,y,window.location.href,a,b,c,e,n,v,m);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+ -"/embed.js?s="+b));a.setAttribute("x0",l);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': -"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+ -"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,n){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled, -resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+ -n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData= +d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,l,n,k, +m,u,p){l=null!=l?l:!0;n=null!=n?n:!1;var d=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(p=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,p);u=null!=u?u:this.getCurrentFile();a=this.createFileData(k, +d,u,window.location.href,a,b,c,e,l,m,p);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,l,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+ +"/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=l&&(l=l.replace(/&/g,"&"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n': +"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+"</head>\n<body"+(null==l&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+ +"</div>\n</div>\n"+(null==l?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,l){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=l&&(l=l.replace(/&/g,"&"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled, +resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+ +l+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==l?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData= function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b= null;this.fileNode=a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"), -this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),c=0;c<k.length;c++){var v=k[c];l.setVisible(v,a[v.id]|| -!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d}; -EditorUi.prototype.downloadFile=function(a,b,c,e,n,l,k,v,y,m,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!n),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"== -a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(d,a,e,b,k,n,v,y,m,z);this.editor.graph.pageVisible=c;return f}catch(Z){this.handleError(Z)}}));else{var q=null,B=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), -mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var p=this.editor.graph.background;if(k||p==mxConstants.NONE)p=null;var u=this.editor.graph.getSvg(p,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();B('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",q=this.getFileData(!1, -!0,null,mxUtils.bind(this,function(a){this.spinner.stop();B(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,n,l,k,v,y,m){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=b);var g="",q="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m=m?"1":"0";"pdf"==b&&0==l&&(q="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(l= -0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g="&from="+l;break}l=d.background;"png"==b&&n?l=mxConstants.NONE:n||null!=l&&l!=mxConstants.NONE||(l="#ffffff");n={globalVars:d.getExportVariables()};y&&(n.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+q+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+e+"&embedXml="+m+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+ -(null!=k?"&scale="+k:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"== +this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),c=0;c<k.length;c++){var m=k[c];n.setVisible(m,a[m.id]|| +!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d}; +EditorUi.prototype.downloadFile=function(a,b,c,e,l,n,k,m,u,p,x){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!l),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"== +a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(d,a,e,b,k,l,m,u,p,x);this.editor.graph.pageVisible=c;return f}catch(Z){this.handleError(Z)}}));else{var q=null,z=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"), +mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var B=this.editor.graph.background;if(k||B==mxConstants.NONE)B=null;var t=this.editor.graph.getSvg(B,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(t);this.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();z('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",q=this.getFileData(!1, +!0,null,mxUtils.bind(this,function(a){this.spinner.stop();z(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,l,n,k,m,u,p){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var g="",q="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};p=p?"1":"0";"pdf"==b&&0==n&&(q="&allPages=1");if("xmlpng"==b&&(p="1",b="png",null!=this.pages&&null!=this.currentPage))for(n= +0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=d.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:d.getExportVariables()};u&&(l.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+q+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+p+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+ +(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"== a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+ " "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&& -c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,l=e.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var v=l.getCell(a.getAttribute("id")); -if(null!=v){try{var y=a.getAttribute("value");if(null!=y){var m=mxUtils.parseXml(y).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))l.setValue(v,m);else for(var z=m.attributes,p=0;p<z.length;p++)e.setAttributeForCell(v,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+v.id+": "+E)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(v,C)}catch(E){null!=window.console&&console.log("Error in style for "+ -v.id+": "+E)}try{var t=a.getAttribute("icon");if(null!=t){var u=0<t.length?JSON.parse(t):null;null!=u&&u.append||e.removeCellOverlays(v);null!=u&&e.addCellOverlay(v,d(u))}}catch(E){null!=window.console&&console.log("Error in icon for "+v.id+": "+E)}try{var x=a.getAttribute("geometry");if(null!=x){var x=JSON.parse(x),J=e.getCellGeometry(v);if(null!=J){J=J.clone();for(key in x){var A=parseFloat(x[key]);"dx"==key?J.x+=A:"dy"==key?J.y+=A:"dw"==key?J.width+=A:"dh"==key?J.height+=A:J[key]=parseFloat(x[key])}e.model.setGeometry(v, -J)}}}catch(E){null!=window.console&&console.log("Error in icon for "+v.id+": "+E)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"== -a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,v=e.getDate(),y=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),d= -d+(" "+(f+"-"+k+"-"+v+"-"+y+"-"+m+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle(); +c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=n.getCell(a.getAttribute("id")); +if(null!=m){try{var u=a.getAttribute("value");if(null!=u){var p=mxUtils.parseXml(u).documentElement;if(null!=p)if("1"==p.getAttribute("replace-value"))n.setValue(m,p);else for(var x=p.attributes,E=0;E<x.length;E++)e.setAttributeForCell(m,x[E].nodeName,0<x[E].nodeValue.length?x[E].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+m.id+": "+M)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(m,C)}catch(M){null!=window.console&&console.log("Error in style for "+ +m.id+": "+M)}try{var v=a.getAttribute("icon");if(null!=v){var t=0<v.length?JSON.parse(v):null;null!=t&&t.append||e.removeCellOverlays(m);null!=t&&e.addCellOverlay(m,d(t))}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}try{var y=a.getAttribute("geometry");if(null!=y){var y=JSON.parse(y),I=e.getCellGeometry(m);if(null!=I){I=I.clone();for(key in y){var A=parseFloat(y[key]);"dx"==key?I.x+=A:"dy"==key?I.y+=A:"dw"==key?I.width+=A:"dh"==key?I.height+=A:I[key]=parseFloat(y[key])}e.model.setGeometry(m, +I)}}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"== +a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,m=e.getDate(),u=e.getHours(),p=e.getMinutes(),e=e.getSeconds(),d= +d+(" "+(f+"-"+k+"-"+m+"-"+u+"-"+p+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle(); this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0; this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+ mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+ a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(B){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(B){}}catch(B){this.fileLoadedError=B;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+ -(null!=a?a.getHash():"none"),action:"message_"+B.message,label:"stack_"+B.stack})}catch(v){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(B,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount= -0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var v=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,v,!0);v.removeAttribute("pageWidth");v.removeAttribute("pageHeight");k.appendChild(v);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!= +(null!=a?a.getHash():"none"),action:"message_"+B.message,label:"stack_"+B.stack})}catch(z){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(B,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount= +0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var m=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!= a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name, g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(d^=this.hashValue(e,b,c)+this.hashValue(g,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary= -function(a,b,c,e,n,l,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(), +function(a,b,c,e,l,n,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(), b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}}; EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement)); this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f= null,g=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;e=q.getAttribute("title"); -null!=e&&0<e.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");q.style.position="relative";var z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get("close"));z.setAttribute("valign","absmiddle"); -z.setAttribute("border","0");z.style.cursor="pointer";z.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var C=this.editor.graph,t=null, -u=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),x=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=z.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",m.insertBefore(t,m.firstChild),q.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(), -b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),q.style.paddingRight=18*m.childNodes.length+"px")})):null==p&&(p=z.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),m.insertBefore(p,m.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(q.style.paddingRight=18*m.childNodes.length+ -"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(d)})),q.style.paddingRight=18*m.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,d,c,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&& -(a.title=e);b.push(a);x(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=C.getSelectionCells(),b=C.view.getBounds(d),c=C.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=C.view.translate.x;b.y-=C.view.translate.y; -J(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(k.style.backgroundColor= +null!=e&&0<e.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");q.style.position="relative";var x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.setAttribute("valign","absmiddle"); +x.setAttribute("border","0");x.style.cursor="pointer";x.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var C=this.editor.graph,v=null, +t=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),y=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v),v=x.cloneNode(!1),v.setAttribute("src",Editor.spinImage),v.setAttribute("title",mxResources.get("saving")),v.style.cursor="default",v.style.marginRight="2px",v.style.marginTop="-2px",m.insertBefore(v,m.firstChild),q.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(), +b,a,a.getMode(),!0,!0,function(){null!=v&&null!=v.parentNode&&(v.parentNode.removeChild(v),q.style.paddingRight=18*m.childNodes.length+"px")})):null==p&&(p=x.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),m.insertBefore(p,m.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(q.style.paddingRight=18*m.childNodes.length+ +"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(d)})),q.style.paddingRight=18*m.childNodes.length+"px")}),I=mxUtils.bind(this,function(a,d,c,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&& +(a.title=e);b.push(a);y(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=C.getSelectionCells(),b=C.view.getBounds(d),c=C.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=C.view.translate.x;b.y-=C.view.translate.y; +I(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(k.style.backgroundColor= "",k.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this, -function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,q,y,z,v){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ -this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:y.substring(0,y.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var m=!1,t=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l= -JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,k);b=b.concat(l);x(a);this.spinner.stop();m=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),y=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,y.width,y.height),a)}m=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); -null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?this.importVisio(v,function(a){t(a,"text/xml")},null,y):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,y)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? -"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));z=z.cloneNode(!1);z.setAttribute("src",Editor.editImage);z.setAttribute("title",mxResources.get("edit"));m.insertBefore(z,m.firstChild);mxEvent.addListener(z,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)== -k&&u(a)});e=z.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); +function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,q,m,u,x){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+ +this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,I(d,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var z=!1,B=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l= +JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,k);b=b.concat(l);y(a);this.spinner.stop();z=!0}catch(K){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),m=this.editor.graph.getBoundingBoxFromGeometry(q);I(q,new mxRectangle(0,0,m.width,m.height),a)}z=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")})); +null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?this.importVisio(x,function(a){B(a,"text/xml")},null,m):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,m)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status? +"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));x=x.cloneNode(!1);x.setAttribute("src",Editor.editImage);x.setAttribute("title",mxResources.get("edit"));m.insertBefore(x,m.firstChild);mxEvent.addListener(x,"click",t);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)== +k&&t(a)});e=x.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink); mxEvent.consume(a)})),m.insertBefore(e,m.firstChild))}q.appendChild(m);q.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],f=c.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(f=this.stringToCells(Graph.decompress(c.xml)), 0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS? "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor= "black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=", -Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,n){a=new ImageDialog(this,a,b,c,e,n);this.showDialog(a.container,Graph.fileSupport? -480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,n){a=new LibraryDialog(this,a,b,c,e,n);this.showDialog(a.container,640,440,!0,!1, +Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,l){a=new ImageDialog(this,a,b,c,e,l);this.showDialog(a.container,Graph.fileSupport? +480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,l){a=new LibraryDialog(this,a,b,c,e,l);this.showDialog(a.container,640,440,!0,!1, mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var d=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position= "absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct(); -mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,n,l,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(t){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError")); -var g=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),q=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m= -null!=l?l:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this, -function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,e,n)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<d.length;a++){var b=document.createElement("option");mxUtils.write(b,d[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML=" ";mxUtils.write(b,"<"+d[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option"); +mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,l,n,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(v){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError")); +var g=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),q=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=l?l:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m= +null!=n?n:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this, +function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,e,l)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<d.length;a++){var b=document.createElement("option");mxUtils.write(b,d[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML=" ";mxUtils.write(b,"<"+d[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option"); mxUtils.write(b,mxResources.get("addAccount"));b.value=d.length;f.appendChild(b)}var d=this.drive.getUsersList(),b=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");b.appendChild(c);var f=document.createElement("select");f.style.width="200px";a();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var b=f.value,c=d.length!=b;c&&this.drive.setUser(d[b]);this.drive.authorize(c,mxUtils.bind(this,function(){c|| (d=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(f);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!== -typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var B=l=null;null!=f&&null!=f.helpLink&&(l=mxResources.get("help"),B=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,c,q,null,null,l,B,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container, -340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,n,l){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,n,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,l);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&& +typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var B=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),B=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,c,q,null,null,n,B,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container, +340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,l,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,l,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&& null!=mxSettings.settings["close"+a])){var f=document.createElement("div");f.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(f.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.className="geBtn gePrimaryBtn"; d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";f.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;"; f.appendChild(d);mxUtils.write(f,b);document.body.appendChild(f);this.bannerShowing=!0;var e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";e.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));e.appendChild(b); f.style.paddingBottom="30px";f.appendChild(e);var k=mxUtils.bind(this,function(d){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);d!=g&&d!=b&&(mxEvent.consume(a), c(),k())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k(!0)}),1E3)}),3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas= function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c,e){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(d=this.writeGraphModelToPng(d,"pHYs","dpi",e));return d};EditorUi.prototype.saveCanvas= -function(a,b,c,e,n){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,n);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog= -function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"), +function(a,b,c,e,l){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,l);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog= +function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,l){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"), null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a"),f=0>navigator.userAgent.indexOf("PaleMoon/")&&!mxClient.IS_IOS&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2], -10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(a,b,c,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!= -c?"&mime="+c:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,y=Math.min(m+1024,c),p=Array(y-m),z=0;m<y;++z,++m)p[z]=d[m].charCodeAt(0);e[k]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,k,l,m){l=null!=l?l:!1;m=null!=m?m:"vsdx"!=k&& -(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(l);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b, -mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(C){this.handleError(C)}}))}catch(F){this.handleError(F)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,m,null,1<k,d,a,c,e);l=this.isServices(k)?k>d?390:270:160;this.showDialog(b.container,400,l,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG? +10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(u){}}else this.createEchoRequest(a,b,c,e,l).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,l,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!= +c?"&mime="+c:"")+(null!=l?"&format="+l:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),f=Array(e),k=0;k<e;++k){for(var m=1024*k,u=Math.min(m+1024,c),p=Array(u-m),x=0;m<u;++x,++m)p[x]=d[m].charCodeAt(0);f[k]=new Uint8Array(p)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,l,n,k){n=null!=n?n:!1;k=null!=k?k:"vsdx"!=l&& +(!mxClient.IS_IOS||!navigator.standalone);l=this.getServiceCount(n);isLocalStorage&&l++;var d=4>=l?2:6<l?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b, +mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(C){this.handleError(C)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<l,d,a,c,e);n=this.isServices(l)?l>d?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG? (c=c?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?d.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+c+'"/></html>'):d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+c+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems= function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px"); this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+ -this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a, +this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a, null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this, -function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,k){this.isLocalFileSave()?this.saveLocalFile(c,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,k,b,d)}),c,k,e)};EditorUi.prototype.saveRequest=function(a, -b,c,e,k,l,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+ -b;if(null!=e)try{this.exportFile(e,a,l,!0,d,c)}catch(t){this.handleError(t)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,d,c)}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), -mxResources.get("download"),!1,!1,m,null,1<d,f,e,l,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,k,l){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,k,l,m,v,y,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d= -this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,m,v,null,c,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,y,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ -mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,q,this.thumbImageCache)):q(g)}catch(M){this.handleError(M)}};EditorUi.prototype.addRadiobox= -function(a,b,c,e,k,l,m){return this.addCheckbox(a,c,e,k,l,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,k,l,m,v){l=null!=l?l:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();d.id=m;null!=v&&d.setAttribute("name",v);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");l&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c, -b),c.setAttribute("for",m),a.appendChild(c),k||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option"); +function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,l){this.isLocalFileSave()?this.saveLocalFile(c,a,e,l,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,l,b,d)}),c,l,e)};EditorUi.prototype.saveRequest=function(a, +b,c,e,l,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+ +b;if(null!=e)try{this.exportFile(e,a,n,!0,d,c)}catch(v){this.handleError(v)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,n,!0,d,c)}catch(v){this.handleError(v)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"), +mxResources.get("download"),!1,!1,k,null,1<d,f,e,n,l);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,l,n){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,l,n,k,m,u,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d= +this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var q=this.getBaseFilename()+".svg",z=mxUtils.bind(this,function(a){this.spinner.stop();l&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+ +mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,z,this.thumbImageCache)):z(g)}catch(L){this.handleError(L)}};EditorUi.prototype.addRadiobox= +function(a,b,c,e,l,n,k){return this.addCheckbox(a,c,e,l,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,l,n,k,m){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();d.id=k;null!=m&&d.setAttribute("name",m);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");n&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c, +b),c.setAttribute("for",k),a.appendChild(c),l||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option"); c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container, 300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE? "border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option"); e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k= null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(a)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}}; -EditorUi.prototype.createLink=function(a,b,c,e,k,l,m,v){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=m?c= -"#U"+encodeURIComponent(m):(d=this.getCurrentFile(),v||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost: -"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,k,l,m,v,y,p,z){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);y||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0); -v&&c.push("layers");0<c.length&&(y&&c.push("lightbox"),d.toolbar=c.join(" "));null!=p&&0<p.length&&(d.edit=p);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1": +EditorUi.prototype.createLink=function(a,b,c,e,l,n,k,m){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=l&&0<l.length&&f.push("edit="+encodeURIComponent(l)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?c= +"#U"+encodeURIComponent(k):(d=this.getCurrentFile(),m||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost: +"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,l,n,k,m,u,p,x){this.getBasenames();var d={};""!=l&&l!=mxConstants.NONE&&(d.highlight=l);"auto"!==e&&(d.target=e);u||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0); +m&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),d.toolbar=c.join(" "));null!=p&&0<p.length&&(d.edit=p);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1": EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=document.createElement("div"); -g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(q);mxUtils.br(g);g.appendChild(k); -q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));g.appendChild(q);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href","javascript:void(0);"),mxUtils.write(q,mxResources.get("share")),g.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked", -"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var z=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";d.appendChild(C);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(d,mxResources.get("allPages"), -g,!g),x=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("lightbox"),!0),A=this.addEditButton(d,J),D=A.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&J.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,p.checked, -C.value,z.getTarget(),z.getColor(),t.checked,u.checked,x.checked,J.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,k,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941"; -a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())})); -q.style.marginTop="12px";q.className="geBtn";n.appendChild(q);d.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));n.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, -null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+ -":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",d.appendChild(p),mxUtils.br(d);var t=this.addLinkSection(d,l);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var x=this.addCheckbox(d,mxResources.get("lightbox"),!0),J=this.addEditButton(d,x),A=J.getEditInput(),D=this.addCheckbox(d,mxResources.get("layers"), -!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&x.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(t.getTarget(),t.getColor(),null==u? -!0:u.checked,x.checked,J.getLink(),D.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f, -mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type", -"text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";d.appendChild(n);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=p&&(p.style.marginBottom="16px");a= -new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(n.value)||0;c(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(k?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,l,m,v){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==v?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; -d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder|| -"0";d.appendChild(t);mxUtils.br(d);var p=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),B=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled","disabled");u.setAttribute("type","checkbox");l&&(d.appendChild(u),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(B,"change",function(){B.checked? -u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var x=this.addCheckbox(d,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");b&&(d.appendChild(A),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+= -26);var E=null;if("png"==v||"jpeg"==v)E=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var O=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=v),S=null!=this.pages&&1<this.pages.length,Z=this.addCheckbox(d,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=v);Z.style.marginLeft="24px";Z.style.marginBottom="16px";S?g+=26:Z.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&S?Z.removeAttribute("disabled"): -Z.setAttribute("disabled","disabled")});m&&S||Z.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option"); -a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==v&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;k(q.value,p.checked,!B.checked,x.checked,O.checked,A.checked,t.value,u.checked,!Z.checked,X.value,null!=E?E.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null, -null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var n=this.addCheckbox(d,mxResources.get("fit"), -!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),u=this.addEditButton(d,p),t=u.getEditInput(),x=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(d,mxResources.get("layers"),x,!x);A.style.marginLeft=t.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(x&&A.removeAttribute("disabled"),t.removeAttribute("disabled")): -(A.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&p.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,u.getLink(),A.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,k,l,m,v){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null, -mxUtils.bind(this,function(a){v({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})}; -EditorUi.prototype.createEmbedSvg=function(a,b,c,e,k,l,m){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var q=" ",p="";e&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ -EditorUi.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),m(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- +g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(m);mxUtils.br(g);g.appendChild(k); +m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));g.appendChild(m);var q=this.getCurrentFile();null==c&&null!=q&&q.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),g.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(q.getId())})));f.setAttribute("checked", +"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var x=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";d.appendChild(C);var v=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,t=t=this.addCheckbox(d,mxResources.get("allPages"), +g,!g),y=this.addCheckbox(d,mxResources.get("layers"),!0),I=this.addCheckbox(d,mxResources.get("lightbox"),!0),A=this.addEditButton(d,I),D=A.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&I.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,p.checked, +C.value,x.getTarget(),x.getColor(),v.checked,t.checked,y.checked,I.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,l,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941"; +a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));k.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())})); +m.style.marginTop="12px";m.className="geBtn";k.appendChild(m);d.appendChild(k);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));k.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this, +null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var q=null,C=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",d.appendChild(q),mxUtils.write(d,mxResources.get("height")+ +":"),C=document.createElement("input"),C.setAttribute("type","text"),C.style.width="50px",C.style.marginLeft="6px",C.style.marginBottom="10px",C.value=e+"px",d.appendChild(C),mxUtils.br(d);var v=this.addLinkSection(d,n);c=null!=this.pages&&1<this.pages.length;var p=null;if(null==g||g.constructor!=window.DriveFile||b)p=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(d,mxResources.get("lightbox"),!0),y=this.addEditButton(d,t),A=y.getEditInput(),D=this.addCheckbox(d,mxResources.get("layers"), +!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&t.checked?y.getEditSelect().removeAttribute("disabled"):y.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){l(v.getTarget(),v.getColor(),null==p? +!0:p.checked,t.checked,y.getLink(),D.checked,null!=q?q.value:null,null!=C?C.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f, +mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";d.appendChild(f);if(l){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type", +"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var m=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),q=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=p&&(p.style.marginBottom="16px");a= +new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(k.value)||0;c(!m.checked,null!=q?q.checked:!1,null!=p?p.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,l,n,k,m){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px"; +d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value=this.lastExportZoom||"100%";d.appendChild(z);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder|| +"0";d.appendChild(v);mxUtils.br(d);var p=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),B=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");n&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(B,"change",function(){B.checked? +t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked","checked"),t.defaultChecked=!0);var y=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(d.appendChild(D),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+= +26);var A=null;if("png"==m||"jpeg"==m)A=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var R=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),S=null!=this.pages&&1<this.pages.length,Z=this.addCheckbox(d,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=m);Z.style.marginLeft="24px";Z.style.marginBottom="16px";S?g+=26:Z.style.display="none";mxEvent.addListener(R,"change",function(){R.checked&&S?Z.removeAttribute("disabled"): +Z.setAttribute("disabled","disabled")});k&&S||Z.setAttribute("disabled","disabled");var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";W.style.marginRight="10px";W.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));W.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));W.appendChild(a);a=document.createElement("option"); +a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));W.appendChild(a);"svg"==m&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(W),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=z.value;l(z.value,p.checked,!B.checked,y.checked,R.checked,D.checked,v.value,t.checked,!Z.checked,W.value,null!=A?A.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null, +null,null,null,!0);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var k=this.addCheckbox(d,mxResources.get("fit"), +!0),m=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),q=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,p),v=C.getEditInput(),t=1<f.model.getChildCount(f.model.getRoot()),y=this.addCheckbox(d,mxResources.get("layers"),t,!t);y.style.marginLeft=v.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(t&&y.removeAttribute("disabled"),v.removeAttribute("disabled")): +(y.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&p.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,m.checked,q.checked,p.checked,C.getLink(),y.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,l,n,k,m){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+d+'"'+m+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null, +mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})}; +EditorUi.prototype.createEmbedSvg=function(a,b,c,e,l,n,k){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var m=f[g].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var q=" ",p="";e&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+ +EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date- a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"== -a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=null;if(null!= +a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=null;if(null!= c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container); -d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(H){null!=b&&b(H)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(v){null!= -b&&b(v)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,k,l,m,v){v=null!=v?v:!0;m=b.background;m==mxConstants.NONE&&(m=null);l=b.getSvg(m,null,null,null,null,l);b.shadowVisible&&b.addSvgShadow(l);null!=a&&l.setAttribute("content",a);null!=c&&l.setAttribute("resource",c);if(null!=k)this.embedFonts(l,mxUtils.bind(this,function(a){v?this.convertImages(a,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ -mxUtils.getXml(a))})):k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&& -this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(q){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,k,l,m,v,y,p,z){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); -try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,v):null,y,null==this.pages||0==this.pages.length,z)}catch(t){"Invalid image"==t.message?this.downloadFile(y):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,l,m,p)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", -"g"),"")}var c=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[c[0]],f=1;f<c.length;f++){var g=c[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[d(c[f].substring(0,g))]);a.push('"'+c[f].substring(g))}b(a.join(""))}});if(0<c.length){for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),y=null,p=c[k].indexOf("format(",m);0<p&&(y=d(c[k].substring(p+7,c[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]= -a;e++;var d="application/x-font-ttf";if("svg"==y||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==y||"embedded-opentype"==y||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==y||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==y||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==y||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==y||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&& -!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(c[k].substring(0,m)),y)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(d){this.editor.resolvedFontCss=d;a()})):a()};EditorUi.prototype.embedExtFonts= -function(a){var d=this.editor.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]: -b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[l].name,d[l].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,l,m,v,y,p,z,u,C,t,x){try{l=null!=l?l:!0;m=null!=m?m:!0;u=null!=u?u:this.editor.graph;C=null!=C?C:0;var d=y?null:u.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==y&&(d="#ffffff");this.convertImages(u.getSvg(null,null,null,t,null,m,null,null,null,p),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f= -function(){mxClient.IS_SF?window.setTimeout(function(){q.drawImage(e,C/v,C/v);a(g)},0):(q.drawImage(e,C/v,C/v),a(g))},g=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));v=null!=v?v:1;null!=b&&(v=l?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(v*n)+2*C;m=Math.ceil(v*m)+2*C;g.setAttribute("width",n);g.setAttribute("height",m);var q=g.getContext("2d");null!=d&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=d,q.fill());q.scale(v,v);if(x){var z= -u.view,y=z.scale;z.scale=1;var t=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=y;var t="data:image/svg+xml;base64,"+t,p=u.gridSize*z.gridSteps*v,B=u.getGraphBounds(),F=z.translate.x*y,A=z.translate.y*y,J=F+(B.x-F)/y,H=A+(B.y-A)/y,D=new Image;D.onload=function(){try{for(var a=-Math.round(p-mxUtils.mod((F-J)*v,p)),d=-Math.round(p-mxUtils.mod((A-H)*v,p));a<n;a+=p)for(var b=d;b<m;b+=p)q.drawImage(D,a/v,b/v);f()}catch(L){null!=k&&k(L)}};D.onerror=function(a){null!=k&&k(a)};D.src= -t}else f()}catch(aa){null!=k&&k(aa)}});e.onerror=function(a){null!=k&&k(a)};p&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(E){null!=k&&k(E)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(O){null!=k&&k(O)}}))}catch(E){null!= -k&&k(E)}}),c,z)}catch(J){null!=k&&k(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+ +d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=b&&b(G)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(z){null!= +b&&b(z)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&n.setAttribute("content",a);null!=c&&n.setAttribute("resource",c);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.convertImages(a,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+ +mxUtils.getXml(a))})):l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&& +this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(q){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,l,n,k,m,u,p,x){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop(); +try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,c,m):null,u,null==this.pages||0==this.pages.length,x)}catch(v){"Invalid image"==v.message?this.downloadFile(u):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,n,k,p)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$", +"g"),"")}var c=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[c[0]],f=1;f<c.length;f++){var g=c[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[d(c[f].substring(0,g))]);a.push('"'+c[f].substring(g))}b(a.join(""))}});if(0<c.length){for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),u=null,p=c[k].indexOf("format(",m);0<p&&(u=d(c[k].substring(p+7,c[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]= +a;e++;var d="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&& +!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(c[k].substring(0,m)),u)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(d){this.editor.resolvedFontCss=d;a()})):a()};EditorUi.prototype.embedExtFonts= +function(a){var d=this.editor.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),n=0;n<d.length;n++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]: +b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[n].name,d[n].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,l,n,k,m,u,p,x,t,C,v,y){try{n=null!=n?n:!0;k=null!=k?k:!0;t=null!=t?t:this.editor.graph;C=null!=C?C:0;var d=u?null:t.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==u&&(d="#ffffff");this.convertImages(t.getSvg(null,null,null,v,null,k,null,null,null,p),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f= +function(){mxClient.IS_SF?window.setTimeout(function(){u.drawImage(e,C/m,C/m);a(g)},0):(u.drawImage(e,C/m,C/m),a(g))},g=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=n?Math.min(1,Math.min(3*b/(4*q),b/k)):b/k);k=Math.ceil(m*k)+2*C;q=Math.ceil(m*q)+2*C;g.setAttribute("width",k);g.setAttribute("height",q);var u=g.getContext("2d");null!=d&&(u.beginPath(),u.rect(0,0,k,q),u.fillStyle=d,u.fill());u.scale(m,m);if(y){var x= +t.view,p=x.scale;x.scale=1;var z=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=p;var z="data:image/svg+xml;base64,"+z,v=t.gridSize*x.gridSteps*m,B=t.getGraphBounds(),D=x.translate.x*p,E=x.translate.y*p,I=D+(B.x-D)/p,A=E+(B.y-E)/p,G=new Image;G.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((D-I)*m,v)),d=-Math.round(v-mxUtils.mod((E-A)*m,v));a<k;a+=v)for(var b=d;b<q;b+=v)u.drawImage(G,a/m,b/m);f()}catch(K){null!=l&&l(K)}};G.onerror=function(a){null!=l&&l(a)};G.src= +z}else f()}catch(ba){null!=l&&l(ba)}});e.onerror=function(a){null!=l&&l(a)};p&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(M){null!=l&&l(M)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(R){null!=l&&l(R)}}))}catch(M){null!= +l&&l(M)}}),c,x)}catch(I){null!=l&&l(I)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+ "?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=e.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=f[l];null==k?(d++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g, -k)}else null!=l&&c.setAttribute(g,l)}}catch(t){}})(l[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,l,m,v){try{var d=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&& -"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},d,this.timeout,function(){k&& -null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},v)});f()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c); -d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(y){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(B){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!= -b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&& -(a[m[0].getAttribute("id")]=this.pages[0].getId(),n=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,u,u,t,!0));g.push(u)}this.updatePageLinks(a,g)}}if(null!=n&&"mxGraphModel"===n.nodeName&&(d=f.importGraphModel(n,b,c,e),null!= -d))for(q=0;q<d.length;q++)this.updatePageLinksForCell(a,d[q])}finally{f.model.endUpdate()}}}catch(I){if(k)throw I;this.handleError(I)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f= +k)}else null!=l&&c.setAttribute(g,l)}}catch(v){}})(l[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,l,k,m,p){try{var d=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&& +"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}k=null!=k?k:"data:image/png;base64,";e=k+this.base64Encode(e)}b(e)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},d,this.timeout,function(){l&& +null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},p)});f()}catch(x){null!=c&&c(x)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c); +d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(u){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(B){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,l){b=null!= +b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&& +(a[m[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var t=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var v=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,t,t,v,!0));g.push(t)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=f.importGraphModel(k,b,c,e),null!= +d))for(q=0;q<d.length;q++)this.updatePageLinksForCell(a,d[q])}finally{f.model.endUpdate()}}}catch(H){if(l)throw H;this.handleError(H)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f= d.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&c.labelChanged(b,d.innerHTML)}for(m=0;m<c.model.getChildCount(b);m++)this.updatePageLinksForCell(a,c.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17)); if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var f=c.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(d=a[f.open.substring(f.open.indexOf(",")+1)],null!=d?f.open="data:page/id,"+d:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(B){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this, -function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(H){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")}); -else{d=new FormData;d.append("file1",a,e);var k=new XMLHttpRequest;k.open("POST",VSD_CONVERT_URL);k.responseType="blob";this.addRemoteServiceSecurityCheck(k);k.onreadystatechange=mxUtils.bind(this,function(){if(4==k.readyState)if(200<=k.status&&299>=k.status)try{var a=k.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(F){c(F)}else c({})}); -k.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(H){c(H)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a, -b,c)}catch(n){c(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(), -this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(n){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(n){null!= -window.console&&console.error(n),c(n)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel= +function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(G){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")}); +else{d=new FormData;d.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(E){c(E)}else c({})}); +l.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(G){c(G)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a, +b,c)}catch(l){c(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(), +this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!= +window.console&&console.error(l),c(l)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel= "strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(d.createSvgDataUri(a)), -f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(B){e(B)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,d,b){c1=a>>2;c2=(a&3)<<4|d>>4;c3=(d&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+ +f,g)}else e({message:mxResources.get("invalidInput")})}catch(x){e(x)}})}catch(B){e(B)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,d,b){c1=a>>2;c2=(a&3)<<4|d>>4;c3=(d&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+ a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType= "blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=d.result,l=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(l+1)))),n=mxUtils.parseXml(k).getElementsByTagName("svg");0<n.length&&(a=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}c(d.result,a, -f)}catch(N){e(N)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,l,m){l=null!=l?l:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&& -!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f= -Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,c,l,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,c,l,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f, -b,c,l,!0);if(0<g.length)return g}catch(z){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)), +f)}catch(O){e(O)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,l,k,m){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&& +!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f= +Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,c,k,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,c,k,!0);if("data:image/svg+xml;"==a.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+1));var g=this.importXml(f, +b,c,k,!0);if(0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)), g=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a= -Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,l);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,l));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"), -mxUtils.bind(this,function(){var d=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(d.container,610,360,!0,!1);d.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length> -this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),k.value=a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(k.value)&&d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d= --1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0, +Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,k);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,k));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"), +mxUtils.bind(this,function(){var d=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(d.container,610,360,!0,!1);d.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;l=null;d.getModel().beginUpdate();try{l=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[l])),"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a)),a.length> +this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),l.value=a,d.updateCellSize(l),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“â€â€˜â€™]))/i.test(l.value)&&d.setLinkForCell(l,l.value),l.geometry.width+=d.gridSize,l.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d= +-1;do a/=1024,d++;while(1024<a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0, 26)||'{"Properties":'==a.substring(0,14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew= -!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))})); +!1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))})); this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c(); else{var f=0,g,l=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText): -c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,k,l,m,p,y,u,z){u=null!=u?u:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,u);null!=p&&p(b)});"image"==b.substring(0,5)?(y=!1,"image/png"== -b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,u),y=!0)),y||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),u&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,k,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=y&& -null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(y,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=y?y:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a), -c,e,!0,null,u);p(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,u));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,l,k;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}l=a.charCodeAt(d++);if(d== -c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l& -15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,l,m,p,y,u,z,x){e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph, -n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,l,k,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,k,m,d,x)}catch(aa){return this.handleError(aa),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==--t){this.spinner.stop(); -if(null!=p)p(y);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<y.length;c++){var e=y[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}l(d)}}),B=0;B<q;B++)mxUtils.bind(this,function(d){var l=a[d];if(null!=l){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+1)))),y=mxUtils.parseXml(p),p= -y.getElementsByTagName("svg");if(0<p.length){var p=p[0],B=x?null:p.getAttribute("content");null!=B&&"<"!=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||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),p=f.getAttribute("height"), -m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,z=f.getAttribute("viewBox");if(null==z||0==z.length)f.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var u=z.split(" ");3<u.length&&(m=parseFloat(u[2]),p=parseFloat(u[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var v=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),B=k(q,l.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(p*v)),l.name);if(isNaN(m)|| -isNaN(p)){var C=new Image;C.onload=mxUtils.bind(this,function(){m=Math.max(1,C.width);p=Math.max(1,C.height);B[0].geometry.width=m;B[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[B[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(f))}return B}}}catch(ea){}return null})):v(d,mxUtils.bind(this,function(){return k(B,"text/xml",b+d*n,c+d* -n,0,0,l.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==l.type){var C=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var E=new Image;E.src=a.target.result;v(d,mxUtils.bind(this,function(){return k(C,"text/xml",b+d*n,c+d*n,E.width,E.height,l.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this, -function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){v(d,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var t=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/m,e/q)):1;return k(g,l.type,b+d*n,c+d*n,Math.round(m*t),Math.round(q*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")}); -return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=a.target.result,k(q,l.type,b+d*n,c+d*n,240,160,l.name,function(a){v(d,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?k(null,l.type,b+d*n,c+d*n,240,160,l.name,function(a){v(d,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?q.readAsDataURL(l):q.readAsText(l)}})(B)});if(g){g=[]; -for(q=0;q<a.length;q++)g.push(a[q]);a=g;this.confirmImageResize(function(a){f=a;v()},y)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), +c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,l,k,m,p,u,t,x){t=null!=t?t:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,t);null!=p&&p(b)});"image"==b.substring(0,5)?(u=!1,"image/png"== +b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,t),u=!0)),u||(b=this.editor.graph,x=a.indexOf(";"),0<x&&(a=a.substring(0,x)+a.substring(a.indexOf(",",x+1))),t&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,l,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=u&& +null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=u?(d=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a), +c,e,!0,null,t);p(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,t));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,k,m;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}k=a.charCodeAt(d++);if(d== +c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k&15)<<2);b+="=";break}m=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(k&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((k& +15)<<2|(m&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,l,k,m,p,u,t,x,y){e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=x||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){g=!0;break}var z=mxUtils.bind(this,function(){var g=this.editor.graph, +n=g.gridSize;l=null!=l?l:mxUtils.bind(this,function(a,b,c,e,f,g,l,k,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,k,m,d,y)}catch(ba){return this.handleError(ba),null}});k=null!=k?k:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,v=[],C=mxUtils.bind(this,function(a,b){v[a]=b;if(0==--u){this.spinner.stop(); +if(null!=p)p(v);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<v.length;c++){var e=v[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}k(d)}}),z=0;z<q;z++)mxUtils.bind(this,function(d){var k=a[d];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=a.target.result,u=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(u+1)))),v=mxUtils.parseXml(p),p= +v.getElementsByTagName("svg");if(0<p.length){var p=p[0],D=y?null:p.getAttribute("content");null!=D&&"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?C(d,mxUtils.bind(this,function(){try{if(q.substring(0,u+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),x=f.getAttribute("height"), +m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,p=f.getAttribute("viewBox");if(null==p||0==p.length)f.setAttribute("viewBox","0 0 "+m+" "+x);else if(isNaN(m)||isNaN(x)){var t=p.split(" ");3<t.length&&(m=parseFloat(t[2]),x=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var D=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,x)),C=l(q,k.type,b+d*n,c+d*n,Math.max(1,Math.round(m*D)),Math.max(1,Math.round(x*D)),k.name);if(isNaN(m)|| +isNaN(x)){var z=new Image;z.onload=mxUtils.bind(this,function(){m=Math.max(1,z.width);x=Math.max(1,z.height);C[0].geometry.width=m;C[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+m+" "+x);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[C[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(ea){}return null})):C(d,mxUtils.bind(this,function(){return l(D,"text/xml",b+d*n,c+d* +n,0,0,k.name)}))}else C(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==k.type){var z=y?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var B=new Image;B.src=a.target.result;C(d,mxUtils.bind(this,function(){return l(z,"text/xml",b+d*n,c+d*n,B.width,B.height,k.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this, +function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){C(d,mxUtils.bind(this,function(){if(null!=g&&g.length<t){var u=f&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(e/m,e/q)):1;return l(g,k.type,b+d*n,c+d*n,Math.round(m*u),Math.round(q*u),k.name)}this.handleError({message:mxResources.get("imageTooBig")}); +return null}))}),f,e,x)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=a.target.result,l(q,k.type,b+d*n,c+d*n,240,160,k.name,function(a){C(d,function(){return a})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?l(null,k.type,b+d*n,c+d*n,240,160,k.name,function(a){C(d,function(){return a})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(z)});if(g){g=[]; +for(q=0;q<a.length;q++)g.push(a[q]);a=g;this.confirmImageResize(function(a){f=a;z()},u)}else z()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"), function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,c)};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);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,l){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(d/k,f/k);if(1<g){var m=Math.round(d/g),n=Math.round(f/g),q=document.createElement("canvas"); -q.width=m;q.height=n;q.getContext("2d").drawImage(a,0,0,m,n);var p=q.toDataURL();if(p.length<b.length){var t=document.createElement("canvas");t.width=m;t.height=n;var u=t.toDataURL();p!==u&&(b=p,d=m,f=n)}}}catch(M){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var k=c,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[c]=k;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a}; -EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=m;m+=b;return a.substring(d,m)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+ -1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==d(a,4)){k=a.substring(0,m-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=g(c.length)+ -b+c+g(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(n){if(null!=c)c(n);else throw n; +OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,l,k){l=null!=l?l:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,k))try{var g=Math.max(d/l,f/l);if(1<g){var m=Math.round(d/g),n=Math.round(f/g),q=document.createElement("canvas"); +q.width=m;q.height=n;q.getContext("2d").drawImage(a,0,0,m,n);var p=q.toDataURL();if(p.length<b.length){var v=document.createElement("canvas");v.width=m;v.height=n;var t=v.toDataURL();p!==t&&(b=p,d=m,f=n)}}}catch(L){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var k=c,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[c]=k;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a}; +EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,l){function d(a,b){var d=k;k+=b;return a.substring(d,k)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+ +1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(d(a,4),"IHDR"!=d(a,4))null!=l&&l();else{d(a,17);l=a.substring(0,k);do{var m=f(a);if("IDAT"==d(a,4)){l=a.substring(0,k-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);l+=g(c.length)+ +b+c+g(e^4294967295);l+=a.substring(k-8,a.length);break}l+=a.substring(k-8,k-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(l){if(null!=c)c(l);else throw l; }};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,f.format, function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(d,"<pre>"+e+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",a.convertDataUri(e),[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([d],[k],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0); c.init()};b.cellEditor.editMermaidData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(c,f.config,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([d],[k],!1));b.setAttributeForCell(d, -"mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(M){a.handleError(M)}}; -b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(I){a.handleError(I)}return d};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!= -a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,d,c){var e=d;d=function(a,d){if(null==d){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(d=c.getAttribute("href"))}null!=d&&b.isCustomLink(d)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(d)&& -mxEvent.consume(a);null!=e&&e(a,d)};l.call(this,a,d,c)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle()); -b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages? -a.pages.length:1:u.apply(this,arguments)};var y=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))y.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b}; -var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", +"mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(L){a.handleError(L)}}; +b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(H){a.handleError(H)}return d};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!= +a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return l.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,d,c){var e=d;d=function(a,d){if(null==d){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(d=c.getAttribute("href"))}null!=d&&b.isCustomLink(d)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(d)&& +mxEvent.consume(a);null!=e&&e(a,d)};k.call(this,a,d,c)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle()); +b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages? +a.pages.length:1:t.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b}; +var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse", !0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave", function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e, f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1, -a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view, -x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", -"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, -function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless|| +a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view, +y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type", +"text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, +function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var x=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:x.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless|| this.editor.editable)){var A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this, function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types, "text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var m=null,c=d.getElementsByTagName("img");null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=d.getElementsByTagName("a"),null!= c&&1==c.length?k=c[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(k=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;q()},mxEvent.isControlDown(a)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1, a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation(); a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var k=f[index]; -if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML= +if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML= " ";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow= "hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML=" ";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown|| b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this, function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b), -this.copyCells(c,!0),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML=" ",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:k.apply(this,arguments)}}; +this.copyCells(c,!0),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML=" ",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:l.apply(this,arguments)}}; EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")|| "Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(), this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged")); @@ -3313,19 +3318,19 @@ function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==u null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&& (d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}), mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(C){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(C){}try{var p=this.editor.graph;if(null!=f&&0<f.length){p.lastPasteXml==f?p.pasteCounter++: -(p.lastPasteXml=f,p.pasteCounter=0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(f))p.setSelectionCells(this.importXml(f,z,z));else{var u=p.getInsertPoint();p.isMouseInsertPoint()&&(z=0,p.lastPasteXml==f&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(f,u.x+z,u.y+z,!0))}p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c|| +(p.lastPasteXml=f,p.pasteCounter=0);var x=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(f))p.setSelectionCells(this.importXml(f,x,x));else{var t=p.getInsertPoint();p.isMouseInsertPoint()&&(x=0,p.lastPasteXml==f&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(f,t.x+x,t.y+x,!0))}p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c|| (p.lastPasteXml=null,p.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML=" "};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&& 12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0); else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))): 0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash= -"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var l=document.documentElement;c=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth, -e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=d+"px";l.style.width=Math.max(0,c-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); +"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var k=document.documentElement;c=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth, +e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=b+"px";k.style.left=d+"px";k.style.width=Math.max(0,c-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a); var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!= -e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(F){this.handleError(F, +e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E, mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(), 200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.target.result.substring(0, -10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c= -this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(z){this.handleError(z)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d= +10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c= +this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(x){this.handleError(x)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d= this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"), null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b= 0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&& @@ -3334,109 +3339,108 @@ a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&& this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow? this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1, -c=!1,e=null,l=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"== -a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ia){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(ba){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey? -mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"== -g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog(); -k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(ba){k.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml; -null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this, -function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,message:g}),"*");return}if("status"== -g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey|| -this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var B=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=this.editor.graph,E=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(B);k.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a= -this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(B)));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);E(a)}),S=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=S){for(var Z=A.getGlobalVariable,A=this.createTemporaryGraph(A.getStylesheet()),X,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==S){X=this.updatePageRoot(this.pages[G]);break}A.getGlobalVariable=function(a){return"page"== -a?X.getName():"pagenumber"==a?1:Z.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=A.model,ga=T.getChildCells(T.getRoot()),m={},G=0;G<g.layerIds.length;G++)m[g.layerIds[G]]=!0;for(G=0;G<ga.length;G++)T.setVisible(ga[G],m[ga[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,g.scale,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL, -"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(B))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?E("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export"); -if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();x.xml=mxUtils.getXml(ja);x.data=this.getFileData(null,null,!0,null,null,null,ja);x.format=g.format}else if("html"==g.format)B=this.editor.getGraphXml(),x.data=this.getHtml(B,this.editor.graph),x.xml=mxUtils.getXml(B),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var U=this.editor.graph.background;U==mxConstants.NONE&&(U=null);x.xml=this.getFileData(!0, -null,null,null,null,null,null,null,null,!1);x.format="svg";var ha=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(x),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(x.xml,this.editor.graph,null,!0,ha,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body, -null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var Y=this.editor.graph.getSvg(U);this.embedFonts(Y,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ha(mxUtils.getXml(a))})):ha(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&& +c=!1,e=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,k=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"== +a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ia){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(aa){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey? +mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&m.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"== +g.action){var n=k(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog(); +m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(aa){m.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var q=1==g.enableRecent,p=1==g.enableSearch,t=1==g.enableCustomTemp,l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml; +null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,p?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this, +function(a,b,d){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==g.action){var y=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:y,message:g}),"*");return}if("status"== +g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var z=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,z):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey|| +this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var B=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,A=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(B);m.postMessage(JSON.stringify(b),"*")}),R=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a= +this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(B)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);A(a)}),S=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=S){for(var Z=D.getGlobalVariable,D=this.createTemporaryGraph(D.getStylesheet()),W,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==S){W=this.updatePageRoot(this.pages[F]);break}D.getGlobalVariable=function(a){return"page"== +a?W.getName():"pagenumber"==a?1:Z.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(W.root)}if(null!=g.layerIds){for(var U=D.model,ga=U.getChildCells(U.getRoot()),l={},F=0;F<g.layerIds.length;F++)l[g.layerIds[F]]=!0;for(F=0;F<ga.length;F++)U.setVisible(ga[F],l[ga[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){R(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){R(null)}),null,null,g.scale,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL, +"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(B))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?A("data:image/png;base64,"+a.getText()):R(null)}),mxUtils.bind(this,function(){R(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);z=this.createLoadMessage("export"); +if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ha=this.getXmlFileData();z.xml=mxUtils.getXml(ha);z.data=this.getFileData(null,null,!0,null,null,null,ha);z.format=g.format}else if("html"==g.format)B=this.editor.getGraphXml(),z.data=this.getHtml(B,this.editor.graph),z.xml=mxUtils.getXml(B),z.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ka=this.editor.graph.background;ka==mxConstants.NONE&&(ka=null);z.xml=this.getFileData(!0, +null,null,null,null,null,null,null,null,!1);z.format="svg";var N=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);m.postMessage(JSON.stringify(z),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,N,null,null,g.embedImages);else if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body, +null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var Y=this.editor.graph.getSvg(ka);this.embedFonts(Y,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){N(mxUtils.getXml(a))})):N(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(z),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&& null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan), -this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(ba){this.handleError(ba)}}var W=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ca){this.handleError(ca)}d= -!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged", -b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")), -"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){W(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this, -function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&W(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){W(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),W(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons= +this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(aa){this.handleError(aa)}}var X=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ca){this.handleError(ca)}d= +!1;null!=urlParams.modified&&this.editor.setStatus("");var k=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=k();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=k();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged", +b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||m.postMessage(JSON.stringify(this.createLoadMessage("load")), +"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(k="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){X(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),k)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this, +function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&X(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){X(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=k(g),X(g,f))}}));var m=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(k,"*")};EditorUi.prototype.addEmbedButtons= function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})), a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),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.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",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.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";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.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()}; -EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,p=null,u=null,z=null,x=null,A=null,t=null,I=null,M="",J="auto",N= -"auto",D=null,E=null,O=40,S=40,Z=100,X=0,G=this.editor.graph;G.getGraphBounds();for(var T=function(){null!=b?b(oa):(G.setSelectionCells(oa),G.scrollCellToVisible(G.getSelectionCell()))},ga=G.getFreeInsertPoint(),ja=ga.x,U=ga.y,ga=U,ha=null,Y="auto",I=null,W=[],ba=null,ia=null,aa=0;aa<d.length&&"#"==d[aa].charAt(0);){a=d[aa];for(aa++;aa<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var ca=a.indexOf(":"); -if(0<ca){var P=mxUtils.trim(a.substring(1,ca)),L=mxUtils.trim(a.substring(ca+1));"label"==P?ha=G.sanitizeHtml(L):"labelname"==P&&0<L.length&&"-"!=L?z=L:"labels"==P&&0<L.length&&"-"!=L?x=JSON.parse(L):"style"==P?m=L:"parentstyle"==P?A=L:"stylename"==P&&0<L.length&&"-"!=L?u=L:"styles"==P&&0<L.length&&"-"!=L?p=JSON.parse(L):"identity"==P&&0<L.length&&"-"!=L?t=L:"parent"==P&&0<L.length&&"-"!=L?I=L:"namespace"==P&&0<L.length&&"-"!=L?M=L:"width"==P?J=L:"height"==P?N=L:"left"==P&&0<L.length?D=L:"top"==P&& -0<L.length?E=L:"ignore"==P?ia=L.split(","):"connect"==P?W.push(JSON.parse(L)):"link"==P?ba=L:"padding"==P?X=parseFloat(L):"edgespacing"==P?O=parseFloat(L):"nodespacing"==P?S=parseFloat(L):"levelspacing"==P?Z=parseFloat(L):"layout"==P&&(Y=L)}}}if(null==d[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ka=this.editor.csvToArray(d[aa]),P=ca=null,L=[],Q=0;Q<ka.length;Q++)t==ka[Q]&&(ca=Q),I==ka[Q]&&(P=Q),L.push(mxUtils.trim(ka[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/, -""));null==ha&&(ha="%"+L[0]+"%");if(null!=W)for(var R=0;R<W.length;R++)null==k[W[R].to]&&(k[W[R].to]={});t=[];for(Q=aa+1;Q<d.length;Q++){var da=this.editor.csvToArray(d[Q]);if(null==da){var pa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(pa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&t.push(da)}G.model.beginUpdate();try{for(Q=0;Q<t.length;Q++){var da=t[Q],K=null,ma=null!=ca?M+da[ca]:null;null!=ma&&(K=G.model.getCell(ma));var d=null!=K,ea=new mxCell(ha,new mxGeometry(ja, -ga,0,0),m||"whiteSpace=wrap;html=1;");ea.vertex=!0;ea.id=ma;for(var fa=0;fa<da.length;fa++)G.setAttributeForCell(ea,L[fa],da[fa]);if(null!=z&&null!=x){var ya=x[ea.getAttribute(z)];null!=ya&&G.labelChanged(ea,ya)}if(null!=u&&null!=p){var za=p[ea.getAttribute(u)];null!=za&&(ea.style=za)}G.setAttributeForCell(ea,"placeholders","1");ea.style=G.replacePlaceholders(ea,ea.style);d&&(G.model.setGeometry(K,ea.geometry),G.model.setStyle(K,ea.style),0>mxUtils.indexOf(e,K)&&e.push(K));K=ea;if(!d)for(R=0;R<W.length;R++)k[W[R].to][K.getAttribute(W[R].to)]= -K;null!=ba&&"link"!=ba&&(G.setLinkForCell(K,K.getAttribute(ba)),G.setAttributeForCell(K,ba,null));G.fireEvent(new mxEventObject("cellsInserted","cells",[K]));var Ca=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=D&&null!=K.getAttribute(D)&&(K.geometry.x=ja+parseFloat(K.getAttribute(D))),null!=E&&null!=K.getAttribute(E)&&(K.geometry.y=U+parseFloat(K.getAttribute(E))),"@"==J.charAt(0)&&null!=K.getAttribute(J.substring(1))?K.geometry.width=parseFloat(K.getAttribute(J.substring(1))):K.geometry.width= -"auto"==J?Ca.width+X:parseFloat(J),"@"==N.charAt(0)&&null!=K.getAttribute(N.substring(1))?K.geometry.height=parseFloat(K.getAttribute(N.substring(1))):K.geometry.height="auto"==N?Ca.height+X:parseFloat(N),ga+=K.geometry.height+S);d?(null==f[ma]&&(f[ma]=[]),f[ma].push(K)):(I=null!=P?G.model.getCell(M+da[P]):null,c.push(K),null!=I?(I.style=G.replacePlaceholders(I,A),G.addCell(K,I)):e.push(G.addCell(K)))}for(var ra=e.slice(),oa=e.slice(),R=0;R<W.length;R++)for(var ta=W[R],Q=0;Q<c.length;Q++){var K=c[Q], -ua=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(G.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?G.replacePlaceholders(l,d.style):G.createCurrentEdgeStyle();oa.push(G.insertEdge(null,null,g||"",d.invert? -f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ua(K,K,ta);if(null!=f[K.id])for(fa=0;fa<f[K.id].length;fa++)ua(K,f[K.id][fa],ta)}if(null!=ia)for(Q=0;Q<c.length;Q++)for(K=c[Q],fa=0;fa<ia.length;fa++)G.setAttributeForCell(K,mxUtils.trim(ia[fa]),null);if(0<e.length){var la=new mxParallelEdgeLayout(G);la.spacing=O;var Aa=function(){0<la.spacing&&la.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));b.y=Math.round(G.snap(b.y));"auto"== -J&&(b.width=Math.round(G.snap(b.width)));"auto"==N&&(b.height=Math.round(G.snap(b.height)))}};if("["==Y.charAt(0)){var Da=T;G.view.validate();this.executeLayoutList(JSON.parse(Y),function(){Aa();Da()});T=null}else if("circle"==Y){var na=new mxCircleLayout(G);na.resetEdges=!1;var La=na.isVertexIgnored;na.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(G.getDefaultParent());Aa()},!0,T);T=null}else if("horizontaltree"==Y|| -"verticaltree"==Y||"auto"==Y&&oa.length==2*e.length-1&&1==ra.length){G.view.validate();var Ba=new mxCompactTreeLayout(G,"horizontaltree"==Y);Ba.levelDistance=S;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(G.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ra.length){G.view.validate();var wa=new mxHierarchicalLayout(G,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing= -S;wa.parallelEdgeSpacing=O;wa.interRankCellSpacing=Z;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(G.getDefaultParent(),oa);G.moveCells(oa,ja,U)},!0,T);T=null}else if("organic"==Y||"auto"==Y&&oa.length>e.length){G.view.validate();var xa=new mxFastOrganicLayout(G);xa.forceConstant=3*S;xa.resetEdges=!1;var Ma=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Ma.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(G);la.spacing=O;this.executeLayout(function(){xa.execute(G.getDefaultParent()); -Aa()},!0,T);T=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=T&&T()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0; -if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b= -u.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&& +EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,p=null,t=null,x=null,y=null,C=null,v=null,A=null,L="",I="auto",O= +"auto",D=null,M=null,R=40,S=40,Z=100,W=0,F=this.editor.graph;F.getGraphBounds();for(var U=function(){null!=b?b(oa):(F.setSelectionCells(oa),F.scrollCellToVisible(F.getSelectionCell()))},ga=F.getFreeInsertPoint(),ha=ga.x,ka=ga.y,ga=ka,N=null,Y="auto",A=null,X=[],aa=null,ia=null,ba=0;ba<d.length&&"#"==d[ba].charAt(0);){a=d[ba];for(ba++;ba<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[ba].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[ba].substring(1)),ba++;if("#"!=a.charAt(1)){var ca=a.indexOf(":"); +if(0<ca){var P=mxUtils.trim(a.substring(1,ca)),K=mxUtils.trim(a.substring(ca+1));"label"==P?N=F.sanitizeHtml(K):"labelname"==P&&0<K.length&&"-"!=K?x=K:"labels"==P&&0<K.length&&"-"!=K?y=JSON.parse(K):"style"==P?m=K:"parentstyle"==P?C=K:"stylename"==P&&0<K.length&&"-"!=K?t=K:"styles"==P&&0<K.length&&"-"!=K?p=JSON.parse(K):"identity"==P&&0<K.length&&"-"!=K?v=K:"parent"==P&&0<K.length&&"-"!=K?A=K:"namespace"==P&&0<K.length&&"-"!=K?L=K:"width"==P?I=K:"height"==P?O=K:"left"==P&&0<K.length?D=K:"top"==P&& +0<K.length?M=K:"ignore"==P?ia=K.split(","):"connect"==P?X.push(JSON.parse(K)):"link"==P?aa=K:"padding"==P?W=parseFloat(K):"edgespacing"==P?R=parseFloat(K):"nodespacing"==P?S=parseFloat(K):"levelspacing"==P?Z=parseFloat(K):"layout"==P&&(Y=K)}}}if(null==d[ba])throw Error(mxResources.get("invalidOrMissingFile"));for(var ja=this.editor.csvToArray(d[ba]),P=ca=null,K=[],Q=0;Q<ja.length;Q++)v==ja[Q]&&(ca=Q),A==ja[Q]&&(P=Q),K.push(mxUtils.trim(ja[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/, +""));null==N&&(N="%"+K[0]+"%");if(null!=X)for(var T=0;T<X.length;T++)null==k[X[T].to]&&(k[X[T].to]={});v=[];for(Q=ba+1;Q<d.length;Q++){var da=this.editor.csvToArray(d[Q]);if(null==da){var pa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(pa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&v.push(da)}F.model.beginUpdate();try{for(Q=0;Q<v.length;Q++){var da=v[Q],J=null,ma=null!=ca?L+da[ca]:null;null!=ma&&(J=F.model.getCell(ma));var d=null!=J,ea=new mxCell(N,new mxGeometry(ha, +ga,0,0),m||"whiteSpace=wrap;html=1;");ea.vertex=!0;ea.id=ma;for(var fa=0;fa<da.length;fa++)F.setAttributeForCell(ea,K[fa],da[fa]);if(null!=x&&null!=y){var ya=y[ea.getAttribute(x)];null!=ya&&F.labelChanged(ea,ya)}if(null!=t&&null!=p){var za=p[ea.getAttribute(t)];null!=za&&(ea.style=za)}F.setAttributeForCell(ea,"placeholders","1");ea.style=F.replacePlaceholders(ea,ea.style);d&&(F.model.setGeometry(J,ea.geometry),F.model.setStyle(J,ea.style),0>mxUtils.indexOf(e,J)&&e.push(J));J=ea;if(!d)for(T=0;T<X.length;T++)k[X[T].to][J.getAttribute(X[T].to)]= +J;null!=aa&&"link"!=aa&&(F.setLinkForCell(J,J.getAttribute(aa)),F.setAttributeForCell(J,aa,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var Aa=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=D&&null!=J.getAttribute(D)&&(J.geometry.x=ha+parseFloat(J.getAttribute(D))),null!=M&&null!=J.getAttribute(M)&&(J.geometry.y=ka+parseFloat(J.getAttribute(M))),"@"==I.charAt(0)&&null!=J.getAttribute(I.substring(1))?J.geometry.width=parseFloat(J.getAttribute(I.substring(1))):J.geometry.width= +"auto"==I?Aa.width+W:parseFloat(I),"@"==O.charAt(0)&&null!=J.getAttribute(O.substring(1))?J.geometry.height=parseFloat(J.getAttribute(O.substring(1))):J.geometry.height="auto"==O?Aa.height+W:parseFloat(O),ga+=J.geometry.height+S);d?(null==f[ma]&&(f[ma]=[]),f[ma].push(J)):(A=null!=P?F.model.getCell(L+da[P]):null,c.push(J),null!=A?(A.style=F.replacePlaceholders(A,C),F.addCell(J,A)):e.push(F.addCell(J)))}for(var ra=e.slice(),oa=e.slice(),T=0;T<X.length;T++)for(var ta=X[T],Q=0;Q<c.length;Q++){var J=c[Q], +ua=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(F.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?F.replacePlaceholders(l,d.style):F.createCurrentEdgeStyle();oa.push(F.insertEdge(null,null,g||"",d.invert? +f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ua(J,J,ta);if(null!=f[J.id])for(fa=0;fa<f[J.id].length;fa++)ua(J,f[J.id][fa],ta)}if(null!=ia)for(Q=0;Q<c.length;Q++)for(J=c[Q],fa=0;fa<ia.length;fa++)F.setAttributeForCell(J,mxUtils.trim(ia[fa]),null);if(0<e.length){var la=new mxParallelEdgeLayout(F);la.spacing=R;var Ba=function(){0<la.spacing&&la.execute(F.getDefaultParent());for(var a=0;a<e.length;a++){var b=F.getCellGeometry(e[a]);b.x=Math.round(F.snap(b.x));b.y=Math.round(F.snap(b.y));"auto"== +I&&(b.width=Math.round(F.snap(b.width)));"auto"==O&&(b.height=Math.round(F.snap(b.height)))}};if("["==Y.charAt(0)){var Da=U;F.view.validate();this.executeLayoutList(JSON.parse(Y),function(){Ba();Da()});U=null}else if("circle"==Y){var na=new mxCircleLayout(F);na.resetEdges=!1;var La=na.isVertexIgnored;na.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(F.getDefaultParent());Ba()},!0,U);U=null}else if("horizontaltree"==Y|| +"verticaltree"==Y||"auto"==Y&&oa.length==2*e.length-1&&1==ra.length){F.view.validate();var Ca=new mxCompactTreeLayout(F,"horizontaltree"==Y);Ca.levelDistance=S;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(F.getDefaultParent(),0<ra.length?ra[0]:null)},!0,U);U=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ra.length){F.view.validate();var wa=new mxHierarchicalLayout(F,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing= +S;wa.parallelEdgeSpacing=R;wa.interRankCellSpacing=Z;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(F.getDefaultParent(),oa);F.moveCells(oa,ha,ka)},!0,U);U=null}else if("organic"==Y||"auto"==Y&&oa.length>e.length){F.view.validate();var xa=new mxFastOrganicLayout(F);xa.forceConstant=3*S;xa.resetEdges=!1;var Ma=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Ma.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(F);la.spacing=R;this.executeLayout(function(){xa.execute(F.getDefaultParent()); +Ba()},!0,U);U=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=U&&U()}}catch(Ha){this.handleError(Ha)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0; +if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var t=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b= +t.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&& null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width- -2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; +2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root, !0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.gitLab||d++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates(); var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c); Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b); this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck= -function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b); +function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b); this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b); this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility); this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&& -(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,l,m){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null, -null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*k/d.view.scale),p=Math.floor(g.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e: -"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()), +(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,m,p){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,m)),"image/svg+xml");else{var f=a.getFileData(!0,null,null, +null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale),n=Math.floor(g.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<p?"&dpi="+p:"")+"&bg="+(null!=e?e: +"none")+"&w="+l+"&h="+n+"&border="+m+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(k,null==e||"none"==e,!0,!1,!1,m,!0,!1,null,null,p):a.exportImage(k,!1,!0,!1,!1,m,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()), this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxUtils.htmlEntities(a));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(c);var e= -document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));l[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0== -a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];l[c.id]&&(b[c.id]=c);var f=this.addCheckbox(e,c.title,l[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b, -mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==l[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(t){this.handleError(t, -mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));for(d in l)b[d]||this.closeLibrary(new RemoteLibrary(this,null,l[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, +document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var p=m[a];if("R"==p.substring(0,1)){var t=JSON.parse(decodeURIComponent(p.substring(1)));k[t[0]]={id:t[0],title:t[1],downloadUrl:t[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0== +a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];k[c.id]&&(b[c.id]=c);var f=this.addCheckbox(e,c.title,k[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b, +mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==k[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(v){this.handleError(v, +mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));for(d in k)b[d]||this.closeLibrary(new RemoteLibrary(this,null,k[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1, allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b= a.msgMarkers,d=this.remoteInvokeCallbacks[b.callbackId];if(null==d)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?d.error&&d.error(a.error.errResp):d.callback&&d.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f); d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var d=mxUtils.bind(this,function(b,d){var c={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=d?c.error={errResp:d}:null!=b&&(c.resp= b);this.remoteWin.postMessage(JSON.stringify(c),"*")});try{var c=a.funtionName,e=this.remoteInvokableFns[c];if(null!=e&&"function"===typeof this[c]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+c+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){d(Array.prototype.slice.apply(arguments))}),m.push(function(a){d(null,a||"Unkown Error")}),this[c].apply(this, -m);else{var p=this[c].apply(this,m);d([p])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(H){d(null,"Invalid Call: An error occured, "+H.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}), -b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src", -"https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml? -b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}}); -a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var p=JSON.parse(a.data);"init"==p.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=p.event||c||(d?null!=p.resp&&0<p.resp.length&&null!=p.resp[0]?(e=p.resp[0],d=!1,k()):g():null!=p.resp&&0<p.resp.length&&null!=p.resp[0]?m(p.resp[0]):l())}}catch(E){try{f= -JSON.stringify(f)}catch(O){}EditorUi.logError("Migration Caught: "+E.message+(0<=E.message.indexOf("JSON")?" >> "+f:""),null,null,null,E,"INFO")}});window.addEventListener("message",a)}})));a(d);d.onversionchange=function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(n){null!=b&&b(n)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f= -d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a, -b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(B){null!=c&&c(B)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value), -b.target.result["continue"]())};e.onerror=b}catch(B){null!=b&&b(B)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(l){null!=b&&b(l)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a= -this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile();null!=d?d.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a? -a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();return null!=d?d.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!= -d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"== -localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null; -var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); -var CommentsWindow=function(a,b,e,c,k,m){function p(){for(var a=y.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==y&&b++;H.style.display=0==b?"block":"none"}function u(a,b,d,c){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}l={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className= -"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){c?(b.parentNode.removeChild(b),p()):e();l=null});n.className="geCommentEditBtn";m.appendChild(n);var t=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();d(a);l=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this, -function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(t.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));t.focus();t.className="geCommentEditBtn gePrimaryBtn";m.appendChild(t);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function x(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo", -[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function t(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className= -"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);c&&(e.style.display="none")}function z(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=E;a(b);return{pdiv:c,replies:d}}function v(c,e,l,m,p){function n(){A(v);b.addReply(x,function(a){x.id=a;b.replies.push(x);f(v);l&&l()},function(b){t();d(v);a.handleError(b,null, -null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){u(x,v,function(a){n()},!0)}var q=z().pdiv,x=a.newComment(c,a.getCurrentUser());x.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=g(x,b.replies,q,k+1);e?t():n()}if(m||!b.isResolved){H.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite"); -var B=document.createElement("div");B.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;B.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";B.appendChild(F);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,b.user.displayName||"");F.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",b.id);x(b, -O);F.appendChild(O);E.appendChild(B);B=document.createElement("div");B.className="geCommentTxt";mxUtils.write(B,b.content||"");E.appendChild(B);B=document.createElement("div");B.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";B.appendChild(D);q||0!=k&&!n||t(mxResources.get("reply"),function(){v("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||q||(t(mxResources.get("edit"),function(){function c(){u(b,E,function(){A(E);b.editComment(b.content, -function(){f(E)},function(b){d(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),t(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(E);b.deleteComment(function(){for(var a=z(b).replies,d=0;d<a.length;d++)y.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}H.style.display=0==y.getElementsByTagName("div").length?"block":"none"},function(b){d(E);a.handleError(b,null,null, -null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=k||t(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=z(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"), -k=0;k<l.length;k++)l[k]!=d.parentNode&&(l[k].style.display=c);C||(e[g].style.display="none")}p()}b.isResolved?v(mxResources.get("reOpened")+": ",!0,d,!1,!0):v(mxResources.get("markedAsResolved"),!1,d,!0)});E.appendChild(B);null!=e?y.insertBefore(E,e.nextSibling):y.appendChild(E);for(e=0;null!=b.replies&&e<b.replies.length;e++)B=b.replies[e],B.isResolved=b.isResolved,g(B,b.replies,null,k+1,m);null!=l&&(l.comment.id==b.id?(m=b.content,b.content=l.comment.content,u(b,E,l.saveCallback,l.deleteOnCancel), -b.content=m):null==l.comment.id&&l.comment.pCommentId==b.id&&(y.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel)));return E}}var q=!a.canComment(),n=a.canReplyToReplies(),l=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var v=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": -Dialog.backdropColor;y.style.bottom=parseInt(v)+7+"px";B.appendChild(y);var H=document.createElement("span");H.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(H,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=v;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter= -"none");v=document.createElement("a");v.className="geButton";mxClient.IS_QUIRKS&&(v.style.filter="none");if(!q){var F=v.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){u(e,l,function(b){A(l);a.addComment(b,function(a){b.id=a;t.push(b);f(l)},function(b){d(l);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, -!0)}var e=a.newComment("",a.getCurrentUser()),l=g(e,t,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=v.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&& -(F=v.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(v=v.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',v.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& -(v.style.filter="invert(100%)"),mxEvent.addListener(v,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(v));B.appendChild(z);var t=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l)try{l.div=l.div.cloneNode(!0);var b=l.div.querySelector(".geCommentEditTxtArea"),d=l.div.querySelector(".geCommentEditBtns");l.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ -IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});y.innerHTML="";y.appendChild(H);H.style.display="block";t=a;for(a=0;a<t.length;a++)b(t[a].replies), -g(t[a],t,null,0,C);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(y.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel))},mxUtils.bind(this,function(a){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(x(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])} -if(this.window.isVisible()){for(var b=y.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<t.length;c++)a(t[c])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),B,b,e,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, -mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var a=this.window.getX(), -b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,k,m,p,u,x,A,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b); -f.appendChild(g);null!=A&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),g.appendChild(b),f.appendChild(g));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom= -"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var n=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(q.checked)});A.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);f.appendChild(A);x?(A.style.marginTop= -"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),f.appendChild(g),mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){n.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; +m);else{var p=this[c].apply(this,m);d([p])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(G){d(null,"Invalid Call: An error occured, "+G.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}), +b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display= +"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this, +function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(O){console.log(O)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(O){console.log(O)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f= +{};try{f=JSON.parse(a.data)}catch(D){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||c||(d?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],d=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(D){console.log(D)}});window.addEventListener("message",a)}})));a(d);d.onversionchange= +function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.removeDatabaseItem= +function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(B){null!=c&&c(B)}}),c)};EditorUi.prototype.getDatabaseItems= +function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(B){null!=b&&b(B)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys(); +e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile(); +null!=d?d.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();return null!=d?d.newComment(a,b):new DrawioComment(this,null, +a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName= +function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"=== +e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})(); +var CommentsWindow=function(a,b,e,c,k,m){function p(){for(var a=u.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==u&&b++;G.style.display=0==b?"block":"none"}function t(a,b,d,c){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}n={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className= +"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){c?(b.parentNode.removeChild(b),p()):e();n=null});m.className="geCommentEditBtn";l.appendChild(m);var q=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();d(a);n=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this, +function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(q.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));q.focus();q.className="geCommentEditBtn gePrimaryBtn";l.appendChild(q);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function y(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo", +[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function x(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className= +"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});R.appendChild(e);c&&(e.style.display="none")}function D(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=z;a(b);return{pdiv:c,replies:d}}function v(c,e,l,m,n){function p(){A(y);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(y);l&&l()},function(b){q();d(y);a.handleError(b,null, +null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function q(){t(v,y,function(a){p()},!0)}var x=D().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var y=g(v,b.replies,x,k+1);e?q():p()}if(m||!b.isResolved){G.style.display="none";var z=document.createElement("div");z.className="geCommentContainer";z.setAttribute("data-commentId",b.id);z.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(z.style.backgroundColor="ghostWhite"); +var B=document.createElement("div");B.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;B.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";B.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,b.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",b.id);y(b, +M);E.appendChild(M);z.appendChild(B);B=document.createElement("div");B.className="geCommentTxt";mxUtils.write(B,b.content||"");z.appendChild(B);B=document.createElement("div");B.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";B.appendChild(R);q||0!=k&&!l||x(mxResources.get("reply"),function(){v("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||q||(x(mxResources.get("edit"),function(){function c(){t(b,z,function(){A(z);b.editComment(b.content, +function(){f(z)},function(b){d(z);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),x(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(z);b.deleteComment(function(){for(var a=D(b).replies,d=0;d<a.length;d++)u.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}G.style.display=0==u.getElementsByTagName("div").length?"block":"none"},function(b){d(z);a.handleError(b,null,null, +null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=k||x(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=D(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"), +l=0;l<k.length;l++)k[l]!=d.parentNode&&(k[l].style.display=c);C||(e[g].style.display="none")}p()}b.isResolved?v(mxResources.get("reOpened")+": ",!0,d,!1,!0):v(mxResources.get("markedAsResolved"),!1,d,!0)});z.appendChild(B);null!=e?u.insertBefore(z,e.nextSibling):u.appendChild(z);for(e=0;null!=b.replies&&e<b.replies.length;e++)B=b.replies[e],B.isResolved=b.isResolved,g(B,b.replies,null,k+1,m);null!=n&&(n.comment.id==b.id?(m=b.content,b.content=n.comment.content,t(b,z,n.saveCallback,n.deleteOnCancel), +b.content=m):null==n.comment.id&&n.comment.pCommentId==b.id&&(u.appendChild(n.div),t(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return z}}var q=!a.canComment(),l=a.canReplyToReplies(),n=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var z=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke": +Dialog.backdropColor;u.style.bottom=parseInt(z)+7+"px";B.appendChild(u);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,mxResources.get("noCommentsFound"));var x=document.createElement("div");x.className="geToolbarContainer geCommentsToolbar";x.style.height=z;x.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";x.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(x.style.filter= +"none");z=document.createElement("a");z.className="geButton";mxClient.IS_QUIRKS&&(z.style.filter="none");if(!q){var E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){t(e,k,function(b){A(k);a.addComment(b,function(a){b.id=a;v.push(b);f(k)},function(b){d(k);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})}, +!0)}var e=a.newComment("",a.getCurrentUser()),k=g(e,v,null,0);c();b.preventDefault();mxEvent.consume(b)});x.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});x.appendChild(E);a.commentsRefreshNeeded()&& +(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),x.appendChild(E));a.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&& +(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),x.appendChild(z));B.appendChild(x);var v=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var b=n.div.querySelector(".geCommentEditTxtArea"),d=n.div.querySelector(".geCommentEditBtns");n.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+ +IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});u.innerHTML="";u.appendChild(G);G.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies), +g(v[a],v,null,0,C);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(u.appendChild(n.div),t(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(a){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;x=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(y(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])} +if(this.window.isVisible()){for(var b=u.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<v.length;c++)a(v[c])}});setInterval(x,6E4);this.refreshCommentsTime=x;this.window=new mxWindow(mxResources.get("comments"),B,b,e,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW, +mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var L=mxUtils.bind(this,function(){var a=this.window.getX(), +b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",L);this.destroy=function(){mxEvent.removeListener(window,"resize",L);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,k,m,p,t,y,A,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b); +f.appendChild(g);null!=A&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),g.appendChild(b),f.appendChild(g));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";null!=t&&(m.innerHTML=t+"<br>"+m.innerHTML,m.style.paddingBottom= +"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var l=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(q.checked)});A.appendChild(l);null!=p?(l.innerHTML=p+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);f.appendChild(A);y?(A.style.marginTop= +"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),f.appendChild(g),mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){l.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))}; function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))}; function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))} @@ -3450,9 +3454,9 @@ this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pa a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})): "undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}}; EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var c=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(c.setViewState(b),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+b.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+b.scrollTop,c.restoreSelection(e))}; -Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(x){console.log("ExtFonts format error: "+x.message)}return{gridEnabled:"0"!= +Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,t=a.getAttribute("extFonts");if(t)try{t=t.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(y){console.log("ExtFonts format error: "+y.message)}return{gridEnabled:"0"!= a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(c)||isNaN(k)?"undefined"=== -typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}}; +typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:t||[]}}; Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold", null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math", null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))}; @@ -3478,9 +3482,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth- e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k= null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);c=this.createPageMenuTab(); -this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var u=this.createControlTab(4," ❯"); -u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var x=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=x+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100: -50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; +this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4," ❮ ");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var t=this.createControlTab(4," ❯"); +t.style.position="absolute";t.style.right=this.editor.chromeless?"0px":"29px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var y=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=y+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,y-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100: +50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,y-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()}; EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle= "none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b}; EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e}; @@ -3490,7 +3494,7 @@ function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUt mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a}; EditorUi.prototype.createTabForPage=function(a,b,e,c){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e}; EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu(); -this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),x=mxEvent.getClientY(m);p.popup(u,x,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))}; +this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var t=mxEvent.getClientX(m),y=mxEvent.getClientY(m);p.popup(t,y,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))}; EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var e=this.getSearch("create title mode url drive splash state".split(" ")),e=e+((0==e.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+e+"#"+b.getHash()}}return null}; EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);var k=this.getLinkForPage(a);null!=k&&(e.addSeparator(c),e.addItem(mxResources.get("link"),null, mxUtils.bind(this,function(){var a=new EmbedDialog(this,k);this.showDialog(a.container,440,240,!0,!0);a.init()}),c));e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(c),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null, @@ -3498,66 +3502,65 @@ null,null,!0,!0))}),c))})};(function(){var a=EditorUi.prototype.refresh;EditorUi (function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){a=c.previous;c.previous=c.name;c.name=a;return c};mxCodecRegistry.register(a)})(); (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,c,k){k.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(k.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(a,c){return 0>mxUtils.indexOf(b, a)?c:void 0})),null!=c.relatedPage.root&&a.encodeCell(c.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(k.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState")); -b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(k.relatedPage.root=a.decodeCell(c,!1),k=c.nextSibling,c.parentNode.removeChild(c),c=k;null!=c;){k=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var e=c.getAttribute("id");null==a.lookup(e)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]= -"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,e,u,x){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var k=e.slice(),d=[],f=0;f<e.length;f++){var g=this.view.getState(e[f]),m=null!=g?g.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&d.push(b);a!=e[f]&&d.push(a);return a==e[f]||!this.model.isCollapsed(a)})), -this.model.setCollapsed(e[f],a))}for(f=0;f<d.length;f++)this.model.setVisible(d[f],!a);e=k;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return B.isVertex(a)&&e(a)}function c(a){var b=!1;null!=a&&(b=l.view.getState(a),b="1"==(null!=b?b.style:l.getCellStyle(a)).treeMoving); -return b}function e(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function x(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y== -a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function A(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=x(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH|| -f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var n=l.getOutgoingEdges(l.model.getTerminal(c[0], -!0));if(null!=n){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=c=0;q<n.length;q++){var u=l.model.getTerminal(n[q],!1);if(f==x(u)){var z=l.view.getState(u);u!=a&&null!=z&&(t&&b!=z.getCenterX()<k.getCenterX()||!t&&b!=z.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,z)&&(c=10+Math.max(c,(Math.min(p.x+p.width,z.x+z.width)-Math.max(p.x,z.x))/m),g=10+Math.max(g,(Math.min(p.y+p.height,z.y+z.height)-Math.max(p.y,z.y))/m))}}t?g=0:c=0;for(q=0;q<n.length;q++)if(u=l.model.getTerminal(n[q], -!1),f==x(u)&&(z=l.view.getState(u),u!=a&&null!=z&&(t&&b!=z.getCenterX()<k.getCenterX()||!t&&b!=z.getCenterY()<k.getCenterY()))){var v=[];l.traverse(z.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});l.moveCells(v,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=x(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1); -var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b= -l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=l.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),p=x(a),n=l.view.translate,t=l.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/t-n.x-e.x+10,c[1].geometry.y+=c[1].geometry.height- -e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/t-n.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height+e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width+e.x+40):c[1].geometry.x+(c[1].geometry.width-e.x+40),c[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(m.y+m.height)/t-n.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function g(a, -b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST|| -c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&l.setSelectionCell(d[c].cell)))))}var n=this,l=n.editor.graph,B=l.getModel(),v=n.menus.createPopupMenu; -n.menus.createPopupMenu=function(a,c,d){v.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&& -1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c], -!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}}, -null,null,"Alt+Shift+D");var y=l.removeCells;l.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var g=a[f];B.isEdge(g)&&e(g)&&(d.push(g),g=B.getTerminal(g,!1));if(b(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==l.getIncomingEdges(a).length)return k.push(a),!0;k=[];return!1});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(a[f]),a=a.concat(g))}else null!= -g&&d.push(a[f])}a=d;return y.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var H=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=H.call(this,a,c);if(k.length==a.length)for(e= -0;e<a.length;e++)if(b(a[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var p=this.cloneCell(g[0]);this.addEdge(p,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=l.moveCells;l.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var p=f,n=this.view.getState(f),t=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(t,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])|| -l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var u=l.getIncomingEdges(a[0]);if(0<u.length){var v=l.view.getState(l.model.getTerminal(u[0],!0));if(null!=v){var x=l.view.getState(p);null!=x&&(c=(x.getCenterX()-v.getCenterX())/l.view.scale,d=(x.getCenterY()-v.getCenterY())/l.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&& -0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],p,!0);else if(b(a[q])&&(u=l.getIncomingEdges(a[q]),0<u.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],p,!0);else if(0==l.getIncomingEdges(m[q]).length){n=p;if(null==n||n==l.model.getParent(a[q]))n=l.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,l.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var F=n.sidebar.dropAndConnect; -n.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},t= -n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(c=A(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],!1)):l.setSelectionCell(c[c.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())), -l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=C[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH), -mxEvent.consume(a))}}catch(Z){console.log("error",Z)}mxEvent.isConsumed(a)||t.apply(this,arguments)};var I=l.connectVertex;l.connectVertex=function(a,c,e,g,k,m){var p=l.getIncomingEdges(a);return b(a)&&0<p.length?(e=x(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):A(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):I.call(this,a,c,e,g,k,m)};l.getSubtree=function(a){var d=[a];!c(a)&& -!b(a)||u(a)||l.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var d=this.graph.model.getParent(this.state.cell),d=this.graph.view.getState(d);(c(this.state.cell)||b(this.state.cell))&&(null==d||"flowLayout"!=d.style.childLayout)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a), +b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(k.relatedPage.root=a.decodeCell(c,!1),k=c.nextSibling,c.parentNode.removeChild(c),c=k;null!=c;){k=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var e=c.getAttribute("id");null==a.lookup(e)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,m,p,t){e=null!=e?e:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var c=m.slice(),k=[],d=0;d<m.length;d++){var f=this.view.getState(m[d]),g=null!=f?f.style:this.getCellStyle(m[d]);"1"==mxUtils.getValue(g,"treeFolding","0")&&(this.traverse(m[d],!0,mxUtils.bind(this,function(a,b){null!=b&& +k.push(b);a!=m[d]&&k.push(a);return a==m[d]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[d],b))}for(d=0;d<k.length;d++)this.model.setVisible(k[d],!b);m=c;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return n.isVertex(a)&&e(a)}function b(a){var b=!1;null!= +a&&(b=l.view.getState(a),b="1"==(null!=b?b.style:l.getCellStyle(a)).treeMoving);return b}function e(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function p(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function t(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]), +null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function y(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0], +l.model.getTerminal(c[0],!0),!0);var f=t(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width- +10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(c[0],!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,x=g=c=0;x<p.length;x++){var v=l.model.getTerminal(p[x],!1);if(f==t(v)){var u=l.view.getState(v);v!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(c=10+Math.max(c,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),g=10+Math.max(g, +(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?g=0:c=0;for(x=0;x<p.length;x++)if(v=l.model.getTerminal(p[x],!1),f==t(v)&&(u=l.view.getState(v),v!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var y=[];l.traverse(u.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});l.moveCells(y,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function A(a){l.model.beginUpdate();try{var b=t(a),d=l.getIncomingEdges(a), +c=l.cloneCells([d[0],a]);l.model.setTerminal(d[0],c[1],!1);l.model.setTerminal(c[0],c[1],!0);l.model.setTerminal(c[0],a,!1);var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(c[1].geometry.x-=f.x,c[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&& +(m=0);l.moveCells(g,k,m);return l.addCells(c,e)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=l.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),n=t(a),p=l.view.translate,q=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x= +null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/q-p.x-e.x+10,c[1].geometry.y+=c[1].geometry.height-e.y+40):n==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/q-p.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height+e.y+40):(c[1].geometry.x=n==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width+e.x+40):c[1].geometry.x+(c[1].geometry.width-e.x+40),c[1].geometry.y=null==m?a.geometry.y+(a.geometry.height- +c[1].geometry.height)/2:(m.y+m.height)/q-p.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function f(a,b,d){a=l.getOutgoingEdges(a);d=l.view.getState(d);var c=[];if(null!=d&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,d.x+d.width)>=Math.max(f.x,d.x)||b&&Math.min(f.y+f.height,d.y+d.height)>=Math.max(f.y,d.y))&&c.push(f)}c.sort(function(a,d){return b?a.x+a.width-d.x-d.width:a.y+a.height-d.y-d.height})}return c} +function g(a,b){var d=t(a),c=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==c&&d!=b?q.actions.get("selectParent").funct():d==b?(c=l.getOutgoingEdges(a),null!=c&&0<c.length&&l.setSelectionCell(l.model.getTerminal(c[0],!1))):(d=l.getIncomingEdges(a),null!=d&&0<d.length&&(c=f(l.model.getTerminal(d[0],!0),c,a),d=l.view.getState(a),null!=d&&(d=mxUtils.indexOf(c,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST? +-1:1,0<=d&&d<=c.length-1&&l.setSelectionCell(c[d].cell)))))}var q=this,l=q.editor.graph,n=l.getModel(),B=q.menus.createPopupMenu;q.menus.createPopupMenu=function(b,d,c){B.apply(this,arguments);if(1==l.getSelectionCount()){d=l.getSelectionCell();var e=l.getOutgoingEdges(d);b.addSeparator();0<e.length&&(a(l.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,c),this.addMenuItems(b,["selectDescendants"],null,c));a(l.getSelectionCell())&&(b.addSeparator(),0<l.getIncomingEdges(d).length&& +this.addMenuItems(b,["selectSiblings","selectParent"],null,c))}};q.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");q.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&& +(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");q.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");q.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a= +l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,d){null!=d&&b.push(d);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var z=l.removeCells;l.removeCells=function(b,d){d=null!=d?d:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));d&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var c=[],f=0;f<b.length;f++){var g=b[f];n.isEdge(g)&&e(g)&&(c.push(g),g=n.getTerminal(g,!1));if(a(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==l.getIncomingEdges(a).length)return k.push(a), +!0;k=[];return!1});0<k.length&&(c=c.concat(k),g=l.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&c.push(b[f])}b=c;return z.apply(this,arguments)};q.hoverIcons.getStateAt=function(b,d,c){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,c))};var u=l.duplicateCells;l.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();for(var c=b.slice(0),e=0;e<c.length;e++){var f=l.view.getState(c[e]);if(null!=f&&a(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f], +b)}this.model.beginUpdate();try{var k=u.call(this,b,d);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(b[e]);if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var G=l.moveCells;l.moveCells=function(b,d,c,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),q=null!=p?p.style:this.getCellStyle(f); +if(null!=b&&a(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var x=0;x<b.length;x++)if(a(b[x])||l.model.isEdge(b[x])&&null==l.model.getTerminal(b[x],!0)){f=l.model.getParent(b[x]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var t=l.getIncomingEdges(b[0]);if(0<t.length){var v=l.view.getState(l.model.getTerminal(t[0],!0));if(null!=v){var u=l.view.getState(n);null!=u&&(d=(u.getCenterX()-v.getCenterX())/l.view.scale,c=(u.getCenterY()-v.getCenterY())/l.view.scale)}}}}m=G.apply(this,arguments); +if(null!=m&&null!=b&&m.length==b.length)for(x=0;x<m.length;x++)if(this.model.isEdge(m[x]))a(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[x],!0))&&this.model.setTerminal(m[x],n,!0);else if(a(b[x])&&(t=l.getIncomingEdges(b[x]),0<t.length))if(!e)a(n)&&0>mxUtils.indexOf(b,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==l.getIncomingEdges(m[x]).length){p=n;if(null==p||p==l.model.getParent(b[x]))p=l.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,l.getDefaultParent(), +p,m[x])}}finally{this.model.endUpdate()}return m};if(null!=q.sidebar){var x=q.sidebar.dropAndConnect;q.sidebar.dropAndConnect=function(b,d,c,e){var f=l.model,g=null;f.beginUpdate();try{if(g=x.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var E={88:q.actions.get("selectChildren"),84:q.actions.get("selectSubtree"), +80:q.actions.get("selectParent"),83:q.actions.get("selectSiblings")},C=q.onKeyDown;q.onKeyDown=function(b){try{if(l.isEnabled()&&!l.isEditing()&&a(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==b.which?c=mxEvent.isShiftDown(b)?A(l.getSelectionCell()):d(l.getSelectionCell()):13==b.which&&(c=y(l.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0], +!1)):l.setSelectionCell(c[c.length-1]),null!=q.hoverIcons&&q.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=E[b.keyCode];null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(g(l.getSelectionCell(), +mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(g(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(S){console.log("error",S)}mxEvent.isConsumed(b)||C.apply(this,arguments)};var v=l.connectVertex;l.connectVertex=function(b,c,e,f,g,k){var m=l.getIncomingEdges(b);return a(b)&&0<m.length?(e=t(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?d(b):f==g?A(b):y(b,c!=mxConstants.DIRECTION_NORTH&& +c!=mxConstants.DIRECTION_WEST)):v.call(this,b,c,e,f,g,k)};l.getSubtree=function(d){var c=[d];!b(d)&&!a(d)||p(d)||l.traverse(d,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage), this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0; -this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;n.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var N=mxVertexHandler.prototype.setHandlesVisible; -mxVertexHandler.prototype.setHandlesVisible=function(a){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var D=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this, +this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;q.hoverIcons.reset();mxEvent.consume(a)})))};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible; +mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){O.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=e.apply(this, arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);var d=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); -f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);g.insertEdge(k, -!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");m.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");l.geometry.relative=!0;l.edge= -!0;b.insertEdge(l,!0);m.insertEdge(l,!1);a.insert(e);a.insert(f);a.insert(k);a.insert(l);a.insert(b);a.insert(c);a.insert(d);a.insert(g);a.insert(m);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], +e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);c.insertEdge(e,!1);var k=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");k.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); +d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);k.insertEdge(d,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);f.insertEdge(g, +!1);var q=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");q.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");l.geometry.relative=!0;l.edge= +!0;b.insertEdge(l,!0);q.insertEdge(l,!1);a.insert(e);a.insert(d);a.insert(g);a.insert(l);a.insert(b);a.insert(c);a.insert(k);a.insert(f);a.insert(q);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a], a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;"); b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;");a.vertex=!0;var b= new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;"); a.vertex=!0;var c=new mxCell("Organization",new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;"); -k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);e.insertEdge(k,!1);var d=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);d.insertEdge(f,!1);a.insert(k);a.insert(f);a.insert(c);a.insert(e); -a.insert(d);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division", +k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);e.insertEdge(k,!1);var A=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");A.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);A.insertEdge(d,!1);a.insert(k);a.insert(d);a.insert(c);a.insert(e); +a.insert(A);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division", new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections", function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section", new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,a,c],220,60, "Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&& -a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; -g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";d.className="geTitle";d.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries|| -"1"==urlParams.embed&&"1"!=urlParams.libraries)d.style.bottom="0";else if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d, -"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d= -c("newLibrary",mxResources.get("newLibrary")),d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.boxSizing="border-box",d.style.paddingRight="6px",d.style.paddingLeft="6px",d.style.height="32px",d.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0, +a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,b.container.clientHeight-30),function(b){function d(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;"; +g.className="geTitle";b.appendChild(g);return g}var c=document.createElement("div");c.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";c.className="geTitle";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(c,mxResources.get("moreShapes"));b.appendChild(c);mxEvent.addListener(c,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if(!Editor.enableCustomLibraries|| +"1"==urlParams.embed&&"1"!=urlParams.libraries)c.style.bottom="0";else if(null!=a.actions.get("newLibrary")){c=document.createElement("div");c.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";c.className="geTitle";var f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c, +"click",a.actions.get("newLibrary").funct);c=document.createElement("div");c.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";c.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("openLibrary"));c.appendChild(f);b.appendChild(c);mxEvent.addListener(c,"click",a.actions.get("openLibrary").funct)}else c= +d("newLibrary",mxResources.get("newLibrary")),c.style.boxSizing="border-box",c.style.paddingRight="6px",c.style.paddingLeft="6px",c.style.height="32px",c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.boxSizing="border-box",c.style.paddingRight="6px",c.style.paddingLeft="6px",c.style.height="32px",c.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0, 0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+ -(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(c)}catch(l){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); +(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var k=function(a,b,c,d,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1); this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&& (this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src; mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR= "#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor= "#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer; -EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900> -e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):u.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat= +EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900> +e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):t.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat= "no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var A=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){A.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;"; a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a"); b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})), @@ -3578,7 +3581,7 @@ c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs") a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "), b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a, b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"], -b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d, +b)})))};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d, e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display= "inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?p.insertBefore(g,k.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown", mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function d(a,b){var c=document.createElement("div");c.className= @@ -3591,16 +3594,16 @@ b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;b d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="), 640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="): null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="): -null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(f=u.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor= -"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),O=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}n.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&& -null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,u=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative"; -k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var x=k.descriptorChanged;k.descriptorChanged=function(){x.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub": +null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==R&&(f=t.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor= +"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),R=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=R&&(R.parentNode.removeChild(R),R=null))}l.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&& +null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,t=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative"; +k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var y=k.descriptorChanged;k.descriptorChanged=function(){y.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub": "gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};k.setStatusText(k.editor.getStatus());p.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer; -k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var N=k.menus.get("viewZoom"); -if(null!=N){this.tabContainer.style.right="70px";var D=u.addMenu("100%",N.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none"; -D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";A.appendChild(D);N=mxUtils.bind(this,function(){D.innerHTML=Math.round(100* -k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,N);k.editor.addListener("resetGraphView",N);k.editor.addListener("pageSelected",N);var E=k.setGraphEnabled;k.setGraphEnabled=function(){E.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(k.tabContainer);A.appendChild(p);A.appendChild(k.diagramContainer); -g.appendChild(A);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}}; +k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var O=k.menus.get("viewZoom"); +if(null!=O){this.tabContainer.style.right="70px";var D=t.addMenu("100%",O.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none"; +D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";A.appendChild(D);O=mxUtils.bind(this,function(){D.innerHTML=Math.round(100* +k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,O);k.editor.addListener("resetGraphView",O);k.editor.addListener("pageSelected",O);var M=k.setGraphEnabled;k.setGraphEnabled=function(){M.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(k.tabContainer);A.appendChild(p);A.appendChild(k.diagramContainer); +g.appendChild(A);k.updateTabContainer();var R=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}}; (function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,c,k,m,p){this.file=a;this.id=b;this.content=e;this.modifiedDate=c;this.createdDate=k;this.isResolved=m;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,c,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,c,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=c;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement; Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.allowZoomIn=!1; GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100; @@ -3626,23 +3629,23 @@ c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this. "100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)){var m=null;null!=e&&b.height+2*this.graph.border>e-2&&(m=(e-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale), Math.floor(this.graph.border-b.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;p()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"}; GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"}; -GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],c=this.graphConfig.layerIds,k=null!=c&&0<c.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),x=0;x<u;x++)p.setVisible(p.getChildAt(p.root,x),null!=b?m.isVisible(m.getChildAt(m.root,x)):!1);if(null==m)if(k)for(x=0;x<c.length;x++)p.setVisible(p.getCell(c[x]),!0);else for(x=0;x<e.length;x++)p.setVisible(p.getChildAt(p.root, -parseInt(e[x])),!0)}finally{p.endUpdate()}}}; +GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],c=this.graphConfig.layerIds,k=null!=c&&0<c.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var t=p.getChildCount(p.root),y=0;y<t;y++)p.setVisible(p.getChildAt(p.root,y),null!=b?m.isVisible(m.getChildAt(m.root,y)):!1);if(null==m)if(k)for(y=0;y<c.length;y++)p.setVisible(p.getCell(c[y]),!0);else for(y=0;y<e.length;y++)p.setVisible(p.getChildAt(p.root, +parseInt(e[y])),!0)}finally{p.endUpdate()}}}; GraphViewer.prototype.addToolbar=function(){function a(a,b,c,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave", function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);d++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box"; e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,m=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this, function(){mxUtils.setOpacity(e,0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER? -"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,x=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY(); -this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<x&&Math.abs(this.scrollTop-u.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var A=this.toolbarItems,d=0,f=null,g=null,q=0;q<A.length;q++){var n=A[q];if("pages"==n){g=b.ownerDocument.createElement("div"); -g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var l=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");l.style.borderRightStyle="none";l.style.paddingLeft="0px";l.style.paddingRight="0px";e.appendChild(g);var B=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ -1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";n=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";l.style.display=g.style.display;B.style.display=g.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, -mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var v=this.graph.getModel(),y=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f), -f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=y.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+ -"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){y.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});y.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n], -null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A, -70),e.appendChild(A));this.minToolbarWidth=34*d;var H=b.style.border,A=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top- -c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==H&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f), -f=null);b.style.border=H});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",A):A()}; +"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var t=this.graph,y=t.getTolerance();t.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY(); +this.scrollLeft=t.container.scrollLeft;this.scrollTop=t.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-t.container.scrollLeft)<y&&Math.abs(this.scrollTop-t.container.scrollTop)<y&&Math.abs(this.startX-b.getGraphX())<y&&Math.abs(this.startY-b.getGraphY())<y&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var A=this.toolbarItems,d=0,f=null,g=null,q=0;q<A.length;q++){var l=A[q];if("pages"==l){g=b.ownerDocument.createElement("div"); +g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(g);var B=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+ +1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";l=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=g.style.display;B.style.display=g.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage, +mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==l){if(this.layersEnabled){var z=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f), +f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=u.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+ +"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});u.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l], +null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A, +70),e.appendChild(A));this.minToolbarWidth=34*d;var G=b.style.border,A=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top- +c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==G&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f), +f=null);b.style.border=G});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",A):A()}; GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isCustomLink(c)?mxEvent.consume(e):a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null!=c&&null==b&&a.isCustomLink(c)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&& a.customLinkClicked(c)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))}; GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&& @@ -3652,10 +3655,10 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length? this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var c=Graph.prototype.shadowId;Graph.prototype.shadowId= "lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=c;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled= -!0;p.apply(this,arguments)};var u=k.editor.graph,x=u.container;x.style.overflow="hidden";this.lightboxChrome?(x.style.border="1px solid #c0c0c0",x.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var A=this;u.getImageFromBundles=function(a){return A.getImageUrl(a)};var d=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return A.getImageUrl(a)};return a}; -this.graphConfig.move&&(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(x.style,"border-radius","4px"),x.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(x.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(x.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,k);window.setTimeout(mxUtils.bind(this,function(){x.style.outline="none"; -x.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(x);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(x.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(x.style.position="absolute",x.style.display="block",x.style.left= -a.x+"px",x.style.top=a.y+"px",x.style.width=document.body.clientWidth-80+"px",x.style.height=document.body.clientHeight-80+"px",x.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k}; +!0;p.apply(this,arguments)};var t=k.editor.graph,y=t.container;y.style.overflow="hidden";this.lightboxChrome?(y.style.border="1px solid #c0c0c0",y.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var A=this;t.getImageFromBundles=function(a){return A.getImageUrl(a)};var d=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return A.getImageUrl(a)};return a}; +this.graphConfig.move&&(t.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(y.style,"border-radius","4px"),y.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(y.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(y.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){y.style.outline="none"; +y.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(y);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(y.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(y.style.position="absolute",y.style.display="block",y.style.left= +a.x+"px",y.style.top=a.y+"px",y.style.width=document.body.clientWidth-80+"px",y.style.height=document.body.clientHeight-80+"px",y.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k}; GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})}; GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b}; GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}}; @@ -3663,7 +3666,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type= GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0; (function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached= new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>'; -b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,u=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(u))};a(u);var x,z,A,C,t=function(){if((A=b.offsetWidth)!=x||(C=b.offsetHeight)!=z)p=!0,x=A,z=C;g()},I=function(a,b,c){a.attachEvent? -a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",t);I(f,"scroll",t)}var u=function(){GraphViewer.resizeSensorEnabled&&c()},x=Object.prototype.toString.call(e),A="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var x=0,d=e.length;x<d;x++)p(e[x],u);else p(e,u);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; +b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,t=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(t))};a(t);var y,x,A,C,v=function(){if((A=b.offsetWidth)!=y||(C=b.offsetHeight)!=x)p=!0,y=A,x=C;g()},H=function(a,b,c){a.attachEvent? +a.attachEvent("on"+b,c):a.addEventListener(b,c)};H(d,"scroll",v);H(f,"scroll",v)}var t=function(){GraphViewer.resizeSensorEnabled&&c()},y=Object.prototype.toString.call(e),A="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var y=0,d=e.length;y<d;y++)p(e[y],t);else p(e,t);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}}; b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); diff --git a/src/main/webapp/package.json b/src/main/webapp/package.json index 8f9e84ab3..078e0834a 100644 --- a/src/main/webapp/package.json +++ b/src/main/webapp/package.json @@ -1,6 +1,6 @@ { - "name": "diagrams.net", - "version": "12.9.2", + "name": "draw.io", + "version": "12.9.3", "description": "diagrams.net desktop", "main": "electron.js", "scripts": { diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js index 9b12318ce..6b5c8fe97 100644 --- a/src/main/webapp/service-worker.js +++ b/src/main/webapp/service-worker.js @@ -6,11 +6,11 @@ if (workbox) workbox.precaching.precacheAndRoute([ { "url": "js/app.min.js", - "revision": "980a618d19ca664cdf543f7e9da9fbef" + "revision": "31cad05a550b429156c1da7d4dcde90e" }, { "url": "js/extensions.min.js", - "revision": "02e798ec6d2bc29c702e201dce553719" + "revision": "c418b80522c531920ebe08b9d2a87451" }, { "url": "js/diagramly/ElectronApp.js", @@ -52,6 +52,22 @@ if (workbox) "url": "js/croppie/croppie.min.css", "revision": "fc297c9002c79c15a132f13ee3ec427e" }, + { + "url": "js/dropbox/Dropbox-sdk.min.js", + "revision": "4b9842892aa37b156db0a8364b7a83b0" + }, + { + "url": "js/onedrive/OneDrive.js", + "revision": "d82b9c14d7a069efabef719a8a5f3975" + }, + { + "url": "math/MathJax.js", + "revision": "c32a502b8b4a6bd6bad8ddb1b59e9e72" + }, + { + "url": "math/config/TeX-MML-AM_HTMLorMML.js", + "revision": "35c6f70100f11ab8f38be59ad53b903e" + }, { "url": "resources/dia.txt", "revision": "a0b626aa5a9b4bc5d8524ca30db73b11" -- GitLab