drawio/src/main/webapp/js/viewer-static.min.js

7592 lines
3.4 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.STYLE_PATH=window.STYLE_PATH||"https://viewer.diagrams.net/styles";window.SHAPES_PATH=window.SHAPES_PATH||"https://viewer.diagrams.net/shapes";window.STENCIL_PATH=window.STENCIL_PATH||"https://viewer.diagrams.net/stencils";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"https://viewer.diagrams.net/math/es5";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"https://viewer.diagrams.net/img";
window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.5",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...M,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Ie=!1,Me=!0,ke=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,M),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...I]),yt=w({},[...M,...k]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Ie&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!Me&&S(/\/>/i,m)){At(a,e);continue}ke&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,i=30,r=15,s=new Uint8Array([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]),o=new Uint8Array([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]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var u=new Array(256);e(u);var c=new Array(29);e(c);var w,m,b,g=new Array(i);function p(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(g);var k=function(t){return t<256?f[t]:f[256+(t>>>7)]},y=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=function(t,e,a){x(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,i,s=new Array(16),o=0;for(n=1;n<=r;n++)o=o+a[n-1]<<1,s[n]=o;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=A(s[l]++,l))}},R=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=function(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n},D=function(t,e,n){var i,r,l,h,d=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+d++],i+=(255&t.pending_buf[t.sym_buf+d++])<<8,r=t.pending_buf[t.sym_buf+d++],0===i?z(t,r,e):(l=u[r],z(t,l+a+1,e),0!==(h=s[l])&&(r-=c[l],x(t,r,h)),i--,l=k(i),z(t,l,n),0!==(h=o[l])&&(i-=g[l],x(t,i,h)))}while(d<t.sym_next);z(t,256,e)},T=function(t,e){var a,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,d=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==s[2*a]?(t.heap[++t.heap_len]=d=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=d<2?++d:0)]=1,t.depth[i]=0,t.opt_len--,l&&(t.static_len-=o[2*i+1]);for(e.max_code=d,a=t.heap_len>>1;a>=1;a--)U(t,s,a);i=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*i]=s[2*a]+s[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=i,t.heap[1]=i++,U(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,s,o,l,h=e.dyn_tree,d=e.max_code,_=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,w=e.stat_desc.max_length,m=0;for(s=0;s<=r;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=h[2*h[2*(n=t.heap[a])+1]+1]+1)>w&&(s=w,m++),h[2*n+1]=s,n>d||(t.bl_count[s]++,o=0,n>=c&&(o=u[n-c]),l=h[2*n],t.opt_len+=l*(s+o),f&&(t.static_len+=l*(_[2*n+1]+o)));if(0!==m){do{for(s=w-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[w]--,m-=2}while(m>0);for(s=w;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--a])>d||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),E(s,d,t.bl_count)},O=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))},I=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}},F=!1,L=function(t,e,a,n){x(t,0+(n?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a},N=function(t,e,n,i){var r,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),T(t,t.l_desc),T(t,t.d_desc),o=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!==e?L(t,e,n,i):4===t.strategy||s===r?(x(t,2+(i?1:0),3),D(t,d,_)):(x(t,4+(i?1:0),3),function(t,e,a,n){var i;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),i=0;i<n;i++)x(t,t.bl_tree[2*h[i]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&Z(t)},B={_tr_init:function(t){F||(!function(){var t,e,a,h,v,k=new Array(16);for(a=0,h=0;h<28;h++)for(c[h]=a,t=0;t<1<<s[h];t++)u[a++]=h;for(u[a-1]=h,v=0,h=0;h<16;h++)for(g[h]=v,t=0;t<1<<o[h];t++)f[v++]=h;for(v>>=7;h<i;h++)for(g[h]=v<<7,t=0;t<1<<o[h]-7;t++)f[256+v++]=h;for(e=0;e<=r;e++)k[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,k[8]++;for(;t<=255;)d[2*t+1]=9,t++,k[9]++;for(;t<=279;)d[2*t+1]=7,t++,k[7]++;for(;t<=287;)d[2*t+1]=8,t++,k[8]++;for(E(d,287,k),t=0;t<i;t++)_[2*t+1]=5,_[2*t]=A(t,5);w=new p(d,s,257,n,r),m=new p(_,o,0,i,r),b=new p(new Array(0),l,0,19,7)}(),F=!0),t.l_desc=new v(t.dyn_ltree,w),t.d_desc=new v(t.dyn_dtree,m),t.bl_desc=new v(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:N,_tr_tally:function(t,e,n){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+a+1)]++,t.dyn_dtree[2*k(e)]++),t.sym_next===t.sym_end},_tr_align:function(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(i=i+e[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0},M=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),H=function(t,e,a,n){var i=M,r=n+a;t^=-1;for(var s=n;s<r;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},j={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"},K={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_MEM_ERROR:-4,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},P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,it=K.Z_BUF_ERROR,rt=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ut=258,ct=262,wt=42,mt=113,bt=666,gt=function(t,e){return t.msg=j[e],e},pt=function(t){return 2*t-(t>4?9:0)},vt=function(t){for(var e=t.length;--e>=0;)t[e]=0},kt=function(t){var e,a,n,i=t.w_size;n=e=t.hash_size;do{a=t.head[--n],t.head[n]=a>=i?a-i:0}while(--e);n=e=i;do{a=t.prev[--n],t.prev[n]=a>=i?a-i:0}while(--e)},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},xt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,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))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},At=function(t,e){t.pending_buf[t.pending++]=e},Et=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=function(t,e,a,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),a),1===t.state.wrap?t.adler=C(t.adler,e,i,a):2===t.state.wrap&&(t.adler=H(t.adler,e,i,a)),t.next_in+=i,t.total_in+=i,i)},Zt=function(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ut,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=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<f);if(n=ut-(f-r),r=f-ut,n>s){if(t.match_start=e,s=n,n>=o)break;u=h[r+s-1],c=h[r+s]}}}while((e=_[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,a,n,i=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-a),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),kt(t),a+=i),0===t.strm.avail_in)break;if(e=Rt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){var a,n,i,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(a=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,a>(n=t.strstart-t.block_start)+t.strm.avail_in&&(a=n+t.strm.avail_in),a>i&&(a=i),a<r&&(0===a&&e!==V||e===q||a!==n+t.strm.avail_in))break;s=e===V&&a===n+t.strm.avail_in?1:0,Y(t,0,0,s),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),n&&(n>a&&(n=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,a-=n),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==q&&e!==V&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,r=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=r||(n||e===V)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(a=n>i?i:n,s=e===V&&0===t.strm.avail_in&&a===n?1:0,Y(t,t.block_start,a,s),t.block_start+=a,xt(t.strm)),s?3:1)},Dt=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),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-ct&&(t.match_length=Zt(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(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=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2},Tt=function(t,e){for(var a,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),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=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}var It=[new Ot(0,0,0,0,Ut),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){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=ft,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 Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Lt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0},Nt=function(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt},Bt=function(t){var e,a=Nt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,vt(e.head),e.max_lazy_match=It[e.level].max_lazy,e.good_match=It[e.level].good_length,e.nice_match=It[e.level].nice_length,e.max_chain_length=It[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ct=function(t,e,a,n,i,r){if(!t)return at;var s=1;if(e===rt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||a!==ft||n<8||n>15||e<0||e>9||r<0||r>ht||8===n&&1!==s)return gt(t,at);8===n&&(n=9);var o=new Ft;return t.state=o,o.strm=t,o.status=wt,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=a,Bt(t)},Mt={deflateInit:function(t,e){return Ct(t,e,ft,15,8,dt)},deflateInit2:Ct,deflateReset:Bt,deflateResetKeep:Nt,deflateSetHeader:function(t,e){return Lt(t)||2!==t.state.wrap?at:(t.state.gzhead=e,tt)},deflate:function(t,e){if(Lt(t)||e>$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?it:at);var n=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt}else if(0===t.avail_in&&pt(e)<=pt(n)&&e!==V)return gt(t,it);if(a.status===bt&&0!==t.avail_in)return gt(t,it);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var i=ft+(a.w_bits-8<<4)<<8;if(i|=(a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(i|=32),Et(a,i+=31-i%31),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){for(var r=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;a.pending+s>a.pending_buf_size;){var o=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+o),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex+=o,xt(t),0!==a.pending)return a.last_flush=-1,tt;r=0,s-=o}var l=new Uint8Array(a.gzhead.extra);a.pending_buf.set(l.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){var h,d=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),xt(t),0!==a.pending)return a.last_flush=-1,tt;d=0}h=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,At(a,h)}while(0!==h);a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){var _,f=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f)),xt(t),0!==a.pending)return a.last_flush=-1,tt;f=0}_=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,At(a,_)}while(0!==_);a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var u=0===a.level?Ut(a,e):a.strategy===ot?function(t,e){for(var a;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):a.strategy===lt?function(t,e){for(var a,n,i,r,s=t.window;;){if(t.lookahead<=ut){if(St(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){r=t.strstart+ut;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<r);t.match_length=ut-(r-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):It[a.level].func(a,e);if(3!==u&&4!==u||(a.status=bt),1===u||3===u)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===u&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(vt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:function(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,nt):tt},deflateSetDictionary:function(t,e){var a=e.length;if(Lt(t))return at;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==wt||n.lookahead)return at;if(1===i&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var r=new Uint8Array(n.w_size);r.set(e.subarray(a-n.w_size,a),0),e=r,a=n.w_size}var s=t.avail_in,o=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var h=n.strstart,d=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[h+3-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++}while(--d);n.strstart=h,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,n.wrap=i,tt},deflateInfo:"pako deflate (from Nodeca project)"};function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var jt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Kt=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!==Ht(a))throw new TypeError(a+"must be non-object");for(var n in a)jt(a,n)&&(t[n]=a[n])}}return t},Pt=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var i=new Uint8Array(e),r=0,s=0,o=t.length;r<o;r++){var l=t[r];i.set(l,s),s+=l.length}return i},Yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yt=!1}for(var Gt=new Uint8Array(256),Xt=0;Xt<256;Xt++)Gt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Gt[254]=Gt[254]=1;var Wt=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,i,r,s=t.length,o=0;for(i=0;i<s;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),r=0,i=0;r<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),a<128?e[r++]=a:a<2048?(e[r++]=192|a>>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},qt=function(t,e){var a,n,i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));var r=new Array(2*i);for(n=0,a=0;a<i;){var s=t[a++];if(s<128)r[n++]=s;else{var o=Gt[s];if(o>4)r[n++]=65533,a+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&a<i;)s=s<<6|63&t[a++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Yt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}(r,n)},Jt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Gt[t[a]]>e?a:e};var Qt=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},Vt=Object.prototype.toString,$t=K.Z_NO_FLUSH,te=K.Z_SYNC_FLUSH,ee=K.Z_FULL_FLUSH,ae=K.Z_FINISH,ne=K.Z_OK,ie=K.Z_STREAM_END,re=K.Z_DEFAULT_COMPRESSION,se=K.Z_DEFAULT_STRATEGY,oe=K.Z_DEFLATED;function le(t){this.options=Kt({level:re,method:oe,chunkSize:16384,windowBits:15,memLevel:8,strategy:se},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ne)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Wt(e.dictionary):"[object ArrayBuffer]"===Vt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=Mt.deflateSetDictionary(this.strm,n))!==ne)throw new Error(j[a]);this._dict_set=!0}}function he(t,e){var a=new le(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result}le.prototype.push=function(t,e){var a,n,i=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ae:$t,"string"==typeof t?i.input=Wt(t):"[object ArrayBuffer]"===Vt.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(n===te||n===ee)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((a=Mt.deflate(i,n))===ie)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),a=Mt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ne;if(0!==i.avail_out){if(n>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},le.prototype.onData=function(t){this.chunks.push(t)},le.prototype.onEnd=function(t){t===ne&&(this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var de={Deflate:le,deflate:he,deflateRaw:function(t,e){return(e=e||{}).raw=!0,he(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,he(t,e)},constants:K},_e=16209,fe=function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=t.state;a=t.next_in,z=t.input,n=a+(t.avail_in-5),i=t.next_out,A=t.output,r=i-(e-t.avail_out),s=i+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,u=E.bits,c=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=c[f&m];e:for(;;){if(f>>>=p=g>>>24,u-=p,0===(p=g>>>16&255))A[i++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=c[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=_e;break t}v=65535&g,(p&=15)&&(u<p&&(f+=z[a++]<<u,u+=8),v+=f&(1<<p)-1,f>>>=p,u-=p),u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=w[f&b];a:for(;;){if(f>>>=p=g>>>24,u-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=_e;break t}if(k=65535&g,u<(p&=15)&&(f+=z[a++]<<u,(u+=8)<p&&(f+=z[a++]<<u,u+=8)),(k+=f&(1<<p)-1)>o){t.msg="invalid distance too far back",E.mode=_e;break t}if(f>>>=p,u-=p,k>(p=i-r)){if((p=k-p)>h&&E.sane){t.msg="invalid distance too far back",E.mode=_e;break t}if(y=0,x=_,0===d){if(y+=l-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}else if(d<p){if(y+=l+d-p,(p-=d)<v){v-=p;do{A[i++]=_[y++]}while(--p);if(y=0,d<v){v-=p=d;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}}else if(y+=d-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}for(;v>2;)A[i++]=x[y++],A[i++]=x[y++],A[i++]=x[y++],v-=3;v&&(A[i++]=x[y++],v>1&&(A[i++]=x[y++]))}else{y=i-k;do{A[i++]=A[y++],A[i++]=A[y++],A[i++]=A[y++],v-=3}while(v>2);v&&(A[i++]=A[y++],v>1&&(A[i++]=A[y++]))}break}}break}}while(a<n&&i<s);a-=v=u>>3,f&=(1<<(u-=v<<3))-1,t.next_in=a,t.next_out=i,t.avail_in=a<n?n-a+5:5-(a-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=f,E.bits=u},ue=15,ce=new Uint16Array([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]),we=new Uint8Array([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]),me=new Uint16Array([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]),be=new Uint8Array([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]),ge=function(t,e,a,n,i,r,s,o){var l,h,d,_,f,u,c,w,m,b=o.bits,g=0,p=0,v=0,k=0,y=0,x=0,z=0,A=0,E=0,R=0,Z=null,S=new Uint16Array(16),U=new Uint16Array(16),D=null;for(g=0;g<=ue;g++)S[g]=0;for(p=0;p<n;p++)S[e[a+p]]++;for(y=b,k=ue;k>=1&&0===S[k];k--);if(y>k&&(y=k),0===k)return i[r++]=20971520,i[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===S[v];v++);for(y<v&&(y=v),A=1,g=1;g<=ue;g++)if(A<<=1,(A-=S[g])<0)return-1;if(A>0&&(0===t||1!==k))return-1;for(U[1]=0,g=1;g<ue;g++)U[g+1]=U[g]+S[g];for(p=0;p<n;p++)0!==e[a+p]&&(s[U[e[a+p]]++]=p);if(0===t?(Z=D=s,u=20):1===t?(Z=ce,D=we,u=257):(Z=me,D=be,u=0),R=0,p=0,g=v,f=r,x=y,z=0,d=-1,_=(E=1<<y)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){c=g-z,s[p]+1<u?(w=0,m=s[p]):s[p]>=u?(w=D[s[p]-u],m=Z[s[p]-u]):(w=96,m=0),l=1<<g-z,v=h=1<<x;do{i[f+(R>>z)+(h-=l)]=c<<24|w<<16|m|0}while(0!==h);for(l=1<<g-1;R&l;)l>>=1;if(0!==l?(R&=l-1,R+=l):R=0,p++,0==--S[g]){if(g===k)break;g=e[a+s[p]]}if(g>y&&(R&_)!==d){for(0===z&&(z=y),f+=v,A=1<<(x=g-z);x+z<k&&!((A-=S[x+z])<=0);)x++,A<<=1;if(E+=1<<x,1===t&&E>852||2===t&&E>592)return 1;i[d=R&_]=y<<24|x<<16|f-r|0}}return 0!==R&&(i[f+R]=g-z<<24|64<<16|0),o.bits=y,0},pe=K.Z_FINISH,ve=K.Z_BLOCK,ke=K.Z_TREES,ye=K.Z_OK,xe=K.Z_STREAM_END,ze=K.Z_NEED_DICT,Ae=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,Re=K.Z_MEM_ERROR,Ze=K.Z_BUF_ERROR,Se=K.Z_DEFLATED,Ue=16180,De=16190,Te=16191,Oe=16192,Ie=16194,Fe=16199,Le=16200,Ne=16206,Be=16209,Ce=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function Me(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var He,je,Ke=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<Ue||e.mode>16211?1:0},Pe=function(t){if(Ke(t))return Ae;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ue,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ye},Ye=function(t){if(Ke(t))return Ae;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Pe(t)},Ge=function(t,e){var a;if(Ke(t))return Ae;var n=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,Ye(t))},Xe=function(t,e){if(!t)return Ae;var a=new Me;t.state=a,a.strm=t,a.window=null,a.mode=Ue;var n=Ge(t,e);return n!==ye&&(t.state=null),n},We=!0,qe=function(t){if(We){He=new Int32Array(512),je=new Int32Array(32);for(var 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(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,je,0,t.work,{bits:5}),We=!1}t.lencode=He,t.lenbits=9,t.distcode=je,t.distbits=5},Je=function(t,e,a,n){var i,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),n>=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>n&&(i=n),r.window.set(e.subarray(a-n,a-n+i),r.wnext),(n-=i)?(r.window.set(e.subarray(a-n,a),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Qe={inflateReset:Ye,inflateReset2:Ge,inflateResetKeep:Pe,inflateInit:function(t){return Xe(t,15)},inflateInit2:Xe,inflate:function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=0,R=new Uint8Array(4),Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ke(t)||!t.output||!t.input&&0!==t.avail_in)return Ae;(a=t.state).mode===Te&&(a.mode=Oe),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=ye;t:for(;;)switch(a.mode){case Ue:if(0===a.wrap){a.mode=Oe;break}for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Be;break}if((15&h)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Be;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:Te,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Be;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=H(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((u=a.length)>o&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(n.subarray(r,r+u),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Be;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Te;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}t.adler=a.check=Ce(h),h=0,d=0,a.mode=De;case De: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,ze;t.adler=a.check=1,a.mode=Te;case Te:if(e===ve||e===ke)break t;case Oe:if(a.last){h>>>=7&d,d-=7&d,a.mode=Ne;break}for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=16193;break;case 1:if(qe(a),a.mode=Fe,e===ke){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Be}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Be;break}if(a.length=65535&h,h=0,d=0,a.mode=Ie,e===ke)break t;case Ie:a.mode=16195;case 16195:if(u=a.length){if(u>o&&(u=o),u>l&&(u=l),0===u)break t;i.set(n.subarray(r,r+u),s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=Te;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=n[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,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Be;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ge(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=Be;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(A=m+2;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Be;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===g){for(A=m+3;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=3+(7&(h>>>=m)),h>>>=3,d-=3}else{for(A=m+7;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=11+(127&(h>>>=m)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Be;break}for(;u--;)a.lens[a.have++]=y}}if(a.mode===Be)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Be;break}if(a.lenbits=9,z={bits:a.lenbits},x=ge(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=Be;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ge(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=Be;break}if(a.mode=Fe,e===ke)break t;case Fe:a.mode=Le;case Le:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,fe(t,f),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Te&&(a.back=-1);break}for(a.back=0;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,v=b,k=g;b=(E=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=Te;break}if(64&b){t.msg="invalid literal/length code",a.mode=Be;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[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=16202;case 16202:for(;b=(E=a.distcode[h&(1<<a.distbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(0==(240&b)){for(p=m,v=b,k=g;b=(E=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Be;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[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=Be;break}a.mode=16204;case 16204:if(0===l)break t;if(u=f-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Be;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),w=a.window}else w=i,c=s-a.offset,u=a.length;u>l&&(u=l),l-=u,a.length-=u;do{i[s++]=w[c++]}while(--u);0===a.length&&(a.mode=Le);break;case 16205:if(0===l)break t;i[s++]=a.length,l--,a.mode=Le;break;case Ne:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=n[r++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,s-f):C(a.check,i,f,s-f)),f=l,4&a.wrap&&(a.flags?h:Ce(h))!==a.check){t.msg="incorrect data check",a.mode=Be;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Be;break}h=0,d=0}a.mode=16208;case 16208:x=xe;break t;case Be:x=Ee;break t;case 16210:return Re;default:return Ae}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||f!==t.avail_out&&a.mode<Be&&(a.mode<Ne||e!==pe))&&Je(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,t.next_out-f):C(a.check,i,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===Te?128:0)+(a.mode===Fe||a.mode===Ie?256:0),(0===_&&0===f||e===pe)&&x===ye&&(x=Ze),x},inflateEnd:function(t){if(Ke(t))return Ae;var e=t.state;return e.window&&(e.window=null),t.state=null,ye},inflateGetHeader:function(t,e){if(Ke(t))return Ae;var a=t.state;return 0==(2&a.wrap)?Ae:(a.head=e,e.done=!1,ye)},inflateSetDictionary:function(t,e){var a,n=e.length;return Ke(t)||0!==(a=t.state).wrap&&a.mode!==De?Ae:a.mode===De&&C(1,e,n,0)!==a.check?Ee:Je(t,e,n,n)?(a.mode=16210,Re):(a.havedict=1,ye)},inflateInfo:"pako inflate (from Nodeca project)"};var Ve=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},$e=Object.prototype.toString,ta=K.Z_NO_FLUSH,ea=K.Z_FINISH,aa=K.Z_OK,na=K.Z_STREAM_END,ia=K.Z_NEED_DICT,ra=K.Z_STREAM_ERROR,sa=K.Z_DATA_ERROR,oa=K.Z_MEM_ERROR;function la(t){this.options=Kt({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Qe.inflateInit2(this.strm,e.windowBits);if(a!==aa)throw new Error(j[a]);if(this.header=new Ve,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Wt(e.dictionary):"[object ArrayBuffer]"===$e.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Qe.inflateSetDictionary(this.strm,e.dictionary))!==aa))throw new Error(j[a])}function ha(t,e){var a=new la(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result}la.prototype.push=function(t,e){var a,n,i,r=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ea:ta,"[object ArrayBuffer]"===$e.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=Qe.inflate(r,n))===ia&&o&&((a=Qe.inflateSetDictionary(r,o))===aa?a=Qe.inflate(r,n):a===sa&&(a=ia));r.avail_in>0&&a===na&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),a=Qe.inflate(r,n);switch(a){case ra:case sa:case ia:case oa:return this.onEnd(a),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||a===na))if("string"===this.options.to){var l=Jt(r.output,r.next_out),h=r.next_out-l,d=qt(r.output,l);r.next_out=h,r.avail_out=s-h,h&&r.output.set(r.output.subarray(l,l+h),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==aa||0!==i){if(a===na)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},la.prototype.onData=function(t){this.chunks.push(t)},la.prototype.onEnd=function(t){t===aa&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var da={Inflate:la,inflate:ha,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ha(t,e)},ungzip:ha,constants:K},_a=de.Deflate,fa=de.deflate,ua=de.deflateRaw,ca=de.gzip,wa=da.Inflate,ma=da.inflate,ba=da.inflateRaw,ga=da.ungzip,pa=K,va={Deflate:_a,deflate:fa,deflateRaw:ua,gzip:ca,Inflate:wa,inflate:ma,inflateRaw:ba,ungzip:ga,constants:pa};t.Deflate=_a,t.Inflate=wa,t.constants=pa,t.default=va,t.deflate=fa,t.deflateRaw=ua,t.gzip=ca,t.inflate=ma,t.inflateRaw=ba,t.ungzip=ga,Object.defineProperty(t,"__esModule",{value:!0})}));
var rough=function(){"use strict";function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&"number"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;e<t.length-1;e++){const s=t[e],n=t[e+1];if(s[1]!==n[1]){const t=Math.min(s[1],n[1]);h.push({ymin:t,ymax:Math.max(s[1],n[1]),x:t===s[1]?s[0]:n[0],islope:(n[0]-s[0])/(n[1]-s[1])})}}if(h.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;e<h.length&&!(h[e].ymin>i);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t<r.length;t+=2){const e=t+1;if(e>=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t<c;t++){const a=p+l+t*n,r=u-h+2*Math.random()*h,i=a-h+2*Math.random()*h,c=this.helper.ellipse(r,i,o,o,e);s.push(...c.ops)}}return{type:"fillSketch",ops:s}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){const s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach((t=>{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t<r;t++){const a=t*(s+n),h=a+s,r=[c[0]+a*Math.cos(u)+i*Math.cos(u),c[1]+a*Math.sin(u)+i*Math.sin(u)],l=[c[0]+h*Math.cos(u)+i*Math.cos(u),c[1]+h*Math.sin(u)+i*Math.sin(u)];o.push(...this.helper.doubleLineOps(r[0],r[1],l[0],l[1],e))}})),o}}class l{constructor(t){this.helper=t}fillPolygons(t,e){const s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,o=e.zigzagOffset<0?s:e.zigzagOffset,a=n(t,e=Object.assign({},e,{hachureGap:s+o}));return{type:"fillSketch",ops:this.zigzagLines(a,o,e)}}zigzagLines(t,e,s){const n=[];return t.forEach((t=>{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;t<h;t++){const o=2*t*e,a=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),i=[r[0]+o*Math.cos(c),r[1]+o*Math.sin(c)],l=[r[0]+a*Math.cos(c),r[1]+a*Math.sin(c)],u=[i[0]+h*Math.cos(c+Math.PI/4),i[1]+h*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(i[0],i[1],u[0],u[1],s),...this.helper.doubleLineOps(u[0],u[1],l[0],l[1],s))}})),n}}const u={};class p{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(t,e){return t.type===e}function b(t){const e=[],s=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:f,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:g,text:""},e}(t);let n="BOD",o=0,a=s[o];for(;!k(a,g);){let h=0;const r=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);o++,h=M[a.text],n=a.text}else k(a,d)?h=M[n]:(o++,h=M[a.text],n=a.text);if(!(o+h<s.length))throw new Error("Path data ended short");for(let t=o;t<o+h;t++){const e=s[t];if(!k(e,d))throw new Error("Param not a number: "+n+","+e.text);r[r.length]=+e.text}if("number"!=typeof M[n])throw new Error("Bad segment: "+n);{const t={key:n,data:r};e.push(t),o+=h,a=s[o],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function y(t){let e=0,s=0,n=0,o=0;const a=[];for(const{key:h,data:r}of t)switch(h){case"M":a.push({key:"M",data:[...r]}),[e,s]=r,[n,o]=r;break;case"m":e+=r[0],s+=r[1],a.push({key:"M",data:[e,s]}),n=e,o=s;break;case"L":a.push({key:"L",data:[...r]}),[e,s]=r;break;case"l":e+=r[0],s+=r[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...r]}),e=r[4],s=r[5];break;case"c":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...r]}),e=r[2],s=r[3];break;case"q":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...r]}),e=r[5],s=r[6];break;case"a":e+=r[5],s+=r[6],a.push({key:"A",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case"H":a.push({key:"H",data:[...r]}),e=r[0];break;case"h":e+=r[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...r]}),s=r[0];break;case"v":s+=r[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...r]}),e=r[2],s=r[3];break;case"s":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...r]}),e=r[0],s=r[1];break;case"t":e+=r[0],s+=r[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s="",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case"M":e.push({key:"M",data:[...l]}),[n,o]=l,[a,h]=l;break;case"C":e.push({key:"C",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case"L":e.push({key:"L",data:[...l]}),[n,o]=l;break;case"H":n=l[0],e.push({key:"L",data:[n,o]});break;case"V":o=l[0],e.push({key:"L",data:[n,o]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:"C",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case"T":{const[t,a]=l;let h=0,c=0;"Q"===s||"T"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:"C",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case"Q":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:"C",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case"A":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:"C",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:"C",data:t})})),n=i,o=c}break}case"Z":e.push({key:"Z",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),t<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),i&&f>d&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e<p.length;e+=3){const s=w(p[e][0],p[e][1],l),n=w(p[e+1][0],p[e+1][1],l),o=w(p[e+2][0],p[e+2][1],l);t.push([s[0],s[1],n[0],n[1],o[0],o[1]])}return t}}const P={randOffset:function(t,e){return G(t,e)},randOffsetWithRange:function(t,e,s){return E(t,e,s)},ellipse:function(t,e,s,n,o){const a=T(s,n,o);return D(t,e,o,a).opset},doubleLineOps:function(t,e,s,n,o){return $(t,e,s,n,o,!0)}};function v(t,e,s,n,o){return{type:"path",ops:$(t,e,s,n,o)}}function S(t,e,s){const n=(t||[]).length;if(n>2){const o=[];for(let e=0;e<n-1;e++)o.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&o.push(...$(t[n-1][0],t[n-1][1],t[0][0],t[0][1],s)),{type:"path",ops:o}}return 2===n?v(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function O(t,e,s,n,o){return function(t,e){return S(t,!0,e)}([[t,e],[t+s,e],[t+s,e+n],[t,e+n]],o)}function L(t,e){if(t.length){const s="number"==typeof t[0][0]?[t]:t,n=j(s[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:j(s[0],1.5*(1+.22*e.roughness),z(e));for(let t=1;t<s.length;t++){const a=s[t];if(a.length){const t=j(a,1*(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:j(a,1.5*(1+.22*e.roughness),z(e));for(const e of t)"move"!==e.op&&n.push(e);for(const t of s)"move"!==t.op&&o.push(t)}}return{type:"path",ops:n.concat(o)}}return{type:"path",ops:[]}}function T(t,e,s){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/o;let h=Math.abs(t/2),r=Math.abs(e/2);const i=1-s.curveFitting;return h+=G(h*i,s),r+=G(r*i,s),{increment:a,rx:h,ry:r}}function D(t,e,s,n){const[o,a]=F(n.increment,t,e,n.rx,n.ry,1,n.increment*E(.1,E(.4,1,s),s),s);let h=q(o,null,s);if(!s.disableMultiStroke&&0!==s.roughness){const[o]=F(n.increment,t,e,n.rx,n.ry,1.5,0,s),a=q(o,null,s);h=h.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function A(t,e,s,n,o,a,h,r,i){const c=t,l=e;let u=Math.abs(s/2),p=Math.abs(n/2);u+=G(.01*u,i),p+=G(.01*p,i);let f=o,d=a;for(;f<0;)f+=2*Math.PI,d+=2*Math.PI;d-f>2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:"path",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case"M":a=[h[0],h[1]],o=[h[0],h[1]];break;case"L":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case"C":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case"Z":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:"move",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a<o;a++)s.push({op:"lineTo",data:[n[a][0]+G(t,e),n[a][1]+G(t,e)]})}}return{type:"fillPath",ops:s}}function C(t,e){return function(t,e){let s=t.fillStyle||"hachure";if(!u[s])switch(s){case"zigzag":u[s]||(u[s]=new h(e));break;case"cross-hatch":u[s]||(u[s]=new r(e));break;case"dots":u[s]||(u[s]=new i(e));break;case"dashed":u[s]||(u[s]=new c(e));break;case"zigzag-line":u[s]||(u[s]=new l(e));break;default:s="hachure",u[s]||(u[s]=new o(e))}return u[s]}(e,P).fillPolygons(t,e)}function z(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function W(t){return t.randomizer||(t.randomizer=new p(t.seed||0)),t.randomizer.next()}function E(t,e,s,n=1){return s.roughness*n*(W(s)*(e-t)+t)}function G(t,e,s=1){return E(-t,t,e,s)}function $(t,e,s,n,o,a=!1){const h=a?o.disableMultiStrokeFill:o.disableMultiStroke,r=R(t,e,s,n,o,!0,!1);if(h)return r;const i=R(t,e,s,n,o,!0,!0);return r.concat(i)}function R(t,e,s,n,o,a,h){const r=Math.pow(t-s,2)+Math.pow(e-n,2),i=Math.sqrt(r);let c=1;c=i<200?1:i>500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:"move",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:"move",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:"bcurveTo",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o<t.length;o++)n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]),o===t.length-1&&n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]);return q(n,null,s)}function q(t,e,s){const n=t.length,o=[];if(n>3){const a=[],h=1-s.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(h*t[e+1][0]-h*t[e-1][0])/6,s[1]+(h*t[e+1][1]-h*t[e-1][1])/6],a[2]=[t[e+1][0]+(h*t[e][0]-h*t[e+2][0])/6,t[e+1][1]+(h*t[e][1]-h*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=s.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+G(t,s),e[1]+G(t,s)]})}}else 3===n?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return o}function F(t,e,s,n,o,a,h,r){const i=[],c=[];if(0===r.roughness){t/=4,c.push([e+n*Math.cos(-t),s+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),s+o*Math.sin(a)];i.push(t),c.push(t)}c.push([e+n*Math.cos(0),s+o*Math.sin(0)]),c.push([e+n*Math.cos(t),s+o*Math.sin(t)])}else{const l=G(.5,r)-Math.PI/2;c.push([G(a,r)+e+.9*n*Math.cos(l-t),G(a,r)+s+.9*o*Math.sin(l-t)]);const u=2*Math.PI+l-.01;for(let h=l;h<u;h+=t){const t=[G(a,r)+e+n*Math.cos(h),G(a,r)+s+o*Math.sin(h)];i.push(t),c.push(t)}c.push([G(a,r)+e+n*Math.cos(l+2*Math.PI+.5*h),G(a,r)+s+o*Math.sin(l+2*Math.PI+.5*h)]),c.push([G(a,r)+e+.98*n*Math.cos(l+h),G(a,r)+s+.98*o*Math.sin(l+h)]),c.push([G(a,r)+e+.9*n*Math.cos(l+.5*h),G(a,r)+s+.9*o*Math.sin(l+.5*h)])}return[c,i]}function V(t,e,s,n,o,a,h,r,i){const c=a+G(.1,i),l=[];l.push([G(r,i)+e+.9*n*Math.cos(c-t),G(r,i)+s+.9*o*Math.sin(c-t)]);for(let a=c;a<=h;a+=t)l.push([G(r,i)+e+n*Math.cos(a),G(r,i)+s+o*Math.sin(a)]);return l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),q(l,null,i)}function Z(t,e,s,n,o,a,h,r){const i=[],c=[r.maxRandomnessOffset||1,(r.maxRandomnessOffset||1)+.3];let l=[0,0];const u=r.disableMultiStroke?1:2,p=r.preserveVertices;for(let f=0;f<u;f++)0===f?i.push({op:"move",data:[h[0],h[1]]}):i.push({op:"move",data:[h[0]+(p?0:G(c[0],r)),h[1]+(p?0:G(c[0],r))]}),l=p?[o,a]:[o+G(c[f],r),a+G(c[f],r)],i.push({op:"bcurveTo",data:[t+G(c[f],r),e+G(c[f],r),s+G(c[f],r),n+G(c[f],r),l[0],l[1]]});return i}function Q(t){return[...t]}function H(t,e=0){const s=t.length;if(s<3)throw new Error("A curve must have at least three points.");const n=[];if(3===s)n.push(Q(t[0]),Q(t[1]),Q(t[2]),Q(t[2]));else{const s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);const o=[],a=1-e;n.push(Q(s[0]));for(let t=1;t+2<s.length;t++){const e=s[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],o[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],o[3]=[s[t+1][0],s[t+1][1]],n.push(o[1],o[2],o[3])}}return n}function N(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function B(t,e,s){const n=N(e,s);if(0===n)return N(t,e);let o=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/n;return o=Math.max(0,Math.min(1,o)),N(t,J(e,s,o))}function J(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function K(t,e,s,n){const o=n||[];if(function(t,e){const s=t[e+0],n=t[e+1],o=t[e+2],a=t[e+3];let h=3*n[0]-2*s[0]-a[0];h*=h;let r=3*n[1]-2*s[1]-a[1];r*=r;let i=3*o[0]-2*a[0]-s[0];i*=i;let c=3*o[1]-2*a[1]-s[1];return c*=c,h<i&&(h=i),r<c&&(r=c),h+r}(t,e)<s){const s=t[e+0];if(o.length){(a=o[o.length-1],h=s,Math.sqrt(N(a,h)))>1&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;n<s-1;++n){const e=B(t[n],h,r);e>i&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s<o;s++){K(t,3*s,e,n)}return s&&s>0?X(n,0,n.length,s):n}const tt="none";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d("line",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];"solid"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d("rectangle",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if("solid"===a.fillStyle){const s=D(t,e,a,r).opset;s.type="fillPath",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d("ellipse",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape="circle",o}linearPath(t,e){const s=this._o(e);return this._d("linearPath",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if("solid"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type="fillPath",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d("arc",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if("solid"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d("curve",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&("solid"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d("polygon",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d("path",n,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&"transparent"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":c(),h=[e[0],e[1]],a.push(h);break;case"L":i(),a.push([e[0],e[1]]);break;case"C":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case"Z":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if("solid"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d("path",n,s)}opsToPath(t,e){let s="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case"fillPath":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case"fillSketch":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===s.stroke?"transparent":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=s.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,o,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||"",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case"path":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke",s.stroke),e.setAttribute("stroke-width",s.strokeWidth+""),e.setAttribute("fill","none"),s.strokeLineDash&&e.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",s.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,"path");return o.setAttribute("d",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute("stroke",s.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),s.fillLineDash&&o.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}return{canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()}}();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d=0;for(null!=b&&b||(a=Base64._utf8_encode(a));d<a.length;){var e=a.charCodeAt(d++);b=a.charCodeAt(d++);var f=a.charCodeAt(d++);var g=e>>2;e=(e&3)<<4|b>>4;var k=(b&15)<<2|f>>6;var l=f&63;isNaN(b)?k=l=64:isNaN(f)&&(l=64);c=c+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(k)+this._keyStr.charAt(l)}return c},decode:function(a,b){b=null!=b?b:!1;var c="",d=0;for(a=a.replace(/[^A-Za-z0-9\+\/=]/g,
"");d<a.length;){var e=this._keyStr.indexOf(a.charAt(d++));var f=this._keyStr.indexOf(a.charAt(d++));var g=this._keyStr.indexOf(a.charAt(d++));var k=this._keyStr.indexOf(a.charAt(d++));e=e<<2|f>>4;f=(f&15)<<4|g>>2;var l=(g&3)<<6|k;c+=String.fromCharCode(e);64!=g&&(c+=String.fromCharCode(f));64!=k&&(c+=String.fromCharCode(l))}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;for(c1=c2=0;c<a.length;){var 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=!0;window.isMermaidEnabled="function"===typeof structuredClone;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)?window.location.protocol+"//"+window.location.hostname:"https://app.diagrams.net");
window.DRAWIO_SERVER_URL=window.DRAWIO_SERVER_URL||window.location.origin+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/";window.DRAWIO_LIGHTBOX_URL=window.DRAWIO_LIGHTBOX_URL||"https://viewer.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://convert.diagrams.net/node/export";window.PLANT_URL=window.PLANT_URL||"https://plant-aws.diagrams.net";window.DRAW_MATH_URL=window.DRAW_MATH_URL||"math/es5";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.diagrams.net/VsdConverter/api/converter";
window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.diagrams.net/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||(/.*\.diagrams\.net$/.test(window.location.hostname)?"https://3axinmwptbp2engjl5hovms4ta0lbvit.lambda-url.eu-central-1.on.aws/":window.DRAWIO_SERVER_URL+"cache");window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"2b14debc5feeb18ba65358d863ec870e4cc9294b28c3c941cb3014eb4af9a9b4";
window.DRAWIO_GITHUB_URL=window.DRAWIO_GITHUB_URL||"https://github.com";window.DRAWIO_GITHUB_API_URL=window.DRAWIO_GITHUB_API_URL||"https://api.github.com";window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.DRAWIO_DROPBOX_ID=window.DRAWIO_DROPBOX_ID||"jg02tc0onwmhlgm";window.SAVE_URL=window.SAVE_URL||window.DRAWIO_SERVER_URL+"save";window.OPEN_URL=window.OPEN_URL||window.DRAWIO_SERVER_URL+"import";window.PROXY_URL=window.PROXY_URL||window.DRAWIO_SERVER_URL+"proxy";
window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.NOTIFICATIONS_URL=window.NOTIFICATIONS_URL||window.DRAWIO_SERVER_URL+"notifications";window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||(urlParams.dev&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_SERVER_URL+"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.ALLOW_CUSTOM_PLUGINS=window.ALLOW_CUSTOM_PLUGINS||!1;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);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){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",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",lt:"Lietuvių",lv:"Latviešu",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:"العربية",fa:"فارسی",th:"ไทย",ta:"தமிழ்",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");
if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang);if(null==window.mxLanguage&&("test.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"viewer.diagrams.net"==window.location.hostname||"embed.diagrams.net"==window.location.hostname||"app.diagrams.net"==window.location.hostname||"jgraph.github.io"==window.location.hostname)&&(lang=navigator.language,null!=lang)){var dash=lang.indexOf("-");0<dash&&(lang=
lang.substring(0,dash));0<=window.mxLanguages.indexOf(lang)&&(window.mxLanguage=lang)}}"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="1"));"viewer.diagrams.net"==window.location.hostname&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}"dark"==urlParams.ui&&null==urlParams.dark&&(urlParams.dark="1");"sketch"==a&&null==urlParams.sketch&&"ac.draw.io"===window.location.hostname&&(urlParams.sketch="1");return a}();
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem("1"==urlParams.sketch?".sketch-config":".drawio-config"),b=!1;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&null==urlParams.splash&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,
8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
"[object SVGForeignObjectElement]"!==document.createElementNS("http://www.w3.org/2000/svg","foreignObject").toString()||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0<navigator.appVersion.indexOf("Win"),IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),IS_LINUX:/\bLinux\b/.test(navigator.appVersion),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(0<navigator.appVersion.indexOf("Mac")),IS_LOCAL:0>document.location.href.indexOf("http://")&&
0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_SVG},link:function(a,b,c,d){c=c||document;var e=c.createElement("link");e.setAttribute("rel",a);e.setAttribute("href",b);e.setAttribute("charset","UTF-8");e.setAttribute("type","text/css");d&&e.setAttribute("id",d);c.getElementsByTagName("head")[0].appendChild(e)},loadResources:function(a,b){function c(){0==--d&&a()}for(var d=mxClient.defaultBundles.length,e=0;e<mxClient.defaultBundles.length;e++)mxResources.add(mxClient.defaultBundles[e],
b,c)},include:function(a){document.write('<script src="'+a+'">\x3c/script>')}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1);"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);
"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath="images";
mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet","mxgraph/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("wrap","off");
mxLog.textarea.setAttribute("readOnly","true");mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);
mxLog.addButton("Info",function(g){mxLog.info()});mxLog.addButton("DOM",function(g){g=mxUtils.getInnerHtml(document.body);mxLog.debug(g)});mxLog.addButton("Trace",function(g){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(g){try{mxUtils.copy(mxLog.textarea.value)}catch(k){mxUtils.alert(k)}});mxLog.addButton("Show",function(g){try{mxUtils.popup(mxLog.textarea.value)}catch(k){mxUtils.alert(k)}});mxLog.addButton("Clear",
function(g){mxLog.textarea.value=""});d=c=0;"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;mxLog.window.title.style.paddingRight="80px";mxLog.window.title.setAttribute("title",
a);if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||11==document.documentMode){var f=mxLog.window.getElement();a=function(g,k){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,
b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){mxLog.TRACE&&(b=0!=b?" ("+((new Date).getTime()-b)+" ms)":
"",mxLog.writeln("Leaving "+a+b))},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):
mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if(null!=a){if(null==a[mxObjectIdentity.FIELD_NAME])if("object"===typeof a){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}else"function"===typeof a&&(a[mxObjectIdentity.FIELD_NAME]="Function#"+mxObjectIdentity.counter++);return a[mxObjectIdentity.FIELD_NAME]}return null},
clear:function(a){"object"!==typeof a&&"function"!==typeof a||delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){a=mxObjectIdentity.get(a);var c=this.map[a];this.map[a]=b;return c};
mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getCount=function(){var a=0,b;for(b in this.map)a++;return a};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
var mxResources={resources:{},extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b,c){b=null!=b?b:null!=mxClient.language?mxClient.language.toLowerCase():mxConstants.NONE;if(b!=mxConstants.NONE){var d=mxResources.getDefaultBundle(a,b),e=mxResources.getSpecialBundle(a,b),f=function(){if(null!=e)if(c)mxUtils.get(e,function(l){mxResources.parse(l.getText());c()},function(){c()});else try{var k=mxUtils.load(e);k.isReady()&&mxResources.parse(k.getText())}catch(l){}else null!=
c&&c()};if(null!=d)if(c)mxUtils.get(d,function(k){mxResources.parse(k.getText());f()},function(){f()});else try{var g=mxUtils.load(d);g.isReady()&&mxResources.parse(g.getText());f()}catch(k){}else f()}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=
unescape(c)):mxResources.resources[d]=c}}}},containsKey:function(a){return null!=mxResources.resources[a]},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);null!=a&&null!=b&&(a=mxResources.replacePlaceholders(a,b));return a},replacePlaceholders:function(a,b){for(var c=[],d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),d=null):null!=d?d+=f:c.push(f)}return c.join("")},loadResources:function(a){mxResources.add(mxClient.basePath+
"/resources/editor",null,function(){mxResources.add(mxClient.basePath+"/resources/graph",null,a)})}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;
mxRectangle.prototype.constructor=mxRectangle;mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.intersect=function(a){if(null!=a){var b=this.x+this.width,c=a.x+a.width,d=this.y+this.height,e=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(b,c)-this.x;this.height=Math.min(d,e)-this.y}};
mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a;return this};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
mxRectangle.fromPoint=function(a){return new mxRectangle(a.x,a.y,0,0)};mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};
var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,q=(l.geometry.y-
l.previous.y)*n,r=(l.geometry.width-l.previous.width)*n;n*=l.geometry.height-l.previous.height;0==d?(m.x-=p,m.y-=q,m.width-=r,m.height-=n):(m.x+=p/10,m.y+=q/10,m.width+=r/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,c),
mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",lightDarkColorSupported:function(){var a=document.createElement("div");a.style.color="light-dark(white, black)";return"light-dark(white, black)"===a.style.color}(),preferDarkColor:!1,lightDarkColorRegex:/light-dark\(\s*(#[0-9a-fA-F]{3,6}|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*,\s*(#[0-9a-fA-F]{3,6}|rgba?\([^)]+\)|var\([^)]+\)|[a-zA-Z]+)\s*\)/,
varColorRegex:/^var\([^)]+\)/,hexColorRegex:/(^#[a-zA-Z0-9]*$)/,rgbaColorRegex:/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i,canvasContext:function(){var a=null;try{a=document.createElement("canvas").getContext("2d")}catch(b){}return a}(),validInvalidColor:"rgba(0, 0, 0, 0)",normalizedValidInvalidColor:"rgba(0,0,0,0)",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE&&
(null==document.documentMode||9>document.documentMode)?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),getCssFontFamily:function(a){if("string"===typeof a){a=a.split(",");for(var b=0;b<a.length;b++)a[b]=mxUtils.trim(a[b]),'"'==a[b].charAt(0)&&'"'==a[b].charAt(a[b].length-1)&&(a[b]=a[b].substring(1,a[b].length-1));a=a.join(", ")}return a},parseCssFontFamily:function(a,b){if("string"===typeof a){a=a.split(",");for(var c=0;c<a.length;c++)a[c]=
mxUtils.trim(a[c]),'"'==a[c].charAt(0)&&'"'==a[c].charAt(a[c].length-1)&&(a[c]=a[c].substring(1,a[c].length-1)),b&&(a[c]=mxUtils.htmlEntities(a[c])),a[c]='"'+a[c]+'"';a=a.join(", ")}return a},parseCssNumber:function(a){"thin"==a?a="2":"medium"==a?a="4":"thick"==a&&(a="6");a=parseFloat(a);isNaN(a)&&(a=0);return a},setPrefixedStyle:function(){var a=null;mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&9<=document.documentMode&&10>document.documentMode&&
(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+
a)}else try{b=eval(a)}catch(c){mxLog.warn(c.message+" while evaluating "+a)}return b},findNode:function(a,b,c){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var d=a.getAttribute(b);if(null!=d&&d==c)return a}for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},getFunctionName:function(a){var b=null;null!=a&&(null!=a.name?b=a.name:(b=mxUtils.trim(a.toString()),/^function\s/.test(b)&&(b=mxUtils.ltrim(b.substring(9)),a=b.indexOf("("),0<a&&(b=b.substring(0,
a)))));return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},lastIndexOf:function(a,b){if(null!=a&&null!=b)for(var c=a.length-1;0<=c;c--)if(a[c]==b)return c;return-1},forEach:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)b(a[c]);return a},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},addItems:function(a,
b){for(var c=0;c<b.length;c++)null!=b[c]&&(b[c].constructor==Array?mxUtils.addItems(a,b[c]):0>mxUtils.indexOf(a,b[c])&&a.push(b[c]));return a},isNode:function(a,b,c,d){return null==a||a.constructor!==Element||null!=b&&a.nodeName.toLowerCase()!=b.toLowerCase()?!1:null==c||a.getAttribute(c)==d},isAncestorNode:function(a,b){for(;null!=b;){if(b==a)return!0;b=b.parentNode}return!1},visitNodes:function(a,b){if(a.nodeType==mxConstants.NODETYPE_ELEMENT)for(b(a),a=a.firstChild;null!=a;)mxUtils.visitNodes(a,
b),a=a.nextSibling},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;var c=[];for(a=a.firstChild;null!=a;)a.nodeType==b&&c.push(a),a=a.nextSibling;return c},removeChildNodes:function(a){for(;null!=a.lastChild;)a.removeChild(a.lastChild)},importNode:function(a,b,c){return mxClient.IS_IE&&(null==document.documentMode||10>document.documentMode)?mxUtils.importNodeImplementation(a,b,c):a.importNode(b,c)},importNodeImplementation:function(a,b,c){switch(b.nodeType){case 1:var d=a.createElement(b.nodeName);
if(b.attributes&&0<b.attributes.length)for(var e=0;e<b.attributes.length;e++)d.setAttribute(b.attributes[e].nodeName,b.getAttribute(b.attributes[e].nodeName));if(c&&b.childNodes&&0<b.childNodes.length)for(e=0;e<b.childNodes.length;e++)d.appendChild(mxUtils.importNodeImplementation(a,b.childNodes[e],c));return d;case 3:case 4:case 8:return a.createTextNode(null!=b.nodeValue?b.nodeValue:b.value)}},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument&&
(a=document.implementation.createDocument("","",null));return a},parseXml:function(a){var b=new DOMParser,c=b.parseFromString(a,"text/xml"),d=null!=c?c.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(c=b.parseFromString(a.replace(/&#([0-9a-fA-F]+);/g,""),"text/xml"));return c},getSvgDefs:function(a){var b=a.ownerDocument,c=a.getElementsByTagName("defs");0==c.length||c[0].parentNode!=a?(b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"defs"):b.createElement("defs"),null!=
a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=c[0];return b},clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges()}:function(){}}(),removeWhitespace:function(a,b){for(a=b?a.previousSibling:a.nextSibling;null!=a&&a.nodeType==mxConstants.NODETYPE_TEXT;){var c=b?a.previousSibling:
a.nextSibling,d=mxUtils.getTextContent(a);0==mxUtils.trim(d).length&&a.parentNode.removeChild(a);a=c}},htmlEntities:function(a,b,c,d){a=String(null!=a?a:"");a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==c||c)a=a.replace(/"/g,"&quot;"),a=a.replace(/'/g,"&#39;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");if(null==d||d)a=a.replace(/\t/g,"&#x9;");return a},decodeHtml:function(a){var b=document.createElement("textarea");b.innerHTML=a;return b.value},getXml:function(a,
b){var c="";mxClient.IS_IE||mxClient.IS_IE11?c=mxUtils.getPrettyXml(a,"","",""):null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c.replace(/\n/g,b||"&#xa;")},getPrettyXml:function(a,b,c,d,e){var f=[];if(null!=a)if(b=null!=b?b:" ",c=null!=c?c:"",d=null!=d?d:"\n",null!=a.namespaceURI&&a.namespaceURI!=e&&(e=a.namespaceURI,null==a.getAttribute("xmlns")&&a.setAttribute("xmlns",a.namespaceURI)),
a.nodeType==mxConstants.NODETYPE_DOCUMENT)f.push(mxUtils.getPrettyXml(a.documentElement,b,c,d,e));else if(a.nodeType==mxConstants.NODETYPE_DOCUMENT_FRAGMENT){var g=a.firstChild;if(null!=g)for(;null!=g;)f.push(mxUtils.getPrettyXml(g,b,c,d,e)),g=g.nextSibling}else if(a.nodeType==mxConstants.NODETYPE_COMMENT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+"\x3c!--"+a+"--\x3e"+d);else if(a.nodeType==mxConstants.NODETYPE_TEXT)a=mxUtils.trim(mxUtils.getTextContent(a)),0<a.length&&f.push(c+mxUtils.htmlEntities(a,
!1,!1)+d);else if(a.nodeType==mxConstants.NODETYPE_CDATA)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+"<![CDATA["+a+"]]"+d);else{f.push(c+"<"+a.nodeName);g=a.attributes;if(null!=g)for(var k=0;k<g.length;k++){var l=mxUtils.htmlEntities(g[k].value);f.push(" "+g[k].nodeName+'="'+l+'"')}g=a.firstChild;if(null!=g){for(f.push(">"+d);null!=g;)f.push(mxUtils.getPrettyXml(g,b,c+b,d,e)),g=g.nextSibling;f.push(c+"</"+a.nodeName+">"+d)}else f.push(" />"+d)}return f.join("")},extractTextWithWhitespace:function(a){function b(e){if(1!=
e.length||"BR"!=e[0].nodeName&&"\n"!=e[0].innerHTML)for(var f=0;f<e.length;f++){var g=e[f];"BR"==g.nodeName||"\n"==g.innerHTML||(1==e.length||0==f)&&"DIV"==g.nodeName&&"<br>"==g.innerHTML.toLowerCase()?d.push("\n"):(3===g.nodeType||4===g.nodeType?0<g.nodeValue.length&&d.push(g.nodeValue):8!==g.nodeType&&0<g.childNodes.length&&b(g.childNodes),f<e.length-1&&0<=mxUtils.indexOf(c,e[f+1].nodeName)&&d.push("\n"))}}var c="BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL".split(" "),d=[];b(a);return d.join("")},
replaceTrailingNewlines:function(a,b){for(var c="";0<a.length&&"\n"==a.charAt(a.length-1);)a=a.substring(0,a.length-1),c+=b;return a+c},getNodeValue:function(a){a=a.firstChild;for(var b=[];null!=a;)a.nodeType!=mxConstants.NODETYPE_TEXT&&a.nodeType!=mxConstants.NODETYPE_CDATA||null==a.nodeValue||b.push(mxUtils.trim(a.nodeValue)),a=a.nextSibling;return 0<b.length?b.join(""):""},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){void 0!==
a.innerText?a.innerText=b:a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].value;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),
b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){b=a.ownerDocument.createTextNode(b);null!=a&&a.appendChild(b);return b},writeln:function(a,b){b=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(b),a.appendChild(document.createElement("br")));return b},br:function(a,b){b=b||1;for(var c=
null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c,d){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(e){b(e)});null!=d&&(c.className=d);return c},para:function(a,b){var c=document.createElement("p");mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+
"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration="underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},getDocumentSize:function(){var a=
document.body,b=document.documentElement;try{return new mxRectangle(0,0,a.clientWidth||b.clientWidth,Math.max(a.clientHeight||0,b.clientHeight))}catch(c){return new mxRectangle}},fit:function(a,b){b=b||0;var c=mxUtils.getDocumentSize(),d=parseInt(a.offsetLeft),e=parseInt(a.offsetWidth),f=mxUtils.getDocumentScrollOrigin(a.ownerDocument),g=f.x;f=f.y;var k=g+c.width-b;d+e>k&&(a.style.left=Math.max(g+b,k-e)+"px");d=parseInt(a.offsetTop);e=parseInt(a.offsetHeight);c=f+c.height-b;d+e>c&&(a.style.top=Math.max(f+
b,c-e)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c,d,e,f,g){a=new mxXmlRequest(a,null,"GET");var k=a.setRequestHeaders;g&&(a.setRequestHeaders=function(l,m){k.apply(this,arguments);for(var n in g)l.setRequestHeader(n,g[n])});null!=d&&a.setBinary(d);a.send(b,c,e,f);return a},getAll:function(a,b,c){for(var d=a.length,e=[],f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(l,m){mxUtils.get(l,function(n){var p=n.getStatus();200>
p||299<p?g():(e[m]=n,d--,0==d&&b(e))},g)})(a[k],k);0==d&&b(e)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c);return a},getColorValue:function(a,b,c){a=null!=a?a[b]:null;if(null==a||"default"==a)a=c;return a},getNumber:function(a,
b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},isLightDarkColor:function(a){return"string"===typeof a&&"light-dark"==mxUtils.ltrim(a).substring(0,10)},isVarColor:function(a){return mxUtils.varColorRegex.test(a)},isHexColor:function(a){return mxUtils.hexColorRegex.test(a)},isRgbColor:function(a){return mxUtils.rgbaColorRegex.test(a)},isValidColor:function(a){if(null==a)return!1;a=String(a).replace(/\s/g,"");if(a.toLowerCase()==mxUtils.normalizedValidInvalidColor)return!0;mxUtils.canvasContext.fillStyle=
mxUtils.validInvalidColor;mxUtils.canvasContext.fillStyle=a;return mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor},isDarkColor:function(a){a=mxUtils.parseColor(a);return null!=a?128>.213*a.r+.715*a.g+.072*a.b:!1},parseLightDarkColor:function(a,b,c){var d=a,e=null;null!=a&&(a=a.match(mxUtils.lightDarkColorRegex))&&3===a.length&&(d=mxUtils.trim(a[1]),e=mxUtils.trim(a[2]));null==e&&(c||mxUtils.isVarColor(d))&&(e=d);e=null!=e?e:null!=b?b:mxUtils.getInverseColor(d);return{light:d,dark:e}},
getInverseColor:function(a,b,c){function d(m){return Math.round(b/100*(255-m)+m*(1-b/100))}function e(m){return Math.round(Math.max(0,Math.min(255,m)))}c=null!=c?c:180;b=null!=b?b:93;var f=0,g=0,k=0;if("transparent"==a.toLowerCase())return a;k=mxUtils.parseColor(a);if(null==k)return a;f=k.r;g=k.g;k=k.b;f=d(f);g=d(g);k=d(k);a=[1,0,0,0,1,0,0,0,1];var l=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);a[0]=.2126+.7874*l-.2126*c;a[1]=.7152-.7152*l-.7152*c;a[2]=.0722-.0722*l+.9278*c;a[3]=.2126-.2126*
l+.143*c;a[4]=.7152+(1-.7152)*l+.14*c;a[5]=.0722-.0722*l-.283*c;a[6]=.2126-.2126*l-.7874*c;a[7]=.7152-.7152*l+.7152*c;a[8]=.0722+.9278*l+.0722*c;c=e(a[0]*f+a[1]*g+a[2]*k);l=e(a[3]*f+a[4]*g+a[5]*k);f=e(a[6]*f+a[7]*g+a[8]*k);return"#"+(16777216|c<<16|l<<8|f).toString(16).slice(1)},addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",
cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?e.light==e.dark?e.light:"light-dark("+e.light+", "+e.dark+")":mxUtils.preferDarkColor?e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText=b.light==b.dark?b.light:"light-dark("+
b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var e in a)e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},
equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(null!=a[c]&&null==b[c]||null==a[c]&&null!=b[c]||null!=a[c]&&null!=b[c]&&(a[c].x!=b[c].x||a[c].y!=b[c].y))return!1;return!0},equalEntries:function(a,b){var c=0;if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){for(var d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||
a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c]){var d=
mxUtils.getFunctionName(a[c].constructor);b+=c+" => ["+d+"]\n"}else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return A;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&
(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=
Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=
new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,
mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;
break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=
mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=(a&mxConstants.DIRECTION_MASK_WEST)<<3;b|=(a&mxConstants.DIRECTION_MASK_NORTH)<<
1;b|=(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var k=a.absolutePoints[g];e=mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,b,c);if(null==f||e<f)f=e,d=g-1;e=k}return d},getDirectedBounds:function(a,b,c,d,e){var f=mxUtils.getValue(c,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);d=null!=d?d:mxUtils.getValue(c,mxConstants.STYLE_FLIPH,
!1);e=null!=e?e:mxUtils.getValue(c,mxConstants.STYLE_FLIPV,!1);b.x=Math.round(Math.max(0,Math.min(a.width,b.x)));b.y=Math.round(Math.max(0,Math.min(a.height,b.y)));b.width=Math.round(Math.max(0,Math.min(a.width,b.width)));b.height=Math.round(Math.max(0,Math.min(a.height,b.height)));if(e&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||d&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.x,b.x=b.width,b.width=c;if(d&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||
e&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.y,b.y=b.height,b.height=c;d=mxRectangle.fromRectangle(b);f==mxConstants.DIRECTION_SOUTH?(d.y=b.x,d.x=b.height,d.width=b.y,d.height=b.width):f==mxConstants.DIRECTION_WEST?(d.y=b.height,d.x=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,d.width=b.height,d.height=b.x);return new mxRectangle(a.x+d.x,a.y+d.y,a.width-d.width-d.x,a.height-d.height-d.y)},getPerimeterPoint:function(a,b,c){for(var d=
null,e=0;e<a.length-1;e++){var f=mxUtils.intersection(a[e].x,a[e].y,a[e+1].x,a[e+1].y,b.x,b.y,c.x,c.y);if(null!=f){var g=c.x-f.x,k=c.y-f.y;f={p:f,distSq:k*k+g*g};null!=f&&(null==d||d.distSq>f.distSq)&&(d=f)}}return null!=d?d.p:null},intersectsPoints:function(a,b){for(var c=0;c<b.length-1;c++)if(mxUtils.rectangleIntersectsSegment(a,b[c],b[c+1]))return!0;return!1},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var k=c.x;b.x>c.x&&(a=c.x,k=b.x);k>g&&(k=g);a<
e&&(a=e);if(a>k)return!1;e=b.y;g=c.y;var l=c.x-b.x;1E-7<Math.abs(l)&&(c=(c.y-b.y)/l,b=b.y-c*b.x,e=c*a+b,g=c*k+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b,c){var d=a.width,e=a.height,f=b.width,g=b.height;if(!c&&(0>=f||0>=g||0>=d||0>=e))return!1;c=a.x;a=a.y;var k=b.x;b=b.y;f+=k;g+=b;d+=c;e+=a;return(f<k||f>c)&&(g<b||g>a)&&(d<c||d>k)&&(e<a||e>b)},intersectsHotspot:function(a,b,c,
d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),k=a.getCenterY(),l=a.width,m=a.height,n=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<n&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(k=a.y+n/2,m=n):(g=a.x+n/2,l=n));l=Math.max(e,l*d);m=Math.max(e,m*d);0<f&&(l=Math.min(l,f),m=Math.min(m,f));d=new mxRectangle(g-l/2,k-m/2,l,m);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),
g=new mxPoint(a.getCenterX(),a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){for(var c=0,d=0,e=!1,f=a,g=document.body,k=document.documentElement;null!=f&&f!=g&&f!=k&&!e;){var l=mxUtils.getCurrentStyle(f);null!=l&&(e=e||"fixed"==l.position);f=f.parentNode}b||e||(b=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c+=b.x,d+=b.y);a=a.getBoundingClientRect();null!=a&&(c+=a.left,d+=a.top);return new mxPoint(c,
d)},getDocumentScrollOrigin:function(a){a=a.defaultView||a.parentWindow;return new mxPoint(null!=a&&void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,null!=a&&void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)},getScrollOrigin:function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!0;for(var d=null!=a?a.ownerDocument:document,e=d.body,f=d.documentElement,g=new mxPoint,
k=!1;null!=a&&a!=e&&a!=f;){isNaN(a.scrollLeft)||isNaN(a.scrollTop)||(g.x+=a.scrollLeft,g.y+=a.scrollTop);var l=mxUtils.getCurrentStyle(a);null!=l&&(k=k||"fixed"==l.position);a=b?a.parentNode:null}!k&&c&&(a=mxUtils.getDocumentScrollOrigin(d),g.x+=a.x,g.y+=a.y);return g},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a,!1);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},removeJavascriptProtocol:function(a){for(a=null!=a?mxUtils.zapGremlins(a):null;null!=a&&"javascript:"===
mxUtils.ltrim(a.toLowerCase()).substring(0,11);)a=a.substring(a.toLowerCase().indexOf(":")+1);return a},zapGremlins:function(a){for(var b=0,c=[],d=0;d<a.length;d++){var e=a.charCodeAt(d);(32<=e||9==e||10==e||13==e)&&65535!=e&&65534!=e||(c.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&c.push(a.substring(b));return 0==c.length?a:c.join("")},ltrim:function(a,b){return null!=a?a.replace(new RegExp("^["+(b||"\\s|\\0")+"]+","g"),""):null},rtrim:function(a,b){return null!=a?a.replace(new RegExp("["+(b||
"\\s|\\0")+"]+$","g"),""):null},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,k){var l=(k-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(k-f)*(a-e))/l;e=((c-a)*(b-f)-(d-b)*(a-e))/l;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):
null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,
b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(a,b){mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?"":"alpha(opacity="+b+")":a.style.opacity=b/100},createElementNs:function(a,b,c){if(null!=a.createElementNS)return a.createElementNS(b,c);a=a.createElement(c);null!=namespace&&a.setAttribute("xmlns",b);return a},createImage:function(a){var b=document.createElement("img");
b.setAttribute("src",a);b.setAttribute("border","0");return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(d,e){var f=c.get(d);null==f&&(f=mxCellPath.create(d).split(mxCellPath.PATH_SEPARATOR),c.put(d,f));d=c.get(e);null==d&&(d=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,d));e=mxCellPath.compare(f,d);return 0==e?0:0<e==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=
[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b){a=a.split(";");for(var c=0,d=0;d<a.length;d++){if(a[d]==b)return c;c+=a[d].length+1}}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a){a=a.split(";");for(var d=0;d<a.length;d++)a[d]!=b&&c.push(a[d])}return c.join(";")},
removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},parseColor:function(a,b){b=null!=b?b:1;var c=null;if(null!=a&&a!=mxConstants.NONE){if(mxUtils.isRgbColor(a)){a=a.replace(/[^\d,]/g,"").split(",");
c=parseInt(a[0]);var d=parseInt(a[1]),e=parseInt(a[2]);4==a.length&&(b=parseFloat(a[3]))}else mxUtils.isHexColor(a)||(a=mxUtils.color2hex(a)),a=a.substring(1),c=parseInt(a.substr(0,2),16),d=parseInt(a.substr(2,2),16),e=parseInt(a.substr(4,2),16),6<a.length&&(b=parseInt(a.substr(6,2),16)/255);c={r:c,g:d,b:e,a:b}}return c},hex2rgb:function(a){var b=mxUtils.parseColor(a);null!=b&&(a="rgb("+b.r+", "+b.g+", "+b.b+")");return a},hex2rgba:function(a,b){b=mxUtils.parseColor(a,b);null!=b&&(a="rgba("+b.r+", "+
b.g+", "+b.b+", "+b.a+")");return a},rgba2hex:function(a){var b=mxUtils.parseColor(a);return null!=b?"#"+("0"+b.r.toString(16)).slice(-2)+("0"+b.g.toString(16)).slice(-2)+("0"+b.b.toString(16)).slice(-2):a},color2hex:function(a,b){b=null!=b?b:"#000000";try{null!=a&&(a=String(a).replace(/\s/g,""),a.toLowerCase()==mxUtils.normalizedValidInvalidColor?b="#000000":(mxUtils.canvasContext.fillStyle=mxUtils.validInvalidColor,mxUtils.canvasContext.fillStyle=a,mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor?
b=mxUtils.canvasContext.fillStyle:1<a.length&&"#"==a.charAt(0)&&(mxUtils.canvasContext.fillStyle=a.substring(1),mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor&&(b=mxUtils.canvasContext.fillStyle))))}catch(c){}return b},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c+";");else if(a.substring(0,b.length+1)==b+"="){var e=a.indexOf(";");a=d?b+"="+c+(0>e?";":a.substring(e)):0>e||e==a.length-1?"":a.substring(e+1)}else{var f=
a.indexOf(";"+b+"=");0>f?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c+";"):(e=a.indexOf(";",f+1),a=d?a.substring(0,f+1)+b+"="+c+(0>e?";":a.substring(e)):a.substring(0,f)+(0>e?";":a.substring(e)))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?
b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f);g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=-.5,d=-.5;a==mxConstants.ALIGN_LEFT?c=0:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_TOP?d=0:b==mxConstants.ALIGN_BOTTOM&&(d=
-1);return new mxPoint(c,d)},getSizeForString:function(a,b,c,d,e){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var f=document.createElement("div");f.style.fontFamily=c;f.style.fontSize=Math.round(b)+"px";f.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*mxSvgCanvas2D.prototype.lineHeightCorrection;null!=e&&((e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(f.style.fontWeight="bold"),(e&mxConstants.FONT_ITALIC)==
mxConstants.FONT_ITALIC&&(f.style.fontStyle="italic"),b=[],(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push("underline"),(e&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push("line-through"),0<b.length&&(f.style.textDecoration=b.join(" ")));f.style.position="absolute";f.style.visibility="hidden";f.style.display="inline-block";f.style.zoom="1";null!=d?(f.style.width=d+"px",f.style.whiteSpace="normal"):f.style.whiteSpace="nowrap";f.innerHTML=a;document.body.appendChild(f);
a=new mxRectangle(0,0,f.offsetWidth,f.offsetHeight);document.body.removeChild(f);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,k=f.isEventsEnabled();f.setEventsEnabled(!1);var l=f.drawPane,m=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var n=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=n,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=l,f.overlayPane=m,f.setEventsEnabled(k)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=mxRectangle.fromRectangle(b.getGraphBounds());b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;var f=Math.sqrt(a);d=Math.sqrt(b/d.height/(e/c));c=f*d;d=f/d;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){g=Math.floor(c)/c;var k=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;
if(10<f)break}return e*c/b*.99999},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();9==document.documentMode&&b.writeln('\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]--\x3e');var g=a.getGraphBounds(),k=Math.ceil(c-g.x),l=Math.ceil(d-g.y);null==e&&(e=Math.ceil(g.width+c)+Math.ceil(Math.ceil(g.x)-g.x));null==f&&(f=Math.ceil(g.height+d)+Math.ceil(Math.ceil(g.y)-g.y));if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";
g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets[c].cssText}catch(m){}d=d+'</style></head><body style="margin:0px;"><div style="position:absolute;overflow:hidden;width:'+(e+"px;height:"+f+'px;"><div style="position:relative;left:'+k+"px;top:"+l+'px;">')+a.container.innerHTML;b.writeln(d+"</div></div></body><html>");b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");
for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln('</head><body style="margin:0px;"></body></html>');b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="absolute";e.style.left=
k+"px";e.style.top=l+"px";f=a.container.firstChild;for(d=null;null!=f;)g=f.cloneNode(!0),f==a.view.drawPane.ownerSVGElement?(c.appendChild(g),d=g):e.appendChild(g),f=f.nextSibling;b.body.appendChild(c);null!=e.firstChild&&b.body.appendChild(e);null!=d&&(d.style.minWidth="",d.style.minHeight="",d.firstChild.setAttribute("transform","translate("+k+","+l+")"))}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();
b.close()};mxClient.IS_GC?b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";b=document.createElement("pre");b.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(b);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),b=c.document.createElement("pre"),b.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(b))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),b=
document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(k){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,k,l,m){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
a.autoscroll=g;a.setGuidesEnabled(!1);null!=l&&(a.highlightDropTargets=l);null!=m&&(a.getDropTarget=m);a.getGraphForEvent=function(n){return"function"==typeof b?b(n):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},k&&(a.createPreviewElement=function(n){var p=d.cloneNode(!0),q=parseInt(p.style.width),r=parseInt(p.style.height);p.style.width=Math.round(q*n.view.scale)+"px";p.style.height=Math.round(r*n.view.scale)+"px";return p}));return a},format:function(a){return parseFloat(parseFloat(a).toFixed(2))}},
mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"#808080",VML_SHADOWCOLOR:"#808080",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_BLUR:2,SHADOW_OPACITY:1,
NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",OUTLINE_HIGHLIGHT_COLOR:"#00FF00",OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:"move",
CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_TERMINAL_HANDLE:"pointer",CURSOR_BEND_HANDLE:"crosshair",CURSOR_VIRTUAL_BEND_HANDLE:"crosshair",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,
EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:6,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,DEFAULT_TEXT_DIRECTION:"",LINE_HEIGHT:1.2,WORD_WRAP:"normal",
ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:0,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,827,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,827),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",
STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_SOURCE_PORT_CONSTRAINT:"sourcePortConstraint",STYLE_TARGET_PORT_CONSTRAINT:"targetPortConstraint",STYLE_OPACITY:"opacity",STYLE_FILL_OPACITY:"fillOpacity",STYLE_FILL_STYLE:"fillStyle",STYLE_STROKE_OPACITY:"strokeOpacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_TEXT_DIRECTION:"textDirection",STYLE_OVERFLOW:"overflow",STYLE_BLOCK_SPACING:"blockSpacing",STYLE_ORTHOGONAL:"orthogonal",
STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_DX:"exitDx",STYLE_EXIT_DY:"exitDy",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_DX:"entryDx",STYLE_ENTRY_DY:"entryDy",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_POINTER_EVENTS:"pointerEvents",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",
STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_WIDTH:"labelWidth",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",
STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",
STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_TEXT_SHADOW:"textShadow",STYLE_SHADOW_OFFSET_X:"shadowOffsetX",STYLE_SHADOW_OFFSET_Y:"shadowOffsetY",STYLE_SHADOW_BLUR:"shadowBlur",STYLE_SHADOWCOLOR:"shadowColor",STYLE_SHADOW_OPACITY:"shadowOpacity",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",
STYLE_SWIMLANE_HEAD:"swimlaneHead",STYLE_SWIMLANE_BODY:"swimlaneBody",STYLE_ENDFILL:"endFill",STYLE_ENDFILLCOLOR:"endFillColor",STYLE_STARTFILL:"startFill",STYLE_STARTFILLCOLOR:"startFillColor",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_FIX_DASH:"fixDash",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_ABSOLUTE_ARCSIZE:"absoluteArcSize",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",
STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ANCHOR_POINT_DIRECTION:"anchorPointDirection",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_AUTOSIZE_GRID:"autosizeGrid",STYLE_FIXED_WIDTH:"fixedWidth",
STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BACKGROUND_OUTLINE:"backgroundOutline",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_RESIZE_WIDTH:"resizeWidth",STYLE_RESIZE_HEIGHT:"resizeHeight",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_JETTY_SIZE:"jettySize",STYLE_SOURCE_JETTY_SIZE:"sourceJettySize",STYLE_TARGET_JETTY_SIZE:"targetJettySize",STYLE_LOOP:"loopStyle",
STYLE_ORTHOGONAL_LOOP:"orthogonalLoop",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",STYLE_CLIP_PATH:"clipPath",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_STRIKETHROUGH:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_ARROW_CONNECTOR:"arrowConnector",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",
SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_CLASSIC_THIN:"classicThin",ARROW_BLOCK:"block",ARROW_BLOCK_THIN:"blockThin",ARROW_OPEN:"open",ARROW_OPEN_THIN:"openThin",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",
DIRECTION_WEST:"west",DIRECTION_RADIAL:"radial",TEXT_DIRECTION_DEFAULT:"",TEXT_DIRECTION_AUTO:"auto",TEXT_DIRECTION_LTR:"ltr",TEXT_DIRECTION_RTL:"rtl",TEXT_DIRECTION_VERTICAL_LR:"vertical-lr",TEXT_DIRECTION_VERTICAL_RL:"vertical-rl",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",
EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_HEXAGON:"hexagonPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.sourceState=this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.sourceState=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};
mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};
mxMouseEvent.prototype.getState=function(){return this.state};mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};
mxMouseEvent.prototype.consume=function(a){(null!=a?a:null!=this.evt.touches||mxEvent.isMouseEvent(this.evt))&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};
mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};
mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=0;c<this.eventListeners.length;c+=2){var d=this.eventListeners[c];null!=d&&d!=a.getName()||this.eventListeners[c+1].apply(this,[b,a])}}};
var mxEvent={addListener:function(){if(window.addEventListener){var a=!1;try{document.addEventListener("test",function(){},Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){a=!0}}))}catch(b){}return function(b,c,d){b.addEventListener(c,d,a?{passive:!1}:!1);null==b.mxListenerList&&(b.mxListenerList=[]);b.mxListenerList.push({name:c,f:d})}}return function(b,c,d){b.attachEvent("on"+c,d);null==b.mxListenerList&&(b.mxListenerList=[]);b.mxListenerList.push({name:c,f:d})}}(),removeListener:function(){var a=
function(b,c,d){if(null!=b.mxListenerList){c=b.mxListenerList.length;for(var e=0;e<c;e++)if(b.mxListenerList[e].f==d){b.mxListenerList.splice(e,1);break}0==b.mxListenerList.length&&(b.mxListenerList=null)}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,
b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointermove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?
"pointerdown":"mousedown",b);null!=c&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointermove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"pointerup":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var k=function(l){return"function"==typeof c?c(l):c};mxEvent.addGestureListeners(a,
function(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(l,k(l)))},function(l){null!=e?e(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(l,k(l)))},function(l){null!=f?f(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(l,k(l)))});mxEvent.addListener(a,"dblclick",function(l){if(null!=g)g(l);else if(!mxEvent.isConsumed(l)){var m=k(l);b.dblClick(l,null!=m?m.cell:null)}})},release:function(a){try{if(null!=
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,"gesturechange",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,"gestureend",function(g){mxEvent.consume(g)})}else{var d=
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.type&&0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.type&&0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return!mxClient.IS_ANDROID&&
mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.type&&0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},
LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",
FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",
BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",
REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",
UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;
mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&this.acceptResponse&&(this.acceptResponse=!1,a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),null!=b&&(this.request.onerror=
mxUtils.bind(this,function(e){this.acceptResponse&&(this.acceptResponse=!1,b(this,e))})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";b=0<this.params.indexOf("&")?this.params.split("&"):this.params.split();for(var e=0;e<b.length;e++){var f=b[e].indexOf("=");if(0<f){var g=b[e].substring(0,f);f=b[e].substring(f+
1);this.decodeSimulateValues&&(f=decodeURIComponent(f));var k=a.createElement("textarea");k.setAttribute("wrap","off");k.setAttribute("name",g);mxUtils.write(k,f);d.appendChild(k)}}a.body.appendChild(d);d.submit();null!=d.parentNode&&d.parentNode.removeChild(d);null!=c&&(window.onbeforeunload=c)};
var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b,!1);return b},removeCells:function(a,b,c){a.removeCells(b,c)},copy:function(a,b){b=b||a.getSelectionCells();b=a.getExportableCells(a.model.getTopmostCells(b));mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(b));
return b},paste:function(a){var b=null;if(!mxClipboard.isEmpty()){b=a.getImportableCells(mxClipboard.getCells());var c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent();b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}return b}};
function mxWindow(a,b,c,d,e,f,g,k,l,m){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,m),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==k||k)&&this.installMoveHandler(),null!=l&&null!=l.parentNode?l.parentNode.replaceChild(this.div,l):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.touchAction="none");null!=c&&(this.div.style.width=c+"px",this.table.style.width=c+"px");null!=d&&(this.div.style.height=d+"px",this.table.style.height=d+"px");a=document.createElement("tbody");b=document.createElement("tr");
this.title=document.createElement("td");this.title.className=e+"Title";this.buttons=document.createElement("div");this.buttons.style.position="absolute";this.buttons.style.display="inline-block";this.buttons.style.right="4px";this.buttons.style.top="5px";this.title.appendChild(this.buttons);b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=
document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);"DIV"!=this.content.nodeName.toUpperCase()&&(this.contentWrapper.style.height="100%");this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(f){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,
e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"");this.title.appendChild(this.buttons)};mxWindow.prototype.setScrollable=function(a){if(null==navigator.userAgent||0>navigator.userAgent.indexOf("Presto/2.5"))this.contentWrapper.style.overflow=a?"auto":"hidden"};
mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement());a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="0px";this.resize.style.right="0px";this.resize.style.zIndex="2";this.resize.setAttribute("src",this.resizeImage);this.resize.style.cursor="nwse-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(k){this.activate();b=mxEvent.getClientX(k);c=mxEvent.getClientY(k);d=this.div.offsetWidth;e=this.div.offsetHeight;
mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",k));mxEvent.consume(k)});var f=mxUtils.bind(this,function(k){if(null!=b&&null!=c){var l=mxEvent.getClientX(k)-b,m=mxEvent.getClientY(k)-c;this.setSize(d+l,e+m);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",k));mxEvent.consume(k)}}),g=mxUtils.bind(this,function(k){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,
"event",k)),mxEvent.consume(k))});mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);this.div.style.width=a+"px";this.div.style.height=b+"px";this.table.style.width=a+"px";this.table.style.height=b+"px";this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"};mxWindow.prototype.setMinimizable=function(a){this.minimizeImg.style.display=a?"":"none"};
mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
mxWindow.prototype.toggleMinimized=function(a){this.activate();if(this.minimized)this.minimized=!1,this.minimizeImg.setAttribute("src",this.minimizeImage),this.minimizeImg.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=this.maxDisplay,this.div.style.height=this.height,this.table.style.height=this.height,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",a));else{this.minimized=!0;this.minimizeImg.setAttribute("src",
this.normalizeImage);this.minimizeImg.setAttribute("title","Normalize");this.contentWrapper.style.display="none";this.maxDisplay=this.maximize.style.display;this.maximize.style.display="none";this.height=this.table.style.height;var b=this.getMinimumSize();0<b.height&&(this.div.style.height=b.height+"px",this.table.style.height=b.height+"px");0<b.width&&(this.div.style.width=b.width+"px",this.table.style.width=b.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,
"event",a))}};
mxWindow.prototype.installMinimizeHandler=function(){this.minimizeImg=document.createElement("img");this.minimizeImg.setAttribute("src",this.minimizeImage);this.minimizeImg.setAttribute("title","Minimize");this.minimizeImg.style.cursor="pointer";this.minimizeImg.style.marginLeft="2px";this.minimizeImg.style.display="none";this.buttons.appendChild(this.minimizeImg);this.minimized=!1;this.height=this.maxDisplay=null;var a=mxUtils.bind(this,function(b){this.toggleMinimized(b);mxEvent.consume(b)});mxEvent.addGestureListeners(this.minimizeImg,
a)};mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="2px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.buttons.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=null,g=mxUtils.bind(this,function(k){this.activate();if("none"!=this.maximize.style.display){if(a){a=
!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimizeImg.style.display=f;this.div.style.left=b+"px";this.div.style.top=c+"px";this.div.style.height=d;this.div.style.width=e;l=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==l.overflow||null!=this.resize)this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=
e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",k))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";f=this.minimizeImg.style.display;this.minimizeImg.style.display="none";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;this.div.style.left="0px";this.div.style.top="0px";
l=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);this.div.style.width=document.body.clientWidth-2+"px";this.div.style.height=l-2+"px";this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=l-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");var l=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==l.overflow||null!=this.resize)this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+
"px";this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",k))}mxEvent.consume(k)}});mxEvent.addGestureListeners(this.maximize,g);mxEvent.addListener(this.title,"dblclick",g)};
mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(k){var l=mxEvent.getClientX(k)-b,m=mxEvent.getClientY(k)-c;this.setLocation(d+l,e+m);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",k));mxEvent.consume(k)}),g=mxUtils.bind(this,function(k){mxEvent.removeGestureListeners(document,null,f,
g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",k));mxEvent.consume(k)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.touchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.buttons.appendChild(this.closeImg);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,"event",a));this.destroyOnClose?this.destroy():
this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
mxWindow.prototype.isVisible=function(){return null!=this.div?"none"!=this.div.style.display:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&(this.isVisible()!=a?a?this.show():this.hide():this.fireEvent(new mxEventObject(a?mxEvent.SHOW:mxEvent.HIDE)))};
mxWindow.prototype.show=function(){this.div.style.display="";this.activate();"auto"!=mxUtils.getCurrentStyle(this.contentWrapper).overflow&&null==this.resize||"none"==this.contentWrapper.style.display||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px");this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.display="none";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);d=document.createElement("td");var e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
mxForm.prototype.addText=function(a,b,c){var d=document.createElement("input");d.setAttribute("type",c||"text");d.value=b;return this.addField(a,d)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c,d,e){this.src=a;this.width=null!=b?b:this.width;this.height=null!=c?c:this.height;this.x=null!=d?d:this.x;this.y=null!=e?e:this.y}mxImage.prototype.src=null;mxImage.prototype.width=0;mxImage.prototype.height=0;mxImage.prototype.x=0;
mxImage.prototype.y=0;function mxDivResizer(a,b){"div"==a.nodeName.toLowerCase()&&(null==b&&(b=window),this.div=a,a=mxUtils.getCurrentStyle(a),null!=a&&(this.resizeWidth="auto"==a.width,this.resizeHeight="auto"==a.height),mxEvent.addListener(b,"resize",mxUtils.bind(this,function(c){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)})),this.resize())}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(c){this.mouseDown(c);mxEvent.consume(c)}));mxEvent.addListener(a,"dragstart",function(c){mxEvent.consume(c)});this.eventConsumer=function(c,d){c=d.getProperty("eventName");d=d.getProperty("event");c!=mxEvent.MOUSE_DOWN&&d.consume()}}mxDragSource.prototype.element=null;
mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.previewOffset=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;
mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.checkEventSource=!0;mxDragSource.prototype.isEnabled=function(){return this.enabled};mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};
mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c,d){return a.getCellAt(b,c)};mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
mxDragSource.prototype.isActive=function(){return null!=this.mouseMoveHandler};mxDragSource.prototype.reset=function(){null!=this.currentGraph&&(this.dragExit(this.currentGraph),this.currentGraph=null);this.removeDragElement();this.removeListeners();this.stopDrag()};
mxDragSource.prototype.mouseDown=function(a){this.enabled&&!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))};
mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);this.checkEventSource&&mxClient.IS_SVG&&(this.dragElement.style.pointerEvents="none")};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()};
mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.getElementForEvent=function(a){return mxEvent.isTouchEvent(a)||mxEvent.isPenEvent(a)?document.elementFromPoint(mxEvent.getClientX(a),mxEvent.getClientY(a)):mxEvent.getSource(a)};
mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();b=this.getElementForEvent(b);if(this.checkEventSource)for(;null!=b&&b!=a.container;)b=b.parentNode;return null!=b&&c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null==b||this.graphContainsEvent(b,a)||(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&mxUtils.setOpacity(this.dragElement,
0);else{b=mxEvent.getClientX(a);var c=mxEvent.getClientY(a);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);mxUtils.setOpacity(this.dragElement,this.dragElementOpacity);null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}mxEvent.consume(a)};
mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)};
mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null};
mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);null!=this.previewElement&&this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none");this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,
this.eventConsumer)};mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x-a.panDx;c=mxEvent.getClientY(b)-c.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c,b),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==
this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");d=this.isGridEnabled()&&a.isGridEnabledEvent(b);var f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))a=parseInt(this.previewElement.style.width),f=parseInt(this.previewElement.style.height),a=new mxRectangle(0,0,a,f),c=new mxPoint(e,c),c=this.currentGuide.move(a,c,d,!0),f=!1,e=c.x,c=c.y;else if(d){d=a.view.scale;b=
a.view.translate;var g=a.gridSize/2;e=(a.snap(e/d-b.x-g)+b.x)*d;c=(a.snap(c/d-b.y-g)+b.y)*d}null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};
mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler.apply(this,arguments);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),k=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(l){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
mxUtils.bind(this,function(l){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var m=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();m!=g&&(this.currentImg=g,this.menu.factoryMethod=f,m=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(m.x,m.y,null,l),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(d){var e=c.options[c.selectedIndex];c.selectedIndex=0;null!=e.funct&&e.funct(d)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(g){g=this.selectedMode.altIcon;null!=g?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",g)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
(this.defaultMode=f);this.selectedMode=f;g=f.altIcon;null!=g?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",g)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(k){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(k){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){!a&&this.noReset||this.selectedMode==this.defaultMode||this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;
mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};
mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"string"===typeof a&&"data:image"!=a.substring(0,10)&&"http://"!=a.substring(0,7)&&"file://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"//"!=a.substring(0,2)};
mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(c,d){},mouseMove:function(c,d){},mouseUp:mxUtils.bind(this,function(c,d){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.stop()});mxEvent.addListener(document,"mouseup",this.mouseUpListener);var b=mxUtils.bind(this,
function(){this.scrollbars=mxUtils.hasScrollbars(a.container);this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;this.scrollbars?(a.panGraph(-a.container.scrollLeft-Math.ceil(this.dx),-a.container.scrollTop-Math.ceil(this.dy)),a.panDx=this.scrollLeft-a.container.scrollLeft,a.panDy=this.scrollTop-a.container.scrollTop,a.fireEvent(new mxEventObject(mxEvent.PAN))):a.panGraph(this.getDx(),
this.getDy())}),this.delay)});this.isActive=function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;this.dx=0>this.dx&&Math.abs(this.dx)<
this.border?this.border+this.dx:this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+(null!=f?f:0)-g.scrollTop-g.clientHeight;this.dy=0>this.dy&&Math.abs(this.dy)<this.border?this.border+this.dy:this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):
0);0!=this.dx||0!=this.dy?(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var c=a.panDx,d=a.panDy;if(0!=c||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+c/a.view.scale,
this.t0y+d/a.view.scale)}};this.destroy=function(){a.removeMouseListener(this.mouseListener);mxEvent.removeListener(document,"mouseup",this.mouseUpListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";
mxPopupMenu.prototype.zIndex=10006;mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f,g,k){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var l=document.createElement("tr");l.className="mxPopupMenuItem";var m=document.createElement("td");m.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,m.appendChild(e)):null!=e&&(b=document.createElement("div"),b.className=e,m.appendChild(b));l.appendChild(m);this.labels&&(m=document.createElement("td"),
m.className="mxPopupMenuItem"+(null==f||f?"":" mxDisabled"),mxUtils.write(m,a),m.align="left",l.appendChild(m),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null==f||f?"":" mxDisabled"),a.style.paddingRight="6px",a.style.textAlign="right",l.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(l);if(0!=g&&0!=f){var n=null;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(p){this.eventReceiver=l;d.activeRow!=l&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&
this.hideSubmenu(d),null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));null!=document.selection&&8==document.documentMode&&(n=document.selection.createRange());mxEvent.consume(p)}),mxUtils.bind(this,function(p){d.activeRow!=l&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=l.div&&(this.showSubmenu(d,l),d.activeRow=l));k||(l.className="mxPopupMenuItemHover")}),mxUtils.bind(this,function(p){if(this.eventReceiver==l){d.activeRow!=l&&
this.hideMenu();if(null!=n){try{n.select()}catch(q){}n=null}null!=c&&c(p)}this.eventReceiver=null;mxEvent.consume(p)}));k||mxEvent.addListener(l,"mouseout",mxUtils.bind(this,function(p){l.className="mxPopupMenuItem"}))}return l};mxPopupMenu.prototype.addCheckmark=function(a,b){a=this.addImage(a.firstChild.nextSibling,b);a.style.marginTop="-2px";a.style.left="6px"};
mxPopupMenu.prototype.addImage=function(a,b){var c=document.createElement("div");c.style.position="absolute";c.style.display="inline-block";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="center center";c.style.backgroundImage="url("+b+")";c.style.backgroundSize="22px";c.style.height="22px";c.style.width="22px";a.appendChild(c);return c};
mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);a=this.addImage(a.firstChild.nextSibling.nextSibling,this.submenuImage);a.style.marginLeft="-18px";a.style.marginTop="-11px"};
mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;c+d>e.x+(document.body.clientWidth||f.clientWidth)&&(b.div.style.left=Math.max(0,a.div.offsetLeft-d+16)+"px");b.div.style.overflowY="auto";b.div.style.overflowX=
"hidden";b.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px";mxUtils.fit(b.div)}};
mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;b=document.createElement("tr");var c=document.createElement("td");c.className="mxPopupMenuIcon";c.style.padding="0 0 0 0px";b.appendChild(c);c=document.createElement("td");c.style.padding="0 0 0 0px";c.setAttribute("colSpan","2");var d=document.createElement("hr");d.setAttribute("size","1");c.appendChild(d);b.appendChild(c);a.tbody.appendChild(b)}};
mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1,this.fireEvent(new mxEventObject(mxEvent.HIDE)))};
mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){mxAnimation.prototype.updateAnimation.apply(this,arguments);var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(this.cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e))for(d=this.graph.getModel().getChildCount(a),e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)};
mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
mxImageBundle.prototype.alt=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;
mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawCellState.apply(this,arguments)})),this.includeOverlays&&this.visitStatesRecursive(a,b,mxUtils.bind(this,function(){this.drawOverlays.apply(this,arguments)})))};
mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.getTitleForCellState=function(a,b){return null};mxImageExport.prototype.getLinkForCellState=function(a,b){return null};mxImageExport.prototype.getLinkTargetForCellState=function(a,b){return null};
mxImageExport.prototype.drawCellState=function(a,b){var c=this.getLinkForCellState(a,b);null!=c&&b.setLink(c,this.getLinkTargetForCellState(a,b));var d=this.getTitleForCellState(a,b);null!=d&&b.setTitle(d);this.drawShape(a,b);this.drawText(a,b);null!=d&&b.setTitle(null);null!=c&&b.setLink(null)};mxImageExport.prototype.drawShape=function(a,b){a.shape instanceof mxShape&&this.doDrawShape(a.shape,b)};mxImageExport.prototype.drawText=function(a,b){this.doDrawShape(a.text,b)};
mxImageExport.prototype.doDrawShape=function(a,b){if(null!=a&&a.checkBounds()){var c=b.root,d=a.node;b.root=a.createSvg();c.appendChild(b.root);a.node=b.root;b.save();a.beforePaint(b);a.paint(b);a.afterPaint(b);b.restore();a.node=d;b.root=c}};mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(c,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;
mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};
mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillAlpha:1,strokeAlpha:1,fillColor:null,gradientFillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",fixDash:!1,lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowStyle:null,
shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){0<this.states.length&&(this.state=this.states.pop())};mxAbstractCanvas2D.prototype.setTitle=function(a){};mxAbstractCanvas2D.prototype.setLink=function(a,b){};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};
mxAbstractCanvas2D.prototype.rotate=function(a,b,c,d,e){};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};mxAbstractCanvas2D.prototype.setFillAlpha=function(a){this.state.fillAlpha=a};mxAbstractCanvas2D.prototype.setStrokeAlpha=function(a){this.state.strokeAlpha=a};mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};
mxAbstractCanvas2D.prototype.setFillStyle=function(a){a==mxConstants.NONE&&(a=null);this.state.fillStyle=a};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){c=this.state;c.fillColor=a;c.gradientFillAlpha=null!=k?k:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};
mxAbstractCanvas2D.prototype.setDashed=function(a,b){this.state.dashed=a;this.state.fixDash=b};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=parseFloat(a)};
mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a,b){this.state.shadow=a;this.state.shadowStyle=b};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
mxXmlCanvas2D.prototype.writeDefaults=function(){var a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);a=
this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};
mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};mxXmlCanvas2D.prototype.setFillAlpha=function(a){if(this.compressed){if(this.state.fillAlpha==a)return;mxAbstractCanvas2D.prototype.setFillAlpha.apply(this,arguments)}var b=this.createElement("fillalpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setStrokeAlpha=function(a){if(this.compressed){if(this.state.strokeAlpha==a)return;mxAbstractCanvas2D.prototype.setStrokeAlpha.apply(this,arguments)}var b=this.createElement("strokealpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var m=this.createElement("gradient");m.setAttribute("c1",a);m.setAttribute("c2",b);m.setAttribute("x",this.format(c));m.setAttribute("y",this.format(d));m.setAttribute("w",this.format(e));m.setAttribute("h",this.format(f));null!=g&&m.setAttribute("direction",g);null!=k&&m.setAttribute("alpha1",k);null!=l&&m.setAttribute("alpha2",l);this.root.appendChild(m)}};
mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setDashed=function(a,b){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var c=this.createElement("dashed");c.setAttribute("dashed",a?"1":"0");null!=b&&c.setAttribute("fixDash",b?"1":"0");this.root.appendChild(c)};
mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert(e);var l=this.createElement("image");l.setAttribute("x",this.format(a));l.setAttribute("y",this.format(b));l.setAttribute("w",this.format(c));l.setAttribute("h",this.format(d));l.setAttribute("src",e);l.setAttribute("aspect",f?"1":"0");l.setAttribute("flipH",g?"1":"0");l.setAttribute("flipV",k?"1":"0");this.root.appendChild(l)};
mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var r=this.createElement("text");r.setAttribute("x",this.format(a));r.setAttribute("y",this.format(b));r.setAttribute("w",this.format(c));r.setAttribute("h",this.format(d));r.setAttribute("str",e);null!=f&&r.setAttribute("align",f);null!=g&&r.setAttribute("valign",g);r.setAttribute("wrap",k?"1":"0");null==l&&(l="");r.setAttribute("format",l);null!=m&&r.setAttribute("overflow",
m);null!=n&&r.setAttribute("clip",n?"1":"0");null!=p&&r.setAttribute("rotation",p);null!=q&&r.setAttribute("dir",q);this.root.appendChild(r)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.idPrefix="";this.gradients=[];this.fillPatterns=[];this.defs=null;this.styleEnabled=null!=b?b:!1;b=this.adaptiveColors=null;if(a.ownerDocument!=document){for(;null!=a&&"svg"!=a.nodeName;)a=a.parentNode;b=a}null!=b&&(0<b.getElementsByTagName("defs").length&&(this.defs=b.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=b.firstChild?b.insertBefore(this.defs,b.firstChild):b.appendChild(this.defs)),
this.styleEnabled&&this.defs.appendChild(this.createStyle()))}mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);
(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}mxSvgCanvas2D.prototype.useAbsoluteIds=!mxClient.IS_CHROMEAPP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&0<document.getElementsByTagName("base").length})();
mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.minStrokeWidth=1;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.lineHeightCorrection=1;
mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;mxSvgCanvas2D.prototype.foreignObjectPadding=2;mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.setCssText=function(a,b){null!=a&&a.setAttribute("style",b)};mxSvgCanvas2D.prototype.getLightDarkColor=function(a){return mxUtils.getLightDarkColor(a,null,null,"simple"==this.adaptiveColors)};mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};
mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.indexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[];this.fillPatterns=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);a=this.root.ownerDocument.createElement(a);null!=b&&a.setAttribute("xmlns",b);return a};mxSvgCanvas2D.prototype.getAlternateText=function(a,b,c,d,e,f,g,k,l,m,n,p,q){return null!=f?this.foAltText:null};
mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,k,l,m,n,p,q){a=this.getAlternateText(a,b,c,d,e,f,g,k,l,m,n,p,q);d=this.state;return null!=a&&0<d.fontSize?(k=k==mxConstants.ALIGN_TOP?1:k==mxConstants.ALIGN_BOTTOM?0:.3,e=g==mxConstants.ALIGN_RIGHT?"end":g==mxConstants.ALIGN_LEFT?"start":"middle",g=this.createElement("text"),g.setAttribute("x",Math.round(b+d.dx)),g.setAttribute("y",Math.round(c+d.dy+k*d.fontSize)),g.setAttribute("fill",d.fontColor||"black"),g.setAttribute("font-family",
mxUtils.parseCssFontFamily(d.fontFamily)),g.setAttribute("font-size",Math.round(d.fontSize)+"px"),"start"!=e&&g.setAttribute("text-anchor",e),(d.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&g.setAttribute("font-weight","bold"),(d.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&g.setAttribute("font-style","italic"),b=[],(d.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push("underline"),(d.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&
b.push("line-through"),0<b.length&&g.setAttribute("text-decoration",b.join(" ")),mxUtils.write(g,a),g):null};
mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":e==mxConstants.DIRECTION_RADIAL?c="r":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return((""!=this.idPrefix?this.idPrefix:"mx")+"-gradient-"+a+"-"+b+"-"+c).replace(/^[^a-z]+|[^\w:.-]+/gi,"_")};
mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){a=this.getLightDarkColor(a);b=this.getLightDarkColor(b);var f=this.createGradientId(a.cssText,b.cssText,c,d,e),g=this.gradients[f];if(null==g){var k=this.root.ownerSVGElement,l=0,m=f+"-"+l;if(null!=k)for(g=k.ownerDocument.getElementById(m);null!=g&&g.ownerSVGElement!=k;)m=f+"-"+l++,g=k.ownerDocument.getElementById(m);else m="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",m),null!=this.defs?this.defs.appendChild(g):
k.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.setAttribute("stop-color",a.light);e.style.stopColor=a.cssText;e.setAttribute("stop-opacity",c);e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("stop-color",b.light);e.style.stopColor=b.cssText;e.setAttribute("stop-opacity",d);e.style.stopOpacity=d;f.appendChild(e);return f};
mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase().replace(/^[^a-z]+|[^\w:.-]+/gi,"_")};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){c=this.getLightDarkColor(c);var e=this.createFillPatternId(a,b,c.cssText),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=
this.createCrossHatchPattern(b,c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b.light);e.style.stroke=
b.cssText;e.setAttribute("stroke-width",a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b.light);e.style.stroke=
b.cssText;e.setAttribute("stroke-width",a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createZigZagLinePattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("path"),f=c/4,g=3*c/4;e.setAttribute("d","M "+f+" 0 L "+g+" 0 L "+f+" "+c+" L "+g+" "+c);e.setAttribute("stroke",b.light);e.style.stroke=b.cssText;
e.setAttribute("stroke-width",a);e.setAttribute("fill","none");d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createCrossHatchPattern=function(a,b,c){a=.5*a*c;c=this.format(1.5*(10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("rect");e.setAttribute("x",0);e.setAttribute("y",0);e.setAttribute("width",c);e.setAttribute("height",c);e.setAttribute("stroke",b.light);e.style.stroke=
b.cssText;e.setAttribute("stroke-width",a);e.setAttribute("fill","none");d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDotsPattern=function(a,b,c){a=this.format((10+a)*c);c=this.createElement("pattern");c.setAttribute("patternUnits","userSpaceOnUse");c.setAttribute("width",a);c.setAttribute("height",a);c.setAttribute("x","0");c.setAttribute("y","0");var d=this.createElement("circle");d.setAttribute("cx",a/2);d.setAttribute("cy",a/2);d.setAttribute("r",a/4);d.setAttribute("stroke","none");d.setAttribute("fill",b.light);d.style.fill=b.cssText;c.appendChild(d);return c};
mxSvgCanvas2D.prototype.addTitle=function(a){if(null!=a&&null!=this.title){var b=this.createElement("title");mxUtils.write(b,this.title);a.appendChild(b)}return a};
mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.addTitle(this.node),d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");0<this.strokeTolerance&&(!a||null==d.fillColor||!mxShape.forceFilledPointerEvents&&!this.pointerEvents&&null==this.originalRoot)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||
"none"!=c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.getShadowFilter=function(){var a=this.state,b=a.shadowStyle;if(1!=a.scale){var c=b.split("(");if(0<c.length){var d=c[1].split(" ");3<d.length&&(b=function(e){return Math.round(parseFloat(d[e])*a.scale*100)/100+"px"},b=c[0]+"("+b(0)+" "+b(1)+" "+b(2)+" "+d.slice(3).join(" ")+(2<c.length?"("+c.slice(2).join("("):""))}}return b};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");c="url("+d+"#"+c+
")"}else c="url(#"+c+")";d=c}else c=this.getLightDarkColor(String(a.fillColor).toLowerCase()),d=c.light,c=c.cssText;a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),c,a.scale);b||null==a?(this.node.setAttribute("fill",d),this.node.style.fill=c):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill",
"url(#"+a+")")};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state,b=this.getLightDarkColor(String(a.strokeColor).toLowerCase());this.node.setAttribute("stroke",b.light);this.node.style.stroke=b.cssText;(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?
1:a.strokeWidth)*a.scale))};mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=[];if("string"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(" ");if(0<c.length)for(var d=0;d<c.length;d++)b[d]=Math.round(Number(c[d])*a*100)/100}return b.join(" ")};
mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OT?"none":"white");return a};
mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"==a.getAttribute("fill")||mxClient.IS_FF&&"transparent"==a.getAttribute("fill")||a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
mxSvgCanvas2D.prototype.setTitle=function(a){this.title=a};mxSvgCanvas2D.prototype.setLink=function(a,b){if(null==a)this.root=this.originalRoot;else{this.originalRoot=this.root;var c=this.createElement("a");null==c.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?c.setAttribute("xlink:href",a):c.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",a);null!=b&&c.setAttribute("target",b);this.root.appendChild(c);this.root=c}};
mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b!=c){var g=b?d:0,k=b?-1:1,l=c?e:0,m=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(l)+")scale("+this.format(k)+","+this.format(m)+")translate("+this.format(-g)+","+this.format(-l)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",this.format((a+c/2+e.dx)*e.scale));f.setAttribute("cy",this.format((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k,l){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;k=null!=k?k:!1;var m=this.state;a+=m.dx;b+=m.dy;var n=this.createElement("image");n.setAttribute("x",this.format(a*m.scale)+this.imageOffset);n.setAttribute("y",this.format(b*m.scale)+this.imageOffset);n.setAttribute("width",this.format(c*m.scale));n.setAttribute("height",this.format(d*m.scale));null==n.setAttributeNS?n.setAttribute("xlink:href",e):n.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",e);f||n.setAttribute("preserveAspectRatio","none");(1>m.alpha||1>m.fillAlpha)&&n.setAttribute("opacity",m.alpha*m.fillAlpha);e=this.state.transform||"";if(g||k){var p=f=1,q=0,r=0;g&&(f=-1,q=-c-2*a);k&&(p=-1,r=-d-2*b);e+="scale("+f+","+p+")translate("+q*m.scale+","+r*m.scale+")"}0<e.length&&n.setAttribute("transform",e);this.pointerEvents||n.setAttribute("pointer-events","none");null!=l&&this.processClipPath(n,l,new mxRectangle(a,b,c,d));this.root.appendChild(n)};
mxSvgCanvas2D.prototype.processClipPath=function(a,b,c){try{var d=this.createElement("clipPath");d.setAttribute("id",this.createClipPathId(b));d.setAttribute("clipPathUnits","objectBoundingBox");var e=this.appendClipPath(d,b,c);if(null!=e){var f=this.state;a.setAttribute("x",c.x*f.scale-c.width*f.scale*e.x/e.width+this.imageOffset);a.setAttribute("y",c.y*f.scale-c.height*f.scale*e.y/e.height+this.imageOffset);a.setAttribute("width",c.width*f.scale/e.width);a.setAttribute("height",c.height*f.scale/
e.height)}this.setClip(a,d)}catch(g){}};
mxSvgCanvas2D.prototype.convertHtml=function(a){if(this.useDomParser){var b=(new DOMParser).parseFromString(a,"text/html");null!=b&&(a=(new XMLSerializer).serializeToString(b.body),"<body"==a.substring(0,5)&&(a=a.substring(a.indexOf(">",5)+1)),"</body>"==a.substring(a.length-7,a.length)&&(a=a.substring(0,a.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){b=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null);var c=b.createElement("body");
b.documentElement.appendChild(c);var d=document.createElement("div");d.innerHTML=a;for(a=d.firstChild;null!=a;)d=a.nextSibling,c.appendChild(b.adoptNode(a)),a=d;return c.innerHTML}b=document.createElement("textarea");b.innerHTML=a.replace(/&amp;/g,"&amp;amp;").replace(/&#60;/g,"&amp;lt;").replace(/&#62;/g,"&amp;gt;").replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,"&lt;").replace(/>/g,"&gt;");a=b.value.replace(/&/g,"&amp;").replace(/&amp;lt;/g,"&lt;").replace(/&amp;gt;/g,"&gt;").replace(/&amp;amp;/g,
"&amp;").replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />").replace(/(<img[^>]+)>/gm,"$1 />")}return a};
mxSvgCanvas2D.prototype.createDiv=function(a){mxUtils.isNode(a)||(a="<div><div>"+this.convertHtml(a)+"</div></div>");if(mxClient.IS_IE||mxClient.IS_IE11||!document.createElementNS)return mxUtils.isNode(a)&&(a="<div><div>"+mxUtils.getXml(a)+"</div></div>"),mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div>").documentElement;var b=document.createElementNS("http://www.w3.org/1999/xhtml","div");if(mxUtils.isNode(a)){var c=document.createElement("div"),d=c.cloneNode(!1);this.root.ownerDocument!=
document?c.appendChild(a.cloneNode(!0)):c.appendChild(a);d.appendChild(c);b.appendChild(d)}else b.innerHTML=a;return b};mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n,p){null!=p&&null!=p.firstChild&&null!=p.firstChild.firstChild&&this.updateTextNodes(a,b,c,d,e,f,g,k,l,m,n,p.firstChild)};
mxSvgCanvas2D.prototype.addForeignObject=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t){var u=this.addTitle(this.createElement("g")),x=this.createElement("foreignObject");this.setCssText(x,"overflow: visible; text-align: left;");x.setAttribute("pointer-events","none");r.ownerDocument!=document&&(r=mxUtils.importNodeImplementation(x.ownerDocument,r,!0));x.appendChild(r);u.appendChild(x);this.updateTextNodes(a,b,c,d,f,g,k,m,n,p,q,u);this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,
d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),b=this.createElement("switch"),b.appendChild(x),b.appendChild(a),u.appendChild(b)));t.appendChild(u)};
mxSvgCanvas2D.prototype.updateTextNodes=function(a,b,c,d,e,f,g,k,l,m,n,p){var q=this.state.scale,r="",t="";null!=n&&"vertical-"==n.substring(0,9)?(r="-rl"==n.substring(n.length-3),t=e==mxConstants.ALIGN_LEFT?r?"flex-end":"flex-start":e==mxConstants.ALIGN_RIGHT?r?"flex-start":"flex-end":"center",r=f==mxConstants.ALIGN_TOP?"flex-start":f==mxConstants.ALIGN_BOTTOM?"flex-end":"center"):(t=f==mxConstants.ALIGN_TOP?"flex-start":f==mxConstants.ALIGN_BOTTOM?"flex-end":"center",r=e==mxConstants.ALIGN_LEFT?
"flex-start":e==mxConstants.ALIGN_RIGHT?"flex-end":"center");var u=null!=this.state.fontBackgroundColor?this.getLightDarkColor(this.state.fontBackgroundColor):null,x=null!=this.state.fontBorderColor?this.getLightDarkColor(this.state.fontBorderColor):null;mxSvgCanvas2D.createCss(c+this.foreignObjectPadding,d,e,f,g,k,l,n,null!=u?u.cssText:null,null!=x?x.cssText:null,"display: flex; align-items: unsafe "+t+"; justify-content: unsafe "+r+"; "+(null!=n&&"vertical-"==n.substring(0,9)?"writing-mode: "+n+
";":""),this.getTextCss(),q,mxUtils.bind(this,function(y,A,z,C,B){a+=this.state.dx;b+=this.state.dy;var v=p.firstChild;"title"==v.nodeName&&(v=v.nextSibling);C+="color: "+this.getLightDarkColor(this.state.fontColor).light+"; ";C+=null!=u?"background-color: "+u.light+"; ":"";C+=null!=x?"border-color: "+x.light+"; ":"";var D=v.firstChild,E=D.firstChild,I=(this.rotateHtml?this.state.rotation:0)+(null!=m?m:0),F=(0!=this.foOffset?"translate("+this.foOffset+" "+this.foOffset+")":"")+(1!=q?"scale("+q+")":
"");this.setCssText(E.firstChild,B);this.setCssText(E,C);v.setAttribute("width",Math.ceil(1/Math.min(1,q)*100)+"%");v.setAttribute("height",Math.ceil(1/Math.min(1,q)*100)+"%");A=Math.round(b+A);0>A?(v.setAttribute("y",A),z+="padding-top: 0; "):(v.removeAttribute("y"),z+="padding-top: "+A+"px; ");this.setCssText(D,z+"margin-left: "+Math.round(a+y)+"px;");F+=0!=I?"rotate("+I+" "+a+" "+b+")":"";""!=F?p.setAttribute("transform",F):p.removeAttribute("transform");1!=this.state.alpha?p.setAttribute("opacity",
this.state.alpha):p.removeAttribute("opacity")}))};
mxSvgCanvas2D.createCss=function(a,b,c,d,e,f,g,k,l,m,n,p,q,r){k=null!=k&&"vertical-"==k.substring(0,9);q="box-sizing: border-box; font-size: 0; ";q=k?q+("text-align: "+(d==mxConstants.ALIGN_TOP?"left":d==mxConstants.ALIGN_BOTTOM?"right":"center")+"; "):q+("text-align: "+(c==mxConstants.ALIGN_LEFT?"left":c==mxConstants.ALIGN_RIGHT?"right":"center")+"; ");var t=mxUtils.getAlignmentAsPoint(c,d);c="overflow: hidden; ";var u="width: 1px; ",x="height: 1px; ",y=t.x*a;t=t.y*b;g?(u="width: "+Math.round(a)+
"px; ",q+="max-height: "+Math.round(b)+"px; ",t=0):"fill"==f?(u="width: "+Math.round(a)+"px; ",x="height: "+Math.round(b)+"px; ",p+="width: 100%; height: 100%; ",q+="width: "+Math.round(a-2)+"px; "+x):"width"==f?(u="width: "+Math.round(a-2)+"px; ",p+="width: 100%; ",q+=u,t=0,0<b&&(q+="max-height: "+Math.round(b)+"px; ")):"block"==f?(u="width: "+Math.round(a-2)+"px; ",p+="width: 100%; ",c="",t=0,q+=u,"middle"==d&&(q+="max-height: "+Math.round(b)+"px; ")):(c="",k?y=0:t=0);d="";null!=l&&(d+="background-color: "+
l+"; ");null!=m&&(d+="border-width: 1px; border-style: solid; border-color: inherit; border: 1px solid "+m+"; ");""==c||g?p+=d:q+=d;e&&(k&&0<b||!k&&0<a)?(p+="white-space: normal; word-wrap: "+mxConstants.WORD_WRAP+"; ",k?x="height: "+Math.round(b)+"px; ":u="width: "+Math.round(a)+"px; ",""!=c&&"fill"!=f&&(k?y=0:t=0)):(p+="white-space: nowrap; ",""==c&&"block"!=f&&(y=0));r(y,t,n+u+x,q+c,p,c)};
mxSvgCanvas2D.prototype.getTextCss=function(){var a=this.state,b=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;b="display: inline-block; font-size: "+mxUtils.htmlEntities(a.fontSize)+"px; font-family: "+mxUtils.parseCssFontFamily(a.fontFamily,!0)+"; color: "+this.getLightDarkColor(mxUtils.htmlEntities(a.fontColor)).cssText+"; line-height: "+mxUtils.htmlEntities(b)+"; pointer-events: "+(this.pointerEvents?mxUtils.htmlEntities(this.pointerEventsValue):
"none")+"; ";(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="font-weight: bold; ");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="font-style: italic; ");var c=[];(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(a.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&(b+="text-decoration: "+c.join(" ")+"; ");return b};
mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,q){if(this.textEnabled&&null!=e)if(p=null!=p?p:0,this.foEnabled&&"html"==l){var r=this.createDiv(e);null!=r&&(null!=q&&"vertical-"!=q.substring(0,9)&&r.setAttribute("dir",q),this.addForeignObject(a,b,c,d,e,f,g,k,l,m,n,p,q,r,this.root))}else this.plainText(a+this.state.dx,b+this.state.dy,c,d,e,f,g,k,m,n,p,q)};
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;e=this.createElement("clipPath");e.setAttribute("id",g);g=this.createElement("rect");g.setAttribute("x",a);g.setAttribute("y",b);g.setAttribute("width",c);g.setAttribute("height",d);e.appendChild(g);return e};
mxSvgCanvas2D.prototype.createClipPathId=function(a){a="mx-clippath-"+a.replace(/[^a-zA-Z0-9]+/g,"-");for(var b="-"==a.charAt(a.length-1)?"":"-",c=0,d=a+b+c;null!=document.getElementById(d);)d=a+b+ ++c;return d};
mxSvgCanvas2D.prototype.appendClipPath=function(a,b,c){var d=b.match(/\(([^)]+)\)/),e=null;"polygon"==b.substring(0,7)?e=this.appendPolygonClip(d[1],a,c):"circle"==b.substring(0,6)?e=this.appendCircleClip(d[1],a,c):"ellipse"==b.substring(0,7)?e=this.appendEllipseClip(d[1],a,c):"inset"==b.substring(0,5)&&(e=this.appendInsetClip(d[1],a,c));return e};
mxSvgCanvas2D.prototype.appendPolygonClip=function(a,b,c){c=this.createElement("polygon");a=a.split(/[ ,]+/);for(var d=null,e=null,f=null,g=null,k=[],l=0;l<a.length;l++){var m=this.parseClipValue(a,l);if(0==l%2){if(null==d||d>m)d=m;if(null==f||f<m)f=m}else{if(null==e||e>m)e=m;if(null==g||g<m)g=m}k.push(m)}c.setAttribute("points",k.join(","));b.appendChild(c);return new mxRectangle(d,e,f-d,g-e)};
mxSvgCanvas2D.prototype.appendCircleClip=function(a,b,c){c=this.createElement("circle");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,2);d=this.parseClipValue(d,3);c.setAttribute("r",a);c.setAttribute("cx",e);c.setAttribute("cy",d);b.appendChild(c);return new mxRectangle(e-a,d-a,2*a,2*a)};
mxSvgCanvas2D.prototype.appendEllipseClip=function(a,b,c){c=this.createElement("ellipse");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,1),f=this.parseClipValue(d,3);d=this.parseClipValue(d,4);c.setAttribute("rx",a);c.setAttribute("ry",e);c.setAttribute("cx",f);c.setAttribute("cy",d);b.appendChild(c);return new mxRectangle(f-a,d-e,2*a,2*e)};
mxSvgCanvas2D.prototype.appendInsetClip=function(a,b,c){c=this.createElement("rect");var d=a.split(/[ ,]+/);a=this.parseClipValue(d,0);var e=this.parseClipValue(d,1),f=this.parseClipValue(d,2),g=this.parseClipValue(d,3);e=1-e-g;f=1-a-f;c.setAttribute("x",g);c.setAttribute("y",a);c.setAttribute("width",e);c.setAttribute("height",f);4<d.length&&"round"==d[4]&&(d=this.parseClipValue(d,5),c.setAttribute("rx",d),c.setAttribute("ry",d));b.appendChild(c);return new mxRectangle(g,a,e,f)};
mxSvgCanvas2D.prototype.parseClipValue=function(a,b){b=a[Math.min(b,a.length-1)];a=1;"center"==b?a=.5:"top"==b||"left"==b?a=0:(b=parseFloat(b),isNaN(b)||(a=Math.max(0,Math.min(1,b/100))));return a};
mxSvgCanvas2D.prototype.setClip=function(a,b){null!=this.defs?this.defs.appendChild(b):this.root.appendChild(b);if(mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document)a.setAttribute("clip-path","url(#"+b.getAttribute("id")+")");else{var c=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");a.setAttribute("clip-path","url("+c+"#"+b.getAttribute("id")+")")}};
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=k.transform||"",t=this.addTitle(this.createElement("g"));this.updateFont(t);this.pointerEvents||null!=this.originalRoot||t.setAttribute("pointer-events","none");0!=n&&(r+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&"vertical-"!=p.substring(0,9)&&t.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&
(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),this.setClip(t,this.createClip(p*k.scale-2,n*k.scale-2,c*k.scale+4,d*k.scale+4)));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&t.setAttribute("text-anchor",n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||t.setAttribute("font-size",q*k.scale+"px");0<r.length&&t.setAttribute("transform",r);1>k.alpha&&t.setAttribute("opacity",k.alpha);r=e.split("\n");p=Math.round(q*
mxConstants.LINE_HEIGHT);var u=q+(r.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+1));for(m=0;m<r.length;m++)0<r[m].length&&0<mxUtils.trim(r[m]).length&&(q=this.createElement("text"),q.setAttribute("x",this.format(a*k.scale)+this.textOffset),q.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(q,r[m]),
t.appendChild(q)),n+=p;this.root.appendChild(t);this.addTextBackground(t,e,a,b,c,"fill"==l?d:u,f,g,l)};
mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state,c=this.getLightDarkColor(b.fontColor);a.setAttribute("fill",c.light);a.style.fill=c.cssText;this.styleEnabled&&b.fontFamily==mxConstants.DEFAULT_FONTFAMILY||a.setAttribute("font-family",mxUtils.parseCssFontFamily(b.fontFamily));(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");c=[];(b.fontStyle&
mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.push("underline");(b.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&c.push("line-through");0<c.length&&a.setAttribute("text-decoration",c.join(" "))};
mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,k,l){var m=this.state;if(null!=document.body&&(null!=m.fontBackgroundColor||null!=m.fontBorderColor)){var n=null;if("fill"==l||"width"==l)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,d*m.scale,(e-2)*m.scale,(f+2)*m.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{n=a.getBBox();var p=mxClient.IS_IE&&
mxClient.IS_SVG;n=new mxRectangle(n.x,n.y+(p?0:1),n.width,n.height+(p?1:0))}catch(q){}if(null==n||0==n.width||0==n.height)n=document.createElement("div"),n.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?m.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT,n.style.fontSize=m.fontSize+"px",n.style.fontFamily=mxUtils.parseCssFontFamily(m.fontFamily),n.style.whiteSpace="nowrap",n.style.position="absolute",n.style.visibility="hidden",n.style.display="inline-block",n.style.zoom="1",(m.fontStyle&
mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(n.style.fontWeight="bold"),(m.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(n.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),n.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(n),e=n.offsetWidth,f=n.offsetHeight,n.parentNode.removeChild(n),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,(d+2)*
m.scale,e*m.scale,(f+1)*m.scale);null!=n&&(b=this.createElement("rect"),c=null!=m.fontBackgroundColor&&m.fontBackgroundColor!=mxConstants.NONE?this.getLightDarkColor(m.fontBackgroundColor):null,d=null!=m.fontBorderColor&&m.fontBorderColor!=mxConstants.NONE?this.getLightDarkColor(m.fontBorderColor):null,b.setAttribute("fill",null!=c?c.light:"none"),b.setAttribute("stroke",null!=d?d.light:"none"),b.setAttribute("x",Math.floor(n.x-1)),b.setAttribute("y",Math.floor(n.y-1)),b.setAttribute("width",Math.ceil(n.width+
2)),b.setAttribute("height",Math.ceil(n.height)),null!=c&&(b.style.fill=c.cssText),d&&(b.style.stroke=d.cssText),m=null!=m.fontBorderColor?Math.max(1,this.format(m.scale)):0,b.setAttribute("stroke-width",m),this.root.ownerDocument==document&&1==mxUtils.mod(m,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};
mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.rounded=!1;mxGuide.prototype.tolerance=2;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};
mxGuide.prototype.getGuideTolerance=function(a){return a&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance};mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};mxGuide.prototype.isStateIgnored=function(a){return!1};
mxGuide.prototype.move=function(a,b,c,d){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){d=function(B,v,D){var E=!1;D&&Math.abs(B-C)<t?(b.y=B-a.getCenterY(),t=Math.abs(B-C),E=!0):D||(Math.abs(B-A)<t?(b.y=B-a.y,t=Math.abs(B-A),E=!0):Math.abs(B-z)<t&&(b.y=B-a.y-a.height,t=Math.abs(B-z),E=!0));E&&(p=v,q=B,null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));
n=n||E};var e=function(B,v,D){var E=!1;D&&Math.abs(B-y)<r?(b.x=B-a.getCenterX(),r=Math.abs(B-y),E=!0):D||(Math.abs(B-u)<r?(b.x=B-a.x,r=Math.abs(B-u),E=!0):Math.abs(B-x)<r&&(b.x=B-a.x-a.width,r=Math.abs(B-x),E=!0));E&&(l=v,m=B,null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||E},f=this.graph.getView().scale;f*=this.getGuideTolerance(c);var g=a.clone();g.x+=
b.x;g.y+=b.y;var k=!1,l=null,m=null,n=!1,p=null,q=null,r=f,t=f,u=g.x,x=g.x+g.width,y=g.getCenterX(),A=g.y,z=g.y+g.height,C=g.getCenterY();for(f=0;f<this.states.length;f++)g=this.states[f],null==g||this.isStateIgnored(g)||(this.horizontal&&(e.call(this,g.getCenterX(),g,!0),e.call(this,g.x,g,!1),e.call(this,g.x+g.width,g,!1),null==g.cell&&e.call(this,g.getCenterX(),g,!1)),this.vertical&&(d.call(this,g.getCenterY(),g,!0),d.call(this,g.y,g,!1),d.call(this,g.y+g.height,g,!1),null==g.cell&&d.call(this,
g.getCenterY(),g,!1)));this.graph.snapDelta(b,a,!c,k,n);b=this.getDelta(a,l,b.x,p,b.y);c=this.graph.container;k||null==this.guideX?null!=this.guideX&&(e=d=null,null!=l&&null!=a&&(d=Math.min(a.y+b.y-this.graph.panDy,l.y),e=Math.max(a.y+a.height+b.y-this.graph.panDy,l.y+l.height)),this.guideX.points=null!=d&&null!=e?[new mxPoint(m,d),new mxPoint(m,e)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,c.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility=
"visible",this.guideX.redraw()):this.guideX.node.style.visibility="hidden";n||null==this.guideY?null!=this.guideY&&(e=d=null,null!=p&&null!=a&&(d=Math.min(a.x+b.x-this.graph.panDx,p.x),e=Math.max(a.x+a.width+b.x-this.graph.panDx,p.x+p.width)),this.guideY.points=null!=d&&null!=e?[new mxPoint(d,q),new mxPoint(e,q)]:[new mxPoint(-this.graph.panDx,q),new mxPoint(c.scrollWidth-3-this.graph.panDx,q)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw()):
this.guideY.node.style.visibility="hidden"}return b};mxGuide.prototype.getDelta=function(a,b,c,d,e){var f=this.graph.view.scale;if(this.rounded||null!=b&&null==b.cell)c=Math.round((a.x+c)/f)*f-a.x;if(this.rounded||null!=d&&null==d.cell)e=Math.round((a.y+e)/f)*f-a.y;return new mxPoint(c,e)};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxShape(a){this.stencil=a;this.initStyles()}mxShape.forceFilledPointerEvents=!0;mxShape.prototype.dialect=null;mxShape.prototype.scale=1;
mxShape.prototype.antiAlias=!0;mxShape.prototype.minSvgStrokeWidth=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=8;mxShape.prototype.pointerEvents=!0;mxShape.prototype.svgPointerEvents="all";mxShape.prototype.shapePointerEvents=!1;mxShape.prototype.stencilPointerEvents=!1;
mxShape.prototype.outline=!1;mxShape.prototype.visible=!0;mxShape.prototype.useSvgBoundingBox=!1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.initStyles=function(a){this.strokewidth=1;this.rotation=0;this.strokeOpacity=this.fillOpacity=this.opacity=100;this.flipV=this.flipH=!1};mxShape.prototype.isHtmlAllowed=function(){return!1};
mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?.5:0};mxShape.prototype.create=function(a){return null!=a&&null!=a.ownerSVGElement?this.createSvg(a):this.createHtml(a)};mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};
mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.visible&&this.checkBounds()?(this.node.style.visibility="visible",this.clear(),"DIV"==this.node.nodeName?this.redrawHtmlShape():this.redrawShape()):(this.node.style.visibility="hidden",this.boundingBox=null)};
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerText=""};
mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),this.scale,this.scale);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),this.scale,this.scale))}};mxShape.prototype.styleChanged=function(a,b,c){};
mxShape.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),c=a;b!=mxConstants.DIRECTION_SOUTH&&b!=mxConstants.DIRECTION_NORTH&&null!=this.state&&null!=this.state.text&&this.state.text.isPaintBoundsInverted()&&(c=c.clone(),b=c.width,c.width=c.height,c.height=b);c=this.getLabelMargins(c);if(null!=c){var d="1"==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,!1),e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,
!1);null!=this.state&&null!=this.state.text&&this.state.text.isPaintBoundsInverted()&&(b=c.x,c.x=c.height,c.height=c.width,c.width=c.y,c.y=b,b=d,d=e,e=b);return mxUtils.getDirectedBounds(a,c,this.style,d,e)}return a};mxShape.prototype.getLabelMargins=function(a){return null};
mxShape.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};
mxShape.prototype.getShadowStyle=function(){var a={dx:mxConstants.SHADOW_OFFSET_X,dy:mxConstants.SHADOW_OFFSET_Y,blur:mxConstants.SHADOW_BLUR,color:mxConstants.SHADOWCOLOR,opacity:100*mxConstants.SHADOW_OPACITY};null!=this.style&&(a.dx=mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW_OFFSET_X,a.dx),a.dy=mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW_OFFSET_Y,a.dy),a.blur=mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW_BLUR,a.blur),a.color=mxUtils.getValue(this.style,mxConstants.STYLE_SHADOWCOLOR,
a.color),a.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW_OPACITY,a.opacity));return a};mxShape.prototype.createDropShadow=function(a,b){var c=mxUtils.getLightDarkColor(a.color,a.opacity/100);return"drop-shadow("+Math.round(a.dx*b*100)/100+"px "+Math.round(a.dy*b*100)/100+"px "+Math.round(a.blur*b*100)/100+"px "+c.cssText+")"};mxShape.prototype.updateSvgFilters=function(a){this.node.style.filter=this.isShadowEnabled()?this.createDropShadow(this.getShadowStyle(),a):""};
mxShape.prototype.isShadowEnabled=function(){return this.isShadow};mxShape.prototype.redrawShape=function(){var a=this.createCanvas();null!=a&&(a.pointerEvents=this.pointerEvents,this.beforePaint(a),this.paint(a),this.afterPaint(a),this.destroyCanvas(a))};
mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement&&(a=this.createSvgCanvas());null!=a&&this.outline&&(a.setStrokeWidth(this.strokewidth),a.setStrokeColor(this.stroke),null!=this.isDashed&&a.setDashed(this.isDashed),a.setStrokeWidth=function(){},a.setStrokeColor=function(){},a.setFillColor=function(){},a.setGradient=function(){},a.setDashed=function(){},a.image=function(){},a.text=function(){});return a};
mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.svgStrokeTolerance;a.pointerEventsValue=this.svgPointerEvents;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");a.minStrokeWidth=this.minSvgStrokeWidth;this.antiAlias||(a.format=function(c){return Math.round(parseFloat(c))});return a};
mxShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
mxShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.VML_SHADOWCOLOR+"')");if(null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,
west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};
mxShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=mxUtils.getLightDarkColor(b).cssText,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.outline?null:this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=mxUtils.getLightDarkColor(b).cssText,a.style.backgroundImage="none"):
this.pointerEvents?a.style.backgroundColor="transparent":this.setTransparentBackgroundImage(a)};
mxShape.prototype.updateHtmlBounds=function(a){var b=Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1)}for(b in a.fillPatterns)c=a.fillPatterns[b],null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldGradients=a.gradients;this.oldFillPatterns=a.fillPatterns}};mxShape.prototype.beforePaint=function(a){};mxShape.prototype.afterPaint=function(a){};
mxShape.prototype.paint=function(a){var b=a.pointerEvents,c=!1;if(null!=a&&this.outline){var d=a.stroke;a.stroke=function(){c=!0;d.apply(this,arguments)};a.fillAndStroke=a.stroke}var e=this.scale,f=this.bounds.x/e,g=this.bounds.y/e,k=this.bounds.width/e,l=this.bounds.height/e;if(this.isPaintBoundsInverted()){var m=(k-l)/2;f+=m;g-=m;m=k;k=l;l=m}this.updateTransform(a,f,g,k,l);this.configureCanvas(a,f,g,k,l);this.updateSvgFilters(null!=a?a.state.scale:e);m=null;if(null==this.stencil&&null==this.points&&
this.shapePointerEvents||null!=this.stencil&&this.stencilPointerEvents){var n=this.createBoundingBox();this.dialect==mxConstants.DIALECT_SVG?(m=this.createTransparentSvgRectangle(n.x,n.y,n.width,n.height),this.node.appendChild(m)):(e=a.createRect("rect",n.x/e,n.y/e,n.width/e,n.height/e),e.appendChild(a.createTransparentFill()),e.stroked="false",a.root.appendChild(e))}null!=this.stencil?this.stencil.drawShape(a,this,f,g,k,l,null!=this.state?this.state.view.graph:null):(a.setStrokeWidth(this.strokewidth),
e=this.getWaypoints(),null!=e?1<e.length&&this.paintEdgeShape(a,e):(e=a.state.dx,n=a.state.dy,this.paintVertexShape(a,f,g,k,l),a.state.dx=e,a.state.dy=n));null!=m&&null!=a.state&&null!=a.state.transform&&m.setAttribute("transform",a.state.transform);null!=a&&this.outline&&!c&&(a.rect(f,g,k,l),a.stroke());a.pointerEvents=b};
mxShape.prototype.getWaypoints=function(){var a=this.points,b=null;if(null!=a&&(b=[],0<a.length)){var c=this.scale,d=Math.max(c,1),e=a[0];b.push(new mxPoint(e.x/c,e.y/c));for(var f=1;f<a.length;f++){var g=a[f];(Math.abs(e.x-g.x)>=d||Math.abs(e.y-g.y)>=d)&&b.push(new mxPoint(g.x/c,g.y/c));e=g}}return b};
mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);a.setFillAlpha(this.fillOpacity/100);a.setStrokeAlpha(this.strokeOpacity/100);null!=this.isShadow&&a.setShadow(this.isShadow,this.shadowStyle);null!=this.isDashed&&a.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);null!=f&&a.setDashPattern(f);null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&
this.gradient!=mxConstants.NONE?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):(a.setFillColor(this.fill),a.setFillStyle(this.fillStyle));null!=this.style&&(null!=this.style.linecap&&a.setLineCap(this.style.linecap),null!=this.style.linejoin&&a.setLineJoin(this.style.linejoin));a.setStrokeColor(this.stroke);this.configurePointerEvents(a)};
mxShape.prototype.configurePointerEvents=function(a){null==this.style||mxShape.forceFilledPointerEvents&&null!=this.fill&&this.fill!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(a.pointerEvents=!1)};mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};
mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(a.setShadow(!1),this.paintForeground(a,b,c,d,e))};mxShape.prototype.paintBackground=function(a,b,c,d,e){};mxShape.prototype.paintForeground=function(a,b,c,d,e){};
mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))a=Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;a=Math.min(a*c,b*c)}return a};
mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,.6*e,"south",.9,.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+.4*e),a.quadTo(b+.5*d,c+.7*e,b+d+g,c+.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+.4*e),a.quadTo(b+.5*d,c+.7*e,b+d+g,c+.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
mxShape.prototype.addPoints=function(a,b,c,d,e,f,g){if(null!=b&&0<b.length){g=null!=g?g:!0;var k=b[b.length-1];if(e&&c){b=b.slice();var l=b[0];l=new mxPoint(k.x+(l.x-k.x)/2,k.y+(l.y-k.y)/2);b.splice(0,0,l)}var m=b[0];l=1;for(g?a.moveTo(m.x,m.y):a.lineTo(m.x,m.y);l<(e?b.length:b.length-1);){g=b[mxUtils.mod(l,b.length)];var n=m.x-g.x;m=m.y-g.y;if(c&&(0!=n||0!=m)&&(null==f||0>mxUtils.indexOf(f,l-1))){var p=Math.sqrt(n*n+m*m);a.lineTo(g.x+n*Math.min(d,p/2)/p,g.y+m*Math.min(d,p/2)/p);for(m=b[mxUtils.mod(l+
1,b.length)];l<b.length-2&&0==Math.round(m.x-g.x)&&0==Math.round(m.y-g.y);)m=b[mxUtils.mod(l+2,b.length)],l++;n=m.x-g.x;m=m.y-g.y;p=Math.max(1,Math.sqrt(n*n+m*m));n=g.x+n*Math.min(d,p/2)/p;m=g.y+m*Math.min(d,p/2)/p;a.quadTo(g.x,g.y,n,m);g=new mxPoint(n,m)}else a.lineTo(g.x,g.y);m=g;l++}e?a.close():a.lineTo(k.x,k.y)}};
mxShape.prototype.resetStyles=function(){this.initStyles();this.spacing=0;delete this.fill;delete this.gradient;delete this.gradientDirection;delete this.stroke;delete this.startSize;delete this.endSize;delete this.startArrow;delete this.endArrow;delete this.direction;delete this.isShadow;delete this.isDashed;delete this.isRounded;delete this.glass};
mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.fillOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_OPACITY,
this.fillOpacity);this.fillStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_STYLE,this.fillStyle);this.strokeOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_STROKE_OPACITY,this.strokeOpacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,
mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,
mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=
1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);this.fill==mxConstants.NONE&&(this.fill=null);this.gradient==mxConstants.NONE&&(this.gradient=null);this.stroke==mxConstants.NONE&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};
mxShape.prototype.getCursor=function(){return this.cursor};mxShape.prototype.isRoundable=function(){return!1};mxShape.prototype.getSvgBoundingBox=function(){var a=null;if(null!=this.node&&null!=this.node.ownerSVGElement)try{var b=this.node.getBBox();0<b.width&&0<b.height&&(a=new mxRectangle(b.x,b.y,b.width,b.height),null!=this.stroke&&a.grow(this.strokewidth*this.scale/2))}catch(c){}return a};
mxShape.prototype.getShapeBoundingBox=function(){var a=null;if(null!=this.bounds&&(a=this.createBoundingBox(),null!=a)){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b))}return a};mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted())&&a.rotate90();return a};
mxShape.prototype.augmentBoundingBox=function(a){if(this.isShadow){var b=this.getShadowStyle();0>b.dx&&(a.x+=b.dx,a.width-=b.dx);0>b.dy&&(a.y+=b.dy,a.height-=b.dy);a.grow(Math.max(b.blur,0)*this.scale*2);a.width+=Math.ceil(Math.max(b.dx,0)*this.scale);a.height+=Math.ceil(Math.max(b.dy,0)*this.scale)}null!=this.stroke&&a.grow(this.strokewidth*this.scale/2)};
mxShape.prototype.updateBoundingBox=function(){var a=this.useSvgBoundingBox?this.getSvgBoundingBox():null;null==a&&(a=this.getShapeBoundingBox());this.boundingBox=a};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};
mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
mxShape.prototype.createTransparentSvgRectangle=function(a,b,c,d){var e=document.createElementNS(mxConstants.NS_SVG,"rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);e.setAttribute("fill","none");e.setAttribute("stroke","none");e.setAttribute("pointer-events","all");return e};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
mxShape.prototype.intersectsRectangle=function(a,b){return null!=a&&(b||null!=this.node&&"none"!=this.node.style.display&&"hidden"!=this.node.style.visibility)&&mxUtils.intersects(this.bounds,a,!0)};mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};
mxShape.prototype.releaseSvgFillPatterns=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};
mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldFillPatterns=this.oldGradients=null};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxUtils.extend(mxStencil,mxShape);mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;mxStencil.prototype.strokewidth=null;
mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y")),d="1"==a.getAttribute("perimeter");a=a.getAttribute("name");return new mxConnectionConstraint(new mxPoint(b,c),d,a)};
mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&mxStencil.allowEval&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
mxStencil.prototype.drawShape=function(a,b,c,d,e,f,g){g=null!=g?g:null!=b&&null!=b.state?b.state.view.graph:null;var k=a.states.slice(),l=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);l=this.computeAspect(b.style,c,d,e,f,l);var m=Math.min(l.width,l.height);m="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*m;a.setStrokeWidth(m);null!=b.style&&"1"==mxUtils.getValue(b.style,mxConstants.STYLE_POINTER_EVENTS,"0")&&(a.setStrokeColor(mxConstants.NONE),
a.rect(c,d,e,f),a.stroke(),a.setStrokeColor(b.stroke));this.drawChildren(a,b,c,d,e,f,this.bgNode,l,!1,!0,g);this.drawChildren(a,b,c,d,e,f,this.fgNode,l,!0,!b.outline||null==b.style||0==mxUtils.getValue(b.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0),g);a.states.length!=k.length&&(a.states=k)};mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=g&&0<e&&0<f)for(c=g.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,k,l,m,n),c=c.nextSibling};
mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var k=(d-e)/2;a+=k;c-=k}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
mxStencil.prototype.parseColor=function(a,b,c,d,e){"stroke"==d?d=b.stroke:"fill"==d?d=b.fill:"font"==d&&null!=b.style?d=mxUtils.getValue(b.style,mxConstants.STYLE_FONTCOLOR,"black"):null==b.style||mxUtils.isValidColor(d)||(a=mxUtils.getValue(b.style,d,mxConstants.NONE),"default"==a&&(a=null!=e?"fillcolor"==c.nodeName?e.shapeBackgroundColor:e.shapeForegroundColor:"#ffffff"),d=a);return d};
mxStencil.prototype.drawNode=function(a,b,c,d,e,f,g){var k=c.nodeName,l=d.x,m=d.y,n=d.width,p=d.height,q=Math.min(n,p);if("save"==k)a.save();else if("restore"==k)a.restore();else if(f){if("path"==k){a.begin();q=!0;if("1"==c.getAttribute("rounded")){q=!1;for(var r=Number(c.getAttribute("arcSize")),t=0,u=[],x=c.firstChild;null!=x;){if(x.nodeType==mxConstants.NODETYPE_ELEMENT){var y=x.nodeName;if("move"==y||"line"==y)"move"!=y&&0!=u.length||u.push([]),u[u.length-1].push(new mxPoint(l+Number(x.getAttribute("x"))*
n,m+Number(x.getAttribute("y"))*p)),t++;else{q=!0;break}}x=x.nextSibling}if(!q&&0<t)for(n=0;n<u.length;n++)p=!1,m=u[n][0],l=u[n][u[n].length-1],m.x==l.x&&m.y==l.y&&(u[n].pop(),p=!0),this.addPoints(a,u[n],!0,r,p);else q=!0}if(q)for(x=c.firstChild;null!=x;)x.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,x,d,e,f,g),x=x.nextSibling}else if("close"==k)a.close();else if("move"==k)a.moveTo(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p);else if("line"==k)a.lineTo(l+Number(c.getAttribute("x"))*
n,m+Number(c.getAttribute("y"))*p);else if("quad"==k)a.quadTo(l+Number(c.getAttribute("x1"))*n,m+Number(c.getAttribute("y1"))*p,l+Number(c.getAttribute("x2"))*n,m+Number(c.getAttribute("y2"))*p);else if("curve"==k)a.curveTo(l+Number(c.getAttribute("x1"))*n,m+Number(c.getAttribute("y1"))*p,l+Number(c.getAttribute("x2"))*n,m+Number(c.getAttribute("y2"))*p,l+Number(c.getAttribute("x3"))*n,m+Number(c.getAttribute("y3"))*p);else if("arc"==k)a.arcTo(Number(c.getAttribute("rx"))*n,Number(c.getAttribute("ry"))*
p,Number(c.getAttribute("x-axis-rotation")),Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p);else if("rect"==k)a.rect(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p,Number(c.getAttribute("w"))*n,Number(c.getAttribute("h"))*p);else if("roundrect"==k)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),d=Number(c.getAttribute("w"))*n,f=Number(c.getAttribute("h"))*
p,b=Number(b)/100,b=Math.min(d*b,f*b),a.roundrect(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p,d,f,b,b);else if("ellipse"==k)a.ellipse(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p,Number(c.getAttribute("w"))*n,Number(c.getAttribute("h"))*p);else if("image"==k)b.outline||(b=this.evaluateAttribute(c,"src",b),a.image(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p,Number(c.getAttribute("w"))*n,Number(c.getAttribute("h"))*p,b,!1,"1"==c.getAttribute("flipH"),
"1"==c.getAttribute("flipV")));else if("text"==k)b.outline||(g=this.evaluateTextAttribute(c,"str",b),d="1"==c.getAttribute("vertical")?-90:0,"0"==c.getAttribute("align-shape")&&(f=b.rotation,q=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0),b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0),d=q&&b?d-f:q||b?d+f:d-f),d-=c.getAttribute("rotation"),a.text(l+Number(c.getAttribute("x"))*n,m+Number(c.getAttribute("y"))*p,0,0,g,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",
!1,"",null,!1,d));else if("include-shape"==k)q=mxStencilRegistry.getStencil(c.getAttribute("name")),null!=q&&(l+=Number(c.getAttribute("x"))*n,m+=Number(c.getAttribute("y"))*p,d=Number(c.getAttribute("w"))*n,f=Number(c.getAttribute("h"))*p,q.drawShape(a,b,l,m,d,f,g));else if("fillstroke"==k)a.fillAndStroke();else if("fill"==k)a.fill();else if("stroke"==k)a.stroke();else if("strokewidth"==k)n="1"==c.getAttribute("fixed")?1:q,a.setStrokeWidth(Number(c.getAttribute("width"))*n);else if("dashed"==k)a.setDashed("1"==
c.getAttribute("dashed"));else if("dashpattern"==k){if(c=c.getAttribute("pattern"),null!=c){c=c.split(" ");p=[];for(n=0;n<c.length;n++)0<c[n].length&&p.push(Number(c[n])*q);c=p.join(" ");a.setDashPattern(c)}}else"strokecolor"==k?a.setStrokeColor(this.parseColor(a,b,c,c.getAttribute("color"),g)):"linecap"==k?a.setLineCap(c.getAttribute("cap")):"linejoin"==k?a.setLineJoin(c.getAttribute("join")):"miterlimit"==k?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==k?a.setFillColor(this.parseColor(a,
b,c,c.getAttribute("color"),g)):"alpha"==k?a.setAlpha(c.getAttribute("alpha")):"fillalpha"==k?a.setAlpha(c.getAttribute("alpha")):"strokealpha"==k?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==k?a.setFontColor(this.parseColor(a,b,c,c.getAttribute("color"),g)):"fontstyle"==k?a.setFontStyle(c.getAttribute("style")):"fontfamily"==k?a.setFontFamily(c.getAttribute("family")):"fontsize"==k&&a.setFontSize(Number(c.getAttribute("size"))*q);!e||"fillstroke"!=k&&"fill"!=k&&"stroke"!=k||a.setShadow(!1)}};
var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,k,l,m){var n=mxMarker.markers[c];return null!=n?n(a,b,c,d,e,f,g,k,l,m):null}};
(function(){function a(d){d=null!=d?d:2;return function(e,f,g,k,l,m,n,p,q,r){f=l*q*1.118;p=m*q*1.118;l*=n+q;m*=n+q;var t=k.clone();t.x-=f;t.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:.75;k.x+=-l*n-f;k.y+=-m*n-p;return function(){e.begin();e.moveTo(t.x,t.y);e.lineTo(t.x-l-m/d,t.y-m+l/d);g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN||e.lineTo(t.x-3*l/4,t.y-3*m/4);e.lineTo(t.x+m/d-l,t.y-m-l/d);e.close();r?e.fillAndStroke():e.stroke()}}}function b(d){d=
null!=d?d:2;return function(e,f,g,k,l,m,n,p,q,r){f=l*q*1.118;g=m*q*1.118;l*=n+q;m*=n+q;var t=k.clone();t.x-=f;t.y-=g;k.x+=2*-f;k.y+=2*-g;return function(){e.begin();e.moveTo(t.x-l-m/d,t.y-m+l/d);e.lineTo(t.x,t.y);e.lineTo(t.x+m/d-l,t.y-m-l/d);e.stroke()}}}function c(d,e,f,g,k,l,m,n,p,q){n=f==mxConstants.ARROW_DIAMOND?.7071:.9862;e=k*p*n;n*=l*p;k*=m+p;l*=m+p;var r=g.clone();r.x-=e;r.y-=n;g.x+=-k-e;g.y+=-l-n;var t=f==mxConstants.ARROW_DIAMOND?2:3.4;return function(){d.begin();d.moveTo(r.x,r.y);d.lineTo(r.x-
k/2-l/t,r.y+k/t-l/2);d.lineTo(r.x-k,r.y-l);d.lineTo(r.x-k/2+l/t,r.y-l/2-k/t);d.close();q?d.fillAndStroke():d.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(d,e,f,g,k,l,m,n,p,q){var r=m/2,t=g.clone();g.x-=k*r;g.y-=l*r;return function(){d.ellipse(t.x-r,t.y-r,m,m);q?d.fillAndStroke():d.stroke()}});
mxMarker.addMarker("baseDash",function(d,e,f,g,k,l,m,n,p,q){var r=k*(m+p+1),t=l*(m+p+1);return function(){d.begin();d.moveTo(g.x-t/2,g.y+r/2);d.lineTo(g.x+t/2,g.y-r/2);d.stroke()}});mxMarker.addMarker("doubleBlock",function(d,e,f,g,k,l,m,n,p,q){e=k*p*1.118;n=l*p*1.118;k*=m+p;l*=m+p;var r=g.clone();r.x-=e;r.y-=n;f=f!=mxConstants.ARROW_CLASSIC&&f!=mxConstants.ARROW_CLASSIC_THIN?1:.75;g.x+=-k*f*2-e;g.y+=-l*f*2-n;return function(){d.begin();d.moveTo(r.x,r.y);d.lineTo(r.x-k-l/2,r.y-l+k/2);d.lineTo(r.x+
l/2-k,r.y-l-k/2);d.close();d.moveTo(r.x-k,r.y-l);d.lineTo(r.x-2*k-.5*l,r.y+.5*k-2*l);d.lineTo(r.x-2*k+.5*l,r.y-.5*k-2*l);d.close();q?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c);mxMarker.addMarker("manyOptional",function(d,e,f,g,k,l,m,n,p,q){var r=k*(m+p+1),t=l*(m+p+1),u=m/2,x=g.x,y=g.y;g.x-=2*r-k*p/2;g.y-=2*t-l*p/2;return function(){d.begin();d.ellipse(x-1.5*r-u,y-1.5*t-u,2*u,2*u);q?d.fillAndStroke():d.stroke();d.begin();d.moveTo(x,y);d.lineTo(x-
r,y-t);d.moveTo(x+t/2,y-r/2);d.lineTo(x-r,y-t);d.lineTo(x-t/2,y+r/2);d.stroke()}})})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(.25*d,.25*e);a.curveTo(.05*d,.25*e,0,.5*e,.16*d,.55*e);a.curveTo(0,.66*e,.18*d,.9*e,.31*d,.8*e);a.curveTo(.4*d,e,.7*d,e,.8*d,.8*e);a.curveTo(d,.8*e,d,.6*e,.875*d,.5*e);a.curveTo(d,.3*e,.8*d,.1*e,.625*d,.2*e);a.curveTo(.5*d,.05*e,.3*d,.05*e,.25*d,.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRectangleShape,mxShape);
mxRectangleShape.prototype.isHtmlAllowed=function(){var a=!0;null!=this.style&&(a="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));return!this.isRounded&&!this.glass&&0==this.rotation&&(a||null!=this.fill&&this.fill!=mxConstants.NONE)};
mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))var f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));else f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
mxRectangleShape.prototype.isRoundable=function(){return!0};mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&!this.outline&&null!=this.fill&&this.fill!=mxConstants.NONE&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);
mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){if(!this.outline){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b,c,d,e);a.stroke()}};
mxDoubleEllipse.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(a.width/5/this.scale,a.height/5/this.scale)))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);mxRhombus.prototype.isRoundable=function(){return!0};
mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=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,k,!0);a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){var c=a.pointerEventsValue;a.pointerEventsValue="stroke";null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.pointerEventsValue=c};
mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);a.grow((Math.max(this.arrowWidth,this.endSize)/2+this.strokewidth)*this.scale)};
mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0];b=b[b.length-1];var f=b.x-e.x,g=b.y-e.y,k=Math.sqrt(f*f+g*g),l=k-2*c-mxConstants.ARROW_SIZE;f/=k;g/=k;k=d*g/3;d=-d*f/3;var m=e.x-k/2+c*f;e=e.y-d/2+c*g;var n=m+k,p=e+d,q=n+l*f;l=p+l*g;var r=q+k,t=l+d,u=r-3*k,x=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(q,l);a.lineTo(r,t);a.lineTo(b.x-c*f,b.y-c*g);a.lineTo(u,x);a.lineTo(u+k,x+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;mxArrowConnector.prototype.isRoundable=function(){return!0};
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c;c=this.endSize+c;var p=this.isArrowRounded(),q=b[b.length-1],r=b[1].x-b[0].x,t=b[1].y-
b[0].y,u=Math.sqrt(r*r+t*t);if(0!=u){var x=r/u,y=x,A=t/u,z=A;u=f*A;var C=-f*x,B=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();r=x;t=A;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,x,A,n,d,f,m,!0);else{var v=b[0].x+u/2+m*x,D=b[0].y+C/2+m*A,E=b[0].x-u/2+m*x,I=b[0].y-C/2+m*A;g?(a.moveTo(v,D),B.push(function(){a.lineTo(E,I)})):(a.moveTo(E,I),a.lineTo(v,D))}var F=D=v=0;for(u=0;u<b.length-2;u++)if(C=mxUtils.relativeCcw(b[u].x,b[u].y,b[u+1].x,b[u+1].y,b[u+2].x,b[u+2].y),v=b[u+2].x-
b[u+1].x,D=b[u+2].y-b[u+1].y,F=Math.sqrt(v*v+D*D),0!=F){y=v/F;z=D/F;F=Math.max(Math.sqrt((x*y+A*z+1)/2),.04);v=x+y;D=A+z;var H=Math.sqrt(v*v+D*D);if(0!=H){v/=H;D/=H;H=Math.max(F,Math.min(this.strokewidth/200+.04,.35));F=0!=C&&p?Math.max(.1,H):Math.max(F,.06);var K=b[u+1].x+D*f/2/F,G=b[u+1].y-v*f/2/F;D=b[u+1].x-D*f/2/F;v=b[u+1].y+v*f/2/F;0!=C&&p?-1==C?(C=D+z*f,F=v-y*f,a.lineTo(D+A*f,v-x*f),a.quadTo(K,G,C,F),function(L,M){B.push(function(){a.lineTo(L,M)})}(D,v)):(a.lineTo(K,G),function(L,M){var O=K-
A*f,P=G+x*f,Q=K-z*f,R=G+y*f;B.push(function(){a.quadTo(L,M,O,P)});B.push(function(){a.lineTo(Q,R)})}(D,v)):(a.lineTo(K,G),function(L,M){B.push(function(){a.lineTo(L,M)})}(D,v));x=y;A=z}}u=f*z;C=-f*y;if(l&&!g)this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!1);else{a.lineTo(q.x-m*y+u/2,q.y-m*z+C/2);var J=q.x-m*y-u/2,N=q.y-m*z-C/2;g?(a.moveTo(J,N),B.splice(0,0,function(){a.moveTo(J,N)})):a.lineTo(J,N)}for(u=B.length-1;0<=u;u--)B[u]();g?(a.end(),a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);
p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,r,t,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-x,-A,c,e,f,m,!0),a.stroke(),a.end()))}};mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};
mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};
mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
function mxText(a,b,c,d,e,f,g,k,l,m,n,p,q,r,t,u,x,y,A,z,C){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=r?r:!0;this.background=t;this.border=u;this.wrap=null!=x?x:!1;this.clipped=null!=y?y:!1;this.overflow=null!=A?A:"visible";this.labelPadding=null!=z?z:0;this.textDirection=C;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8!=document.documentMode||mxClient.IS_EM?3:4;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};mxText.prototype.configurePointerEvents=function(a){};
mxText.prototype.getActualTextDirection=function(){var a=this.textDirection;a==mxConstants.TEXT_DIRECTION_AUTO&&(a=this.getAutoDirection());a!=mxConstants.TEXT_DIRECTION_LTR&&a!=mxConstants.TEXT_DIRECTION_RTL&&a!=mxConstants.TEXT_DIRECTION_VERTICAL_LR&&a!=mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(a=null);return a};
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,g=this.bounds.height/c;this.updateTransform(a,d,e,f,g);this.configureCanvas(a,d,e,f,g);this.updateSvgFilters(null!=a?a.state.scale:c);c=this.getActualTextDirection();if(b)a.updateText(d,e,f,g,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),c,this.node);else{var k=(b=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML)?"html":"",l=this.value;
b||"html"!=k||(l=mxUtils.htmlEntities(l,!1));"html"!=k||mxUtils.isNode(this.value)||(l=mxUtils.replaceTrailingNewlines(l,"<div><br></div>"));l=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==k?l.replace(/\n/g,"<br/>"):l;a.text(d,e,f,g,l,this.align,this.valign,this.wrap,k,this.overflow,this.clipped,this.getTextRotation(),c)}};
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName)mxClient.IS_SVG?this.redrawHtmlShapeWithCss3():(this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform());else{var a=this.createCanvas();
null!=a&&null!=a.updateText?(a.pointerEvents=this.pointerEvents,this.paint(a,!0),this.destroyCanvas(a)):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=this.spacing=2;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
delete this.margin};
mxText.prototype.apply=function(a){var b=this.spacing;mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,
this.align),this.valign=mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing)),this.spacingTop=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop-b))+this.spacing,this.spacingRight=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight-b))+this.spacing,this.spacingBottom=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,
this.spacingBottom-b))+this.spacing,this.spacingLeft=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft-b))+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,
mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
mxText.prototype.getContentNode=function(){var a=this.node;null!=a&&(a=null==a.ownerSVGElement?this.node.firstChild.firstChild:a.firstChild.firstChild.firstChild.firstChild.firstChild);return a};
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!(this.ignoreStringSize||null==a||"fill"==this.overflow||this.clipped&&this.ignoreClippedStringSize&&c==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_MIDDLE)){d=
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName&&null!=a.firstChild.firstChild.firstChild&&null!=a.firstChild.firstChild.firstChild.firstChild)a=a.firstChild.firstChild.firstChild.firstChild,d=a.offsetHeight*this.scale,c="width"==this.overflow?this.boundingBox.width:a.offsetWidth*this.scale;else try{var e=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=
0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else{c=null!=this.state?this.state.view.textDiv:null;if(null==this.offsetWidth||null==this.offsetHeight)null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8!=document.documentMode||mxClient.IS_EM?null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild):(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace=
"normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight;c=this.offsetWidth*this.scale;d=this.offsetHeight*this.scale}null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,
d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=
b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};mxText.prototype.isShadowEnabled=function(){return null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_SHADOW,!1):!1};
mxText.prototype.getHtmlValue=function(){var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");return this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a};
mxText.prototype.getTextCss=function(){var a="display: inline-block; font-size: "+this.size+"px; font-family: "+this.family+"; color: "+this.color+"; line-height: "+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+"; pointer-events: "+(this.pointerEvents?"all":"none")+"; ";(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="font-weight: bold; ");(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="font-style: italic; ");
var b=[];(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push("underline");(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push("line-through");0<b.length&&(a+="text-decoration: "+b.join(" ")+"; ");return a};
mxText.prototype.redrawHtmlShape=function(){if(mxClient.IS_SVG)this.redrawHtmlShapeWithCss3();else{var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}};
mxText.prototype.redrawHtmlShapeWithCss3=function(){var a=Math.max(0,Math.round(this.bounds.width/this.scale)),b=Math.max(0,Math.round(this.bounds.height/this.scale)),c="position: absolute; left: "+Math.round(this.bounds.x)+"px; top: "+Math.round(this.bounds.y)+"px; pointer-events: none; ",d=this.getTextCss(),e=this.getActualTextDirection();mxSvgCanvas2D.createCss(a+2,b,this.align,this.valign,this.wrap,this.overflow,this.clipped,e,null!=this.background?mxUtils.htmlEntities(this.background):null,null!=
this.border?mxUtils.htmlEntities(this.border):null,c,d,this.scale,mxUtils.bind(this,function(f,g,k,l,m,n){f=this.getTextRotation();f=(1!=this.scale?"scale("+this.scale+") ":"")+(0!=f?"rotate("+f+"deg) ":"")+(0!=this.margin.x||0!=this.margin.y?"translate("+100*this.margin.x+"%,"+100*this.margin.y+"%)":"");""!=f&&(f="transform-origin: 0 0; transform: "+f+"; ");"block"==this.overflow&&this.valign==mxConstants.ALIGN_MIDDLE&&(f+="max-height: "+(b+1)+"px;");""==n?(k+=l,l="display:inline-block; min-width: 100%; "+
f):(l+=f,mxClient.IS_SF&&(l+="-webkit-clip-path: content-box;"));"block"==this.overflow&&(l+="width: 100%; ");100>this.opacity&&(m+="opacity: "+this.opacity/100+"; ");this.node.setAttribute("style",k);k=mxUtils.isNode(this.value)?this.value.outerHTML:this.getHtmlValue();null==this.node.firstChild&&(this.node.innerHTML="<div><div>"+k+"</div></div>",mxClient.IS_IE11&&this.fixFlexboxForIe11(this.node));this.node.firstChild.firstChild.setAttribute("style",m);this.node.firstChild.setAttribute("style",
l)}))};mxText.prototype.fixFlexboxForIe11=function(a){for(var b=a.querySelectorAll('div[style*="display: flex; justify-content: flex-end;"]'),c=0;c<b.length;c++)b[c].style.justifyContent="flex-start",b[c].style.flexDirection="row-reverse";if(!this.wrap)for(b=a.querySelectorAll('div[style*="display: flex; justify-content: center;"]'),a=-window.innerWidth,c=0;c<b.length;c++)b[c].style.marginLeft=a+"px",b[c].style.marginRight=a+"px"};
mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%) scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+") translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x-
Math.ceil(c*("fill"!=this.overflow&&"width"!=this.overflow?3:1)))+"px";b.top=Math.round(this.bounds.y-d*("fill"!=this.overflow?3:1))+"px";b.opacity=100>this.opacity?this.opacity/100:""};
mxText.prototype.updateInnerHtml=function(a){if(mxUtils.isNode(this.value))a.innerHTML=this.value.outerHTML;else{var b=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=mxUtils.htmlEntities(b,!1));b=mxUtils.replaceTrailingNewlines(b,"<div>&nbsp;</div>");b=this.replaceLinefeeds?b.replace(/\n/g,"<br/>"):b;a.innerHTML='<div style="display:inline-block;_display:inline;">'+b+"</div>"}};
mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;mxUtils.setOpacity(this.node,this.opacity);var e=0,f=null!=this.state?this.state.view.textDiv:null,g=this.node;if(null!=f){f.style.overflow="";f.style.height="";f.style.width="";this.updateFont(f);this.updateSize(f,!1);this.updateInnerHtml(f);var k=Math.round(this.bounds.width/this.scale);if(this.wrap&&0<k){f.style.whiteSpace="normal";f.style.wordWrap=mxConstants.WORD_WRAP;var l=k;this.clipped&&
(l=Math.min(l,this.bounds.width));f.style.width=l+"px"}else f.style.whiteSpace="nowrap";g=f;null!=g.firstChild&&"DIV"==g.firstChild.nodeName&&(g=g.firstChild,this.wrap&&"break-word"==f.style.wordWrap&&(g.style.width="100%"));!this.clipped&&this.wrap&&0<k&&(l=g.offsetWidth+this.textWidthPadding,f.style.width=l+"px");e=g.offsetHeight+2}else null!=g.firstChild&&"DIV"==g.firstChild.nodeName&&(g=g.firstChild,e=g.offsetHeight);l=g.offsetWidth+this.textWidthPadding;this.clipped&&(e=Math.min(e,this.bounds.height));
k=this.bounds.width/d;f=this.bounds.height/d;"fill"==this.overflow?(e=f,l=k):"width"==this.overflow&&(e=g.scrollHeight,l=k);this.offsetWidth=l;this.offsetHeight=e;"fill"!=this.overflow&&"width"!=this.overflow&&(this.clipped&&(l=Math.min(k,l)),k=l,this.wrap&&(a.width=Math.round(k)+"px"));f=e*d;k*=d;var m=this.getTextRotation()*(Math.PI/180);l=parseFloat(parseFloat(Math.cos(m)).toFixed(8));e=parseFloat(parseFloat(Math.sin(-m)).toFixed(8));m%=2*Math.PI;0>m&&(m+=2*Math.PI);m%=Math.PI;m>Math.PI/2&&(m=
Math.PI-m);g=Math.cos(m);var n=Math.sin(-m);b=k*-(b+.5);c=f*-(c+.5);0!=m&&(m="progid:DXImageTransform.Microsoft.Matrix(M11="+l+", M12="+e+", M21="+-e+", M22="+l+", sizingMethod='auto expand')",a.filter=null!=a.filter&&0<a.filter.length?a.filter+(" "+m):m);a.zoom=d;a.left=Math.round(this.bounds.x+((k-k*g+f*n)/2-l*b-e*c)-k/2)+"px";a.top=Math.round(this.bounds.y+((f-f*g+k*n)/2+e*b-l*c)-f/2)+"px"};
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerText="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow||
"width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML=
a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}};
mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT;a.fontSize=this.size+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";var b=[];(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
b.push("underline");(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push("line-through");a.textDecoration=b.join(" ");a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
mxText.prototype.updateSize=function(a,b){var c=Math.max(0,Math.round(this.bounds.width/this.scale)),d=Math.max(0,Math.round(this.bounds.height/this.scale)),e=a.style;this.clipped?(e.overflow="hidden",e.maxHeight=d+"px",e.maxWidth=c+"px"):"fill"==this.overflow?(e.width=c+1+"px",e.height=d+1+"px",e.overflow="hidden"):"width"==this.overflow?(e.width=c+1+"px",e.maxHeight=d+1+"px",e.overflow="hidden"):"block"==this.overflow&&(e.width=c+1+"px");if(this.wrap&&0<c){if(e.wordWrap=mxConstants.WORD_WRAP,e.whiteSpace=
"normal",e.width=c+"px",b&&"fill"!=this.overflow&&"width"!=this.overflow){b=a;null!=b.firstChild&&"DIV"==b.firstChild.nodeName&&(b=b.firstChild,"break-word"==a.style.wordWrap&&(b.style.width="100%"));d=b.offsetWidth;if(0==d){var f=a.parentNode;a.style.visibility="hidden";document.body.appendChild(a);d=b.offsetWidth;a.style.visibility="";f.appendChild(a)}d+=3;this.clipped&&(d=Math.min(d,c));e.width=d+"px"}}else e.whiteSpace="nowrap"};
mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
mxText.prototype.getSpacing=function(a,b){return new mxPoint(null!=b&&-.5==b.x||null==b&&this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:null!=b&&-1==b.x||null==b&&this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-(a?0:this.baseSpacingRight):this.spacingLeft+(a?0:this.baseSpacingLeft),this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-(a?0:this.baseSpacingBottom):this.spacingTop+(a?
0:this.baseSpacingTop))};function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.isRoundable=function(){return!0};mxTriangle.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,.5*e),new mxPoint(0,e)],this.isRounded,b,!0)};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);
mxHexagon.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(.25*d,0),new mxPoint(.75*d,0),new mxPoint(d,.5*e),new mxPoint(.75*d,e),new mxPoint(.25*d,e),new mxPoint(0,.5*e)],this.isRounded,b,!0)};function mxLine(a,b,c,d){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1;this.vertical=null!=d?d:this.vertical}mxUtils.extend(mxLine,mxShape);mxLine.prototype.vertical=!1;
mxLine.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();if(this.vertical){var f=b+d/2;a.moveTo(f,c);a.lineTo(f,c+e)}else f=c+e/2,a.moveTo(b,f),a.lineTo(b+d,f);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;mxImageShape.prototype.getSvgScreenOffset=function(){return 0};
mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.imageBackground=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),this.imageBorder=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||
1==mxUtils.getValue(this.style,"imageFlipV",0),this.clipPath=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxImageShape.prototype.isRoundable=function(){return!1};mxImageShape.prototype.getImageDataUri=function(){return this.image};mxImageShape.prototype.configurePointerEvents=function(a){};
mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){null!=this.image?(null!=this.imageBackground&&(a.setFillColor(this.imageBackground),a.setStrokeColor(this.imageBorder),a.rect(b,c,d,e),a.fillAndStroke()),a.image(b,c,d,e,this.getImageDataUri(),this.preserveImageAspect,!1,!1,this.clipPath),null!=this.imageBorder&&(a.setShadow(!1),a.setStrokeColor(this.imageBorder),a.rect(b,c,d,e),a.stroke())):mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerText="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
a;this.node.style.borderColor=b;a=document.createElement("img");a.setAttribute("border","0");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");a.style.filter!=b&&(a.style.filter=b);"image"==
a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}mxUtils.extend(mxLabel,mxRectangleShape);
mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection,this.indicator.redraw());mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),c=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1,c))};
mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-l):a+l;b=f==mxConstants.ALIGN_TOP?b+l:f==mxConstants.ALIGN_BOTTOM?b+(d-k-l):b+(d-k)/2;return new mxRectangle(a,b,g,k)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),k=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),l=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-l):e==mxConstants.ALIGN_CENTER?a+(c-g)/
2:a+l;b=f==mxConstants.ALIGN_BOTTOM?b+(d-k-l):f==mxConstants.ALIGN_TOP?b+l:b+(d-k)/2;return new mxRectangle(a,b,g,k)};
mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;
mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(a.setShadow(!1),a.begin(),this.redrawPath(a,b,c,d,e,!0),a.stroke())};mxCylinder.prototype.getCylinderSize=function(a,b,c,d){return Math.min(this.maxHeight,Math.round(d/5))};
mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=this.getCylinderSize(b,c,d,e);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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!=this.style&&1==this.style[mxConstants.STYLE_CURVED];mxShape.prototype.updateBoundingBox.apply(this,arguments)};
mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);a.setShadow(!1);a.setDashed(!1);null!=c&&(a.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_STARTFILLCOLOR,this.stroke)),c());null!=d&&(a.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_ENDFILLCOLOR,this.stroke)),d())};
mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=c?b[1]:b[e-2];b=c?b[0]:b[e-1];if(null!=f&&null!=g&&null!=b){d=b.x-g.x;e=b.y-g.y;var k=Math.sqrt(d*d+e*e);g=d/k;d=e/k;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxMarker.createMarker(a,this,f,b,g,d,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:
mxConstants.STYLE_ENDFILL])}return d};
mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
1);a.grow(b*this.scale)};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;mxSwimlane.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.laneFill=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE))};mxSwimlane.prototype.isRoundable=function(){return!0};
mxSwimlane.prototype.getTitleSize=function(){return Math.max(0,mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE))};
mxSwimlane.prototype.getLabelBounds=function(a){var b=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),c=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);a=new mxRectangle(a.x,a.y,a.width,a.height);var d=this.isHorizontal(),e=this.getTitleSize(),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH;d=d==!f;b=!d&&b!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);c=d&&c!=(this.direction==mxConstants.DIRECTION_SOUTH||
this.direction==mxConstants.DIRECTION_WEST);if(f){e=Math.min(a.width,e*this.scale);if(b||c)a.x+=a.width-e;a.width=e}else{e=Math.min(a.height,e*this.scale);if(b||c)a.y+=a.height-e;a.height=e}return a};mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=this.getTitleSize();return this.isHorizontal()?new mxRectangle(b,c,d,Math.min(a,e)):new mxRectangle(b,c,Math.min(a,d),e)};
mxSwimlane.prototype.getSwimlaneArcSize=function(a,b,c){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))return Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return c*a*3};mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){if(!this.outline){var f=this.getTitleSize(),g=0;f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(g=this.getSwimlaneArcSize(d,e,f),g=Math.min((this.isHorizontal()?e:d)-f,Math.min(f,g)),this.paintRoundedSwimlane(a,b,c,d,e,f,g)):this.paintSwimlane(a,b,c,d,e,f);var k=mxUtils.getValue(this.style,mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,k);null!=this.image&&(e=this.getImageBounds(b,
c,d,e),k=mxUtils.getValue(this.style,mxConstants.STYLE_CLIP_PATH,null),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1,k));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,g))}};
mxSwimlane.prototype.configurePointerEvents=function(a){var b=!0,c=!0,d=!0;null!=this.style&&(b="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"),c=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));(b||c||d)&&mxShape.prototype.configurePointerEvents.apply(this,arguments)};
mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f){var g=this.laneFill,k=!0,l=!0,m=!0,n=!0;null!=this.style&&(k="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"),l=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),m=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),n=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));this.isHorizontal()?(a.begin(),a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),m?a.fillAndStroke():
a.fill(),f<e&&(g!=mxConstants.NONE&&k||(a.pointerEvents=!1),g!=mxConstants.NONE&&a.setFillColor(g),a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),n?g==mxConstants.NONE?a.stroke():n&&a.fillAndStroke():g!=mxConstants.NONE&&a.fill())):(a.begin(),a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),m?a.fillAndStroke():a.fill(),f<d&&(g!=mxConstants.NONE&&k||(a.pointerEvents=!1),g!=mxConstants.NONE&&a.setFillColor(g),a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),
n?g==mxConstants.NONE?a.stroke():n&&a.fillAndStroke():g!=mxConstants.NONE&&a.fill()));l&&this.paintDivider(a,b,c,d,e,f,g==mxConstants.NONE)};
mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g){var k=this.laneFill,l=!0,m=!0,n=!0,p=!0;null!=this.style&&(l="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"),m=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),n=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_HEAD,1),p=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_BODY,1));this.isHorizontal()?(a.begin(),a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/
2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),n?a.fillAndStroke():a.fill(),f<e&&(k!=mxConstants.NONE&&l||(a.pointerEvents=!1),k!=mxConstants.NONE&&a.setFillColor(k),a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),p?k==mxConstants.NONE?a.stroke():p&&a.fillAndStroke():k!=mxConstants.NONE&&a.fill())):(a.begin(),a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,
e),n?a.fillAndStroke():a.fill(),f<d&&(k!=mxConstants.NONE&&l||(a.pointerEvents=!1),k!=mxConstants.NONE&&a.setFillColor(k),a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),p?k==mxConstants.NONE?a.stroke():p&&a.fillAndStroke():k!=mxConstants.NONE&&a.fill()));m&&this.paintDivider(a,b,c,d,e,f,k==mxConstants.NONE)};
mxSwimlane.prototype.paintDivider=function(a,b,c,d,e,f,g){0!=f&&(g||a.setShadow(!1),a.begin(),this.isHorizontal()?(a.moveTo(0,f),a.lineTo(d,f)):(a.moveTo(f,0),a.lineTo(f,e)),a.stroke())};mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};
mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.resizeCell=function(a,b){};mxGraphLayout.prototype.execute=function(a){};
mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){return this.graph.getCurrentCellStyle(b)[a]};
mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d))&&(d=this.graph.model.getEdgeCount(a),0<d))for(var f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),k=this.graph.model.getTerminal(g,!0)==a;if(!b||k)k=this.graph.view.getVisibleTerminal(g,!k),this.traverse(k,b,c,g,e)}};
mxGraphLayout.prototype.isAncestor=function(a,b,c){if(!c)return this.graph.model.getParent(b)==a;if(b==a)return!1;for(;null!=b&&b!=a;)b=this.graph.model.getParent(b);return b==a};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.getModel().isVisible(a)};
mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.getModel().isVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};
mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b){var e=c.getParent(a);e=this.getParentOffset(e);for(var f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y}d.points=b;c.setGeometry(a,d)}};
mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var k=this.graph.getView().scale,l=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-l.x)/k,f.width=l.width);g.text.boundingBox.y<g.y&&(c+=(g.y-l.y)/k,f.height=l.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox){var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d;b=new mxRectangle(b.x-f,b.y-g,b.width+f+Math.max(e.x+e.width-(c.x+c.width),0)/d,b.height+g+Math.max(e.y+e.height-(c.y+c.height),0)/d)}}null!=this.parent&&(a=this.graph.getModel().getParent(a),
b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};mxGraphLayout.prototype.arrangeGroups=function(a,b,c,d,e,f){return this.graph.updateGroupBounds(a,b,!0,c,d,e,f)};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;
WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;
mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeParentMax=!1;
mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.allowGaps=!1;mxStackLayout.prototype.gridSize=0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,k=d.getChildCount(e);c=f?b:c;b=this.graph.getView().getState(e);null!=b&&(c-=f?b.x:b.y);c/=this.graph.view.scale;for(b=0;b<k;b++){var l=d.getChildAt(e,b);if(l!=a&&(l=d.getGeometry(l),null!=l)){l=f?l.x+l.width/2:l.y+l.height/2;if(g<=c&&l>c)break;g=l}}f=e.getIndex(a);f=Math.max(0,b-(b>f?1:0));d.add(e,a,f)}};
mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot)&&(c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));return c};
mxStackLayout.prototype.getLayoutCells=function(a){for(var b=this.graph.getModel(),c=b.getChildCount(a),d=[],e=0;e<c;e++){var f=b.getChildAt(a,e);!this.isVertexIgnored(f)&&this.isVertexMovable(f)&&d.push(f)}this.allowGaps&&d.sort(mxUtils.bind(this,function(g,k){g=this.graph.getCellGeometry(g);k=this.graph.getCellGeometry(k);return this.horizontal?g.x==k.x?0:g.x>k.x>0?1:-1:g.y==k.y?0:g.y>k.y>0?1:-1}));return d};
mxStackLayout.prototype.snap=function(a){if(null!=this.gridSize&&0<this.gridSize&&(a=Math.max(a,this.gridSize),1<a/this.gridSize)){var b=a%this.gridSize;a+=b>this.gridSize/2?this.gridSize-b:-b}return a};
mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);e-=2*this.border;var f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k=1==mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,
!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{l=0;k=null;for(var m=0,n=null,p=this.getLayoutCells(a),q=0;q<p.length;q++){var r=p[q],t=d.getGeometry(r);if(null!=t){t=t.clone();null!=this.wrap&&null!=k&&(c&&k.x+k.width+t.width+2*this.spacing>this.wrap||!c&&k.y+k.height+t.height+2*this.spacing>this.wrap)&&(k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=0);l=Math.max(l,c?t.height:t.width);var u=0;if(!this.borderCollapse){var x=this.graph.getCellStyle(r);
u=mxUtils.getNumber(x,mxConstants.STYLE_STROKEWIDTH,1)}if(null!=k){var y=m+this.spacing+Math.floor(u/2);c?t.x=this.snap((this.allowGaps?Math.max(y,t.x):y)-this.marginLeft)+this.marginLeft:t.y=this.snap((this.allowGaps?Math.max(y,t.y):y)-this.marginTop)+this.marginTop}else this.keepFirstLocation||(c?t.x=this.allowGaps&&t.x>f?Math.max(this.snap(t.x-this.marginLeft)+this.marginLeft,f):f:t.y=this.allowGaps&&t.y>g?Math.max(this.snap(t.y-this.marginTop)+this.marginTop,g):g);c?t.y=g:t.x=f;this.fill&&null!=
e&&(c?t.height=e:t.width=e);c?t.width=this.snap(t.width):t.height=this.snap(t.height);this.setChildGeometry(r,t);n=r;k=t;m=c?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,b,k):this.resizeLast&&null!=b&&null!=k&&null!=n&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};
mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);null!=c&&b.x==c.x&&b.y==c.y&&b.width==c.width&&b.height==c.height||this.graph.getModel().setGeometry(a,b)};
mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.marginRight+this.border,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.marginBottom+this.border,f.height=this.resizeParentMax?Math.max(f.height,c):c);b.x==f.x&&b.y==f.y&&b.width==f.width&&b.height==f.height||e.setGeometry(a,f)};
function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){var e,f=0,g=c.getChildCount(d);for(e=0;e<g;e++){var k=c.getChildAt(d,e);k=this.getVertexBounds(k);if(null!=k){k=k.x+k.width/2;if(f<b&&k>b)break;f=k}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot)&&(d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var k=c.getChildAt(a,g);!this.isVertexIgnored(k)&&this.isVertexMovable(k)&&e.push(k)}f=e.length;if(0<f){var l=this.border,m=this.border,n=b?
d.height:d.width;n-=2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;n-=b?a.height:a.width;l+=a.width;m+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-l-a)/f:(d.height-m-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){k=e[g];var p=c.getGeometry(k);null!=p&&(p=p.clone(),p.x=l,p.y=m,b?(this.resizeVertices&&(p.width=d,p.height=n),l+=d+this.spacing):(this.resizeVertices&&(p.height=d,p.width=n),m+=d+this.spacing),c.setGeometry(k,p))}}finally{c.endUpdate()}}}}};
function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.maintainParentLocation=!1;mxCompactTreeLayout.prototype.groupPadding=10;
mxCompactTreeLayout.prototype.groupPaddingTop=0;mxCompactTreeLayout.prototype.groupPaddingRight=0;mxCompactTreeLayout.prototype.groupPaddingBottom=0;mxCompactTreeLayout.prototype.groupPaddingLeft=0;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;mxCompactTreeLayout.prototype.visited=null;mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;
mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;mxCompactTreeLayout.prototype.root=null;mxCompactTreeLayout.prototype.node=null;
mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)this.root=a;else{if(b=this.graph.findTreeRoots(a,!0,this.invert),0<b.length)for(var d=0;d<b.length;d++)if(!this.isVertexIgnored(b[d])&&0<this.graph.getEdges(b[d],null,this.invert,!this.invert,!1).length){this.root=b[d];break}}else this.root=b;if(null!=this.root){this.parentsChanged=this.resizeParent?{}:null;this.parentY=
this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var e=this.graph.getCellGeometry(a);null!=e&&(this.parentX=e.x,this.parentY=e.y)}c.beginUpdate();try{if(this.visited={},this.node=this.dfs(this.root,a),this.alignRanks&&(this.maxRankHeight=[],this.findRankHeights(this.node,0),this.setCellHeights(this.node,0)),null!=this.node){this.layout(this.node);var f=this.graph.gridSize;b=f;if(!this.moveTree){var g=this.getVertexBounds(this.root);null!=g&&(f=g.x,b=g.y)}g=null;
g=this.isHorizontal()?this.horizontalLayout(this.node,f,b):this.verticalLayout(this.node,null,f,b);if(null!=g){var k=d=0;0>g.x&&(d=Math.abs(f-g.x));0>g.y&&(k=Math.abs(b-g.y));0==d&&0==k||this.moveNode(this.node,d,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(e=this.graph.getCellGeometry(a),null!=e&&(e=e.clone(),e.x=this.parentX,e.y=this.parentY,c.setGeometry(a,e)))}}finally{c.endUpdate()}}};
mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(d,e){var f=d.getTerminal(d.getTerminal(!1)==a);d=c.get(f);null==d&&(d=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,d));e=e.getTerminal(e.getTerminal(!1)==a);f=c.get(e);null==f&&(f=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,f));return mxCellPath.compare(d,f)})};
mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(a=a.child;null!=a;)this.findRankHeights(a,b+1),a=a.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(a=a.child;null!=a;)this.setCellHeights(a,b+1),a=a.next};
mxCompactTreeLayout.prototype.dfs=function(a,b){var c=mxCellPath.create(a),d=null;if(null!=a&&null==this.visited[c]&&!this.isVertexIgnored(a)){this.visited[c]=a;d=this.createNode(a);c=this.graph.getModel();var e=null,f=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),g=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,f);for(a=0;a<f.length;a++){var k=f[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
null));var l=g.getState(k);k=null!=l?l.getVisibleTerminal(this.invert):g.getVisibleTerminal(k,this.invert);l=this.dfs(k,b);null!=l&&null!=c.getGeometry(k)&&(null==e?d.child=l:e.next=l,e=l)}}}return d};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b)for(e=this.verticalLayout(b,a,a.x,a.y,e),c=a.x+b.offsetY,d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next;return e};
mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance;b=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=b;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,b,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;var d=c.width+b,e=d;for(c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var k=this.offset(c,d,g.dx,g.dy,f.dx,f.dy);d+=k;e+=k;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){if(e<=a||0>=a+c)return 0;a=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<a?a:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(a=c.getParent(d),c=mxCellPath.create(a),null==this.parentsChanged[c]&&(this.parentsChanged[c]=a))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)};
mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);f=a.width;var g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);f=this.minEdgeJetty-this.prefVertEdgeOff;g=this.getVertexBounds(c);for(var k=0;k<e.length;k++){var l=e[k].cell.cell,
m=this.getVertexBounds(l);l=this.graph.getEdgesBetween(c,l,!1);for(var n=[],p,q,r=0;r<l.length;r++)this.horizontal?(p=g.x+g.width,q=g.y+b,n.push(new mxPoint(p,q)),p=g.x+g.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=g.x+b,q=g.y+g.height,n.push(new mxPoint(p,q)),q=g.y+g.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a}};
function mxRadialTreeLayout(a){mxCompactTreeLayout.call(this,a,!1)}mxUtils.extend(mxRadialTreeLayout,mxCompactTreeLayout);mxRadialTreeLayout.prototype.angleOffset=.5;mxRadialTreeLayout.prototype.rootx=0;mxRadialTreeLayout.prototype.rooty=0;mxRadialTreeLayout.prototype.levelDistance=120;mxRadialTreeLayout.prototype.nodeDistance=10;mxRadialTreeLayout.prototype.autoRadius=!1;mxRadialTreeLayout.prototype.sortEdges=!1;mxRadialTreeLayout.prototype.rowMinX=[];mxRadialTreeLayout.prototype.rowMaxX=[];
mxRadialTreeLayout.prototype.rowMinCenX=[];mxRadialTreeLayout.prototype.rowMaxCenX=[];mxRadialTreeLayout.prototype.rowRadi=[];mxRadialTreeLayout.prototype.row=[];mxRadialTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
mxRadialTreeLayout.prototype.execute=function(a,b){this.parent=a;this.edgeRouting=this.useBoundingBox=!1;mxCompactTreeLayout.prototype.execute.apply(this,arguments);var c=null,d=this.getVertexBounds(this.root);this.centerX=d.x+d.width/2;this.centerY=d.y+d.height/2;for(var e in this.visited){var f=this.getVertexBounds(this.visited[e]);c=null!=c?c:f.clone();c.add(f)}this.calcRowDims([this.node],0);var g=0,k=0;for(c=0;c<this.row.length;c++)e=(this.rowMaxX[c]-this.centerX-this.nodeDistance)/this.rowRadi[c],
g=Math.max(g,(this.centerX-this.rowMinX[c]-this.nodeDistance)/this.rowRadi[c]),k=Math.max(k,e);for(c=0;c<this.row.length;c++){var l=this.centerX-this.nodeDistance-g*this.rowRadi[c],m=this.centerX+this.nodeDistance+k*this.rowRadi[c]-l;for(e=0;e<this.row[c].length;e++)f=this.row[c],d=f[e],f=this.getVertexBounds(d.cell),d.theta=(f.x+f.width/2-l)/m*Math.PI*2}for(c=this.row.length-2;0<=c;c--)for(f=this.row[c],e=0;e<f.length;e++){d=f[e];g=d.child;for(l=k=0;null!=g;)l+=g.theta,k++,g=g.next;0<k&&(g=l/k,g>
d.theta&&e<f.length-1?d.theta=Math.min(g,f[e+1].theta-Math.PI/10):g<d.theta&&0<e&&(d.theta=Math.max(g,f[e-1].theta+Math.PI/10)))}for(c=0;c<this.row.length;c++)for(e=0;e<this.row[c].length;e++)f=this.row[c],d=f[e],f=this.getVertexBounds(d.cell),this.setVertexLocation(d.cell,this.centerX-f.width/2+this.rowRadi[c]*Math.cos(d.theta),this.centerY-f.height/2+this.rowRadi[c]*Math.sin(d.theta))};
mxRadialTreeLayout.prototype.calcRowDims=function(a,b){if(null!=a&&0!=a.length){this.rowMinX[b]=this.centerX;this.rowMaxX[b]=this.centerX;this.rowMinCenX[b]=this.centerX;this.rowMaxCenX[b]=this.centerX;this.row[b]=[];for(var c=!1,d=0;d<a.length;d++)for(var e=null!=a[d]?a[d].child:null;null!=e;){var f=this.getVertexBounds(e.cell);this.rowMinX[b]=Math.min(f.x,this.rowMinX[b]);this.rowMaxX[b]=Math.max(f.x+f.width,this.rowMaxX[b]);this.rowMinCenX[b]=Math.min(f.x+f.width/2,this.rowMinCenX[b]);this.rowMaxCenX[b]=
Math.max(f.x+f.width/2,this.rowMaxCenX[b]);this.rowRadi[b]=f.y-this.getVertexBounds(this.root).y;null!=e.child&&(c=!0);this.row[b].push(e);e=e.next}c&&this.calcRowDims(this.row[b],b+1)}};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;
mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;
mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];.001>this.forceConstant&&(this.forceConstant=
.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var k=mxObjectIdentity.get(g);this.indices[k]=d;var l=this.getVertexBounds(g),m=l.width,n=l.height,p=l.x,q=l.y;this.cellLocation[d][0]=p+m/2;this.cellLocation[d][1]=q+n/2;this.radius[d]=Math.min(m,n);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
var r=this.graph.getConnections(this.vertexArray[d],a);c=this.graph.getOpposites(r,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(r[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(r[m],!1);k=mxObjectIdentity.get(c[m]);var t=this.indices[k];this.neighbours[d][m]=null!=t?t:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(l=this.getVertexBounds(g),null!=l&&(this.cellLocation[d][0]-=l.width/2,this.cellLocation[d][1]-=l.height/2,p=this.graph.snap(Math.round(this.cellLocation[d][0])),q=this.graph.snap(Math.round(this.cellLocation[d][1])),this.setVertexLocation(g,p,q),c=null==c?p:Math.min(c,p),a=null==a?q:Math.min(a,q)));d=-(c||0)+1;g=-(a||
0)+1;null!=e&&(d+=e.x,g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);.001>b&&(b=.001);var c=this.dispX[a]/b*Math.min(b,this.temperature);b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f);f/=this.forceConstant;d=d/g*f;e=e/g*f;this.dispX[a]-=
d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=.01+Math.random());0==e&&(e=.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),k=0;k<g;k++){var l=b.getChildAt(a,k);if(this.isVertexIgnored(l))this.isEdgeIgnored(l)||(this.resetEdges&&this.graph.resetEdge(l),this.disableEdgeStyle&&this.setEdgeStyleEnabled(l,!1));else{f.push(l);var m=this.getVertexBounds(l);d=null==d?m.y:Math.min(d,m.y);e=null==e?m.x:Math.min(e,m.x);c=Math.max(c,Math.max(m.width,m.height))}}var n=this.getRadius(f.length,
c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,n,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],Math.round(c+b+b*Math.cos(g*f-Math.PI/2)),Math.round(d+b+b*Math.sin(g*f-Math.PI/2)))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}
mxParallelEdgeLayout.prototype=new mxGraphLayout;mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.checkOverlap=!1;mxParallelEdgeLayout.prototype.execute=function(a,b){a=this.findParallels(a,b);this.graph.model.beginUpdate();try{for(var c in a){var d=a[c];1<d.length&&this.layout(d)}}finally{this.graph.model.endUpdate()}};
mxParallelEdgeLayout.prototype.findParallels=function(a,b){var c=[],d=mxUtils.bind(this,function(g){if(!this.isEdgeIgnored(g)){var k=this.getEdgeId(g);null!=k&&(null==c[k]&&(c[k]=[]),c[k].push(g))}});if(null!=b)for(var e=0;e<b.length;e++)d(b[e]);else{b=this.graph.getModel();var f=b.getChildCount(a);for(e=0;e<f;e++)d(b.getChildAt(a,e))}return c};
mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);b=b.getVisibleTerminal(a,!1);var d="";if(null!=c&&null!=b){c=mxObjectIdentity.get(c);b=mxObjectIdentity.get(b);if(this.checkOverlap&&(a=this.graph.view.getState(a),null!=a&&null!=a.absolutePoints)){d=[];for(var e=0;e<a.absolutePoints.length;e++){var f=a.absolutePoints[e];null!=f&&d.push(f.x,f.y)}d=d.join(",")}return(c>b?b+"-"+c:c+"-"+b)+d}return null};
mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.view.getState(b);if(null!=c&&null!=c.absolutePoints){var d=c.absolutePoints[0];c=c.absolutePoints[c.absolutePoints.length-1];if(null!=d&&null!=c){var e=this.graph.getView(),f=this.graph.getModel(),g=f.getGeometry(e.getVisibleTerminal(b,!0));b=f.getGeometry(e.getVisibleTerminal(b,!1));if(g==b)for(c=g.x+g.width+this.spacing,d=g.y+g.height/2,g=0;g<a.length;g++)this.route(a[g],c,d),c+=this.spacing;else if(null!=g&&null!=b&&(g=this.graph.view.scale,
b=this.graph.view.translate,d.x=d.x/g-b.x,d.y=d.y/g-b.y,c.x=c.x/g-b.x,c.y=c.y/g-b.y,g=c.x-d.x,e=c.y-d.y,b=Math.sqrt(g*g+e*e),0<b))for(c=d.x+g/2,d=d.y+e/2,e=e*this.spacing/b,b=g*this.spacing/b,c+=e*(a.length-1)/2,d-=b*(a.length-1)/2,g=0;g<a.length;g++)this.route(a[g],c,d),c-=e,d+=b}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(Math.round(b),Math.round(c))])};
function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.moveCell.apply(this.master,arguments):this.layouts[0].moveCell.apply(this.layouts[0],arguments)};
mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;
mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var k=c.getChildAt(a,g),l=b.getState(k);null!=l&&(this.isVertexIgnored(k)?this.isEdgeIgnored(k)||d.push(l):e.push(l))}this.placeLabels(e,d)};
mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height;e=Math.abs(e)<Math.abs(f)?e:f;f=-d.x-d.width+b.x;b=-d.x+b.x+b.width;b=Math.abs(f)<Math.abs(b)?f:b;Math.abs(b)<Math.abs(e)?e=0:b=0;d=c.getGeometry(a.cell);null!=d&&(d=d.clone(),null!=d.offset?(d.offset.x+=b,d.offset.y+=e):d.offset=new mxPoint(b,e),c.setGeometry(a.cell,d))}};
function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],k=g.edges;if(null!=k&&0<k.length){k=k[0];var l=a.getVisibleTerminal(k,!1);l=this.vertexMapper.get(l);c[d]==
l&&(l=a.getVisibleTerminal(k,!0),l=this.vertexMapper.get(l));null!=l&&c[d]!=l&&(g.target=l,0==l.connectsAsTarget.length&&(l.connectsAsTarget=[]),0>mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var k=a.getVisibleTerminal(f[g],!1);if(k!=b[e]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[e],k,!1);k=a.getEdgesBetween(b[e],k,!0);if(null!=l&&0<l.length&&null==this.edgeMapper.get(l[0])&&2*k.length>=l.length){k=
new mxGraphHierarchyEdge(l);for(var m=0;m<l.length;m++){var n=l[m];this.edgeMapper.put(n,k);d.resetEdge(n);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(n,!1),a.setOrthogonalEdge(n,!0))}k.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,k)&&c[e].connectsAsSource.push(k)}}}c[e].temp[0]=0}};
mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}var d=this.vertexMapper.getValues();for(b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){c=a[0];var f=c.connectsAsTarget,g=c.connectsAsSource,k=!0,l=this.SOURCESCANSTARTRANK;for(b=0;b<f.length;b++){var m=f[b];if(5270620==m.temp[0])m=m.source,l=Math.min(l,m.temp[0]-1);else{k=!1;break}}if(k){c.temp[0]=
l;this.maxRank=Math.min(this.maxRank,l);if(null!=g)for(b=0;b<g.length;b++)m=g[b],m.temp[0]=5270620,m=m.target,-1==m.temp[0]&&(a.push(m),m.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++)for(c=e[b],a=0,f=c.connectsAsSource,d=0;d<f.length;d++)m=f[d],m=m.target,c.temp[0]=Math.max(a,m.temp[0]+1),a=c.temp[0];this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots){var d=this.roots;c=[];for(b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}}this.visit(function(f,g,k,l,m){0==m&&0>g.maxRank&&0>g.minRank&&(a[g.temp[0]].push(g),g.maxRank=g.temp[0],g.minRank=g.temp[0],g.temp[0]=a[g.maxRank].length-1);if(null!=f&&null!=k&&1<f.maxRank-g.maxRank)for(k.maxRank=f.maxRank,k.minRank=g.maxRank,k.temp=
[],k.x=[],k.y=[],f=k.minRank+1;f<k.maxRank;f++)a[f].push(k),k.setGeneralPurposeVariable(f,a[f].length-1)},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g])for(e[g]=b,d(a,b,c,f,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1);else d(a,b,c,f,1)}};
mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,k){if(null!=b)if(null==a||null!=b.hashCode&&b.hashCode[0]==a.hashCode[0]||(f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g),g=b.id,null==e[g])for(e[g]=b,d(a,b,c,k,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,k+1);else d(a,b,c,k,1)};
function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],k=g.edges;if(null!=k&&0<k.length){k=k[0];var l=a.getVisibleTerminal(k,!1);l=this.vertexMapper.get(l);c[d]==l&&(l=
a.getVisibleTerminal(k,!0),l=this.vertexMapper.get(l));null!=l&&c[d]!=l&&(g.target=l,0==l.connectsAsTarget.length&&(l.connectsAsTarget=[]),0>mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.tightenToSource=!1;mxSwimlaneModel.prototype.ranksPerGroup=null;
mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);this.vertexMapper.put(b[f],c[f]);c[f].swimlaneIndex=-1;for(var g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var k=0;k<g.length;k++){var l=a.getVisibleTerminal(g[k],!1);if(l!=b[f]&&a.graph.model.isVertex(l)&&!a.isVertexIgnored(l)){var m=a.getEdgesBetween(b[f],l,!1);
l=a.getEdgesBetween(b[f],l,!0);if(null!=m&&0<m.length&&null==this.edgeMapper.get(m[0])&&2*l.length>=m.length){l=new mxGraphHierarchyEdge(m);for(var n=0;n<m.length;n++){var p=m[n];this.edgeMapper.put(p,l);d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}l.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,l)&&c[f].connectsAsSource.push(l)}}}c[f].temp[0]=0}};
mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=this.vertexMapper.get(this.roots[c]);this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];d=this.vertexMapper.getValues();for(c=0;c<d.length;c++)d[c].temp[0]=-1;for(a.slice();0<a.length;){d=a[0];var e=d.connectsAsTarget,
f=d.connectsAsSource,g=!0,k=b[0];for(c=0;c<e.length;c++){var l=e[c];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{g=!1;break}}if(g){k>b[d.swimlaneIndex]&&(k=b[d.swimlaneIndex]);d.temp[0]=k;if(null!=f)for(c=0;c<f.length;c++)l=f[c],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots){var d=this.roots;c=[];for(b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}}this.visit(function(f,g,k,l,m){0==m&&0>g.maxRank&&0>g.minRank&&(a[g.temp[0]].push(g),g.maxRank=g.temp[0],g.minRank=g.temp[0],g.temp[0]=a[g.maxRank].length-1);if(null!=f&&null!=k&&1<f.maxRank-g.maxRank)for(k.maxRank=f.maxRank,k.minRank=g.maxRank,k.temp=
[],k.x=[],k.y=[],f=k.minRank+1;f<k.maxRank;f++)a[f].push(k),k.setGeneralPurposeVariable(f,a[f].length-1)},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g])for(e[g]=b,d(a,b,c,f,0),a=b.connectsAsSource.slice(),c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1);else d(a,b,c,f,1)}};
mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,k){if(null!=b)if(null==a||null!=b.hashCode&&b.hashCode[0]==a.hashCode[0]||(f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g),g=b.id,null==e[g]){e[g]=b;d(a,b,c,k,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var l=f.target;b.swimlaneIndex<=l.swimlaneIndex&&this.extendedDfs(b,l,f,d,e,b.hashCode,g,k+1)}for(g=0;g<c.length;g++)f=c[g],l=f.source,b.swimlaneIndex<l.swimlaneIndex&&
this.extendedDfs(b,l,f,d,e,b.hashCode,g,k+1)}else d(a,b,c,k,1)};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;mxMedianHybridCrossingReduction.prototype.maxIterations=24;
mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();var c=0,d=this.calculateCrossings(a);for(b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d)for(d=e,e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var k=f[g];this.nestedBestRanks[e][k.getGeneralPurposeVariable(e)]=
k}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g);if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[];for(b=0;b<d.length;b++){var g=d[b],k=g.getGeneralPurposeVariable(a);g=g.getPreviousLayerConnectedCells(a);for(var l=[],m=0;m<g.length;m++){var n=g[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(p,q){return p-q});f[k]=l}a=[];for(b=0;b<f.length;b++)a=a.concat(f[b]);for(d=1;d<e.length;)d<<=1;f=2*d-1;--d;e=[];for(b=0;b<f;++b)e[b]=0;for(b=0;b<a.length;b++)for(f=a[b]+d,++e[f];0<
f;)f%2&&(c+=e[f+1]),f=f-1>>1,++e[f];return c};
mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;){var e=1==a%2&&1==d%2;c=!1;for(var f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}var p=null,q=null,r=null,t=null,u=null;for(l=0;l<g.length-1;l++){if(0==l){var x=k[l];m=x.getNextLayerConnectedCells(f);n=x.getPreviousLayerConnectedCells(f);for(var y=[],A=[],z=0;z<m.length;z++)y[z]=m[z].getGeneralPurposeVariable(f+1);for(z=
0;z<n.length;z++)A[z]=n[z].getGeneralPurposeVariable(f-1)}else m=p,n=q,y=r,A=t,x=u;u=k[l+1];p=u.getNextLayerConnectedCells(f);q=u.getPreviousLayerConnectedCells(f);r=[];t=[];for(z=0;z<p.length;z++)r[z]=p[z].getGeneralPurposeVariable(f+1);for(z=0;z<q.length;z++)t[z]=q[z].getGeneralPurposeVariable(f-1);var C=0,B=0;for(z=0;z<y.length;z++)for(var v=0;v<r.length;v++)y[z]>r[v]&&C++,y[z]<r[v]&&B++;for(z=0;z<A.length;z++)for(v=0;v<t.length;v++)A[z]>t[v]&&C++,A[z]<t[v]&&B++;if(B<C||B==C&&e)p=x.getGeneralPurposeVariable(f),
x.setGeneralPurposeVariable(f,u.getGeneralPurposeVariable(f)),u.setGeneralPurposeVariable(f,p),p=m,q=n,r=y,t=A,u=x,e||(c=!0)}}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){if(a=0==a%2)for(var c=b.maxRank-1;0<=c;c--)this.medianRank(c,a);else for(c=1;c<b.maxRank;c++)this.medianRank(c,a)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a),m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(g,k){return g-k});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;a=d/2;b=c[a-1]-c[0];d=c[d-1]-c[a];return(c[a-1]*d+c[a]*b)/(b+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots){var f=a.roots;c=[];for(e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e])}a.visit(function(g,k,l,m,n){k.isAncestor(g)&&(l.invert(),mxUtils.remove(l,g.connectsAsSource),g.connectsAsTarget.push(l),mxUtils.remove(l,k.connectsAsTarget),k.connectsAsSource.push(l));b[k.id]=k;delete d[k.id]},c,!0,null);e=mxUtils.clone(b,null,
!0);a.visit(function(g,k,l,m,n){k.isAncestor(g)&&(l.invert(),mxUtils.remove(l,g.connectsAsSource),k.connectsAsSource.push(l),g.connectsAsTarget.push(l),mxUtils.remove(l,k.connectsAsTarget));b[k.id]=k;delete d[k.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;
mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;mxCoordinateAssignment.prototype.minEdgeJetty=12;
mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;mxCoordinateAssignment.prototype.rankBottomY=null;
mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b)," ");mxLog.writeln()}mxLog.writeln("====================================")};
mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(e=
a.ranks[d],f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d));this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){g=b.shift();e=g.cell;var l=g.weightedValue,m=parseInt(g.rankIndex);k=e.getNextLayerConnectedCells(l);var n=e.getPreviousLayerConnectedCells(l),p=k.length,q=n.length,r=this.medianXValue(k,l+1),t=this.medianXValue(n,
l-1),u=p+q,x=e.getGeneralPurposeVariable(l),y=x;0<u&&(y=(r*p+t*q)/u);p=!1;y<x-1?0==m?(e.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m-1],x=m.getGeneralPurposeVariable(l),x=x+m.width/2+this.intraCellSpacing+e.width/2,x<y?(e.setGeneralPurposeVariable(l,y),p=!0):x<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,x),p=!0)):y>x+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,y),p=!0):(m=d[l][m+1],x=m.getGeneralPurposeVariable(l),x=x-m.width/2-this.intraCellSpacing-e.width/2,x>y?(e.setGeneralPurposeVariable(l,
y),p=!0):x>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,x),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&0==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(a=b.maxRank;0<a;a--)this.rankMedianPosition(a-1,b,a);else for(a=0;a<b.maxRank-1;a++)this.rankMedianPosition(a+1,b,a)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){g=d[f].cell;var l=0;k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));var m=0;k=-1E8;for(var n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var q=p.cell;p.visited?(k=q.getGeneralPurposeVariable(a)+q.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=q.width+this.intraCellSpacing,n--)}}m=0;q=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var r=p.cell;p.visited?(q=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=r.width+
this.intraCellSpacing,n++)}l>=k&&l<=q?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>q&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(e,f){return e-f});if(1==a.length%2)return c[Math.floor(a.length/2)];a=a.length/2;return(c[a-1]+c[a])/2};
mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=this.initialX+(this.widestRankValue-this.rankWidths[a])/2;for(var d=!1,e=0;e<b.length;e++){var f=b[e];if(f.isVertex()){var g=this.layout.getVertexBounds(f.cell);null!=g?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(f.width=g.width,f.height=g.height):(f.width=g.height,f.height=g.width):d=!0}else f.isEdge()&&(g=1,null!=f.edges?g=f.edges.length:mxLog.warn("edge.edges is null"),
f.width=(g-1)*this.parallelEdgeSpacing);c+=f.width/2;f.setX(a,c);f.setGeneralPurposeVariable(a,c);c+=f.width/2;c+=this.intraCellSpacing}1==d&&mxLog.warn("At least one cell has no bounds")};
mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){a=-this.interRankCellSpacing;var c=0;this.rankWidths=[];this.rankY=[];for(var d=b.maxRank;0<=d;d--){for(var e=0,f=b.ranks[d],g=this.initialX,k=!1,l=0;l<f.length;l++){var m=f[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;e=Math.max(e,m.height)}else m.isEdge()&&
(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);g+=m.width/2;m.setX(d,g);m.setGeneralPurposeVariable(d,g);g+=m.width/2;g+=this.intraCellSpacing;g>this.widestRankValue&&(this.widestRankValue=g,this.widestRank=d);this.rankWidths[d]=g}1==k&&mxLog.warn("At least one cell has no bounds");this.rankY[d]=a;g=e/2+c/2+this.interRankCellSpacing;c=e;a=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?a+g:a-
g;for(l=0;l<f.length;l++)f[l].setY(d,a)}};
mxCoordinateAssignment.prototype.minPath=function(a,b){a=b.edgeMapper.getValues();for(var c=0;c<a.length;c++){var d=a[c];if(!(1>d.maxRank-d.minRank-1)){for(var e=d.getGeneralPurposeVariable(d.minRank+1),f=!0,g=0,k=d.minRank+2;k<d.maxRank;k++){var l=d.getGeneralPurposeVariable(k);e!=l?(f=!1,e=l):g++}if(!f){f=e=0;l=[];var m=[],n=d.getGeneralPurposeVariable(d.minRank+1);for(k=d.minRank+1;k<d.maxRank-1;k++){var p=d.getX(k+1);n==p?(l[k-d.minRank-1]=n,e++):this.repositionValid(b,d,k+1,n)?(l[k-d.minRank-
1]=n,e++):n=l[k-d.minRank-1]=p}n=d.getX(k);for(k=d.maxRank-1;k>d.minRank+1;k--)p=d.getX(k-1),n==p?(m[k-d.minRank-2]=n,f++):this.repositionValid(b,d,k-1,n)?(m[k-d.minRank-2]=n,f++):(m[k-d.minRank-2]=d.getX(k-1),n=p);if(f>g||e>g)if(f>=e)for(k=d.maxRank-2;k>d.minRank;k--)d.setX(k,m[k-d.minRank-1]);else if(e>f)for(k=d.minRank+2;k<d.maxRank;k++)d.setX(k,l[k-d.minRank-2])}}}};
mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(a=0;a<b.ranks.length;a++)this.rankTopY[a]=Number.MAX_VALUE,this.rankBottomY[a]=-Number.MAX_VALUE;var c=b.vertexMapper.getValues();for(a=0;a<c.length;a++)this.setVertexLocation(c[a]);this.layout.edgeStyle!=mxHierarchicalEdgeStyle.ORTHOGONAL&&this.layout.edgeStyle!=mxHierarchicalEdgeStyle.POLYLINE&&this.layout.edgeStyle!=mxHierarchicalEdgeStyle.CURVE||this.localEdgeProcessing(b);b=b.edgeMapper.getValues();
for(a=0;a<b.length;a++)this.setEdgePosition(b[a])};
mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);n=e.x[0]-e.width/2;var p=n+e.width,q=f=0;g=[];for(m=0;m<l.length;m++){var r=l[m].cell;
if(r.isVertex())for(var t=0==k?e.connectsAsSource:e.connectsAsTarget,u=0;u<t.length;u++){if(t[u].source==r||t[u].target==r)f+=t[u].edges.length,q++,g.push(t[u])}else f+=r.edges.length,q++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=0;m<g.length;m++)for(q=g[m].edges.length,r=this.jettyPositions[g[m].ids[0]],null==r&&(r=[],this.jettyPositions[g[m].ids[0]]=r),m<f/2?p+=
this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff),t=0;t<q;t++)r[4*t+2*k]=n,n+=l,r[4*t+2*k+1]=p}f=e.getNextLayerConnectedCells(b);g=b+1}}};
mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),q=[],r=a.isReversed;p!=g&&(r=!r);if(null!=f){var t=r?
2:0,u=r?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],x=f[4*e+1+t];r!=l&&(x=-x);u+=x;t=f[4*e+t];var y=k.model.getTerminal(n,!0);this.layout.isPort(y)&&k.model.getParent(y)==p&&(t=k.view.getState(y),t=null!=t?t.x:p.geometry.x+a.source.width*y.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(t,u)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(t,u+x))):(q.push(new mxPoint(u,
t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u+x,t)))}t=a.x.length-1;u=x=-1;p=a.maxRank-1;for(r&&(t=0,x=a.x.length,u=1,p=a.minRank+1);a.maxRank!=a.minRank&&t!=x;t+=u){y=a.x[t]+b;var A=(this.rankTopY[p]+this.rankBottomY[p+1])/2,z=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(r){var C=A;A=z;z=C}this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(q.push(new mxPoint(y,A)),q.push(new mxPoint(y,z))):(q.push(new mxPoint(A,y)),q.push(new mxPoint(z,
y)));this.limitX=Math.max(this.limitX,y);p+=u}null!=f&&(t=r?2:0,u=r?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],x=f[4*e+3-t],r!=l&&(x=-x),u-=x,t=f[4*e+2-t],r=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(r)&&k.model.getParent(r)==p&&(t=k.view.getState(r),t=null!=t?t.x:p.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
q.push(new mxPoint(t,u-x)),q.push(new mxPoint(t,u))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&q.push(new mxPoint(u-x,t)),q.push(new mxPoint(u,t))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,q);this.layout.resetEdgeLabels&&null!=n.geometry&&(geometry=n.geometry.clone(),geometry.relative=!0,geometry.x=0,geometry.y=0,k.model.setGeometry(n,geometry));b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
mxSwimlaneOrdering.prototype.execute=function(a){a=this.layout.getModel();var b=mxUtils.clone(a.vertexMapper,null,!0),c=null;if(null!=a.roots){var d=a.roots;c=[];for(var e=0;e<d.length;e++)c[e]=a.vertexMapper.get(d[e])}a.visit(function(f,g,k,l,m){l=null!=f&&f.swimlaneIndex==g.swimlaneIndex&&g.isAncestor(f);m=null!=f&&null!=k&&f.swimlaneIndex<g.swimlaneIndex&&k.source==g;l?(k.invert(),mxUtils.remove(k,f.connectsAsSource),g.connectsAsSource.push(k),f.connectsAsTarget.push(k),mxUtils.remove(k,g.connectsAsTarget)):
m&&(k.invert(),mxUtils.remove(k,f.connectsAsTarget),g.connectsAsTarget.push(k),f.connectsAsSource.push(k),mxUtils.remove(k,g.connectsAsSource));f=mxCellPath.create(g.cell);delete b[f]},c,!0,null)};function mxHierarchicalLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxHierarchicalLayout.prototype=new mxGraphLayout;
mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!1;mxHierarchicalLayout.prototype.maintainParentLocation=!1;mxHierarchicalLayout.prototype.moveParent=!1;mxHierarchicalLayout.prototype.parentBorder=0;mxHierarchicalLayout.prototype.intraCellSpacing=30;mxHierarchicalLayout.prototype.interRankCellSpacing=100;mxHierarchicalLayout.prototype.interHierarchySpacing=60;
mxHierarchicalLayout.prototype.parallelEdgeSpacing=10;mxHierarchicalLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxHierarchicalLayout.prototype.fineTuning=!0;mxHierarchicalLayout.prototype.tightenToSource=!0;mxHierarchicalLayout.prototype.disableEdgeStyle=!0;mxHierarchicalLayout.prototype.resetEdgeLabels=!0;mxHierarchicalLayout.prototype.traverseAncestors=!0;mxHierarchicalLayout.prototype.model=null;mxHierarchicalLayout.prototype.edgesCache=null;
mxHierarchicalLayout.prototype.edgeSourceTermCache=null;mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxHierarchicalLayout.prototype.getModel=function(){return this.model};
mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null==b||b instanceof Array||(b=[b]);if(null!=b||null!=a){this.parentY=this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}if(null!=b){for(var e=[],f=0;f<b.length;f++)(null!=a?c.isAncestor(a,
b[f]):1)&&c.isVertex(b[f])&&e.push(b[f]);this.roots=e}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],this.parentBorder,this.moveParent),null!=this.parentX&&null!=this.parentY&&(d=this.graph.getCellGeometry(a),null!=d&&(d=d.clone(),d.x=this.parentX,d.y=this.parentY,c.setGeometry(a,d)))}finally{c.endUpdate()}}};
mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){a=this.graph.model;var d=null,e=-1E5,f;for(f in b){var g=b[f];if(a.isVertex(g)&&this.graph.isCellVisible(g)){for(var k=this.getEdges(g),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==g?l++:m++;0==m&&0<l&&c.push(g);k=l-m;k>e&&(e=k,d=g)}}0==c.length&&null!=d&&c.push(d)}return c};
mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;var c=this.graph.model;b=[];for(var d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
this.parent||this.isAncestor(this.parent,d,this.traverseAncestors))||d==a&&(null==this.parent||this.isAncestor(this.parent,e,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;d=this.graph.view.getState(a);var e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));null!=e&&(this.isPort(e)&&(e=this.graph.model.getParent(e)),c.put(a,e));return e};
mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){var g=this.findRoots(a,d);for(e=0;e<g.length;e++){var k={};b.push(k);this.traverse(g[e],!0,null,c,k,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);for(e=c=
0;e<b.length;e++){k=b[e];d=[];for(f in k)d.push(k[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&a!=this.parent&&this.graph.isCellVisible(a)&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return null!=a&&null!=a.geometry?a.geometry.relative:!1};
mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),k=this.getVisibleTerminal(d[f],!1);(g==a&&k==b||!c&&g==b&&k==a)&&e.push(d[f])}return e};
mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var k=mxObjectIdentity.get(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a);k=[];for(c=0;c<l.length;c++)k[c]=this.getVisibleTerminal(l[c],!0)==a;for(c=0;c<l.length;c++)if(!b||k[c]){a=this.getVisibleTerminal(l[c],!k[c]);for(var m=1,n=0;n<l.length;n++)if(n!=c){var p=k[n];this.getVisibleTerminal(l[n],!p)==a&&(p?m++:m--)}0<=m&&(e=this.traverse(a,
b,l[c],d,e,f,g))}}else if(null==e[k])for(c=0;c<f.length;c++)if(b=f[c],null!=b[k]){for(l in b)e[l]=b[l];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
mxHierarchicalLayout.prototype.placementStage=function(a,b){a=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);a.fineTuning=this.fineTuning;a.execute(b);return a.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.maintainParentLocation=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxHierarchicalLayout.prototype.edgeSourceTermCache=null;
mxHierarchicalLayout.prototype.edgesTargetTermCache=null;mxHierarchicalLayout.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.parentY=this.parentX=null;if(a!=this.root&&null!=c.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}this.swimlanes=b;for(var e=[],f=0;f<b.length;f++){var g=this.graph.getChildCells(b[f]);
if(null==g||0==g.length)g=this.graph.insertVertex(b[f],null,null,0,0,this.dummyVertexWidth,0),e.push(g)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],this.parentBorder,this.moveParent),null!=this.parentX&&null!=this.parentY&&(d=this.graph.getCellGeometry(a),null!=d&&(d=d.clone(),d.x=this.parentX,d.y=this.parentY,c.setGeometry(a,d))),this.graph.removeCells(e)}finally{c.endUpdate()}}};
mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model;for(f in b.edgeMapper)for(var c=b.edgeMapper[f],d=0;d<c.edges.length;d++)a.push(c.edges[d]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(d=0;d<this.swimlanes.length;d++){var e=this.swimlanes[d],f=this.graph.getCellGeometry(e);if(null!=f){var g=this.graph.getChildCells(e);c=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;e=this.graph.getBoundingBoxFromGeometry(g);b[d]=e;c=e.y+f.y-c.height-this.parentBorder;
f=e.y+f.y+e.height;null==a?a=new mxRectangle(0,c,0,f-c):(a.y=Math.min(a.y,c),a.height=Math.max(a.y+a.height,f)-a.y)}}for(d=0;d<this.swimlanes.length;d++)if(e=this.swimlanes[d],f=this.graph.getCellGeometry(e),null!=f){g=this.graph.getChildCells(e);c=this.graph.isSwimlane(e)?this.graph.getStartSize(e):new mxRectangle;var k=f.clone(),l=c.width+(0==d?this.parentBorder:this.interRankCellSpacing/2),m=b[d].x-l,n=a.y-this.parentBorder;k.x+=m;k.y=n;k.width=b[d].width+l+this.interRankCellSpacing/2;k.height=
a.height+c.height+2*this.parentBorder;this.graph.model.setGeometry(e,k);this.graph.moveCells(g,-m,f.y-n)}};
mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var k=b[g];if(null!=k&&d.isVertex(k)&&this.graph.isCellVisible(k)&&d.isAncestor(a,k)){for(var l=this.getEdges(k),m=0,n=0,p=0;p<l.length;p++){var q=this.getVisibleTerminal(l[p],!0);q==k?(q=this.getVisibleTerminal(l[p],!1),d.isAncestor(a,q)&&m++):d.isAncestor(a,q)&&n++}0==n&&0<m&&c.push(k);l=m-n;l>f&&(f=l,e=k)}}0==c.length&&null!=e&&c.push(e)}return c};
mxSwimlaneLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;var c=this.graph.model;b=[];for(var d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;d=this.graph.view.getState(a);var e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));null!=e&&(this.isPort(e)&&(e=this.graph.model.getParent(e)),c.put(a,e));return e};
mxSwimlaneLayout.prototype.run=function(a){var b=[],c={};if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];e=!0;for(var f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var k=this.findRoots(this.swimlanes[g],d);if(0==k.length)g++;else{for(e=0;e<k.length;e++){var l={};b.push(l);this.traverse(k[e],!0,null,c,l,b,d,g)}for(e=0;e<k.length;e++)this.roots.push(k[e]);e=
!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)l={},b.push(l),this.traverse(this.roots[e],!0,null,c,l,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);this.placementStage(0,a)};
mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a)&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),k=this.getVisibleTerminal(d[f],!1);(g==a&&k==b||!c&&g==b&&k==a)&&e.push(d[f])}return e};
mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=d){var l=mxObjectIdentity.get(a);if(null==d[l]&&(null==g||null!=g[l])){null==e[l]&&(e[l]=a);null==d[l]&&(d[l]=a);null!==g&&delete g[l];var m=this.getEdges(a);l=this.graph.model;for(c=0;c<m.length;c++){var n=this.getVisibleTerminal(m[c],!0),p=n==a;p&&(n=this.getVisibleTerminal(m[c],!1));for(var q=0;q<this.swimlanes.length&&!l.isAncestor(this.swimlanes[q],n);)q++;q>=this.swimlanes.length||!(q>k||(!b||p)&&q==k)||(e=this.traverse(n,
b,m[c],d,e,f,g,q))}}else if(null==e[l])for(c=0;c<f.length;c++)if(a=f[c],null!=a[l]){for(m in a)e[m]=a[m];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
mxSwimlaneLayout.prototype.placementStage=function(a,b){a=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);a.fineTuning=this.fineTuning;a.execute(b);return a.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.ignoreRelativeEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCells=function(){var a=[];if(null!=this.cells)for(var b in this.cells)a.push(this.cells[b]);return a};mxGraphModel.prototype.getCellCount=function(){var a=0;if(null!=this.cells)for(var b in this.cells)a++;return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};
mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a){c=[];for(var d=0;d<a.length;d++)b(a[d])&&c.push(a[d])}return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++){var f=this.getChildAt(b,e);c=c.concat(this.filterDescendants(a,f))}return c};
mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};
mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));b=this.getChildCount(a);for(var c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)a=c[d],this.isAncestor(b,a)&&this.updateEdgeParent(a,b)};
mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1);null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&this.ignoreRelativeEdgeParent&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(b=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=b&&(this.getParent(b)!=this.root||this.isAncestor(b,a))&&this.getParent(a)!=
b)){c=this.getGeometry(a);if(null!=c){var e=this.getOrigin(this.getParent(a)),f=this.getOrigin(b);d=f.x-e.x;e=f.y-e.y;c=c.clone();c.translate(-d,-e);this.setGeometry(a,c)}this.add(b,a,this.getChildCount(b))}};mxGraphModel.prototype.getOrigin=function(a){if(null!=a){var b=this.getOrigin(this.getParent(a));this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))}else b=new mxPoint;return b};
mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=mxCellPath.create(a);for(c.length<d.length&&(a=b,b=d,d=c,c=b);null!=a;){b=this.getParent(a);if(0==c.indexOf(d+mxCellPath.PATH_SEPARATOR)&&null!=b)return a;d=mxCellPath.getParentPath(d);a=b}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?b==d&&d.getIndex(a)==c||b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));b=this.contains(b);c=this.contains(d);b&&!c?this.cellAdded(a):c&&!b&&this.cellRemoved(a);return d};
mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var k=this.getEdgeAt(a,g),l=this.getTerminal(k,!0),m=this.getTerminal(k,!1);(d&&l==m||l!=m&&(b&&m==a||c&&l==a))&&f.push(k)}return f};
mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var k=this.getEdgeAt(f,e),l=this.getTerminal(k,!0),m=this.getTerminal(k,!1),n=m==a&&l==b;(l==a&&m==b||!c&&n)&&d.push(k)}return d};
mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),k=this.getTerminal(a[f],!1);g==b&&null!=k&&k!=b&&d?e.push(k):k==b&&null!=g&&g!=b&&c&&e.push(g)}return e};
mxGraphModel.prototype.getTopmostCells=function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<a.length;d++){for(var e=a[d],f=!0,g=this.getParent(e);null!=g;){if(b.get(g)){f=!1;break}g=this.getParent(g)}f&&c.push(e)}return c};mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};
mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};
mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};
mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};
mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this,null!=a?a:!0);b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};
mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var k=g.getId(),l=null==k||this.isEdge(g)&&c?null:this.getCell(k);if(null==l){var m=g.clone();m.setId(k);m.setTerminal(g.getTerminal(!0),!0);m.setTerminal(g.getTerminal(!1),!1);l=b.insert(m);this.cellAdded(l)}d[mxCellPath.create(g)]=l;this.mergeChildrenImpl(g,l,c,d)}}}finally{this.endUpdate()}};
mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c=new mxDictionary,d=0;d<a.length;d++){var e=this.getParent(a[d]);null==e||c.get(e)||(c.put(e,!0),b.push(e))}return b};mxGraphModel.prototype.cloneCell=function(a,b,c){return null!=a?this.cloneCells([a],b,null,c)[0]:null};
mxGraphModel.prototype.cloneCells=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:{};d=null!=d?d:!1;for(var e=[],f=0;f<a.length;f++)null!=a[f]?e.push(this.cloneCellImpl(a[f],c,b,d)):e.push(null);for(f=0;f<e.length;f++)null!=e[f]&&this.restoreClone(e[f],a[f],c);return e};
mxGraphModel.prototype.cloneCellImpl=function(a,b,c,d){var e=mxObjectIdentity.get(a),f=b[e];if(null==f&&(f=this.cellCloned(a),b[e]=f,d&&(f.id=a.id),c))for(c=this.getChildCount(a),e=0;e<c;e++){var g=this.cloneCellImpl(this.getChildAt(a,e),b,!0,d);f.insert(g)}return f};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));d=this.getChildCount(a);for(var e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
mxChildChange.prototype.execute=function(){if(null!=this.child){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b}};
mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){null!=this.cell&&(this.terminal=this.previous,this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source))};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}
mxValueChange.prototype.execute=function(){null!=this.cell&&(this.value=this.previous,this.previous=this.model.valueForCellChanged(this.cell,this.previous))};function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){null!=this.cell&&(this.style=this.previous,this.previous=this.model.styleForCellChanged(this.cell,this.previous))};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}
mxGeometryChange.prototype.execute=function(){null!=this.cell&&(this.geometry=this.previous,this.previous=this.model.geometryForCellChanged(this.cell,this.previous))};function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){null!=this.cell&&(this.collapsed=this.previous,this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous))};
function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){null!=this.cell&&(this.visible=this.previous,this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous))};function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}
mxCellAttributeChange.prototype.execute=function(){if(null!=this.cell){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a}};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;
mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};
mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return 0!=this.vertex};mxCell.prototype.setVertex=function(a){this.vertex=a};
mxCell.prototype.isEdge=function(){return 0!=this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return 0!=this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return 0!=this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototype.setCollapsed=function(a){this.collapsed=a};
mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
mxCell.prototype.insertEdge=function(a,b){null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a))&&(null==this.edges&&(this.edges=[]),this.edges.push(a));return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();a=null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null;return null!=a?a:b};
mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(a){a=null!=a?a:this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}
mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
mxGeometry.prototype.rotate=function(a,b){var c=mxUtils.toRadians(a);a=Math.cos(c);c=Math.sin(c);if(!this.relative){var d=new mxPoint(this.getCenterX(),this.getCenterY());d=mxUtils.getRotatedPoint(d,a,c,b);this.x=Math.round(d.x-this.width/2);this.y=Math.round(d.y-this.height/2)}null!=this.sourcePoint&&(d=mxUtils.getRotatedPoint(this.sourcePoint,a,c,b),this.sourcePoint.x=Math.round(d.x),this.sourcePoint.y=Math.round(d.y));null!=this.targetPoint&&(d=mxUtils.getRotatedPoint(this.targetPoint,a,c,b),this.targetPoint.x=
Math.round(d.x),this.targetPoint.y=Math.round(d.y));if(null!=this.points)for(var e=0;e<this.points.length;e++)null!=this.points[e]&&(d=mxUtils.getRotatedPoint(this.points[e],a,c,b),this.points[e].x=Math.round(d.x),this.points[e].y=Math.round(d.y))};
mxGeometry.prototype.translate=function(a,b,c){a=parseFloat(a);b=parseFloat(b);this.relative||c||(this.x=parseFloat(this.x)+a,this.y=parseFloat(this.y)+b);null!=this.sourcePoint&&(this.sourcePoint.x=parseFloat(this.sourcePoint.x)+a,this.sourcePoint.y=parseFloat(this.sourcePoint.y)+b);null!=this.targetPoint&&(this.targetPoint.x=parseFloat(this.targetPoint.x)+a,this.targetPoint.y=parseFloat(this.targetPoint.y)+b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(c=0;c<this.points.length;c++)null!=
this.points[c]&&(this.points[c].x=parseFloat(this.points[c].x)+a,this.points[c].y=parseFloat(this.points[c].y)+b)};
mxGeometry.prototype.scale=function(a,b,c){a=parseFloat(a);b=parseFloat(b);null!=this.sourcePoint&&(this.sourcePoint.x=parseFloat(this.sourcePoint.x)*a,this.sourcePoint.y=parseFloat(this.sourcePoint.y)*b);null!=this.targetPoint&&(this.targetPoint.x=parseFloat(this.targetPoint.x)*a,this.targetPoint.y=parseFloat(this.targetPoint.y)*b);if(null!=this.points)for(var d=0;d<this.points.length;d++)null!=this.points[d]&&(this.points[d].x=parseFloat(this.points[d].x)*a,this.points[d].y=parseFloat(this.points[d].y)*
b);this.relative||(this.x=parseFloat(this.x)*a,this.y=parseFloat(this.y)*b,c&&(b=a=Math.min(a,b)),this.width=parseFloat(this.width)*a,this.height=parseFloat(this.height)*b)};
mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){if(null!=b){b=b.split(mxCellPath.PATH_SEPARATOR);for(var c=0;c<b.length;c++)a=a.getChildAt(parseInt(b[c]))}return a},
compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),k=Math.PI,l=Math.PI/2-f,m=Math.atan2(a.height,a.width);f<-k+m||f>k-m?(g.x=a.x,g.y=e-a.width*Math.tan(f)/
2):f<-m?(g.y=a.y,g.x=b-a.height*Math.tan(l)/2):f<m?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(l)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,k=a.height/2,l=e+g,m=f+k;b=c.x;c=c.y;var n=parseInt(b-l),p=parseInt(c-m);if(0==n&&0!=p)return new mxPoint(l,
m+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-m,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,b<=e&&(a=-a),new mxPoint(l+a,c);if(b>=e&&b<=e+a.width)return a=b-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,m+a)}e=p/n;m-=e*l;f=g*g*e*e+k*k;a=-2*l*f;k=Math.sqrt(a*a-4*f*(g*g*e*e*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*f);l=(-a-k)/(2*f);k=e*g+m;m=e*l+m;Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2))<Math.sqrt(Math.pow(l-b,2)+Math.pow(m-c,2))?(b=g,c=k):(b=l,c=
m);return new mxPoint(b,c)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,k=e+a/2,l=c.x;c=c.y;if(g==l)return k>c?new mxPoint(g,e):new mxPoint(g,e+a);if(k==c)return g>l?new mxPoint(b,k):new mxPoint(b+f,k);var m=g,n=k;d&&(l>=b&&l<=b+f?m=l:c>=e&&c<=e+a&&(n=c));return l<g?c<k?mxUtils.intersection(l,c,m,n,g,e,b,k):mxUtils.intersection(l,c,m,n,g,e+a,b,k):c<k?mxUtils.intersection(l,c,m,n,g,e,b+f,k):mxUtils.intersection(l,c,m,n,g,e+a,b+f,k)},TrianglePerimeter:function(a,
b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width,l=a.height;a=f+k/2;var m=g+l/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),q=new mxPoint(f,g+l);b==mxConstants.DIRECTION_NORTH?(n=q,p=new mxPoint(a,g),q=new mxPoint(f+k,g+l)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(a,g+l),q=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),q=new mxPoint(f+k,g+l));var r=c.x-
a,t=c.y-m;r=e?Math.atan2(r,t):Math.atan2(t,r);t=e?Math.atan2(k,l):Math.atan2(l,k);(b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?r>-t&&r<t:r<-Math.PI+t||r>Math.PI-t)?c=d&&(e&&c.x>=n.x&&c.x<=q.x||!e&&c.y>=n.y&&c.y<=q.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+l*Math.tan(r)/2,g+l):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-l*Math.tan(r)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+l/2+k*Math.tan(r)/2):new mxPoint(f,g+
l/2-k*Math.tan(r)/2):(d&&(d=new mxPoint(a,m),c.y>=g&&c.y<=g+l?(d.x=e?a:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=e?b==mxConstants.DIRECTION_NORTH?g+l:g:m),a=d.x,m=d.y),c=e&&c.x<=f+k/2||!e&&c.y<=g+l/2?mxUtils.intersection(c.x,c.y,a,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,a,m,p.x,p.y,q.x,q.y));null==c&&(c=new mxPoint(a,m));return c},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=-Math.atan2(n-
a,m-l),q=Math.PI,r=Math.PI/2;new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;var u=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(t){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,f+3*
k/4)}else if(m>e+g){if(n==f+k/4)return new mxPoint(e+g,f+k/4);if(n==f+3*k/4)return new mxPoint(e+g,f+3*k/4)}else if(m==e){if(n<a)return new mxPoint(e,f+k/4);if(n>a)return new mxPoint(e,f+3*k/4)}else if(m==e+g){if(n<a)return new mxPoint(e+g,f+k/4);if(n>a)return new mxPoint(e+g,f+3*k/4)}if(n==f)return new mxPoint(l,f);if(n==f+k)return new mxPoint(l,f+k);m<l?n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e,f),u=new mxPoint(e,f+k)):n<f+k/4?(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f-
Math.floor(.25*k))):n>f+3*k/4&&(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f+Math.floor(1.25*k))):m>l&&(n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e+g,f),u=new mxPoint(e+g,f+k)):n<f+k/4?(b=new mxPoint(e,f-Math.floor(.25*k)),u=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k))):n>f+3*k/4&&(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k)),u=new mxPoint(e,f+Math.floor(1.25*k))))}else{if(n==a){if(m<=e)return new mxPoint(e,f+k/2);if(m>=e+g)return new mxPoint(e+g,f+k/2)}else if(n<
f){if(m==e+g/4)return new mxPoint(e+g/4,f);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f)}else if(n>f+k){if(m==e+g/4)return new mxPoint(e+g/4,f+k);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f+k)}else if(n==f){if(m<l)return new mxPoint(e+g/4,f);if(m>l)return new mxPoint(e+3*g/4,f)}else if(n==f+k){if(m<l)return new mxPoint(e+g/4,f+k);if(n>a)return new mxPoint(e+3*g/4,f+k)}if(m==e)return new mxPoint(e,a);if(m==e+g)return new mxPoint(e+g,a);n<a?m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f),u=new mxPoint(e+g,f)):
m<e+g/4?(b=new mxPoint(e-Math.floor(.25*g),f+k),u=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f+k)):n>a&&(m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f+k),u=new mxPoint(e+g,f+k)):m<e+g/4?(b=new mxPoint(e-Math.floor(.25*g),f),u=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f)))}d=l;p=a;m>=e&&m<=
e+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);c=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,u.x,u.y)}else{if(t){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(.25*k));if(p==r)return new mxPoint(e+Math.floor(.5*g),f);if(p==q-m)return new mxPoint(e,f+Math.floor(.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(.75*k));if(p==-r)return new mxPoint(e+Math.floor(.5*g),f+k);if(p==-q+m)return new mxPoint(e,f+Math.floor(.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),u=new mxPoint(e+g,f+
k)):p>m&&p<r?(b=new mxPoint(e,f-Math.floor(.25*k)),u=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k))):p>r&&p<q-m?(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f-Math.floor(.25*k))):p>q-m&&p<=q||p<-q+m&&p>=-q?(b=new mxPoint(e,f),u=new mxPoint(e,f+k)):p<-m&&p>-r?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(.5*k)),u=new mxPoint(e,f+Math.floor(1.25*k))):p<-r&&p>-q+m&&(b=new mxPoint(e-Math.floor(.5*g),f+Math.floor(.5*k)),u=new mxPoint(e+g,f+Math.floor(1.25*k)))}else{m=
Math.atan2(k/2,g/4);if(p==m)return new mxPoint(e+Math.floor(.75*g),f);if(p==q-m)return new mxPoint(e+Math.floor(.25*g),f);if(p==q||p==-q)return new mxPoint(e,f+Math.floor(.5*k));if(0==p)return new mxPoint(e+g,f+Math.floor(.5*k));if(p==-m)return new mxPoint(e+Math.floor(.75*g),f+k);if(p==-q+m)return new mxPoint(e+Math.floor(.25*g),f+k);0<p&&p<m?(b=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f+k)):p>m&&p<q-m?(b=new mxPoint(e,f),u=new mxPoint(e+g,f)):p>q-m&&
p<q?(b=new mxPoint(e-Math.floor(.25*g),f+k),u=new mxPoint(e+Math.floor(.5*g),f-Math.floor(.5*k))):0>p&&p>-m?(b=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)),u=new mxPoint(e+Math.floor(1.25*g),f)):p<-m&&p>-q+m?(b=new mxPoint(e,f+k),u=new mxPoint(e+g,f+k)):p<-q+m&&p>-q&&(b=new mxPoint(e-Math.floor(.25*g),f),u=new mxPoint(e+Math.floor(.5*g),f+Math.floor(1.5*k)))}c=mxUtils.intersection(l,a,c.x,c.y,b.x,b.y,u.x,u.y)}return null==c?new mxPoint(l,a):c}};
function mxPrintPreview(a,b,c,d,e,f,g,k,l){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=mxRectangle.fromRectangle(null!=c?c:a.pageFormat);this.title=null!=k?k:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.addPageCss=!1;mxPrintPreview.prototype.pixelsPerInch=100;
mxPrintPreview.prototype.pageMargin=27;mxPrintPreview.prototype.overflowClipMargin="1px";mxPrintPreview.prototype.gridSize=null;mxPrintPreview.prototype.gridSteps=null;mxPrintPreview.prototype.gridColor=null;mxPrintPreview.prototype.gridStrokeWidth=.5;mxPrintPreview.prototype.defaultCss='g[style*="filter: drop-shadow("] {\n filter: none !important;\n}\n@media screen {\n body {\n background: gray;\n transform: scale(0.7);\n transform-origin: 0 0;\n }\n body > div {\n margin-bottom: 20px;\n box-sizing: border-box;\n }\n a, a * {\n pointer-events: none;\n }\n}\n@media print {\n body {\n margin: 0px;\n }\n * {\n -webkit-print-color-adjust: exact;\n }\n}';
mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.marginTop=0;mxPrintPreview.prototype.marginBottom=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printControls=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.backgroundColor="#ffffff";mxPrintPreview.prototype.borderColor=null;
mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.targetWindow=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.clipping=!0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
mxPrintPreview.prototype.getDoctype=function(){var a="";8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--\x3e');return a};mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f,g,k,l){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f,g,k,l)};
mxPrintPreview.prototype.getPageClassCss=function(a,b){var c=this.pageMargin,d=this.pixelsPerInch,e=(b.width/d).toFixed(2)+"in "+(b.height/d).toFixed(2)+"in";b="@page "+a+" {\n margin: 0;\n size: "+mxUtils.htmlEntities(e)+";\n}\n."+a+" {\n page: "+a+";\n"+(mxClient.IS_SF?" padding: "+mxUtils.htmlEntities((c/d).toFixed(2))+"in;\n":"")+" width: "+mxUtils.htmlEntities((b.width/d).toFixed(2))+"in;\n height: "+mxUtils.htmlEntities((b.height/d).toFixed(2))+"in;\n}\n";mxClient.IS_SF||(b+="."+a+" > svg {\n margin: "+
mxUtils.htmlEntities((c/d).toFixed(2))+"in;\n}\n");return b};
mxPrintPreview.prototype.open=function(a,b,c,d,e,f,g){c=null;try{var k=this.graph.cellRenderer.initializeOverlay,l=null!=f;f=mxRectangle.fromRectangle(null!=f?f:this.pageFormat);var m=f.width+1,n=f.height+1;this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(G,J){J.init(G.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(G,J,N,L){J.dialect=G.view.graph.dialect;J.init(G.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;b=!1;null==this.wnd&&
(b=!0,this.wnd=window.open());var p=this.wnd.document;if(b){var q=this.getDoctype();null!=q&&0<q.length&&p.writeln(q);"CSS1Compat"===document.compatMode&&p.writeln("<!DOCTYPE html>");p.writeln("<html>");p.writeln("<head>");this.writeHead(p,a);p.writeln("</head>");p.writeln("<body>")}var r=mxRectangle.fromRectangle(null!=g?this.graph.getBoundingBox(g):this.graph.getGraphBounds()),t=this.graph.getView().getScale(),u=t/this.scale,x=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=x.x*this.scale,
this.y0-=x.y*this.scale,r.width+=r.x,r.height+=r.y,r.x=0,this.border=r.y=0);var y=m-2*this.border,A=n-2*this.border;n+=this.marginTop+this.marginBottom;r.width/=u;r.height/=u;var z=Math.max(1,Math.ceil((r.width+this.x0)/y)),C=Math.max(1,Math.ceil((r.height+this.y0)/A));this.pageCount=z*C;var B=null;l&&(null==this.pendingCss&&(this.pageFormatClass={},this.pendingCss=""),B=mxUtils.htmlEntities("gePageFormat-"+String(f.width).replace(/\./g,"_")+"-"+String(f.height).replace(/\./g,"_")),null==this.pageFormatClass[B]&&
(this.pageFormatClass[B]=!0,this.pendingCss+=this.getPageClassCss(B,f)));var v=mxUtils.bind(this,function(G){null!=this.borderColor&&(G.style.borderColor=this.borderColor,G.style.borderStyle="solid",G.style.borderWidth="1px");G.style.background=this.backgroundColor;null!=B?G.classList.add(B):(G.style.width=f.width+"px",G.style.height=f.height+"px");p.body.appendChild(G)}),D=this.getCoverPages(m,n);if(null!=D)for(var E=0;E<D.length;E++)v(D[E],!0);var I=this.getAppendices(m,n);for(E=0;E<C;E++){var F=
E*A/this.scale-this.y0/this.scale+(r.y-x.y*t)/t-E;for(a=0;a<z;a++){if(null==this.wnd)return null;var H=a*y/this.scale-this.x0/this.scale+(r.x-x.x*t)/t-a;g=E*z+a+1;c=p.createElement("div");c.style.display="flex";c.style.alignItems="center";c.style.justifyContent="center";var K=new mxRectangle(H,F,y,A);this.addGraphFragment(-H,-F,this.scale,g,c,K);null!=e&&0==E&&0==a&&c.setAttribute("id",e);v(c,!0)}}if(null!=I)for(E=0;E<I.length;E++)v(I[E],E<I.length-1);b&&!d&&this.closeDocument();this.wnd.focus()}catch(G){null!=
c&&null!=c.parentNode&&c.parentNode.removeChild(c),null!=window.console&&console.error(G)}finally{this.graph.cellRenderer.initializeOverlay=k}return this.wnd};mxPrintPreview.prototype.addPendingCss=function(a){if(null!=this.pendingCss){var b=a.createElement("style");b.setAttribute("type","text/css");b.appendChild(a.createTextNode(this.pendingCss));a.getElementsByTagName("head")[0].appendChild(b);this.pendingCss=null}};
mxPrintPreview.prototype.closeDocument=function(){try{if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("</body>");a.writeln("</html>");a.close();this.addPendingCss(a);mxEvent.release(a.body)}}catch(b){}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+mxUtils.htmlEntities(this.title)+"</title>");mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln(this.defaultCss);var c=this.pageFormat;this.addPageCss&&null!=c&&(c=(c.width/this.pixelsPerInch).toFixed(2)+"in "+(c.height/this.pixelsPerInch).toFixed(2)+"in",a.writeln("@page {"),a.writeln(" margin: "+mxUtils.htmlEntities((this.pageMargin/this.pixelsPerInch).toFixed(2))+
"in;"),a.writeln(" size: "+mxUtils.htmlEntities(c)+";"),a.writeln("}"));null!=b&&a.writeln(mxUtils.htmlEntities(b,!1,!1,!1));a.writeln("</style>")};mxPrintPreview.prototype.writePostfix=function(a){};mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};mxPrintPreview.prototype.useCssTransforms=function(){return!mxClient.NO_FO&&!mxClient.IS_SF};mxPrintPreview.prototype.isCellVisible=function(a){return!0};
mxPrintPreview.prototype.drawBackgroundImage=function(a){a.redraw()};
mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane(),p=c;if(this.graph.dialect==mxConstants.DIALECT_SVG){if(g.createSvg(),this.useCssTransforms()){var q=g.getDrawPane().parentNode;q.setAttribute("transformOrigin","0 0");q.setAttribute("transform","scale("+c+","+c+")translate("+a+","+b+")");c=1;b=a=0}}else g.createHtml();q=g.isEventsEnabled();
g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.selectionCellsHandler.updateHandler;this.graph.selectionCellsHandler.updateHandler=function(){};var x=this.graph.cellRenderer.redraw,y=g.states,A=g.scale,z=null;if(this.printBackgroundImage){var C=this.getBackgroundImage();null!=C&&(z=new mxRectangle(Math.round(a*A+C.x),Math.round(b*A+C.y),C.width-1,C.height-1),z=new mxImageShape(z,C.src),z.dialect=this.graph.dialect)}if(this.clipping){var B=
new mxRectangle((f.x+t.x+1.5)*A,(f.y+t.y+1.5)*A,(f.width-1.5)*A/p,(f.height-1.5)*A/p),v=this;this.graph.cellRenderer.redraw=function(E,I,F){if(null!=E){var H=y.get(E.cell);if(null!=H&&(H=g.getBoundingBox(H,!1),null!=H&&0<H.width&&0<H.height&&!mxUtils.intersects(B,H))||!v.isCellVisible(E.cell))return}x.apply(this,arguments)};null!=z&&(a=new mxRectangle(z.bounds.x*A+(t.x-a)*A,z.bounds.y*A+(t.y-b)*A,z.bounds.width*A,z.bounds.height*A),mxUtils.intersects(B,a)||(z=null))}null!=z&&(z.init(g.backgroundPane),
this.drawBackgroundImage(z));a=null;try{var D=[this.getRoot()];a=new mxTemporaryCellStates(g,c,D,null,mxUtils.bind(this,function(E){return this.getLinkForCellState(E)}))}finally{for(c=e.firstChild;null!=c;)e=c.nextSibling,"svg"==c.nodeName.toLowerCase()?(c.style.top="",c.style.left="",c.style.width="",c.style.height="",c.style.display="",c.style.maxWidth="100%",c.style.maxHeight="100%",c.style.overflow=mxClient.IS_SF?"hidden":"clip",c.style.overflowClipMargin=this.overflowClipMargin,c.setAttribute("viewBox",
"0 0 "+(mxClient.IS_SF?f.width+1+" "+(f.height+1):f.width-1+" "+(f.height-1))),this.addGrid(c,f),mxClient.IS_SF&&(f.width>f.height?c.style.height="100%":c.style.width="100%")):this.isTextLabel(c)||c.parentNode.removeChild(c),c=e;g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=x;this.graph.selectionCellsHandler.updateHandler=u;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=t;a.destroy();g.setEventsEnabled(q)}};
mxPrintPreview.prototype.addGrid=function(a,b){0<this.gridSize&&0<this.gridSteps&&null!=this.gridColor&&(b=this.createSvgGrid(a,b),a=mxUtils.getSvgDefs(a),null!=a.nextSibling?a.parentNode.insertBefore(b,a.nextSibling):a.parentNode.appendChild(b))};
mxPrintPreview.prototype.createSvgGrid=function(a,b){var c=this.gridSize;a=a.ownerDocument;var d=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"g"):a.createElement("g"),e=mxUtils.mod(Math.ceil(Math.round(b.x)/c),this.gridSteps),f=mxUtils.mod(c-mxUtils.mod(Math.round(b.x),c),c),g=mxUtils.mod(Math.ceil(Math.round(b.y)/c),this.gridSteps),k=mxUtils.mod(c-mxUtils.mod(Math.round(b.y),c),c);f*=this.scale;k*=this.scale;c*=this.scale;for(var l=Math.ceil(b.height/c),m=0;m<l;m++){var n=null!=
a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"line"):a.createElement("line");n.setAttribute("x1",0);n.setAttribute("y1",m*c+k);n.setAttribute("x2",b.width);n.setAttribute("y2",m*c+k);n.setAttribute("stroke",this.gridColor);n.setAttribute("opacity",0==mxUtils.mod(m+g,this.gridSteps)?"1":"0.2");n.setAttribute("stroke-width","0.5");d.appendChild(n)}g=Math.ceil(b.width/c);for(m=0;m<g;m++)n=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"line"):a.createElement("line"),n.setAttribute("x1",
m*c+f),n.setAttribute("y1",0),n.setAttribute("x2",m*c+f),n.setAttribute("y2",b.height),n.setAttribute("stroke",this.gridColor),n.setAttribute("opacity",0==mxUtils.mod(m+e,this.gridSteps)?"1":"0.2"),n.setAttribute("stroke-width","0.5"),d.appendChild(n);return d};mxPrintPreview.prototype.isTextLabel=function(a){return"default"==tmp.style.cursor||"div"==a.nodeName.toLowerCase()};mxPrintPreview.prototype.getLinkForCellState=function(a){return this.graph.getLinkForCell(a.cell)};
mxPrintPreview.prototype.getBackgroundImage=function(){return this.graph.backgroundImage};mxPrintPreview.prototype.getCoverPages=function(){return null};mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};
function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
mxStylesheet.prototype.getCellStyle=function(a,b,c){c=null!=c?c:!0;if(null!=a&&0<a.length){var d=a.split(";");b=null!=b&&";"!=a.charAt(0)?mxUtils.clone(b):{};for(a=0;a<d.length;a++){var e=d[a],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f);e=e.substring(f+1);e==mxConstants.NONE&&c?delete b[g]:mxUtils.isNumeric(e)?b[g]=parseFloat(e):b[g]=e}else if(e=this.styles[e],null!=e)for(g in e)b[g]=e[g]}}return b};
function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=null!=c?c:{};this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalidStyle=!1;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;
mxCellState.prototype.visibleSourceState=null;mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;mxCellState.prototype.unscaledWidth=null;mxCellState.prototype.unscaledHeight=null;
mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil&&"fixed"==this.shape.stencil.aspect){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.isFloatingTerminalPoint=function(a){var b=this.getVisibleTerminalState(a);if(null==b)return!1;a=this.view.graph.getConnectionConstraint(this,b,a);return null==a||null==a.point};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};
mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};mxCellState.prototype.getCellBounds=function(){return this.cellBounds};mxCellState.prototype.getPaintBounds=function(){return this.paintBounds};
mxCellState.prototype.updateCachedBounds=function(){var a=this.view.translate,b=this.view.scale;this.cellBounds=new mxRectangle(this.x/b-a.x,this.y/b-a.y,this.width/b,this.height/b);this.paintBounds=mxRectangle.fromRectangle(this.cellBounds);null!=this.shape&&this.shape.isPaintBoundsInverted()&&this.paintBounds.rotate90()};
mxCellState.prototype.setState=function(a){this.view=a.view;this.cell=a.cell;this.style=a.style;this.absolutePoints=a.absolutePoints;this.origin=a.origin;this.absoluteOffset=a.absoluteOffset;this.boundingBox=a.boundingBox;this.terminalDistance=a.terminalDistance;this.segments=a.segments;this.length=a.length;this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;this.unscaledWidth=a.unscaledWidth;this.unscaledHeight=a.unscaledHeight};
mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,null!=this.style?mxUtils.clone(this.style):null);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;
a.segments=this.segments;a.length=this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a.unscaledWidth=this.unscaledWidth;a.unscaledHeight=this.unscaledHeight;return a};mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;
mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};
mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};
mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};
mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0])a=new mxSelectionChange(this,a,b),a.execute(),b=new mxUndoableEdit(this,!1),b.add(a),this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b))};
mxGraphSelectionModel.prototype.cellAdded=function(a){null==a||this.isSelected(a)||this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};
function mxCellEditor(a){this.graph=a;this.zoomHandler=mxUtils.bind(this,function(){this.graph.isEditing()&&this.resize()});null!=this.graph.container&&mxEvent.addListener(this.graph.container,"scroll",this.zoomHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.zoomHandler);this.graph.view.addListener(mxEvent.SCALE,this.zoomHandler);this.changeHandler=mxUtils.bind(this,function(b){null!=this.editingCell&&(b=this.graph.getView().getState(this.editingCell),null==b?this.stopEditing(!0):
this.updateTextAreaStyle(b))});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;mxCellEditor.prototype.rotateText=!0;mxCellEditor.prototype.emptyLabelText=mxClient.IS_FF?"<br>":"";mxCellEditor.prototype.escapeCancelsEditing=!0;
mxCellEditor.prototype.textNode=null;mxCellEditor.prototype.zIndex=1;mxCellEditor.prototype.minResize=new mxRectangle(0,20);mxCellEditor.prototype.blurEnabled=!1;mxCellEditor.prototype.initialValue=null;mxCellEditor.prototype.align=null;mxCellEditor.prototype.init=function(){this.textarea=document.createElement("div");this.textarea.className="mxCellEditor mxPlainTextEditor";this.textarea.contentEditable=!0;mxClient.IS_GC&&(this.textarea.style.minHeight="1em");this.installListeners(this.textarea)};
mxCellEditor.prototype.applyValue=function(a,b){this.graph.labelChanged(a.cell,b,this.trigger)};mxCellEditor.prototype.setAlign=function(a){var b=this.graph.getView().getState(this.editingCell);null!=this.textarea&&null!=b&&(b=mxUtils.getValue(b.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),null==b||"vertical-"!=b.substring(0,9))&&(this.textarea.style.textAlign=a);this.align=a;this.resize()};
mxCellEditor.prototype.getInitialValue=function(a,b){a=mxUtils.htmlEntities(this.graph.getEditingValue(a.cell,b),!1);a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");return a.replace(/\n/g,"<br>")};mxCellEditor.prototype.getCurrentValue=function(a){return mxUtils.extractTextWithWhitespace(this.textarea.childNodes)};mxCellEditor.prototype.isCancelEditingKeyEvent=function(a){return this.escapeCancelsEditing||mxEvent.isShiftDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)};
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(f){this.graph.stopEditing(!1);mxEvent.consume(f)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(f){this.blurEnabled&&this.focusLost(f)}));var b=this.graph.container.scrollTop,c=this.graph.container.scrollLeft;mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(f){b=this.graph.container.scrollTop;c=this.graph.container.scrollLeft;mxEvent.isConsumed(f)||(this.isStopEditingEvent(f)?
(this.graph.stopEditing(!1),mxEvent.consume(f)):27==f.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(f)),mxEvent.consume(f)))}));var d=mxUtils.bind(this,function(f){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=f.keyCode&&46!=f.keyCode)&&(this.clearOnChange=!1,a.innerText="")});mxEvent.addListener(a,"keypress",d);mxEvent.addListener(a,"paste",d);d=mxUtils.bind(this,function(f){null!=this.editingCell&&(this.graph.container.scrollTop=
b,this.graph.container.scrollLeft=c,a.scrollIntoView({block:"nearest",inline:"nearest"}),0!=this.textarea.innerHTML.length&&"<br>"!=this.textarea.innerHTML||this.textarea.innerHTML==this.getEmptyLabelText()?this.clearOnChange=!1:(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length))});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",d);mxEvent.addListener(a,"cut",d);mxEvent.addListener(a,"paste",d);d=mxClient.IS_IE11||mxClient.IS_IE?
"keydown":"input";var e=mxUtils.bind(this,function(f){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(f)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a,d,e);mxEvent.addListener(window,"resize",e);mxEvent.addListener(a,"cut",e);mxEvent.addListener(a,"paste",e)};
mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
mxCellEditor.prototype.resize=function(){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else if(null!=this.textarea){var b=mxUtils.getAlignmentAsPoint(null!=this.align?this.align:this.textShape.align,this.textShape.valign);this.bounds=this.graph.cellRenderer.getLabelBounds(a,this.textShape,b,!this.rotateText);var c=this.rotateText?this.textShape.getTextRotation():0,d=this.graph.getView().scale;this.bounds.x+=-.5==b.x?0:0==b.x?-d:d;this.bounds.y+=-.5==b.y?0:0==
b.y?-d:d;this.textarea.style.left=Math.max(0,Math.round(this.bounds.x))+"px";this.textarea.style.top=Math.max(0,Math.round(this.bounds.y))+"px";if(this.autoSize&&"fill"!=a.style[mxConstants.STYLE_OVERFLOW])if(this.graph.isWrapping(a.cell)&&(2<=this.bounds.width||2<=this.bounds.height)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);e=null!=e&&"vertical-"==e.substring(0,9);this.textarea.style.wordWrap=mxConstants.WORD_WRAP;this.textarea.style.whiteSpace=
"normal";"block"==a.style[mxConstants.STYLE_OVERFLOW]||"width"==a.style[mxConstants.STYLE_OVERFLOW]?this.bounds.width-=2*d:a.view.graph.isHtmlLabel(a.cell)&&(this.bounds.width+=mxSvgCanvas2D.prototype.foreignObjectPadding*d);if(this.textarea.innerHTML!=this.getEmptyLabelText())if("block"==a.style[mxConstants.STYLE_OVERFLOW]||"width"==a.style[mxConstants.STYLE_OVERFLOW]){if(-.5==b.y||"width"==a.style[mxConstants.STYLE_OVERFLOW])this.textarea.style.maxHeight=Math.round(this.bounds.height/d)+"px";this.textarea.style.width=
Math.round(this.bounds.width/d)+"px"}else e?this.textarea.style.maxHeight=Math.round(this.bounds.height/d)+"px":this.textarea.style.maxWidth=Math.round(this.bounds.width/d)+"px";else this.textarea.style.maxWidth=Math.round(this.bounds.width/d)+"px"}else this.textarea.style.whiteSpace="nowrap",this.textarea.style.width="";else this.textarea.style.width=Math.round(this.bounds.width/d)+"px",this.textarea.style.height=Math.round(this.bounds.height/d)+"px",this.graph.isWrapping(a.cell)&&(2<=this.bounds.width||
2<=this.bounds.height)&&this.textarea.innerHTML!=this.getEmptyLabelText()?(this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace="normal","fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=Math.round(this.bounds.width/d)+"px")):(this.textarea.style.whiteSpace="nowrap","fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=""));mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px");mxUtils.setPrefixedStyle(this.textarea.style,
"transform",(0!=c?"rotate("+c+"deg) ":"")+"scale("+d+","+d+") translate("+100*b.x+"%,"+100*b.y+"%)")}};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};mxCellEditor.prototype.getBackgroundColor=function(a){return null};mxCellEditor.prototype.getBorderColor=function(a){return null};
mxCellEditor.prototype.updateTextAreaStyle=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,f=[],g=this.graph.getCellStyle(this.graph.model.getParent(a.cell),
!0);"inherit"==b&&(b=null!=g?mxUtils.getValue(g,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE):mxConstants.DEFAULT_FONTSIZE);"inherit"==c&&(c=null!=g?mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY):mxConstants.DEFAULT_FONTFAMILY);(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&f.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&
f.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(b*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=f.join(" ");this.textarea.style.fontWeight=d?"bold":"normal";this.textarea.style.fontStyle=e?"italic":"";this.textarea.style.fontSize=Math.round(b)+"px";this.textarea.style.zIndex=this.zIndex;this.textarea.style.fontFamily=mxUtils.parseCssFontFamily(c);this.textarea.style.writingMode="";b=mxUtils.getValue(a.style,
mxConstants.STYLE_FONTCOLOR);if(null==b||b==mxConstants.NONE)b=this.graph.shapeForegroundColor;this.textarea.style.color=mxUtils.getLightDarkColor(b).cssText;b=this.getBackgroundColor(a);this.textarea.style.backgroundColor=null!=b?mxUtils.getLightDarkColor(b).cssText:"transparent";b=this.getBorderColor(a);this.textarea.style.border=null!=b?"1px solid "+mxUtils.getLightDarkColor(b).cssText:"1px solid transparent";b=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
c=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT);this.textarea.removeAttribute("dir");b!=mxConstants.TEXT_DIRECTION_AUTO||null==a||null==a.text||a.text.dialect==mxConstants.DIALECT_STRICTHTML||mxUtils.isNode(a.text.value)||(b=a.text.getAutoDirection());if(b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL)this.textarea.setAttribute("dir",b);else if(b==mxConstants.TEXT_DIRECTION_VERTICAL_LR||b==mxConstants.TEXT_DIRECTION_VERTICAL_RL)a=mxUtils.getValue(a.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),c=a==mxConstants.ALIGN_TOP?"left":a==mxConstants.ALIGN_BOTTOM?"right":"center",this.textarea.style.writingMode=b;this.textarea.style.textAlign=c};mxCellEditor.prototype.setEditingValue=function(a,b){this.textarea.innerHTML=b};
mxCellEditor.prototype.startEditing=function(a,b,c){this.stopEditing(!0);this.align=null;null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();var d=this.graph.getView().getState(a);null!=d&&(this.updateTextAreaStyle(d),this.setEditingValue(d,this.getInitialValue(d,b)||""),this.initialValue=this.textarea.innerHTML,0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText(),this.textShape=d.text,this.editingCell=a,this.trigger=b,null==this.textShape&&(this.textShape=this.graph.cellRenderer.createTextShape(d,"",this.graph.dialect)),a=mxUtils.bind(this,function(){if(null!=this.editingCell)if(null!=this.textShape&&null!=this.textShape.node&&this.isHideLabel(d)&&(this.textNode=this.textShape.node,this.textNode.style.visibility="hidden"),this.resize(),this.graph.container.appendChild(this.textarea),
mxClient.IS_IOS&&(this.graph.container.scrollTop=Math.max(this.graph.container.scrollTop,d.y+d.height-this.graph.container.clientHeight/3)),this.textarea.scrollIntoView({block:"nearest",inline:"nearest"}),this.textarea.focus(),null!=c){this.textarea.innerHTML=c;var e=document.createRange();e.selectNodeContents(this.textarea);e.collapse(!1);var f=window.getSelection();f.removeAllRanges();f.addRange(e)}else this.isSelectText()&&0<this.textarea.innerHTML.length&&(this.textarea.innerHTML!=this.getEmptyLabelText()||
!this.clearOnChange)&&document.execCommand("selectAll",!1,null)}),mxClient.IS_IOS?a():window.setTimeout(a,0))};mxCellEditor.prototype.isSelectText=function(){return this.selectText};mxCellEditor.prototype.clearSelection=function(){var a=null;window.getSelection?a=window.getSelection():document.selection&&(a=document.selection);null!=a&&(a.empty?a.empty():a.removeAllRanges&&a.removeAllRanges())};
mxCellEditor.prototype.stopEditing=function(a){if(null!=this.editingCell){null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null);a=a?null:this.graph.view.getState(this.editingCell);var b=this.initialValue;this.bounds=this.trigger=this.textShape=this.editingCell=this.initialValue=null;this.textarea.blur();this.clearSelection();null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea);this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&
(this.textarea.innerText="",this.clearOnChange=!1);if(null!=a&&(this.textarea.innerHTML!=b||null!=this.align)){this.prepareTextarea();b=this.getCurrentValue(a);this.graph.getModel().beginUpdate();try{null!=b&&this.applyValue(a,b),null!=this.align&&this.graph.setCellStyles(mxConstants.STYLE_ALIGN,this.align,[a.cell])}finally{this.graph.getModel().endUpdate()}}mxEvent.release(this.textarea);this.align=this.textarea=null}};
mxCellEditor.prototype.prepareTextarea=function(){null!=this.textarea.lastChild&&"BR"==this.textarea.lastChild.nodeName&&this.textarea.removeChild(this.textarea.lastChild)};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};
mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);this.zoomHandler&&(null!=this.graph.container&&mxEvent.removeListener(this.graph.container,"scroll",this.zoomHandler),this.graph.view.removeListener(this.zoomHandler),this.zoomHandler=null)};
function mxCellRenderer(){}mxCellRenderer.defaultShapes={};mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.legacySpacing=!0;mxCellRenderer.prototype.antiAlias=!0;mxCellRenderer.prototype.minSvgStrokeWidth=1;mxCellRenderer.prototype.forceControlClickHandler=!1;
mxCellRenderer.registerShape=function(a,b){mxCellRenderer.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);
mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW_CONNECTOR,mxArrowConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);
mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;this.configureShape(a);a.shape.init(a.view.getDrawPane())};
mxCellRenderer.prototype.createShape=function(a){var b=null;null!=a.style&&(b=a.style[mxConstants.STYLE_SHAPE],b=null==mxCellRenderer.defaultShapes[b]?mxStencilRegistry.getStencil(b):null,b=null!=b?new mxShape(b):new (this.getShapeConstructor(a)));return b};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.defaultShapes[a]:null};
mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR))};
mxCellRenderer.prototype.checkPlaceholderStyles=function(a){if(null!=a.style){if("inherit"==a.style[mxConstants.STYLE_FONTSIZE]||"inherit"==a.style[mxConstants.STYLE_FONTFAMILY])return!0;for(var b=[mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_FONTCOLOR],c=a.view.graph,d=0;d<b.length;d++)if(0<=c.isSpecialColor(a.style[b[d]]))return!0}return!1};
mxCellRenderer.prototype.inheritFontStyle=function(a,b,c){if(null!=a.text&&"inherit"==a.text[b]){var d=a.view.graph;d=d.getView().getState(d.model.getParent(a.cell));null!=d&&(a.text[b]=d.style[c])}};
mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=c==mxConstants.STYLE_FONTCOLOR?a.text:a.shape;if(null!=d){var e=a.view.graph,f=d[b],g=null;"inherit"==f||f==mxConstants.STYLE_FILLCOLOR||f==mxConstants.STYLE_STROKECOLOR?(g=e.model.getParent(a.cell),"inherit"!=f&&(c=f)):"swimlane"==f?(d[b]=c==mxConstants.STYLE_STROKECOLOR||c==mxConstants.STYLE_FONTCOLOR?"#000000":"#ffffff",g=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,g=e.getSwimlane(g),c=e.swimlaneIndicatorColorAttribute):
"indicated"==f&&null!=a.shape?d[b]=a.shape.indicatorColor:c!=mxConstants.STYLE_FILLCOLOR&&f==mxConstants.STYLE_FILLCOLOR&&null!=a.shape?d[b]=a.style[mxConstants.STYLE_FILLCOLOR]:c!=mxConstants.STYLE_STROKECOLOR&&f==mxConstants.STYLE_STROKECOLOR&&null!=a.shape&&(d[b]=a.style[mxConstants.STYLE_STROKECOLOR]);null!=g&&(a=e.getView().getState(g),d[b]=null,null!=a&&(e=c==mxConstants.STYLE_FONTCOLOR?a.text:a.shape,d[b]=null!=e&&"indicatorColor"!=b&&f!=mxConstants.STYLE_STROKECOLOR&&f!=mxConstants.STYLE_FILLCOLOR?
e[b]:a.style[c]))}};mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
mxCellRenderer.prototype.createTextShape=function(a,b,c){var d=a.view.graph;b=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,d.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],
a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],d.isWrapping(a.cell)&&d.isHtmlLabel(a.cell),d.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING],mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION));b.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100);b.dialect=c;b.style=
a.style;b.state=a;return b};
mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]||"inherit"==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=this.createTextShape(a,b,d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect);this.initializeLabel(a,a.text);this.configureShape(a);var e=!1,f=function(g){var k=a;if(mxClient.IS_TOUCH||e)k=mxEvent.getClientX(g),g=mxEvent.getClientY(g),
g=mxUtils.convertPoint(c.container,k,g),k=c.view.getState(c.getCellAt(g.x,g.y));return k};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,a)),e=c.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(g).nodeName)}),mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,f(g)))}),mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,
new mxMouseEvent(g,f(g))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(g){this.isLabelEvent(a,g)&&(c.dblClick(g,a.cell),mxEvent.consume(g))}))}};mxCellRenderer.prototype.initializeLabel=function(a,b){mxClient.IS_SVG&&mxClient.NO_FO&&b.dialect!=mxConstants.DIALECT_SVG?b.init(a.view.graph.container):b.init(a.view.getDrawPane())};
mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b){c=new mxDictionary;for(var d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e?(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor),c.put(b[d],e)):c.put(b[d],e)}}null!=
a.overlays&&a.overlays.visit(function(f,g){g.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(e){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",e,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(e){mxEvent.consume(e)},function(e){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(e){b.fireEvent(new mxEventObject(mxEvent.CLICK,
"event",e,"cell",a.cell))})};mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,this.createControlClickHandler(a))}}else null!=a.control&&(a.control.destroy(),a.control=null)};
mxCellRenderer.prototype.createControlClickHandler=function(a){var b=a.view.graph;return mxUtils.bind(this,function(c){if(this.forceControlClickHandler||b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell],null,c);mxEvent.consume(c)}})};
mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;null==d||mxClient.IS_IOS||(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));if(c){var f=null;mxEvent.addGestureListeners(b,function(g){f=new mxPoint(mxEvent.getClientX(g),mxEvent.getClientY(g));
e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,a));mxEvent.consume(g)},function(g){e.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,a))},function(g){e.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g,a));mxEvent.consume(g)});null!=d&&mxClient.IS_IOS&&b.addEventListener("touchend",function(g){if(null!=f){var k=e.tolerance;Math.abs(f.x-mxEvent.getClientX(g))<k&&Math.abs(f.y-mxEvent.getClientY(g))<k&&(d.call(d,g),mxEvent.consume(g))}},!0)}return b};
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(d){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(d).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(d),d=mxEvent.getClientY(d),d=mxUtils.convertPoint(b.container,e,d),e=b.view.getState(b.getCellAt(d.x,d.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d,a))}),mxUtils.bind(this,
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&(b.dblClick(d,a.cell),mxEvent.consume(d))}))};
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=a.view.graph,d=this.getLabelValue(a),e=c.isWrapping(a.cell),f=c.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=d&&mxUtils.isNode(d)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";null==a.text||a.text.wrap==e&&a.text.clipped==f&&a.text.overflow==k&&a.text.dialect==g||(a.text.destroy(),a.text=null);null==a.text&&null!=d&&(mxUtils.isNode(d)||0<d.length)?this.createLabel(a,
d):null==a.text||null!=d&&0!=d.length||(a.text.destroy(),a.text=null);if(null!=a.text){b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),this.configureShape(a),a.text.valign=c.getVerticalAlign(a));c=this.getLabelBounds(a);var l=this.getTextScale(a);this.resolveColor(a,"color",mxConstants.STYLE_FONTCOLOR);this.inheritFontStyle(a,"size",mxConstants.STYLE_FONTSIZE);this.inheritFontStyle(a,"family",mxConstants.STYLE_FONTFAMILY);
if(b||a.text.value!=d||a.text.isWrapping!=e||a.text.overflow!=k||a.text.isClipping!=f||a.text.scale!=l||a.text.dialect!=g||null==a.text.bounds||!a.text.bounds.equals(c))a.text.dialect=g,a.text.value=d,a.text.bounds=c,a.text.scale=l,a.text.wrap=e,a.text.clipped=f,a.text.overflow=k,b=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=b}};
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(d,e,f){return"spacingTop"==e||"spacingRight"==e||"spacingBottom"==e||"spacingLeft"==e?parseFloat(b[d])-parseFloat(b.spacing)!=(a.style[e]||f):b[d]!=(null!=a.style[e]?a.style[e]:f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,
"black")||c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||c("spacingTop",mxConstants.STYLE_SPACING_TOP,0)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,0)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,0)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,0)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||
c("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
mxCellRenderer.prototype.getLabelBounds=function(a,b,c,d){b=null!=b?b:a.text;var e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y),f=a.view.graph.getModel().isEdge(a.cell),g=a.view.scale;if(f){var k=b.getSpacing(null,c);e.x+=k.x*g;e.y+=k.y*g;k=a.view.graph.getCellGeometry(a.cell);null!=k&&(e.width=Math.max(0,k.width*g),e.height=Math.max(0,k.height*g))}else b.isPaintBoundsInverted()&&!d&&(k=e.x,e.x=e.y,e.y=k),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);b.isPaintBoundsInverted()&&
!d&&(k=(a.width-a.height)/2,e.x+=k,e.y-=k,k=e.width,e.width=e.height,e.height=k);if(null!=a.shape){k=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);var l=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);k==mxConstants.ALIGN_CENTER&&l==mxConstants.ALIGN_MIDDLE&&(e=a.shape.getLabelBounds(e))}k=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null);null!=k&&(e.width=parseFloat(k)*g);f||this.rotateLabelBounds(a,e,b,
c,d);return e};
mxCellRenderer.prototype.rotateLabelBounds=function(a,b,c,d,e){var f=null!=d?d:c.margin;b.y-=f.y*b.height;b.x-=f.x*b.width;if(!this.legacySpacing||"fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]&&("block"!=a.style[mxConstants.STYLE_OVERFLOW]||"1"==a.style[mxConstants.STYLE_BLOCK_SPACING])){d=a.view.scale;f=c.getSpacing("1"==a.style[mxConstants.STYLE_BLOCK_SPACING],f);b.x+=f.x*d;b.y+=f.y*d;f=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);
var g=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),k=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null);b.width=Math.max(0,b.width-(f==mxConstants.ALIGN_CENTER&&null==k?c.spacingLeft*d+c.spacingRight*d:0));b.height=Math.max(0,b.height-(g==mxConstants.ALIGN_MIDDLE?c.spacingTop*d+c.spacingBottom*d:0))}e=e?0:c.getTextRotation();0!=e&&null!=a&&a.view.graph.model.isVertex(a.cell)&&(c=a.getCenterX(),a=a.getCenterY(),b.x!=c||b.y!=a)&&(e*=Math.PI/
180,a=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,a)),b.x=a.x,b.y=a.y)};
mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(g,k){g=k.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=g.getCenterX(),m=g.getCenterY();m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY()));l=m.x;m=m.y;g.x=Math.round(l-
g.width/2);g.y=Math.round(m-g.height/2)}if(b||null==k.bounds||k.scale!=a.view.scale||!k.bounds.equals(g))k.bounds=g,k.scale=a.view.scale,k.redraw()})}};
mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){c=this.getControlBounds(a,c.width,c.height);var d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted()){var k=(a.width-a.height)/2;e+=k;f-=k}0!=g&&(k=mxUtils.toRadians(g),g=Math.cos(k),k=Math.sin(k),f=mxUtils.getRotatedPoint(new mxPoint(e,
f),g,k,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]&&null!=d[e].node){var f=d[e].node.parentNode!=a.view.getDrawPane()&&d[e].node.parentNode!=a.view.getOverlayPane(),g=f?c:b;if(null!=g&&g.nextSibling!=d[e].node)null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling);else if(null==g)if(d[e].node.parentNode==a.view.graph.container){for(g=a.view.canvas;null!=g&&g.parentNode!=
a.view.graph.container;)g=g.parentNode;null!=g&&null!=g.nextSibling?g.nextSibling!=d[e].node&&d[e].node.parentNode.insertBefore(d[e].node,g.nextSibling):d[e].node.parentNode.appendChild(d[e].node)}else null!=d[e].node.parentNode&&null!=d[e].node.parentNode.firstChild&&d[e].node.parentNode.firstChild!=d[e].node&&d[e].node.parentNode.insertBefore(d[e].node,d[e].node.parentNode.firstChild);f?c=d[e].node:b=d[e].node}return[b,c]};
mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text,a.control]};mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);null==a.shape||null!=c&&!c||(this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b))};
mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=a.view.graph.model,e=!1;null!=a.shape&&null!=a.shape.style&&null!=a.style&&a.shape.style[mxConstants.STYLE_SHAPE]!=a.style[mxConstants.STYLE_SHAPE]&&(a.shape.destroy(),a.shape=null);null==a.shape&&null!=a.view.graph.container&&a.cell!=a.view.currentRoot&&(d.isVertex(a.cell)||d.isEdge(a.cell))?(a.shape=this.createShape(a),null!=a.shape&&(a.shape.minSvgStrokeWidth=this.minSvgStrokeWidth,a.shape.antiAlias=this.antiAlias,this.createIndicatorShape(a),
this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a),a.view.graph.selectionCellsHandler.updateHandler(a))):b||null==a.shape||mxUtils.equalEntries(a.shape.style,a.style)&&!this.checkPlaceholderStyles(a)||(a.shape.resetStyles(),this.configureShape(a),a.view.graph.selectionCellsHandler.updateHandler(a),b=!0);null!=a.shape&&a.shape.indicatorShape!=this.getShape(a.view.graph.getIndicatorShape(a))&&(null!=a.shape.indicator&&(a.shape.indicator.destroy(),a.shape.indicator=null),this.createIndicatorShape(a),
null!=a.shape.indicatorShape&&(a.shape.indicator=new a.shape.indicatorShape,a.shape.indicator.dialect=a.shape.dialect,a.shape.indicator.init(a.node),b=!0));null!=a.shape&&(this.createControl(a),b||this.isShapeInvalid(a,a.shape))&&(null!=a.absolutePoints?(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,(null==c||c)&&this.doRedrawShape(a),e=!0);return e};
mxCellRenderer.prototype.doRedrawShape=function(a){a.shape.redraw()};mxCellRenderer.prototype.isShapeInvalid=function(a,b){return null==b.bounds||b.scale!=a.view.scale||null==a.absolutePoints&&!b.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(b.points,a.absolutePoints)};
mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(b,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var k=a.absolutePoints,l=k[0],m=k[k.length-1];k=!1;if(null!=b){var n=g.getCellGeometry(b.cell);null!=n&&n.relative?k=.5>=n.x:null!=c&&(k=(null!=m?m.x:c.x+c.width)<(null!=l?l.x:b.x))}if(null!=l)b=new mxCellState,b.x=l.x,b.y=l.y;else if(null!=b){var p=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);p!=mxConstants.DIRECTION_MASK_NONE&&
p!=mxConstants.DIRECTION_MASK_WEST+mxConstants.DIRECTION_MASK_EAST&&(k=p==mxConstants.DIRECTION_MASK_WEST)}else return;n=!0;null!=c&&(g=g.getCellGeometry(c.cell),null!=g&&g.relative?n=.5>=g.x:null!=b&&(n=(null!=l?l.x:b.x+b.width)<(null!=m?m.x:c.x)));null!=m?(c=new mxCellState,c.x=m.x,c.y=m.y):null!=c&&(p=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),p!=mxConstants.DIRECTION_MASK_NONE&&p!=mxConstants.DIRECTION_MASK_WEST+mxConstants.DIRECTION_MASK_EAST&&(n=p==mxConstants.DIRECTION_MASK_WEST));
null!=b&&null!=c&&(a=k?b.x:b.x+b.width,b=f.getRoutingCenterY(b),l=n?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(k?-d:d),b),g=new mxPoint(l+(n?-d:d),c),k==n?(d=k?Math.min(a,l)-d:Math.max(a,l)+d,e.push(new mxPoint(d,b)),e.push(new mxPoint(d,c))):(f.x<g.x==k?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(g.x,d))):e.push(f),e.push(g)))},Loop:function(a,b,c,d,e){c=a.absolutePoints;var f=c[c.length-1];if(null!=c[0]&&null!=f){if(null!=d&&0<d.length)for(b=0;b<d.length;b++)c=
d[b],c=a.view.transformControlPoint(a,c),e.push(new mxPoint(c.x,c.y))}else if(null!=b){f=a.view;var g=f.graph;c=null!=d&&0<d.length?d[0]:null;null!=c&&(c=f.transformControlPoint(a,c),mxUtils.contains(b,c.x,c.y)&&(c=null));var k=d=0,l=0,m=0;g=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,g.gridSize)*f.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||a==mxConstants.DIRECTION_SOUTH?(d=f.getRoutingCenterX(b),k=g):(l=f.getRoutingCenterY(b),
m=g);null==c||c.x<b.x||c.x>b.x+b.width?null!=c?(d=c.x,m=Math.max(Math.abs(l-c.y),m)):a==mxConstants.DIRECTION_NORTH?l=b.y-2*k:a==mxConstants.DIRECTION_SOUTH?l=b.y+b.height+2*k:d=a==mxConstants.DIRECTION_EAST?b.x-2*m:b.x+b.width+2*m:null!=c&&(d=f.getRoutingCenterX(b),k=Math.max(Math.abs(d-c.x),m),l=c.y,m=0);e.push(new mxPoint(d-k,l-m));e.push(new mxPoint(d+k,l+m))}},ElbowConnector:function(a,b,c,d,e){var f=null!=d&&0<d.length?d[0]:null,g=!1,k=!1;if(null!=b&&null!=c)if(null!=f){var l=Math.min(b.x,c.x),
m=Math.max(b.x+b.width,c.x+c.width);k=Math.min(b.y,c.y);var n=Math.max(b.y+b.height,c.y+c.height);f=a.view.transformControlPoint(a,f);g=f.y<k||f.y>n;k=f.x<l||f.x>m}else l=Math.max(b.x,c.x),m=Math.min(b.x+b.width,c.x+c.width),(g=l==m)||(k=Math.max(b.y,c.y),n=Math.min(b.y+b.height,c.y+c.height),k=k==n);k||!g&&a.style[mxConstants.STYLE_ELBOW]!=mxConstants.ELBOW_VERTICAL?mxEdgeStyle.SideToSide(a,b,c,d,e):mxEdgeStyle.TopToBottom(a,b,c,d,e)},SideToSide:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?
d[0]:null;var g=a.absolutePoints,k=g[0];g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),k=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:Math.round(k+(a-k)/2),k=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(k=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,
k)),mxUtils.contains(c,a,f)||mxUtils.contains(b,a,f)||e.push(new mxPoint(a,f)),1==e.length&&(null!=d?mxUtils.contains(c,a,d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0];g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,
c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,k)||mxUtils.contains(b,a,k)||e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,k)||mxUtils.contains(b,d.x,k)||
e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,k)))))},SegmentConnector:function(a,b,c,d,e){var f=mxEdgeStyle.scalePointArray(a.absolutePoints,a.view.scale);b=mxEdgeStyle.scaleCellState(b,a.view.scale);var g=mxEdgeStyle.scaleCellState(c,a.view.scale);c=[];var k=0<e.length?e[0]:null,l=!0,m=f[0];null==m&&null!=b?m=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=m&&(m=m.clone());var n=f.length-1;if(null!=d&&0<d.length){for(var p=
[],q=0;q<d.length;q++){var r=a.view.transformControlPoint(a,d[q],!0);null!=r&&p.push(r)}if(0==p.length)return;null!=m&&null!=p[0]&&(1>Math.abs(p[0].x-m.x)&&(p[0].x=m.x),1>Math.abs(p[0].y-m.y)&&(p[0].y=m.y));r=f[n];null!=r&&null!=p[p.length-1]&&(1>Math.abs(p[p.length-1].x-r.x)&&(p[p.length-1].x=r.x),1>Math.abs(p[p.length-1].y-r.y)&&(p[p.length-1].y=r.y));d=p[0];var t=b,u=f[0],x=d;null!=u&&(t=null);for(q=0;2>q;q++){var y=null!=u&&u.x==x.x,A=null!=u&&u.y==x.y,z=null!=t&&x.y>=t.y&&x.y<=t.y+t.height,C=
null!=t&&x.x>=t.x&&x.x<=t.x+t.width;t=A||null==u&&z;x=y||null==u&&C;if(0!=q||!(t&&x||y&&A)){if(null!=u&&!A&&!y&&(z||C)){l=z?!1:!0;break}if(x||t){l=t;1==q&&(l=0==p.length%2?t:x);break}}t=g;u=f[n];null!=u&&(t=null);x=p[p.length-1];y&&A&&(p=p.slice(1))}l&&(null!=f[0]&&f[0].y!=d.y||null==f[0]&&null!=b&&(d.y<b.y||d.y>b.y+b.height))?c.push(new mxPoint(m.x,d.y)):!l&&(null!=f[0]&&f[0].x!=d.x||null==f[0]&&null!=b&&(d.x<b.x||d.x>b.x+b.width))&&c.push(new mxPoint(d.x,m.y));l?m.y=d.y:m.x=d.x;for(q=0;q<p.length;q++)l=
!l,d=p[q],l?m.y=d.y:m.x=d.x,c.push(m.clone())}else d=m,l=!0;m=f[n];null==m&&null!=g&&(m=new mxPoint(a.view.getRoutingCenterX(g),a.view.getRoutingCenterY(g)));null!=m&&null!=d&&(l&&(null!=f[n]&&f[n].y!=d.y||null==f[n]&&null!=g&&(d.y<g.y||d.y>g.y+g.height))?c.push(new mxPoint(m.x,d.y)):!l&&(null!=f[n]&&f[n].x!=d.x||null==f[n]&&null!=g&&(d.x<g.x||d.x>g.x+g.width))&&c.push(new mxPoint(d.x,m.y)));if(null==f[0]&&null!=b)for(;0<c.length&&null!=c[0]&&mxUtils.contains(b,c[0].x,c[0].y);)c.splice(0,1);if(null==
f[n]&&null!=g)for(;0<c.length&&null!=c[c.length-1]&&mxUtils.contains(g,c[c.length-1].x,c[c.length-1].y);)c.splice(c.length-1,1);for(q=0;q<c.length;q++)if(f=c[q],f.x=Math.round(f.x*a.view.scale*10)/10,f.y=Math.round(f.y*a.view.scale*10)/10,null==k||1<=Math.abs(k.x-f.x)||Math.abs(k.y-f.y)>=Math.max(1,a.view.scale))e.push(f),k=f;null!=r&&null!=e[e.length-1]&&1>=Math.abs(r.x-e[e.length-1].x)&&1>=Math.abs(r.y-e[e.length-1].y)&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(1>Math.abs(e[e.length-1].x-r.x)&&
(e[e.length-1].x=r.x),1>Math.abs(e[e.length-1].y-r.y)&&(e[e.length-1].y=r.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,
2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,
BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,getJettySize:function(a,b){var c=mxUtils.getValue(a.style,b?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(a.style,b?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,b?mxConstants.STYLE_STARTSIZE:
mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},scalePointArray:function(a,b){var c=[];if(null!=a)for(var d=0;d<a.length;d++)if(null!=a[d]){var e=new mxPoint(Math.round(a[d].x/b*10)/10,Math.round(a[d].y/b*10)/10);c[d]=e}else c[d]=null;else c=null;return c},scaleCellState:function(a,b){if(null!=a){var c=a.clone();c.setRect(Math.round(a.x/b*10)/10,Math.round(a.y/
b*10)/10,Math.round(a.width/b*10)/10,Math.round(a.height/b*10)/10)}else c=null;return c},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==l?!1:f.getModel().isEdge(l.cell),k=null==m?!1:f.getModel().isEdge(m.cell);f=mxEdgeStyle.scalePointArray(a.absolutePoints,a.view.scale);var l=mxEdgeStyle.scaleCellState(b,a.view.scale),m=mxEdgeStyle.scaleCellState(c,a.view.scale),n=f[0],p=f[f.length-1],q=null!=l?l.x:n.x,r=null!=l?l.y:n.y,t=null!=l?l.width:1,u=null!=l?l.height:1,x=null!=m?m.x:p.x,y=null!=
m?m.y:p.y,A=null!=m?m.width:1,z=null!=m?m.height:1;f=mxEdgeStyle.getJettySize(a,!0);var C=mxEdgeStyle.getJettySize(a,!1);null!=l&&m==l&&(f=C=Math.max(f,C));var B=C+f,v=!1;if(null!=n&&null!=p){v=p.x-n.x;var D=p.y-n.y;v=v*v+D*D<B*B}if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else if(c=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL],null!=l&&(c[0]=mxUtils.getPortConstraints(l,a,!0,mxConstants.DIRECTION_MASK_ALL),b=mxUtils.getValue(l.style,
mxConstants.STYLE_ROTATION,0),0!=b&&(b=mxUtils.getBoundingBox(new mxRectangle(q,r,t,u),b),q=b.x,r=b.y,t=b.width,u=b.height)),null!=m&&(c[1]=mxUtils.getPortConstraints(m,a,!1,mxConstants.DIRECTION_MASK_ALL),b=mxUtils.getValue(m.style,mxConstants.STYLE_ROTATION,0),0!=b&&(b=mxUtils.getBoundingBox(new mxRectangle(x,y,A,z),b),x=b.x,y=b.y,A=b.width,z=b.height)),0!=t&&0!=u&&0!=A&&0!=z){b=[0,0];q=[[q,r,t,u],[x,y,A,z]];C=[f,C];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=q[v][0]-C[v],mxEdgeStyle.limits[v][2]=
q[v][1]-C[v],mxEdgeStyle.limits[v][4]=q[v][0]+q[v][2]+C[v],mxEdgeStyle.limits[v][8]=q[v][1]+q[v][3]+C[v];C=q[0][1]+q[0][3]/2;r=q[1][1]+q[1][3]/2;v=q[0][0]+q[0][2]/2-(q[1][0]+q[1][2]/2);D=C-r;C=0;0>v?C=0>D?2:1:0>=D&&(C=3,0==v&&(C=2));r=null;null!=l&&(r=n);l=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=r&&(l[v][0]=(r.x-q[v][0])/q[v][2],1>=Math.abs(r.x-q[v][0])?b[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(r.x-q[v][0]-q[v][2])&&(b[v]=mxConstants.DIRECTION_MASK_EAST),l[v][1]=(r.y-q[v][1])/q[v][3],1>=Math.abs(r.y-
q[v][1])?b[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(r.y-q[v][1]-q[v][3])&&(b[v]=mxConstants.DIRECTION_MASK_SOUTH)),r=null,null!=m&&(r=p);v=q[0][1]-(q[1][1]+q[1][3]);p=q[0][0]-(q[1][0]+q[1][2]);r=q[1][1]-(q[0][1]+q[0][3]);t=q[1][0]-(q[0][0]+q[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(p-B,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-B,0);mxEdgeStyle.vertexSeperations[4]=Math.max(r-B,0);mxEdgeStyle.vertexSeperations[3]=Math.max(t-B,0);B=[];m=[];n=[];m[0]=p>=t?mxConstants.DIRECTION_MASK_WEST:
mxConstants.DIRECTION_MASK_EAST;n[0]=v>=r?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;m[1]=mxUtils.reversePortConstraints(m[0]);n[1]=mxUtils.reversePortConstraints(n[0]);p=p>=t?p:t;r=v>=r?v:r;t=[[0,0],[0,0]];u=!1;for(v=0;2>v;v++)0==b[v]&&(0==(m[v]&c[v])&&(m[v]=mxUtils.reversePortConstraints(m[v])),0==(n[v]&c[v])&&(n[v]=mxUtils.reversePortConstraints(n[v])),t[v][0]=n[v],t[v][1]=m[v]);0<r&&0<p&&(0<(m[0]&c[0])&&0<(n[1]&c[1])?(t[0][0]=m[0],t[0][1]=n[0],t[1][0]=n[1],t[1][1]=m[1],
u=!0):0<(n[0]&c[0])&&0<(m[1]&c[1])&&(t[0][0]=n[0],t[0][1]=m[0],t[1][0]=m[1],t[1][1]=n[1],u=!0));0<r&&!u&&(t[0][0]=n[0],t[0][1]=m[0],t[1][0]=n[1],t[1][1]=m[1],u=!0);0<p&&!u&&(t[0][0]=m[0],t[0][1]=n[0],t[1][0]=m[1],t[1][1]=n[1]);for(v=0;2>v;v++)0==b[v]&&(0==(t[v][0]&c[v])&&(t[v][0]=t[v][1]),B[v]=t[v][0]&c[v],B[v]|=(t[v][1]&c[v])<<8,B[v]|=(t[1-v][v]&c[v])<<16,B[v]|=(t[1-v][1-v]&c[v])<<24,0==(B[v]&15)&&(B[v]<<=8),0==(B[v]&3840)&&(B[v]=B[v]&15|B[v]>>8),0==(B[v]&983040)&&(B[v]=B[v]&65535|(B[v]&251658240)>>
8),b[v]=B[v]&15,c[v]==mxConstants.DIRECTION_MASK_WEST||c[v]==mxConstants.DIRECTION_MASK_NORTH||c[v]==mxConstants.DIRECTION_MASK_EAST||c[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(b[v]=c[v]);c=b[0]==mxConstants.DIRECTION_MASK_EAST?3:b[0];B=b[1]==mxConstants.DIRECTION_MASK_EAST?3:b[1];c-=C;B-=C;1>c&&(c+=4);1>B&&(B+=4);c=mxEdgeStyle.routePatterns[c-1][B-1];mxEdgeStyle.wayPoints1[0][0]=q[0][0];mxEdgeStyle.wayPoints1[0][1]=q[0][1];switch(b[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
f;mxEdgeStyle.wayPoints1[0][1]+=l[0][1]*q[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=l[0][0]*q[0][2];mxEdgeStyle.wayPoints1[0][1]+=q[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=q[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=l[0][1]*q[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=l[0][0]*q[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;m=B=0<(b[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
0:1;for(v=0;v<c.length;v++)n=c[v]&15,u=n==mxConstants.DIRECTION_MASK_EAST?3:n,u+=C,4<u&&(u-=4),p=mxEdgeStyle.dirVectors[u-1],n=0<u%2?0:1,n!=B&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),x=0<(c[v]&mxEdgeStyle.TARGET_MASK),y=0<(c[v]&mxEdgeStyle.SOURCE_MASK),r=(c[v]&mxEdgeStyle.SIDE_MASK)>>5,r<<=C,15<r&&(r>>=4),t=0<(c[v]&mxEdgeStyle.CENTER_MASK),(y||x)&&9>r?(u=y?0:1,r=t&&0==n?q[u][0]+l[u][0]*q[u][2]:t?q[u][1]+l[u][1]*
q[u][3]:mxEdgeStyle.limits[u][r],0==n?(r=(r-mxEdgeStyle.wayPoints1[f][0])*p[0],0<r&&(mxEdgeStyle.wayPoints1[f][0]+=p[0]*r)):(r=(r-mxEdgeStyle.wayPoints1[f][1])*p[1],0<r&&(mxEdgeStyle.wayPoints1[f][1]+=p[1]*r))):t&&(mxEdgeStyle.wayPoints1[f][0]+=p[0]*Math.abs(mxEdgeStyle.vertexSeperations[u]/2),mxEdgeStyle.wayPoints1[f][1]+=p[1]*Math.abs(mxEdgeStyle.vertexSeperations[u]/2)),0<f&&mxEdgeStyle.wayPoints1[f][n]==mxEdgeStyle.wayPoints1[f-1][n]?f--:B=n;for(v=0;v<=f&&(v!=f||((0<(b[1]&(mxConstants.DIRECTION_MASK_EAST|
mxConstants.DIRECTION_MASK_WEST))?0:1)==m?0:1)==(f+1)%2);v++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[v][0]*a.view.scale*10)/10,Math.round(mxEdgeStyle.wayPoints1[v][1]*a.view.scale*10)/10));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];0!=c&&
0!=d||null==inlineRoutePatterns[e-1][a-1]||(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;
mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.states=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastForegroundNode=null;mxGraphView.prototype.lastForegroundHtmlNode=null;mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};
mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=mxRectangle.fromRectangle(e):b.add(e))}return b};mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!0);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&this.viewStateChanged();this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&this.viewStateChanged());this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&this.viewStateChanged();this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.viewStateChanged=function(){this.revalidate();this.graph.sizeDidChange()};
mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();if(null!=a){b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b){var f=d.getChildCount(a);for(e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}}if(c)for(f=d.getEdgeCount(a),e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c);delete a.invalidating}}};
mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;null==this.canvas||null!=this.textDiv||8!=document.documentMode||mxClient.IS_EM||(this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=this.canvas.clientHeight+
"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display="inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv));a=null!=a?a:null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot();a=this.validateCellState(this.validateCell(a));
a=this.getBoundingBox(a,!0,!0);this.setGraphBounds(null!=a?a:this.getEmptyBounds());this.validateBackground();null!=c&&(this.canvas.style.display=c,this.textDiv.parentNode.removeChild(this.textDiv),null!=this.placeholder&&this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
mxGraphView.prototype.getEmptyBounds=function(){return new mxRectangle(this.translate.x*this.scale,this.translate.y*this.scale)};mxGraphView.prototype.updateBoundingBox=function(a){null!=a.shape&&a.shape.updateBoundingBox();null!=a.text&&a.text.updateBoundingBox()};
mxGraphView.prototype.getBoundingBox=function(a,b,c){b=null!=b?b:!0;c=null!=c?c:!1;var d=null;if(null!=a){var e=function(l){null==l||null==l.boundingBox||isNaN(l.boundingBox.x)||isNaN(l.boundingBox.y)||isNaN(l.boundingBox.width)||isNaN(l.boundingBox.height)||(null==d?d=l.boundingBox.clone():d.add(l.boundingBox))};c&&this.updateBoundingBox(a);e(a.shape);e(a.text);if(b){e=this.graph.getModel();for(var f=e.getChildCount(a.cell),g=0;g<f;g++){var k=this.getBoundingBox(this.getState(e.getChildAt(a.cell,
g)),b,c);null!=k&&(null==d?d=k:d.add(k))}}}return d};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw()}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&
(this.backgroundImage.destroy(),this.backgroundImage=null)};
mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),this.graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
"dblclick",mxUtils.bind(this,function(b){this.graph.dblClick(b)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(b){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(b)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
new mxMouseEvent(b))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
mxGraphView.prototype.redrawBackgroundImage=function(a,b){b=new mxRectangle(this.scale*(this.translate.x+b.x),this.scale*(this.translate.y+b.y),this.scale*b.width,this.scale*b.height);a.scale==this.scale&&b.equals(a.bounds)||(a.scale=this.scale,a.bounds=b,null==a.node||"g"!=a.node.nodeName||"image"!=a.node.firstChild.nodeName&&"svg"!=a.node.firstChild.nodeName?a.redraw():(a.node.firstChild.setAttribute("x",b.x),a.node.firstChild.setAttribute("y",b.y),a.node.firstChild.setAttribute("width",b.width),
a.node.firstChild.setAttribute("height",b.height)))};mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null==this.getState(a,b)||b)for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.isCellCollapsed(a)||a==this.currentRoot));else this.removeState(a);return a};
mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();if(c.invalid){c.invalid=!1;if(null==c.style||c.invalidStyle)c.style=this.graph.getCellStyle(c.cell),c.invalidStyle=!1;a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1);c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0);c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),
!1);this.updateCellState(c);a==this.currentRoot||c.invalid||(this.graph.cellRenderer.redraw(c,!1,this.isRendering()),c.updateCachedBounds())}if(b&&!c.invalid){null!=c.shape&&this.stateValidated(c);b=d.getChildCount(a);for(var e=0;e<b;e++)this.validateCellState(d.getChildAt(a,e))}}return c};
mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;if(a.cell!=this.currentRoot){var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=null!=e.offset?e.offset:this.EMPTY_POINT,
e.relative&&null!=c?b.isEdge(c.cell)?(d=this.getPoint(c,e),null!=d&&(a.origin.x+=d.x/this.scale-c.origin.x-this.translate.x,a.origin.y+=d.y/this.scale-c.origin.y-this.translate.y)):(a.origin.x+=e.x*c.unscaledWidth+d.x,a.origin.y+=e.y*c.unscaledHeight+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.unscaledWidth=e.width,a.height=
this.scale*e.height,a.unscaledHeight=e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&this.updateEdgeState(a,e))}a.updateCachedBounds()};mxGraphView.prototype.isCellCollapsed=function(a){return this.graph.isCellCollapsed(a)};
mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d&&!c.isEdge(d.cell)&&(c=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0"),0!=c)){b=Math.cos(c);c=Math.sin(c);var e=new mxPoint(a.getCenterX(),a.getCenterY());d=new mxPoint(d.getCenterX(),d.getCenterY());d=mxUtils.getRotatedPoint(e,b,c,d);a.x=d.x-a.width/2;a.y=d.y-a.height/2}this.updateVertexLabelOffset(a)};
mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);null!=this.graph.model.getTerminal(a.cell,!0)&&null==c||null==c&&null==b.getTerminalPoint(!0)||null!=this.graph.model.getTerminal(a.cell,!1)&&null==d||null==d&&null==b.getTerminalPoint(!1)?this.clear(a.cell,!0):(this.updateFixedTerminalPoints(a,c,d),this.updatePoints(a,b.points,c,d),this.updateFloatingTerminalPoints(a,c,d),b=a.absolutePoints,a.cell!=this.currentRoot&&(null==b||2>
b.length||null==b[0]||null==b[b.length-1])?this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)))};
mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(b==mxConstants.ALIGN_LEFT)b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),b=null!=b?b*this.scale:a.width,a.absoluteOffset.x-=b;else if(b==mxConstants.ALIGN_RIGHT)a.absoluteOffset.x+=a.width;else if(b==mxConstants.ALIGN_CENTER&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),null!=b)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,
mxConstants.ALIGN_CENTER),d=0;c==mxConstants.ALIGN_CENTER?d=.5:c==mxConstants.ALIGN_RIGHT&&(d=1);0!=d&&(a.absoluteOffset.x-=(b*this.scale-a.width)*d)}b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null};
mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(a.cell)&&this.graph.keepEdgesInBackground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastForegroundNode||this.lastNode:this.lastNode,b?this.lastForegroundHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastForegroundHtmlNode=a[1],this.lastForegroundNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){a.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(a,b,c,d),c)};
mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d,!1));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin;e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}return e};
mxGraphView.prototype.updateBoundsFromStencil=function(a){var b=null;if(null!=a&&null!=a.shape&&null!=a.shape.stencil&&"fixed"==a.shape.stencil.aspect){b=mxRectangle.fromRectangle(a);var c=a.shape.stencil.computeAspect(a.style,a.x,a.y,a.width,a.height);a.setRect(c.x,c.y,a.shape.stencil.w0*c.width,a.shape.stencil.h0*c.height)}return b};
mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a&&null!=a.absolutePoints&&0<a.absolutePoints.length){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f){c=this.getTerminalPort(a,c,!0);d=this.getTerminalPort(a,d,!1);var g=this.updateBoundsFromStencil(c),k=this.updateBoundsFromStencil(d);f(a,c,d,b,e);null!=g&&c.setRect(g.x,g.y,g.width,g.height);null!=k&&d.setRect(k.x,k.y,k.width,k.height)}else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(c=mxUtils.clone(b[f]),
e.push(this.transformControlPoint(a,c)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};mxGraphView.prototype.transformControlPoint=function(a,b,c){return null!=a&&null!=b?(a=a.origin,c=c?1:this.scale,new mxPoint(c*(b.x+this.translate.x+a.x),c*(b.y+this.translate.y+a.y))):null};
mxGraphView.prototype.isLoopStyleEnabled=function(a,b,c,d){var e=this.graph.getConnectionConstraint(a,c,!0),f=this.graph.getConnectionConstraint(a,d,!1);return!(null==b||2>b.length)||mxUtils.getValue(a.style,mxConstants.STYLE_ORTHOGONAL_LOOP,!1)&&(null!=e&&null!=e.point||null!=f&&null!=f.point)?!1:null!=c&&c==d};
mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=this.isLoopStyleEnabled(a,b,c,d)?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?null:a.style[mxConstants.STYLE_EDGE];"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints;if(null!=d){var e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)}};mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){a.setAbsoluteTerminalPoint(this.getFloatingTerminalPoint(a,b,c,d),d)};
mxGraphView.prototype.getFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c){var k=Math.cos(-c),l=Math.sin(-c);e=mxUtils.getRotatedPoint(e,k,l,g)}k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
0);a=this.getPerimeterPoint(b,e,0==c&&f,k);0!=c&&(k=Math.cos(c),l=Math.sin(c),a=mxUtils.getRotatedPoint(a,k,l,g));return a};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height)){e=new mxPoint(b.x,b.y);var g=b=!1;this.graph.model.isVertex(a.cell)&&(b=1==mxUtils.getValue(a.style,mxConstants.STYLE_FLIPH,0),g=1==mxUtils.getValue(a.style,mxConstants.STYLE_FLIPV,0),null!=a.shape&&null!=a.shape.stencil&&(b=1==mxUtils.getValue(a.style,"stencilFlipH",0)||b,g=1==mxUtils.getValue(a.style,"stencilFlipV",
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
mxGraphView.prototype.getVisibleTerminal=function(a,b){var c=this.graph.getModel();for(b=a=c.getTerminal(a,b);null!=a&&a!=this.currentRoot;){if(!this.graph.isCellVisible(b)||this.isCellCollapsed(a))b=a;a=c.getParent(a)}null==b||c.contains(b)&&c.getParent(b)!=c.getRoot()&&b!=this.currentRoot||(b=null);return b};
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;d=0;var g=[];f=c;if(null!=f){c=f.x;for(var k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
Math.max(1,m-k)}};
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(b=b.offset,null!=b&&(c+=b.x,d+=b.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];a=a.absolutePoints[l];null!=f&&null!=a&&(l=c=d=0,null!=b&&(d=b.y,b=b.offset,null!=b&&(c=b.x,l=b.y)),b=a.x-f.x,a=a.y-f.y,c=f.x+b*e+
((0==g?0:a/g)*d+c)*this.scale,d=f.y+a*e-((0==g?0:b/g)*d-l)*this.scale)}return new mxPoint(c,d)};
mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){d=a.length;for(var f=a.segments,g=a.absolutePoints[0],k=a.absolutePoints[1],l=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),m=0,n=0,p=0,q=2;q<e;q++)g=k,k=a.absolutePoints[q],g=mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c),p+=f[q-2],g<=l&&(l=g,n=q-1,m=p);e=f[n];g=a.absolutePoints[n];k=a.absolutePoints[n+1];l=k.x;f=k.y;a=g.x-l;n=g.y-f;f=(a-(b-l))*
a+(n-(c-f))*n;a=Math.sqrt(0>=f?0:f*f/(a*a+n*n));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,b,c)&&(e=-e);return new mxPoint((d/2-m-a)/d*-2,e/this.scale)}}return new mxPoint};
mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{d=b[0];var e=b[b.length-1];if(null!=d&&null!=e){b=e.x-d.x;var f=e.y-d.y,g=e=0;c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)&&(null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a)));return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.invalid=!0,b.destroy()));return b};mxGraphView.prototype.createState=function(a){return new mxCellState(this,a,this.graph.getCellStyle(a))};mxGraphView.prototype.getCanvas=function(){return this.canvas};mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};
mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};mxGraphView.prototype.getDecoratorPane=function(){return this.decoratorPane};mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||this.backgroundPane.contains(a)||a==this.canvas.parentNode||a==this.canvas||a==this.drawPane||a==this.overlayPane||a==this.decoratorPane};
mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);b=this.graph.container.offsetWidth;var c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};mxGraphView.prototype.init=function(){this.installListeners();this.graph.dialect==mxConstants.DIALECT_SVG?this.createSvg():this.createHtml()};
mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;null!=b&&(mxClient.IS_TOUCH&&(mxEvent.addListener(b,"gesturestart",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)})),mxEvent.addListener(b,"gesturechange",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)})),mxEvent.addListener(b,"gestureend",mxUtils.bind(this,function(c){a.fireGestureEvent(c);mxEvent.consume(c)}))),mxEvent.addGestureListeners(b,mxUtils.bind(this,function(c){!this.isContainerEvent(c)||
(mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_GC||mxClient.IS_OP||mxClient.IS_SF)&&this.isScrollEvent(c)||a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})),mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(c){this.isContainerEvent(c)&&a.dblClick(c)})),
a.addMouseListener({mouseDown:function(c,d){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}}),this.moveHandler=mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();if(this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&!this.isContainerEvent(c)&&"none"!=a.container.style.display&&"hidden"!=a.container.style.visibility&&!mxEvent.isConsumed(c)){var d=a.fireMouseEvent,e=mxEvent.MOUSE_MOVE,f=null;if(mxClient.IS_TOUCH){f=
mxEvent.getClientX(c);var g=mxEvent.getClientY(c);f=mxUtils.convertPoint(b,f,g);f=a.view.getState(a.getCellAt(f.x,f.y))}d.call(a,e,new mxMouseEvent(c,f))}}),this.endHandler=mxUtils.bind(this,function(c){this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&!this.isContainerEvent(c)&&"none"!=a.container.style.display&&"hidden"!=a.container.style.visibility&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))}),mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler))};
mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.canvas.style.overflow="hidden",this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.decoratorPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane),
a.appendChild(this.canvas),this.updateContainerStyle(a))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);this.decoratorPane=document.createElementNS(mxConstants.NS_SVG,
"g");this.canvas.appendChild(this.decoratorPane);var b=document.createElementNS(mxConstants.NS_SVG,"svg");b.style.left="0px";b.style.top="0px";b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);if(mxClient.IS_IE||mxClient.IS_IE11)b.style.overflow="hidden";null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};
mxGraphView.prototype.updateContainerStyle=function(a){var b=mxUtils.getCurrentStyle(a);null!=b&&"static"==b.position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.touchAction="none")};
mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.decoratorPane=this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp){a=this.view.currentRoot;for(var c=this.view.graph.getModel();null!=a;){if(a==b){this.isUp=!0;break}a=c.getParent(a)}}}
mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp=!this.isUp};
function mxGraph(a,b,c,d,e){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());this.setStylesheet(null!=d?d:this.createStylesheet());
this.view=this.createGraphView();this.view.rendering=null!=e?e:this.view.rendering;this.graphModelChangeListener=mxUtils.bind(this,function(f,g){this.graphModelChanged(g.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.rendering&&this.view.revalidate()}mxLoadResources?mxResources.add(mxClient.basePath+"/resources/graph"):mxClient.defaultBundles.push(mxClient.basePath+"/resources/graph");
mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;
mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;mxGraph.prototype.nativeDblClickEnabled=!0;mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=350;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.translateToScrollPosition=!1;mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;
mxGraph.prototype.keepEdgesInBackground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainRelativeChildren=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;
mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;
mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(b){null!=this.tooltipHandler&&null!=this.tooltipHandler.div&&this.tooltipHandler.div!=b.relatedTarget&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(b){return this.isEditing()||
!this.isMouseDown&&!mxEvent.isShiftDown(b)})))};mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
mxGraph.prototype.getSelectionCellsForChanges=function(a,b){for(var c=new mxDictionary,d=[],e=mxUtils.bind(this,function(k){if(null!=k&&!c.get(k)&&this.model.contains(k)&&!this.model.isLayer(k))if(this.model.isEdge(k)||this.model.isVertex(k))c.put(k,!0),d.push(k);else for(var l=this.model.getChildCount(k),m=0;m<l;m++)e(this.model.getChildAt(k,m))}),f=0;f<a.length;f++){var g=a[f];g.constructor==mxRootChange||null!=b&&b(g)||e(this.getCellForChange(g))}return d};
mxGraph.prototype.getCellForChange=function(a){var b=null;a instanceof mxChildChange?b=a.child:null!=a.cell&&a.cell instanceof mxCell&&(b=a.cell);return b};mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.updateSelection();this.view.validate();this.sizeDidChange()};
mxGraph.prototype.updateSelection=function(){for(var a=this.getSelectionCells(),b=[],c=0;c<a.length;c++)if(this.model.contains(a[c])&&this.isCellVisible(a[c]))for(var d=this.model.getParent(a[c]);null!=d&&d!=this.view.currentRoot;){if(this.isCellCollapsed(d)||!this.isCellVisible(d)){b.push(a[c]);break}d=this.model.getParent(d)}else b.push(a[c]);this.removeSelectionCells(b)};
mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.setDefaultParent(null),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(!this.model.contains(b)||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),
this.view.currentRoot==a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),a=this.view.getState(a.cell),
null!=a&&(a.invalidStyle=!0)):null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(e,f){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a,b){this.startEditingAtCell(null,a,b)};
mxGraph.prototype.startEditingAtCell=function(a,b,c){null!=b&&mxEvent.isMultiTouchEvent(b)||(null==a&&(a=this.getSelectionCell(),null==a||this.isCellEditable(a)||(a=null)),null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b,c),this.fireEvent(new mxEventObject(mxEvent.EDITING_STARTED,"cell",a,"event",b))))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};
mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a);this.fireEvent(new mxEventObject(mxEvent.EDITING_STOPPED,"cancel",a))};mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};mxGraph.prototype.escape=function(a){this.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",a))};
mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);if(this.isEnabled()&&!mxEvent.isConsumed(b)&&!d.isConsumed()){if(null!=c){if(this.isTransparentClickEvent(b)){var e=!1;a=this.getCellAt(a.graphX,a.graphY,null,null,null,mxUtils.bind(this,function(g){var k=this.isCellSelected(g.cell);e=e||k;return!e||k||g.cell!=c&&this.model.isAncestor(g.cell,c)}));null!=a&&(c=a)}}else if(this.isSwimlaneSelectionEnabled()&&
(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY()),!(null==c||this.isToggleEvent(b)&&mxEvent.isAltDown(b)))){d=c;for(a=[];null!=d;){d=this.model.getParent(d);var f=this.view.getState(d);this.isSwimlane(d)&&null!=f&&a.push(d)}if(0<a.length)for(a=a.reverse(),a.splice(0,0,c),a.push(c),d=0;d<a.length-1;d++)this.isCellSelected(a[d])&&(c=a[this.isToggleEvent(b)?d:d+1])}null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()}};
mxGraph.prototype.isSiblingSelected=function(a){for(var b=this.model,c=b.getParent(a),d=b.getChildCount(c),e=0;e<d;e++){var f=b.getChildAt(c,e);if(a!=f&&this.isCellSelected(f))return!0}return!1};mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);!this.isEnabled()||mxEvent.isConsumed(a)||c.isConsumed()||null==b||!this.isCellEditable(b)||this.isEditing(b)||(this.startEditingAtCell(b,a),mxEvent.consume(a))};
mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled()&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=b,
this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(this.timerAutoScroll||!this.ignoreScrollbars&&!mxUtils.hasScrollbars(this.container))this.allowAutoPanning&&!this.panningHandler.isActive()&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy));else{var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-
a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,
b=this.container.scrollHeight+d-f,a.style.height=b+"px"):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas(),a.style.height=b+"px"),e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=d-f))}}};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
mxGraph.prototype.getBorderSizes=function(){var a=mxUtils.getCurrentStyle(this.container);return new mxRectangle(mxUtils.parseCssNumber(a.paddingLeft)+("none"!=a.borderLeftStyle?mxUtils.parseCssNumber(a.borderLeftWidth):0),mxUtils.parseCssNumber(a.paddingTop)+("none"!=a.borderTopStyle?mxUtils.parseCssNumber(a.borderTopWidth):0),mxUtils.parseCssNumber(a.paddingRight)+("none"!=a.borderRightStyle?mxUtils.parseCssNumber(a.borderRightWidth):0),mxUtils.parseCssNumber(a.paddingBottom)+("none"!=a.borderBottomStyle?
mxUtils.parseCssNumber(a.borderBottomWidth):0))};mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.translate;var d=this.pageFormat,e=this.pageScale;d=new mxRectangle(0,0,Math.ceil(d.width*e),Math.ceil(d.height*e));return new mxRectangle(0,0,(this.pageBreaksVisible?Math.ceil(b/d.width):1)*d.width+2+a.x,(this.pageBreaksVisible?Math.ceil(c/d.height):1)*d.height+2+a.y)};
mxGraph.prototype.fit=function(a,b,c,d,e,f,g){if(null!=this.container){a=null!=a?a:this.getBorder();b=null!=b?b:!1;c=null!=c?c:0;d=null!=d?d:!0;e=null!=e?e:!1;f=null!=f?f:!1;var k=this.getBorderSizes(),l=this.container.offsetWidth-k.x-k.width-1,m=null!=g?g:this.container.offsetHeight-k.y-k.height-1;g=this.view.getGraphBounds();if(0<g.width&&0<g.height){b&&null!=g.x&&null!=g.y&&(g=g.clone(),g.width+=g.x,g.height+=g.y,g.x=0,g.y=0);k=this.view.scale;var n=g.width/k,p=g.height/k;null!=this.backgroundImage&&
null!=this.backgroundImage.width&&null!=this.backgroundImage.height&&(n=Math.max(n,this.backgroundImage.width-g.x/k),p=Math.max(p,this.backgroundImage.height-g.y/k));var q=(b?a:2*a)+c+1;l-=q;m-=q;e=e?m/p:f?l/n:Math.min(l/n,m/p);null!=this.minFitScale&&(e=Math.max(e,this.minFitScale));null!=this.maxFitScale&&(e=Math.min(e,this.maxFitScale));if(d)b?this.view.scale!=e&&this.view.setScale(e):mxUtils.hasScrollbars(this.container)?(this.view.setScale(e),a=this.getGraphBounds(),null!=a.x&&(this.container.scrollLeft=
a.x),null!=a.y&&(this.container.scrollTop=a.y)):this.view.scaleAndTranslate(e,null!=g.x?Math.floor(this.view.translate.x-g.x/k+a/e+c/2):a,null!=g.y?Math.floor(this.view.translate.y-g.y/k+a/e+c/2):a);else return e}}return this.view.scale};
mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x)+a.width+2*b;b=Math.max(0,a.y)+a.height+2*b;null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,Math.max(1,c),Math.max(1,b));null!=d&&(c=d.width*this.view.scale,
b=d.height*this.view.scale)}null!=this.minimumGraphSize&&(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c);b=Math.ceil(b);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%")):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=Math.max(1,
b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c,b)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};mxGraph.prototype.doResizeContainer=function(a,b){null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
mxGraph.prototype.updatePageBreaks=function(a,b,c){b=this.view.scale;c=this.view.translate;var d=this.pageFormat,e=b*this.pageScale,f=new mxRectangle(0,0,d.width*e,d.height*e);d=mxRectangle.fromRectangle(this.getGraphBounds());d.width=Math.max(1,d.width);d.height=Math.max(1,d.height);f.x=Math.floor((d.x-c.x*b)/f.width)*f.width+c.x*b;f.y=Math.floor((d.y-c.y*b)/f.height)*f.height+c.y*b;d.width=Math.ceil((d.width+(d.x-f.x))/f.width)*f.width;d.height=Math.ceil((d.height+(d.y-f.y))/f.height)*f.height;
var g=(a=a&&Math.min(f.width,f.height)>this.minPageBreakDist)?Math.ceil(d.height/f.height)+1:0,k=a?Math.ceil(d.width/f.width)+1:0,l=(k-1)*f.width,m=(g-1)*f.height;null==this.horizontalPageBreaks&&0<g&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<k&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(n){if(null!=n){for(var p=n==this.horizontalPageBreaks?g:k,q=0;q<=p;q++){var r=n==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+q*f.height)),new mxPoint(Math.round(f.x+
l),Math.round(f.y+q*f.height))]:[new mxPoint(Math.round(f.x+q*f.width),Math.round(f.y)),new mxPoint(Math.round(f.x+q*f.width),Math.round(f.y+m))];null!=n[q]?(n[q].points=r,n[q].redraw()):(r=new mxPolyline(r,this.pageBreakColor),r.dialect=this.dialect,r.pointerEvents=!1,r.isDashed=this.pageBreakDashed,r.init(this.view.backgroundPane),r.redraw(),n[q]=r)}for(q=p;q<n.length;q++)n[q].destroy();n.splice(p,n.length-p)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
mxGraph.prototype.getCurrentCellStyle=function(a,b){b=b?null:this.view.getState(a);return null!=b?b.style:this.getCellStyle(a)};mxGraph.prototype.getCellStyle=function(a,b){b=null!=b?b:!0;var c=this.model.getStyle(a),d=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=c&&0<c.length?d=this.stylesheet.getCellStyle(c,d,b):null!=d&&(d=mxUtils.clone(d));null==d?d={}:b&&(d=this.postProcessCellStyle(a,d));return d};
mxGraph.prototype.postProcessCellStyle=function(a,b){if(null!=b){var c=b[mxConstants.STYLE_IMAGE];a=this.getImageFromBundles(c);null!=a?b[mxConstants.STYLE_IMAGE]=a:a=c;null!=a&&"function"===typeof a.substring&&"data:image/"==a.substring(0,11)&&("data:image/svg+xml,<"==a.substring(0,20)?a=a.substring(0,19)+encodeURIComponent(a.substring(19)):"data:image/svg+xml,%3C"!=a.substring(0,22)&&(c=a.indexOf(","),0<c&&";base64,"!=a.substring(c-7,c+1)&&(a=a.substring(0,c)+";base64,"+a.substring(c+1))),b[mxConstants.STYLE_IMAGE]=
a)}return b};mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();return this.toggleCellStyles(a,b,[c])};
mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getEditableCells(this.getSelectionCells());var d=null;null!=c&&0<c.length&&(d=this.getCurrentCellStyle(c[0]),d=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,d,c));return d};
mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getEditableCells(this.getSelectionCells());this.model.beginUpdate();try{mxUtils.setCellStyles(this.model,c,a,b);for(var d=0;d<c.length;d++){var e=this.view.getState(c[d]);null!=e&&null!=e.shape&&e.shape.styleChanged(a,b,e)}}finally{this.model.endUpdate()}};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getEditableCells(this.getSelectionCells());null!=d&&0<d.length&&(null==c&&(c=this.getCurrentCellStyle(d[0]),c=(parseInt(c[a]||0)&b)!=b),mxUtils.setCellStyleFlags(this.model,d,a,b,c))};mxGraph.prototype.getOriginForCell=function(a){a=this.model.getParent(a);for(var b=new mxPoint;null!=a;){var c=this.getCellGeometry(a);null==c||c.relative||(b.x+=c.x,b.y+=c.y);a=this.model.getParent(a)}return b};
mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getMovableCells(this.getSelectionCells()));if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.getOriginForCell(b[d]),f=this.getCellGeometry(b[d]);if(!this.model.isEdge(b[d])&&null!=f&&!f.relative)if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+f.x+f.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+f.x+f.width;else if(a==mxConstants.ALIGN_TOP)c=e.y+f.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+f.y+f.height/
2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+f.y+f.height:e.x+f.x;else c=a==mxConstants.ALIGN_RIGHT?Math.max(c,e.x+f.x+f.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y+f.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+f.y+f.height):Math.min(c,e.x+f.x)}if(null!=c){b=mxUtils.sortCells(b);this.model.beginUpdate();try{for(d=0;d<b.length;d++)e=this.getOriginForCell(b[d]),f=this.getCellGeometry(b[d]),this.model.isEdge(b[d])||null==f||f.relative||(f=f.clone(),a==mxConstants.ALIGN_CENTER?f.x=c-e.x-f.width/
2:a==mxConstants.ALIGN_RIGHT?f.x=c-e.x-f.width:a==mxConstants.ALIGN_TOP?f.y=c-e.y:a==mxConstants.ALIGN_MIDDLE?f.y=c-e.y-f.height/2:a==mxConstants.ALIGN_BOTTOM?f.y=c-e.y-f.height:f.x=c-e.x,this.resizeCell(b[d],f));this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
mxGraph.prototype.orderCells=function(a,b,c){null==b&&(b=mxUtils.sortCells(this.getEditableCells(this.getSelectionCells()),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a,c),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b,"increment",c))}finally{this.model.endUpdate()}return b};
mxGraph.prototype.cellsOrdered=function(a,b,c){if(null!=a){this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.model.getParent(a[d]);b?c?this.model.add(e,a[d],Math.max(0,e.getIndex(a[d])-1)):this.model.add(e,a[d],d):c?this.model.add(e,a[d],Math.min(this.model.getChildCount(e)-1,e.getIndex(a[d])+1)):this.model.add(e,a[d],this.model.getChildCount(e)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a,"increment",c))}finally{this.model.endUpdate()}}};
mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(1<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);this.cellsResized([a],[d],!1);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1,
!1,!1);f=this.model.getChildCount(a);this.cellsAdded(c,a,f,null,null,!1,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!1,!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b,!0);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),null!=c&&(b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c));return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
mxGraph.prototype.ungroupCells=function(a){var b=[];null==a&&(a=this.getCellsForUngroup());if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getChildren(a[c]);if(null!=d&&0<d.length){d=d.slice();var e=this.model.getParent(a[c]),f=this.model.getChildCount(e);this.cellsAdded(d,e,f,null,null,!0);b=b.concat(d);for(var g=0;g<d.length;g++)if(this.model.isVertex(d[g])){var k=this.view.getState(d[g]),l=this.getCellGeometry(d[g]);null!=k&&null!=l&&l.relative&&
(l=l.clone(),l.x=k.origin.x,l.y=k.origin.y,l.relative=!1,this.model.setGeometry(d[g],l))}}}this.removeCellsAfterUngroup(a);this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.getCellsForUngroup=function(){for(var a=this.getEditableCells(this.getSelectionCells()),b=[],c=0;c<a.length;c++)this.model.isVertex(a[c])&&0<this.model.getChildCount(a[c])&&b.push(a[c]);return b};mxGraph.prototype.removeCellsAfterUngroup=function(a){this.cellsRemoved(this.addAllEdges(a))};
mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=this.isSwimlane(a[k])?this.getActualStartSize(a[k],!0):new mxRectangle;l=
l.clone();c&&(l.x=Math.round(l.x+n.x-b-p.x-g),l.y=Math.round(l.y+n.y-b-p.y-d));l.width=Math.round(n.width+2*b+p.x+g+e+p.width);l.height=Math.round(n.height+2*b+p.y+d+f+p.height);this.model.setGeometry(a[k],l);this.moveCells(m,b+p.x-n.x+g,b+p.y-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
mxGraph.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=0;c<a.length;c++)if(this.model.isVertex(a[c])||this.model.isEdge(a[c])){var d=this.view.getBoundingBox(this.view.getState(a[c]),!0);null!=d&&(null==b?b=mxRectangle.fromRectangle(d):b.add(d))}return b};mxGraph.prototype.cloneCell=function(a,b,c,d){return this.cloneCells([a],b,c,d)[0]};
mxGraph.prototype.cloneCells=function(a,b,c,d){b=null!=b?b:!0;var e=null;if(null!=a){var f=new mxDictionary;e=[];for(var g=0;g<a.length;g++)f.put(a[g],!0),e.push(a[g]);if(0<e.length){var k=this.view.scale,l=this.view.translate;e=this.model.cloneCells(a,!0,c);for(g=0;g<a.length;g++)if(!b&&this.model.isEdge(e[g])&&null!=this.getEdgeValidationError(e[g],this.model.getTerminal(e[g],!0),this.model.getTerminal(e[g],!1)))e[g]=null;else{var m=this.model.getGeometry(e[g]);if(null!=m){var n=this.view.getState(a[g]),
p=this.view.getState(this.model.getParent(a[g]));if(null!=n&&null!=p)if(c=p.origin.x,p=p.origin.y,this.model.isEdge(e[g])){if(n=n.absolutePoints,null!=n){var q=this.model.getTerminal(a[g],!0);if(null!=q){for(;null!=q&&!f.get(q);)q=this.model.getParent(q);null==q&&null!=n[0]&&m.setTerminalPoint(new mxPoint(Math.round(n[0].x/k-l.x-c),Math.round(n[0].y/k-l.y-p)),!0)}d||(q=m.getTerminalPoint(!0),null!=q&&(q.x+=c,q.y+=p));q=this.model.getTerminal(a[g],!1);if(null!=q){for(;null!=q&&!f.get(q);)q=this.model.getParent(q);
var r=n.length-1;null==q&&null!=n[r]&&m.setTerminalPoint(new mxPoint(Math.round(n[r].x/k-l.x-c),Math.round(n[r].y/k-l.y-p)),!1)}d||(q=m.getTerminalPoint(!1),null!=q&&(q.x+=c,q.y+=p));m=m.points;if(!d&&null!=m)for(n=0;n<m.length;n++)null!=m[n]&&(m[n].x+=c,m[n].y+=p)}}else d||m.translate(c,p)}}}else e=[]}return e};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};
mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};
mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};mxGraph.prototype.addCells=function(a,b,c,d,e,f){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,null!=f?f:!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0);for(l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,x=r.y-m.y;t=t.clone();t.translate(u,x);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||
(t.x=Math.max(0,t.x),t.y=Math.max(0,t.y));this.model.setGeometry(a[l],t)}}b==p&&c+l>this.model.getChildCount(b)&&c--;var y=this.model.updateEdgeParent;this.model.updateEdgeParent=function(A,z){0>mxUtils.indexOf(a,A)&&y.apply(this,arguments)};this.model.add(b,a[l],c+l);this.model.updateEdgeParent=y;this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],
d,!0);null!=e&&this.cellConnected(a[l],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1){b=this.model.getChildCount(a);for(var c=0;c<b;c++)this.autoSizeCell(this.model.getChildAt(a,c))}this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));if(b)a=this.getDeletableCells(this.addAllEdges(a));else{a=a.slice();for(var c=this.getDeletableCells(this.getAllEdges(a)),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++)null!=this.view.getState(c[e])||d.get(c[e])||(d.put(c[e],!0),a.push(c[e]))}this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",
a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(l,m){var n=this.model.getGeometry(l);if(null!=n){for(var p=this.model.getTerminal(l,m),q=!1,r=p;null!=r;){if(a[e]==r){q=!0;break}r=this.model.getParent(r)}q&&(n=n.clone(),q=this.view.getState(l),null!=q&&null!=q.absolutePoints?
(p=q.absolutePoints,r=m?0:p.length-1,n.setTerminalPoint(new mxPoint(p[r].x/b-c.x-q.origin.x,p[r].y/b-c.y-q.origin.y),m)):(p=this.view.getState(p),null!=p&&n.setTerminalPoint(new mxPoint(p.getCenterX()/b-c.x,p.getCenterY()/b-c.y),m)),this.model.setGeometry(l,n),this.model.setTerminal(l,null,m))}}),k=0;k<f.length;k++)d.get(f[k])||(d.put(f[k],!0),g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
mxGraph.prototype.splitEdge=function(a,b,c,d,e,f,g,k){d=d||0;e=e||0;k=null!=k?k:this.model.getParent(a);f=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCell(a);var l=this.view.getState(a),m=this.getCellGeometry(c);if(null!=m&&null!=m.points&&null!=l){var n=this.view.translate,p=this.view.scale,q=mxUtils.findNearestSegment(l,(d+n.x)*p,(e+n.y)*p);m.points=m.points.slice(0,q);m=this.getCellGeometry(a);null!=m&&null!=m.points&&(m=m.clone(),m.points=m.points.slice(q),
this.model.setGeometry(a,m))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded([c],k,this.model.getChildCount(k),f,b[0],!1);this.cellsAdded(b,k,this.model.getChildCount(k),null,null,!0);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
mxGraph.prototype.foldCells=function(a,b,c,d,e){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e])){this.model.setCollapsed(a[e],b);this.swapBounds(a[e],b);this.isExtendParent(a[e])&&this.extendParent(a[e]);if(c){var f=this.model.getChildren(a[e]);this.cellsFolded(f,b,c)}this.constrainChild(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.getCurrentCellStyle(a);if(null==b.alternateBounds){var d=b;if(this.collapseToPreferredSize){var e="1"==mxUtils.getValue(c,mxConstants.STYLE_AUTOSIZE_GRID,this.gridEnabled?"1":"0");a=this.getPreferredSizeForCell(a,null,e);null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a)))}b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}null!=b.alternateBounds&&(b.alternateBounds.x=
b.x,b.alternateBounds.y=b.y,e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||0),0!=e&&(c=b.alternateBounds.getCenterX()-b.getCenterX(),d=b.alternateBounds.getCenterY()-b.getCenterY(),a=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=a*c-e*d-c,b.alternateBounds.y+=e*c+a*d-d))}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return mxUtils.removeDuplicates(b.concat(this.getAllEdges(a)))};
mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getCellStyle(a),d=this.model.getGeometry(a);if(null!=d){var e=null,f=mxUtils.getValue(c,mxConstants.STYLE_FIXED_WIDTH,!1);f&&(e=d.width-2*parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING,2))-parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING_LEFT,0))-parseFloat(mxUtils.getValue(c,mxConstants.STYLE_SPACING_RIGHT,0)));var g="1"==mxUtils.getValue(c,mxConstants.STYLE_AUTOSIZE_GRID,this.gridEnabled?
"1":"0"),k=this.getPreferredSizeForCell(a,e,g);if(null!=k){var l=this.isCellCollapsed(a);d=d.clone();if(this.isSwimlane(a)){var m=this.model.getStyle(a);null==m&&(m="");mxUtils.getValue(c,mxConstants.STYLE_HORIZONTAL,!0)?(m=mxUtils.setStyle(m,mxConstants.STYLE_STARTSIZE,k.height+8),l&&(d.height=k.height+8),f||(d.width=k.width)):(m=mxUtils.setStyle(m,mxConstants.STYLE_STARTSIZE,k.width+8),l&&!f&&(d.width=k.width+8),d.height=k.height);this.model.setStyle(a,m)}else{var n=this.view.createState(a),p=n.style[mxConstants.STYLE_ALIGN]||
mxConstants.ALIGN_CENTER,q=this.getVerticalAlign(n);"fixed"==n.style[mxConstants.STYLE_ASPECT]&&(k.height=Math.round(d.height*k.width*100/d.width)/100);q==mxConstants.ALIGN_BOTTOM?d.y+=d.height-k.height:q==mxConstants.ALIGN_MIDDLE&&(d.y+=Math.round((d.height-k.height)/2));d.height=k.height;f||(p==mxConstants.ALIGN_RIGHT?d.x+=d.width-k.width:p==mxConstants.ALIGN_CENTER&&(d.x+=Math.round((d.width-k.width)/2)),d.width=k.width)}if(!b&&!l){var r=this.view.getBounds(this.model.getChildren(a));if(null!=
r){var t=this.view.translate,u=this.view.scale,x=(r.x+r.width)/u-d.x-t.x;d.height=Math.max(d.height,(r.y+r.height)/u-d.y-t.y);f||(d.width=Math.max(d.width,x))}}this.cellsResized([a],[d],!1)}}}finally{this.model.endUpdate()}}};
mxGraph.prototype.getPreferredSizeForCell=function(a,b,c){c=null!=c?c:this.gridEnabled;var d=null;if(null!=a){var e=this.view.createState(a),f=e.style;if(!this.model.isEdge(a)){var g=f[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE;a=d=0;null==this.getImage(e)&&null==f[mxConstants.STYLE_IMAGE]||f[mxConstants.STYLE_SHAPE]!=mxConstants.SHAPE_LABEL||(f[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(d+=parseFloat(mxUtils.getValue(f,mxConstants.STYLE_IMAGE_WIDTH,mxLabel.prototype.imageSize))),
f[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(a+=parseFloat(mxUtils.getValue(f,mxConstants.STYLE_IMAGE_HEIGHT,mxLabel.prototype.imageSize))));d+=2*parseFloat(mxUtils.getValue(f,mxConstants.STYLE_SPACING,2));d+=parseFloat(mxUtils.getValue(f,mxConstants.STYLE_SPACING_LEFT,2));d+=parseFloat(mxUtils.getValue(f,mxConstants.STYLE_SPACING_RIGHT,2));a+=2*parseFloat(mxUtils.getValue(f,mxConstants.STYLE_SPACING,2));a+=parseFloat(mxUtils.getValue(f,mxConstants.STYLE_SPACING_TOP,2));a+=parseFloat(mxUtils.getValue(f,
mxConstants.STYLE_SPACING_BOTTOM,2));var k=this.getFoldingImage(e);null!=k&&(d+=k.width+8);k=this.cellRenderer.getLabelValue(e);null!=k&&0<k.length?(this.isHtmlLabel(e.cell)?null!=b&&(b+=mxSvgCanvas2D.prototype.foreignObjectPadding):k=mxUtils.htmlEntities(k,!1),k=k.replace(/\n/g,"<br>"),e=mxUtils.getSizeForString(k,g,f[mxConstants.STYLE_FONTFAMILY],b,f[mxConstants.STYLE_FONTSTYLE]),b=e.width+d,e=e.height+a,mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)||(f=e,e=b,b=f),c&&(b=this.snap(b+this.gridSize/
2),e=this.snap(e+this.gridSize/2)),d=new mxRectangle(0,0,b,e)):(c=4*this.gridSize,d=new mxRectangle(0,0,c,c))}}return d};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{var d=this.cellsResized(a,b,c);this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;var d=[];if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)d.push(this.cellResized(a[e],b[e],!1,c)),this.isExtendParent(a[e])&&this.extendParent(a[e]),this.constrainChild(a[e]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b,"previous",d))}finally{this.model.endUpdate()}}return d};
mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){var f=e.clone();!c&&f.relative?(c=f.offset,null!=c&&(c.x+=b.x-f.x,c.y+=b.y-f.y)):(f.x=b.x,f.y=b.y);f.width=b.width;f.height=b.height;f.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(f.x=Math.max(0,f.x),f.y=Math.max(0,f.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,f),this.model.setGeometry(a,f),this.isCellCollapsed(a)||
this.constrainChildCells(a)}finally{this.model.endUpdate()}}return e};mxGraph.prototype.resizeChildCells=function(a,b){var c=this.model.getGeometry(a),d=0!=c.width?b.width/c.width:1;b=0!=c.height?b.height/c.height:1;c=this.model.getChildCount(a);for(var e=0;e<c;e++)this.scaleCell(this.model.getChildAt(a,e),d,b,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var f=this.getCurrentCellStyle(a);e=e.clone();var g=e.x,k=e.y,l=e.width,m=e.height;e.scale(b,c,"fixed"==f[mxConstants.STYLE_ASPECT]);"1"==f[mxConstants.STYLE_RESIZE_WIDTH]?e.width=l*b:"0"==f[mxConstants.STYLE_RESIZE_WIDTH]&&(e.width=l);"1"==f[mxConstants.STYLE_RESIZE_HEIGHT]?e.height=m*c:"0"==f[mxConstants.STYLE_RESIZE_HEIGHT]&&(e.height=m);this.isCellMovable(a)||(e.x=g,e.y=k);this.isCellResizable(a)||(e.width=
l,e.height=m);this.model.isVertex(a)?this.cellResized(a,e,!0,d):this.model.setGeometry(a,e)}};mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.getCellGeometry(b);null==b||null==c||this.isCellCollapsed(b)||(a=this.getCellGeometry(a),null!=a&&!a.relative&&(c.width<a.x+a.width||c.height<a.y+a.height)&&(c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)))}};
mxGraph.prototype.importCells=function(a,b,c,d,e,f){return this.moveCells(a,b,c,!0,d,e,f)};
mxGraph.prototype.moveCells=function(a,b,c,d,e,f,g){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){var k=a=this.model.getTopmostCells(a);this.model.beginUpdate();try{for(var l=new mxDictionary,m=0;m<a.length;m++)l.put(a[m],!0);var n=mxUtils.bind(this,function(x){for(;null!=x;){if(l.get(x))return!0;x=this.model.getParent(x)}return!1}),p=[];for(m=0;m<a.length;m++){var q=this.getCellGeometry(a[m]),r=this.model.getParent(a[m]);null!=q&&q.relative&&this.model.isEdge(r)&&
(n(this.model.getTerminal(r,!0))||n(this.model.getTerminal(r,!1)))||p.push(a[m])}a=p;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var t=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(t);if(null!=e){var u=this.model.getChildCount(e);this.cellsAdded(a,e,u,null,null,
!0);if(d)for(m=0;m<a.length;m++)q=this.getCellGeometry(a[m]),r=this.model.getParent(k[m]),null!=q&&q.relative&&this.model.isEdge(r)&&this.model.contains(r)&&this.model.add(r,a[m])}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);if(null!=d){b=parseFloat(b);c=parseFloat(c);d=d.clone();d.translate(b,c,this.model.isEdge(a));d.relative||!this.model.isVertex(a)||this.isAllowNegativeCoordinates()||(d.x=Math.max(0,parseFloat(d.x)),d.y=Math.max(0,parseFloat(d.y)));if(d.relative&&!this.model.isEdge(a)){var e=this.model.getParent(a),f=0;this.model.isVertex(e)&&(e=this.getCurrentCellStyle(e),f=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0));0!=f&&(f=mxUtils.toRadians(-f),
e=Math.cos(f),f=Math.sin(f),c=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,new mxPoint(0,0)),b=c.x,c=c.y);null==d.offset?d.offset=new mxPoint(Math.round(b),Math.round(c)):(d.offset.x=Math.round(parseFloat(d.offset.x+b)),d.offset.y=Math.round(parseFloat(d.offset.y+c)))}this.model.setGeometry(a,d)}};
mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width;c=c.height;if(this.isSwimlane(b)){var f=this.getStartSize(b),g=this.getCurrentCellStyle(b);b=mxUtils.getValue(g,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);var k=1==mxUtils.getValue(g,mxConstants.STYLE_FLIPH,0);g=1==mxUtils.getValue(g,mxConstants.STYLE_FLIPV,0);if(b==
mxConstants.DIRECTION_SOUTH||b==mxConstants.DIRECTION_NORTH){var l=f.width;f.width=f.height;f.height=l}if(b==mxConstants.DIRECTION_EAST&&!g||b==mxConstants.DIRECTION_NORTH&&!k||b==mxConstants.DIRECTION_WEST&&g||b==mxConstants.DIRECTION_SOUTH&&k)a=f.width,d=f.height;e-=f.width;c-=f.height}return new mxRectangle(a,d,e,c)}}}return null};mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
mxGraph.prototype.constrainChild=function(a,b){if(null!=a&&(b=this.getCellGeometry(a),null!=b&&(this.isConstrainRelativeChildren()||!b.relative))){var c=this.model.getParent(a);this.getCellGeometry(c);var d=this.getMaximumGraphBounds();null!=d&&(c=this.getBoundingBoxFromGeometry([c],!1),null!=c&&(d=mxRectangle.fromRectangle(d),d.x-=c.x,d.y-=c.y));if(this.isConstrainChild(a)&&(c=this.getCellContainmentArea(a),null!=c)){var e=this.getOverlap(a);0<e&&(c=mxRectangle.fromRectangle(c),c.x-=c.width*e,c.y-=
c.height*e,c.width+=2*c.width*e,c.height+=2*c.height*e);null==d?d=c:(d=mxRectangle.fromRectangle(d),d.intersect(c))}if(null!=d){c=[a];if(!this.isCellCollapsed(a)){e=this.model.getDescendants(a);for(var f=0;f<e.length;f++)this.isCellVisible(e[f])&&c.push(e[f])}c=this.getBoundingBoxFromGeometry(c,!1);if(null!=c){b=b.clone();e=0;b.width>d.width&&(e=b.width-d.width,b.width-=e);c.x+c.width>d.x+d.width&&(e-=c.x+c.width-d.x-d.width-e);f=0;b.height>d.height&&(f=b.height-d.height,b.height-=f);c.y+c.height>
d.y+d.height&&(f-=c.y+c.height-d.y-d.height-f);c.x<d.x&&(e-=c.x-d.x);c.y<d.y&&(f-=c.y-d.y);if(0!=e||0!=f)b.relative?(null==b.offset&&(b.offset=new mxPoint),b.offset.x+=e,b.offset.y+=f):(b.x+=e,b.y+=f);this.model.setGeometry(a,b)}}}};
mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);this.model.beginUpdate();try{for(c=0;c<a.length;c++){var d=this.model.getEdges(a[c]);if(null!=d)for(var e=0;e<d.length;e++){var f=this.view.getState(d[e]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[e],!0),k=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[e],!1);b.get(g)&&b.get(k)||this.resetEdge(d[e])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&null!=b.points&&0<b.points.length&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};
mxGraph.prototype.getOutlineConstraint=function(a,b,c){if(null!=b.shape){c=this.view.getPerimeterBounds(b);var d=b.style[mxConstants.STYLE_DIRECTION];if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH){c.x+=c.width/2-c.height/2;c.y+=c.height/2-c.width/2;var e=c.width;c.width=c.height;c.height=e}var f=mxUtils.toRadians(b.shape.getShapeRotation());if(0!=f){e=Math.cos(-f);f=Math.sin(-f);var g=new mxPoint(c.getCenterX(),c.getCenterY());a=mxUtils.getRotatedPoint(a,e,f,g)}g=f=1;var k=0,l=
0;if(this.getModel().isVertex(b.cell)){var m=b.style[mxConstants.STYLE_FLIPH],n=b.style[mxConstants.STYLE_FLIPV];null!=b.shape&&null!=b.shape.stencil&&(m=1==mxUtils.getValue(b.style,"stencilFlipH",0)||m,n=1==mxUtils.getValue(b.style,"stencilFlipV",0)||n);if(d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH)e=m,m=n,n=e;m&&(f=-1,k=-c.width);n&&(g=-1,l=-c.height)}a=new mxPoint((a.x-c.x)*f-k+c.x,(a.y-c.y)*g-l+c.y);return new mxConnectionConstraint(new mxPoint(0==c.width?0:Math.round(1E3*
(a.x-c.x)/c.width)/1E3,0==c.height?0:Math.round(1E3*(a.y-c.y)/c.height)/1E3),!1)}return null};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;var f=e=0;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0),e=parseFloat(a.style[c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX]),f=parseFloat(a.style[c?mxConstants.STYLE_EXIT_DY:
mxConstants.STYLE_ENTRY_DY]),e=isFinite(e)?e:0,f=isFinite(f)?f:0);return new mxConnectionConstraint(b,d,null,e,f)};
mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DY:mxConstants.STYLE_ENTRY_DY,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:
mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DX:mxConstants.STYLE_ENTRY_DX,d.dx,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_DY:mxConstants.STYLE_ENTRY_DY,d.dy,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,
null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
mxGraph.prototype.getConnectionPoint=function(a,b,c){c=null!=c?c:!0;var d=null;if(null!=a&&null!=b.point){var e=this.view.getPerimeterBounds(a),f=new mxPoint(e.getCenterX(),e.getCenterY()),g=a.style[mxConstants.STYLE_DIRECTION],k=0;null!=g&&1==mxUtils.getValue(a.style,mxConstants.STYLE_ANCHOR_POINT_DIRECTION,1)&&(g==mxConstants.DIRECTION_NORTH?k+=270:g==mxConstants.DIRECTION_WEST?k+=180:g==mxConstants.DIRECTION_SOUTH&&(k+=90),g!=mxConstants.DIRECTION_NORTH&&g!=mxConstants.DIRECTION_SOUTH||e.rotate90());
d=this.view.scale;d=new mxPoint(e.x+b.point.x*e.width+b.dx*d,e.y+b.point.y*e.height+b.dy*d);var l=a.style[mxConstants.STYLE_ROTATION]||0;if(b.perimeter)0!=k&&(g=e=0,90==k?g=1:180==k?e=-1:270==k&&(g=-1),d=mxUtils.getRotatedPoint(d,e,g,f)),d=this.view.getPerimeterPoint(a,d,!1);else if(l+=k,this.getModel().isVertex(a.cell)){k=1==a.style[mxConstants.STYLE_FLIPH];b=1==a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(k=1==mxUtils.getValue(a.style,"stencilFlipH",0)||k,b=1==mxUtils.getValue(a.style,
"stencilFlipV",0)||b);if(g==mxConstants.DIRECTION_NORTH||g==mxConstants.DIRECTION_SOUTH)a=k,k=b,b=a;k&&(d.x=2*e.getCenterX()-d.x);b&&(d.y=2*e.getCenterY()-d.y)}0!=l&&null!=d&&(a=mxUtils.toRadians(l),e=Math.cos(a),g=Math.sin(a),d=mxUtils.getRotatedPoint(d,e,g,f))}c&&null!=d&&(d.x=Math.round(d.x),d.y=Math.round(d.y));return d};
mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
c,"previous",e))}finally{this.model.endUpdate()}}};
mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var f=this.model.getGeometry(a[e]);if(null!=f){var g=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=g&&null!=k){f=f.clone();var l=-k.origin.x,m=-k.origin.y,n=g.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=p&&this.isCellDisconnectable(a[e],
p,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var q=this.model.getTerminal(a[e],!1);if(null!=q&&this.isCellDisconnectable(a[e],q,!1)){for(;null!=q&&!d.get(q);)q=this.model.getParent(q);if(null==q){var r=n.length-1;f.setTerminalPoint(new mxPoint(n[r].x/b-c.x+l,n[r].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};
mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection(),a=mxRectangle.fromRectangle(this.getGraphBounds()),a.x-=this.view.translate.x,a.y-=this.view.translate.y,this.scrollRectToVisible(a))};
mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&(this.setSelectionCell(b),this.scrollCellToVisible(b))}};
mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b,c,d){b=null!=b?b:!1;var e=null;if(null!=a)for(var f=0;f<a.length;f++)if(b||this.model.isVertex(a[f])){var g=this.getCellGeometry(a[f]);if(null!=g){var k=this.model.getParent(a[f]),l=null;if(this.model.isEdge(a[f])){var m=function(p){null!=p&&(null==l?l=new mxRectangle(p.x,p.y,0,0):l.add(new mxRectangle(p.x,p.y,0,0)))};null==this.model.getTerminal(a[f],!0)&&m(g.getTerminalPoint(!0));null==this.model.getTerminal(a[f],!1)&&m(g.getTerminalPoint(!1));
g=g.points;if(null!=g)for(var n=0;n<g.length;n++)m(g[n]);null!=l&&this.model.isVertex(k)&&0<=mxUtils.indexOf(null!=c?c:a,k)&&(m=this.getBoundingBoxFromGeometry([k],!1,null!=c?c:a,d),null!=m&&(l.x+=m.x,l.y+=m.y))}else g.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(m=this.getBoundingBoxFromGeometry([k],!1,null!=c?c:a,d),null!=m&&(l=new mxRectangle(g.x*m.width,g.y*m.height,g.width,g.height),0<=mxUtils.indexOf(null!=c?c:a,k)&&(l.x+=m.x,l.y+=m.y))):(l=mxRectangle.fromRectangle(g),this.model.isVertex(k)&&
0<=mxUtils.indexOf(null!=c?c:a,k)&&(m=this.getBoundingBoxFromGeometry([k],!1,null!=c?c:a,d),null!=m&&(l.x+=m.x,l.y+=m.y))),null!=l&&null!=g.offset&&(l.x+=g.offset.x,l.y+=g.offset.y),k=this.getCurrentCellStyle(a[f]),null!=l&&(k=mxUtils.getValue(k,mxConstants.STYLE_ROTATION,0),0!=k&&(l=mxUtils.getBoundingBox(l,k)));null!=l&&(d&&(k=this.getCurrentCellStyle(a[f],!0),null!=k&&(k=mxUtils.getNumber(k,mxConstants.STYLE_STROKEWIDTH,1),l.grow(k/2))),null==e?e=mxRectangle.fromRectangle(l):e.add(l))}}return e};
mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
mxGraph.prototype.snapDelta=function(a,b,c,d,e){var f=this.view.translate,g=this.view.scale;!c&&this.gridEnabled?(c=this.gridSize*g*.5,d||(d=b.x-(this.snap(b.x/g-f.x)+f.x)*g,a.x=Math.abs(a.x-d)<c?0:this.snap(a.x/g)*g-d),e||(b=b.y-(this.snap(b.y/g-f.y)+f.y)*g,a.y=Math.abs(a.y-b)<c?0:this.snap(a.y/g)*g-b)):(c=.5*g,d||(d=b.x-(Math.round(b.x/g-f.x)+f.x)*g,a.x=Math.abs(a.x-d)<c?0:Math.round(a.x/g)*g-d),e||(b=b.y-(Math.round(b.y/g-f.y)+f.y)*g,a.y=Math.abs(a.y-b)<c?0:Math.round(a.y/g)*g-b));return a};
mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";var f=this.shiftPreview1;for(d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&(null!=c.parentNode&&c.parentNode.parentNode==this.container?this.container.insertBefore(this.shiftPreview1,c.parentNode):this.container.appendChild(this.shiftPreview1));
null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f;f=this.container.clientHeight-f;var k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=
(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x/m+n*c/m):l.x,b?Math.floor(l.y-k.y/m+p*d/m):l.y)};
mxGraph.prototype.zoom=function(a,b,c){b=null!=b?b:this.centerZoom;var d=Math.round(this.view.scale*a*100)/100;null!=c&&(d=Math.round(d*c)/c);c=this.view.getState(this.getSelectionCell());a=d/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=c)a=new mxRectangle(c.x*a,c.y*a,c.width*a,c.height*a),this.view.scale=d,this.scrollRectToVisible(a)||(this.view.revalidate(),this.view.setScale(d));else if(c=mxUtils.hasScrollbars(this.container),b&&!c){c=this.container.offsetWidth;var e=this.container.offsetHeight;
1<a?(a=(a-1)/(2*d),c*=-a,e*=-a):(a=(1/a-1)/(2*this.view.scale),c*=a,e*=a);this.view.scaleAndTranslate(d,this.view.translate.x+c,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(d);c&&(e=c=0,b&&(c=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+c),this.container.scrollTop=(this.view.translate.y-
g)*this.view.scale+Math.round(l*a+e))}};
mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,a.y-=Math.min(a.y,c),d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,a.x-=Math.min(a.x,c),c=Math.min(this.container.scrollWidth,
a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y;a=this.view.getState(a);null!=a&&(c=new mxRectangle(c+a.x,d+a.y,a.width,a.height),b&&null!=this.container&&(b=this.container.clientWidth,d=this.container.clientHeight,c.x=c.getCenterX()-b/2,c.width=b,c.y=c.getCenterY()-d/2,c.height=d),b=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(c)&&(c=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x=
b.x,this.view.translate.y=b.y,this.view.setTranslate(c.x,c.y)))};
mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x;d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));this.useScrollbarsForPanning||0==d&&0==g||this.view.setTranslate(d,g)}else{g=-this.view.translate.x;var k=-this.view.translate.y,l=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/l,b=!0);a.y+f>k+d&&(this.view.translate.y-=(a.y+f-d-k)/l,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/l,b=!0);a.y<k&&(this.view.translate.y+=(k-a.y)/l,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
mxGraph.prototype.isTransparentClickEvent=function(a){return!1};mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)&&!mxEvent.isAltDown(a)};mxGraph.prototype.isIgnoreTerminalEvent=function(a){return!1};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};
mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
"\n"}e=this.model.getDirectedEdgeCount(b,!0,a);var f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var k=this.multiplicities[g].check(this,a,b,c,e,f);null!=k&&(d+=k)}k=this.validateEdge(a,b,c);null!=k&&(d+=k);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");b=this.validateCell(a,b);null!=b&&(d+=b);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(b>f.max||b<f.min)?d+=f.countError+"\n":!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(c>f.max||c<f.min)&&(d+=f.countError+"\n")}return 0<d.length?d:null};
mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.getCurrentCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};
mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){return"wrap"==this.getCurrentCellStyle(a)[mxConstants.STYLE_WHITE_SPACE]};mxGraph.prototype.isLabelClipped=function(a){return"hidden"==this.getCurrentCellStyle(a)[mxConstants.STYLE_OVERFLOW]};
mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;null!=a&&(null==a.control||b!=a.control.node&&b.parentNode!=a.control.node||(e=this.collapseExpandResource,e=mxUtils.htmlEntities(mxResources.get(e)||e).replace(/\\n/g,"<br>")),null==e&&null!=a.overlays&&a.overlays.visit(function(f,g){null!=e||b!=g.node&&b.parentNode!=g.node||(e=mxUtils.htmlEntities(g.overlay.toString()).replace(/\\n/g,"<br>"))}),null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&
(e=c.getTooltipForNode(b))),null==e&&(e=this.getTooltipForCell(a.cell)));return e};mxGraph.prototype.getTooltipForCell=function(a){return null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getLinkForCell=function(a){return null};mxGraph.prototype.getLinkTargetForCell=function(a){return null};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
mxGraph.prototype.getStartSize=function(a,b){var c=new mxRectangle;a=this.getCurrentCellStyle(a,b);b=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?c.height=b:c.width=b;return c};
mxGraph.prototype.getSwimlaneDirection=function(a){var b=mxUtils.getValue(a,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),c=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPH,0),d=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPV,0);a=mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?0:3;b==mxConstants.DIRECTION_NORTH?a--:b==mxConstants.DIRECTION_WEST?a+=2:b==mxConstants.DIRECTION_SOUTH&&(a+=1);b=mxUtils.mod(a,2);c&&1==b&&(a+=2);d&&0==b&&(a+=2);return[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,
mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST][mxUtils.mod(a,4)]};mxGraph.prototype.getActualStartSize=function(a,b){var c=new mxRectangle;this.isSwimlane(a,b)&&(b=this.getCurrentCellStyle(a,b),a=parseInt(mxUtils.getValue(b,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),b=this.getSwimlaneDirection(b),b==mxConstants.DIRECTION_NORTH?c.y=a:b==mxConstants.DIRECTION_WEST?c.x=a:b==mxConstants.DIRECTION_SOUTH?c.height=a:c.width=a);return c};
mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};mxGraph.prototype.isTransparentState=function(a){var b=!1;if(null!=a){b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE);var c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);b=b==mxConstants.NONE&&c==mxConstants.NONE&&null==this.getImage(a)}return b};
mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
mxGraph.prototype.isSwimlane=function(a,b){return null==a||this.model.getParent(a)==this.model.getRoot()||this.model.isEdge(a)?!1:this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
mxGraph.prototype.setEnabled=function(a){this.enabled=a;this.fireEvent(new mxEventObject("enabledChanged","enabled",a))};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellCloneable(b)}))};
mxGraph.prototype.isCellCloneable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.canExportCell(b)}))};mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};
mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.canImportCell(b)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};
mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellDeletable(b)}))};mxGraph.prototype.isCellDeletable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};
mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.getRotatableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellRotatable(b)}))};mxGraph.prototype.isCellRotatable=function(a){return 0!=this.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATABLE]};
mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellMovable(b)}))};mxGraph.prototype.isCellMovable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};
mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};
mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};
mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};
mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};
mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.getResizableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellResizable(b)}))};
mxGraph.prototype.isCellResizable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};
mxGraph.prototype.isCellBendable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};mxGraph.prototype.getEditableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(b){return this.isCellEditable(b)}))};
mxGraph.prototype.isCellEditable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
mxGraph.prototype.isConnectable=function(){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};mxGraph.prototype.isAutoSizeCell=function(a){a=this.getCurrentCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};
mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(a){return this.extendParentsOnAdd};
mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(a){return this.recursiveResize};mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};
mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isConstrainRelativeChildren=function(){return this.constrainRelativeChildren};mxGraph.prototype.setConstrainRelativeChildren=function(a){this.constrainRelativeChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};
mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(c){return this.isCellFoldable(c,b)}))};
mxGraph.prototype.isCellFoldable=function(a,b){b=this.getCurrentCellStyle(a);return 0<this.model.getChildCount(a)&&0!=b[mxConstants.STYLE_FOLDABLE]};mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&!this.isCellLocked(a)&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
mxGraph.prototype.getDropTarget=function(a,b,c,d){if(!this.isSwimlaneNesting())for(var e=0;e<a.length;e++)if(this.isSwimlane(a[e]))return null;e=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));e.x-=this.panDx;e.y-=this.panDy;e=this.getSwimlaneAt(e.x,e.y);if(null==c)c=e;else if(null!=e){for(var f=this.model.getParent(e);null!=f&&this.isSwimlane(f)&&f!=c;)f=this.model.getParent(f);f==c&&(c=e)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
if(null==d||!d)for(var g=c;null!=g&&0>mxUtils.indexOf(a,g);)g=this.model.getParent(g);return this.model.isLayer(c)||null!=g?null:c};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
mxGraph.prototype.getSwimlaneAt=function(a,b,c){null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.model.getRoot()));if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e);if(null!=f){var g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isCellVisible(f)&&this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}}return null};
mxGraph.prototype.getCellAt=function(a,b,c,d,e,f){d=null!=d?d:!0;e=null!=e?e:!0;null==c&&(c=this.getCurrentRoot(),null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var g=this.model.getChildCount(c)-1;0<=g;g--){var k=this.model.getChildAt(c,g),l=this.getCellAt(a,b,k,d,e,f);if(null!=l)return l;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||d&&this.model.isVertex(k))&&(l=this.view.getState(k),null!=l&&(null==f||!f(l,a,b))&&this.intersects(l,a,b)))return k}return null};
mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],k=this.isCellCollapsed(a),l=this.model.getChildCount(a),m=0;m<l;m++){var n=this.model.getChildAt(a,m);if(k||!this.isCellVisible(n))g=g.concat(this.model.getEdges(n,c,d))}g=g.concat(this.model.getEdges(a,c,d));k=[];for(m=0;m<g.length;m++)n=this.view.getState(g[m]),l=null!=n?n.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[m],!0),n=null!=n?n.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[m],
!1),(e&&l==n||l!=n&&(c&&n==a&&(null==b||this.isValidAncestor(l,b,f))||d&&l==a&&(null==b||this.isValidAncestor(n,b,f))))&&k.push(g[m]);return k};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0);k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0);g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){a=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));var c=this.view.scale,d=this.view.translate;b=0!=b?this.gridSize/2:0;a.x=this.snap(a.x/c-d.x-b);a.y=this.snap(a.y/c-d.y-b);return a};
mxGraph.prototype.getCells=function(a,b,c,d,e,f,g,k,l){f=null!=f?f:[];if(0<c||0<d||null!=g){var m=this.getModel(),n=a+c,p=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=m.getRoot()));if(null!=e)for(var q=m.getChildCount(e),r=0;r<q;r++){var t=m.getChildAt(e,r),u=this.view.getState(t);if(null!=u&&this.isCellVisible(t)&&(null==k||!k(u))){var x=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=x&&(u=mxUtils.getBoundingBox(u,x));(x=null!=g&&m.isVertex(t)&&mxUtils.intersects(g,u)||null!=g&&
m.isEdge(t)&&mxUtils.intersects(g,u)||null==g&&(m.isEdge(t)||m.isVertex(t))&&u.x>=a&&u.y+u.height<=p&&u.y>=b&&u.x+u.width<=n)&&f.push(t);x&&!l||this.getCells(a,b,c,d,t,f,g,k,l)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,q=0,r=0;r<n.length;r++)this.view.getVisibleTerminal(n[r],!0)==m?p++:q++;(c&&0==p&&0<q||!c&&0==q&&0<p)&&d.push(m);n=c?q-p:p-q;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e,f){if(null!=c&&null!=a&&(b=null!=b?b:!0,f=null!=f?f:!1,e=e||new mxDictionary,null==d||!e.get(d))&&(e.put(d,!0),d=c(a,d),null==d||d)&&(d=this.model.getEdgeCount(a),0<d))for(var g=0;g<d;g++){var k=this.model.getEdgeAt(a,g),l=this.model.getTerminal(k,!0)==a;b&&!f!=l||(l=this.model.getTerminal(k,!l),this.traverse(l,b,c,k,e,f))}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};
mxGraph.prototype.isAncestorSelected=function(a){for(a=this.model.getParent(a);null!=a&&a!=this.getCurrentRoot();){if(this.isCellSelected(a))return!0;a=this.model.getParent(a)}return!1};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};
mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};
mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){a=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(a,b);return a};mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();d=null!=e?this.model.getParent(e):this.getDefaultParent();var f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):null!=e&&!b||null==this.view.getState(d)||null==this.model.getGeometry(d)?null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,
b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a)):this.getCurrentRoot()!=d&&this.setSelectionCell(d)};mxGraph.prototype.selectAll=function(a,b){a=a||this.getDefaultParent();b=b?this.model.filterDescendants(mxUtils.bind(this,function(c){return c!=a&&null!=this.view.getState(c)}),a):this.model.getChildren(a);null!=b&&this.setSelectionCells(b)};mxGraph.prototype.selectVertices=function(a,b){this.selectCells(!0,!1,a,b)};
mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};mxGraph.prototype.selectCells=function(a,b,c,d){c=c||this.getDefaultParent();var e=mxUtils.bind(this,function(f){return null!=this.view.getState(f)&&((d||0==this.model.getChildCount(f))&&this.model.isVertex(f)&&a&&!this.model.isEdge(this.model.getParent(f))||this.model.isEdge(f)&&b)});c=this.model.filterDescendants(e,c);null!=c&&this.setSelectionCells(c)};
mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):c&&1==this.getSelectionCount()||this.setSelectionCell(a)};mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
mxGraph.prototype.createHandler=function(a){var b=null;if(null!=a)if(this.model.isEdge(a.cell)){b=a.getVisibleTerminalState(!0);var c=a.getVisibleTerminalState(!1),d=this.getCellGeometry(a.cell);b=this.view.getEdgeStyle(a,null!=d?d.points:null,b,c);b=this.createEdgeHandler(a,b)}else b=this.createVertexHandler(a);return b};mxGraph.prototype.createVertexHandler=function(a){return new mxVertexHandler(a)};
mxGraph.prototype.createEdgeHandler=function(a,b){return b==mxEdgeStyle.Loop||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(a):new mxEdgeHandler(a)};mxGraph.prototype.createEdgeSegmentHandler=function(a){return new mxEdgeSegmentHandler(a)};mxGraph.prototype.createElbowEdgeHandler=function(a){return new mxElbowEdgeHandler(a)};
mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};
mxGraph.prototype.updateMouseEvent=function(a,b){if(null==a.graphX||null==a.graphY){var c=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=c.x-this.panDx;a.graphY=c.y-this.panDy;null==a.getCell()&&this.isMouseDown&&b==mxEvent.MOUSE_MOVE&&(a.state=this.view.getState(this.getCellAt(c.x,c.y,null,null,null,function(d){return null==d.shape||d.shape.paintBackground!=mxRectangleShape.prototype.paintBackground||"1"==mxUtils.getValue(d.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=d.shape.fill&&
d.shape.fill!=mxConstants.NONE})))}return a};mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=!1;b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();if(null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE)mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null;else if(!mxClient.IS_GC&&null!=this.eventSource&&b.getSource()!=this.eventSource)e=!0;else if(mxClient.IS_TOUCH&&a==mxEvent.MOUSE_DOWN&&
!d&&!mxEvent.isPenEvent(b.getEvent())){this.eventSource=b.getSource();var f=null;!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC||(f=b.getEvent().pointerId);this.mouseMoveRedirect=mxUtils.bind(this,function(g){null!=f&&g.pointerId!=f||this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g,this.getStateForTouchEvent(g)))});this.mouseUpRedirect=mxUtils.bind(this,function(g){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g,this.getStateForTouchEvent(g)));f=null});mxEvent.addGestureListeners(this.eventSource,
null,this.mouseMoveRedirect,this.mouseUpRedirect)}this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail)return!0;a==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:a!=mxEvent.MOUSE_DOWN||this.isMouseDown?!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(e=!0):(this.isMouseDown=!0,this.isMouseTrigger=
d);e||a!=mxEvent.MOUSE_DOWN||(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&!b&&a==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0);return c};
mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource(),d=null!=c.nodeName?c.nodeName.toLowerCase():"";b=!mxEvent.isMouseEvent(b.getEvent())||mxEvent.isLeftMouseButton(b.getEvent());return a==mxEvent.MOUSE_DOWN&&b&&("select"==d||"option"==d||"input"==d&&"checkbox"!=c.type&&"radio"!=c.type&&"button"!=c.type&&"submit"!=c.type&&"file"!=c.type)};mxGraph.prototype.getEventState=function(a){return a};
mxGraph.prototype.isPointerEventIgnored=function(a,b){var c=!1;if(mxClient.IS_ANDROID||!mxClient.IS_LINUX||!mxClient.IS_GC){var d=b.getEvent().pointerId;a==mxEvent.MOUSE_DOWN?null!=this.currentPointerId&&this.currentPointerId!=d?c=!0:null==this.currentPointerId&&(this.currentPointerId=b.getEvent().pointerId):a==mxEvent.MOUSE_MOVE?null!=this.currentPointerId&&this.currentPointerId!=d&&(c=!0):a==mxEvent.MOUSE_UP&&(this.currentPointerId=null)}return c};
mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else if(this.isPointerEventIgnored(a,b))this.tapAndHoldValid=!1;else{null==c&&(c=this);b=this.updateMouseEvent(b,a);if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))){var d=(new Date).getTime();if(a==mxEvent.MOUSE_DOWN)if(null!=this.lastTouchEvent&&
this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){if(this.doubleClickCounter++,d=!1,a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,d=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),d),d=!0):(this.fireDoubleClick=!0,this.lastTouchTime=0),d){mxEvent.consume(b.getEvent());
return}}else{if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;d=this.lastTouchCell;this.lastTouchCell=null;this.isMouseDown=!1;(null!=d||(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))&&(mxClient.IS_GC||mxClient.IS_SF))&&
Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),d):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){b.state=this.getEventState(b.getState());this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE11||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=this.container){if(a==mxEvent.MOUSE_MOVE&&
this.isMouseDown&&this.autoScroll&&!mxEvent.isMultiTouchEvent(b.getEvent))this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);else if(a==mxEvent.MOUSE_UP&&this.ignoreScrollbars&&this.translateToScrollPosition&&(0!=this.container.scrollLeft||0!=this.container.scrollTop)){d=this.view.scale;var e=this.view.translate;this.view.setTranslate(e.x-this.container.scrollLeft/d,e.y-this.container.scrollTop/d);this.container.scrollLeft=0;this.container.scrollTop=0}if(null!=this.mouseListeners)for(d=
[c,b],b.getEvent().preventDefault||(b.getEvent().returnValue=!0),e=0;e<this.mouseListeners.length;e++){var f=this.mouseListeners[e];a==mxEvent.MOUSE_DOWN?f.mouseDown.apply(f,d):a==mxEvent.MOUSE_MOVE?f.mouseMove.apply(f,d):a==mxEvent.MOUSE_UP&&f.mouseUp.apply(f,d)}a==mxEvent.MOUSE_UP&&this.click(b)}(mxEvent.isTouchEvent(b.getEvent())||mxEvent.isPenEvent(b.getEvent()))&&a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),
this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-
b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent())&&this.stopEditing(!this.isInvokesStopCellEditing());this.consumeMouseEvent(a,b,c)}}};mxGraph.prototype.consumeMouseEvent=function(a,b,c){this.fireEvent(new mxEventObject(mxEvent.CONSUME_MOUSE_EVENT,"eventName",a,"event",b));a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)};
mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=.5;
mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=this.image.width,e=this.image.height;if(b)if(b=a.absolutePoints,1==b.length%2)b=b[Math.floor(b.length/2)];else{var f=b.length/2;a=b[f-1];b=b[f];b=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2)}else b=new mxPoint,b.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,b.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
a.y+a.height/2:a.y+a.height;return new mxRectangle(Math.round(b.x-(d*this.defaultOverlap-this.offset.x)*c),Math.round(b.y-(e*this.defaultOverlap-this.offset.y)*c),d*c,e*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.container=null;mxOutline.prototype.enabled=!0;mxOutline.prototype.suspended=!1;mxOutline.prototype.border=14;
mxOutline.prototype.opacity=mxClient.IS_IE11?.9:.7;
mxOutline.prototype.init=function(a){this.container=a;this.updateHandler=mxUtils.bind(this,function(b,c){this.update(!0)});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.source.addListener(mxEvent.REFRESH,this.updateHandler);a=this.source.getView();a.addListener(mxEvent.UP,this.updateHandler);a.addListener(mxEvent.DOWN,this.updateHandler);a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,
this.updateHandler);this.scrollHandler=mxUtils.bind(this,function(b,c){this.update(!1)});mxEvent.addListener(this.source.container,"scroll",this.scrollHandler);this.source.addListener(mxEvent.PAN,this.scrollHandler);this.update(!0)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.isSuspended=function(){return this.suspended};mxOutline.prototype.setSuspended=function(a){this.suspended=a;this.update(!0)};
mxOutline.prototype.isScrolling=function(){return this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)};
mxOutline.prototype.createSvg=function(){var a=document.createElementNS(mxConstants.NS_SVG,"svg");a.style.position="absolute";a.style.left="0px";a.style.top="0px";a.style.width="100%";a.style.height="100%";a.style.display="block";a.style.padding=this.border+"px";a.style.boxSizing="border-box";a.style.overflow="visible";a.style.cursor="default";a.setAttribute("shape-rendering","optimizeSpeed");a.setAttribute("image-rendering","optimizeSpeed");return a};
mxOutline.prototype.addGestureListeners=function(a){var b=null,c=0,d=0,e=1,f=mxUtils.bind(this,function(l){if(this.isEnabled()){b=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l));var m=a.clientWidth-2*this.border,n=a.clientHeight-2*this.border,p=this.getViewBox();e=Math.max(p.width/m,p.height/n);if(mxEvent.getSource(l)!=this.viewport)if(this.isScrolling()){m-=p.width/e;n-=p.height/e;var q=this.svg.getBoundingClientRect();this.source.container.scrollLeft=p.x-m*e/2+(b.x-this.border-q.left)*
e;this.source.container.scrollTop=p.y-n*e/2+(b.y-this.border-q.top)*e}else p=this.source.view.translate,n=this.viewport.getBoundingClientRect(),m=(mxEvent.getClientX(l)-n.left)*e/this.source.view.scale,n=(mxEvent.getClientY(l)-n.top)*e/this.source.view.scale,this.source.getView().setTranslate(p.x-m,p.y-n),this.source.panGraph(0,0);mxEvent.addGestureListeners(document,null,g,k);c=this.source.container.scrollLeft;d=this.source.container.scrollTop;mxEvent.consume(l)}}),g=mxUtils.bind(this,function(l){this.isEnabled()&&
null!=b&&(this.isScrolling()?(this.source.container.scrollLeft=c+(mxEvent.getClientX(l)-b.x)*e,this.source.container.scrollTop=d+(mxEvent.getClientY(l)-b.y)*e):this.source.panGraph((b.x-mxEvent.getClientX(l))*e,(b.y-mxEvent.getClientY(l))*e),mxEvent.consume(l))}),k=mxUtils.bind(this,function(l){if(this.isEnabled()&&null!=b){if(!this.isScrolling()){var m=(mxEvent.getClientX(l)-b.x)*e/this.source.view.scale,n=(mxEvent.getClientY(l)-b.y)*e/this.source.view.scale,p=this.source.view.translate;this.source.getView().setTranslate(p.x-
m,p.y-n);this.source.panGraph(0,0)}mxEvent.removeGestureListeners(document,null,g,k);mxEvent.consume(l);b=null}});mxEvent.addGestureListeners(a,f,g,k)};mxOutline.prototype.getViewBox=function(){return this.source.getGraphBounds()};
mxOutline.prototype.updateSvg=function(){null==this.svg&&(this.svg=this.createSvg(),this.addGestureListeners(this.svg),this.container.appendChild(this.svg));var a=this.getViewBox();this.svg.setAttribute("viewBox",Math.round(a.x)+" "+Math.round(a.y)+" "+Math.round(a.width)+" "+Math.round(a.height));a=mxUtils.getLightDarkColor(null==this.source.background||this.source.background==mxConstants.NONE?this.source.defaultPageBackgroundColor:this.source.background).cssText;this.svg.style.backgroundColor=a;
this.updateDrawPane()};mxOutline.prototype.updateDrawPane=function(){null!=this.drawPane&&this.drawPane.parentNode.removeChild(this.drawPane);this.drawPane=this.source.view.getDrawPane().cloneNode(!0);this.drawPane.style.opacity=this.opacity;this.processSvg(this.drawPane);null!=this.viewport?this.svg.insertBefore(this.drawPane,this.viewport):this.svg.appendChild(this.drawPane)};
mxOutline.prototype.processSvg=function(a){var b=mxClient.IS_IE11?Math.max(1,this.source.view.scale):this.source.view.scale;Array.prototype.slice.call(a.getElementsByTagName("*")).forEach(mxUtils.bind(this,function(c){if("text"!=c.nodeName&&"foreignObject"!=c.nodeName&&"hidden"!=c.getAttribute("visibility")&&c instanceof SVGElement){var d=parseInt(c.getAttribute("stroke-width")||1);isNaN(d)||c.setAttribute("stroke-width",Math.max(mxClient.IS_IE11?4:1,d/(5*b)));c.setAttribute("vector-effect","non-scaling-stroke");
c.style.cursor=""}else c.parentNode.removeChild(c)}))};
mxOutline.prototype.updateViewport=function(){if(null!=this.svg){null==this.viewport&&(this.viewport=this.createViewport(),this.svg.appendChild(this.viewport));var a=this.source.container;a=new mxRectangle(a.scrollLeft,a.scrollTop,a.clientWidth,a.clientHeight);this.isScrolling()||(a.x=-this.source.panDx,a.y=-this.source.panDy);this.viewport.setAttribute("x",a.x);this.viewport.setAttribute("y",a.y);this.viewport.setAttribute("width",a.width);this.viewport.setAttribute("height",a.height)}};
mxOutline.prototype.createViewport=function(){var a=this.svg.ownerDocument.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("stroke-width",mxClient.IS_IE11?"12":"3");a.setAttribute("stroke",HoverIcons.prototype.arrowFill);a.setAttribute("fill",HoverIcons.prototype.arrowFill);a.setAttribute("vector-effect","non-scaling-stroke");a.setAttribute("fill-opacity",.2);a.style.cursor="move";return a};
mxOutline.prototype.update=function(a){null!=this.source&&null!=this.source.container&&(null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null),this.fullUpdate=this.fullUpdate||a,this.thread=window.setTimeout(mxUtils.bind(this,function(){this.isSuspended()||(this.fullUpdate&&this.updateSvg(),this.updateViewport());this.thread=this.fullUpdate=null}),this.isScrolling()?10:0))};
mxOutline.prototype.destroy=function(){null!=this.svg&&(this.svg.parentNode.removeChild(this.svg),this.svg=null);null!=this.source&&(this.source.removeListener(this.scrollHandler),this.source.removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),this.source.getModel().removeListener(this.updateHandler),mxEvent.removeListener(this.source.container,"scroll",this.scrollHandler),this.source=null)};
function mxMultiplicity(a,b,c,d,e,f,g,k,l,m){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(k)||k;this.typeError=mxResources.get(l)||l;this.validNeighborsAllowed=null!=m?m:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;
mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b))null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max))&&(g+=this.countError+"\n"),null!=this.validNeighbors&&null!=this.typeError&&0<this.validNeighbors.length&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"));return 0<g.length?g:null};
mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};
function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.resizeHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.cellsResized(c.getProperty("cells"),c.getProperty("bounds"),c.getProperty("previous"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;
mxLayoutManager.prototype.constructor=mxLayoutManager;mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.undoHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.resizeHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};
mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};mxLayoutManager.prototype.getGraph=function(){return this.graph};
mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler);this.graph.removeListener(this.resizeHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler),this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler))};
mxLayoutManager.prototype.hasLayout=function(a){return null!=this.getLayout(a,mxEvent.LAYOUT_CELLS)};mxLayoutManager.prototype.getLayout=function(a,b){return null};mxLayoutManager.prototype.beforeUndo=function(a){this.executeLayoutForCells(this.getCellsForChanges(a.changes))};
mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b){b=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b));for(var c=this.getGraph().getModel(),d=0;d<a.length;d++){var e=this.getLayout(c.getParent(a[d]),mxEvent.MOVE_CELLS);null!=e&&e.moveCell(a[d],b.x,b.y)}}};
mxLayoutManager.prototype.cellsResized=function(a,b,c){if(null!=a&&null!=b)for(var d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]),mxEvent.RESIZE_CELLS);null!=f&&f.resizeCell(a[e],b[e],c[e])}};mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)return[];b=b.concat(this.getCellsForChange(d))}return b};
mxLayoutManager.prototype.getCellsForChange=function(a){return a instanceof mxChildChange?this.addCellsWithLayout(a.child,this.addCellsWithLayout(a.previous)):a instanceof mxValueChange||a instanceof mxTerminalChange||a instanceof mxGeometryChange||a instanceof mxVisibleChange||a instanceof mxStyleChange?this.addCellsWithLayout(a.cell):[]};mxLayoutManager.prototype.addCellsWithLayout=function(a,b){return this.addDescendantsWithLayout(a,this.addAncestorsWithLayout(a,b))};
mxLayoutManager.prototype.addAncestorsWithLayout=function(a,b){b=null!=b?b:[];if(null!=a&&(this.hasLayout(a)&&b.push(a),this.isBubbling())){var c=this.getGraph().getModel();this.addAncestorsWithLayout(c.getParent(a),b)}return b};mxLayoutManager.prototype.addDescendantsWithLayout=function(a,b){b=null!=b?b:[];if(null!=a&&this.hasLayout(a))for(var c=this.getGraph().getModel(),d=0;d<c.getChildCount(a);d++){var e=c.getChildAt(a,d);this.hasLayout(e)&&(b.push(e),this.addDescendantsWithLayout(e,b))}return b};
mxLayoutManager.prototype.executeLayoutForCells=function(a){var b=this.getGraph().getModel();b.beginUpdate();try{var c=mxUtils.sortCells(a,!1);this.layoutCells(c,!0);this.layoutCells(c.reverse(),!1)}finally{b.endUpdate()}};
mxLayoutManager.prototype.layoutCells=function(a,b){if(0<a.length){var c=this.getGraph().getModel();c.beginUpdate();try{for(var d=null,e=0;e<a.length;e++)a[e]!=c.getRoot()&&a[e]!=d&&(this.executeLayout(a[e],b),d=a[e]);this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{c.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){b=this.getLayout(a,b?mxEvent.BEGIN_UPDATE:mxEvent.END_UPDATE);null!=b&&b.execute(a)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(e,f){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(f.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(e,f){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(f.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){f=g;g=b.getParent(g);var k=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=k.width;e.height+=k.height}var l=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
e.height,l)}}}finally{b.endUpdate()}}};
mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);null!=g&&(d&&g.height!=c||!d&&g.width!=b)&&(g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g))}var k=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=k.width;c-=k.height;var l=e.getChildCount(a);for(d=0;d<l;d++){var m=e.getChildAt(a,d);this.resizeSwimlane(m,b,c,f)}}finally{e.endUpdate()}};
mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};
function mxTemporaryCellStates(a,b,c,d,e,f){b=null!=b?b:1;this.view=a;this.oldValidateCellState=a.validateCellState;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();this.oldDoRedrawShape=a.graph.cellRenderer.doRedrawShape;var g=this;null!=e&&(a.graph.cellRenderer.doRedrawShape=function(m){var n=m.shape.paint;m.shape.paint=function(p){var q=e(m);null!=q&&p.setLink(q,null!=f?f(m):null);n.apply(this,arguments);null!=q&&p.setLink(null)};g.oldDoRedrawShape.apply(a.graph.cellRenderer,
arguments);m.shape.paint=n});a.validateCellState=function(m,n){return null==m||null==d||d(m)?g.oldValidateCellState.apply(a,arguments):null};a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var k=0;k<c.length;k++){var l=a.getBoundingBox(a.validateCellState(a.validateCell(c[k])));null==b?b=l:b.add(l)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;mxTemporaryCellStates.prototype.oldStates=null;
mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds);this.view.validateCellState=this.oldValidateCellState;this.view.graph.cellRenderer.doRedrawShape=this.oldDoRedrawShape};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;
mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(b,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);0==b&&0==c||null==e||e.relative&&null==this.deltas.get(a.cell)||(a.x+=b,a.y+=c)}e=d.getChildCount(a.cell);for(var f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));0==b&&0==c||null==f||!f.relative||!e.isVertex(a.cell)||null!=g&&!e.isVertex(g.cell)&&null==this.deltas.get(a.cell)||(a.x+=b,a.y+=c);this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b,c,d,e){this.point=a;this.perimeter=null!=b?b:!0;this.name=c;this.dx=d?d:0;this.dy=e?e:0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;mxConnectionConstraint.prototype.name=null;
mxConnectionConstraint.prototype.dx=null;mxConnectionConstraint.prototype.dy=null;
function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.suspended||(this.updatePreview(),this.updateHint())});this.graph.addListener(mxEvent.PAN,this.panHandler);this.escapeHandler=mxUtils.bind(this,function(b,c){this.reset()});this.graph.addListener(mxEvent.ESCAPE,this.escapeHandler);this.refreshHandler=mxUtils.bind(this,function(b,c){this.refreshThread&&window.clearTimeout(this.refreshThread);this.refreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.refreshThread=null;if(null!=this.first&&!this.suspended){var d=this.currentDx,e=this.currentDy;this.currentDy=this.currentDx=0;this.updatePreview();this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);null!=this.pBounds||this.livePreviewUsed?(this.currentDx=d,this.currentDy=e,this.updatePreview(),this.updateHint(),this.livePreviewUsed&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1,!0),
this.updatePreview())):this.reset()}}),0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.addListener(mxEvent.REFRESH,this.refreshHandler);this.keyHandler=mxUtils.bind(this,function(b){null==this.graph.container||"hidden"==this.graph.container.style.visibility||null==this.first||this.suspended||(b=this.graph.isCloneEvent(b)&&this.graph.isCellsCloneable()&&this.isCloneEnabled(),b!=this.cloning&&(this.cloning=b,this.checkPreview(),this.updatePreview()))});mxEvent.addListener(document,
"keydown",this.keyHandler);mxEvent.addListener(document,"keyup",this.keyHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;mxGraphHandler.prototype.handlesVisible=!0;mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;
mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.removeEmptyParents=!1;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;
mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.maxLivePreview=0;mxGraphHandler.prototype.allowLivePreview=mxClient.IS_SVG;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b,c){var d=this.graph.model.getParent(a);return b?(b=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),!this.graph.isSiblingSelected(a)&&(null!=b&&b.relative||!this.graph.isSwimlane(d))):(!this.graph.isToggleEvent(c.getEvent())||!this.graph.isSiblingSelected(a)&&!this.graph.isCellSelected(a)&&!this.graph.isSwimlane(d)||this.graph.isCellSelected(d))&&(this.graph.isToggleEvent(c.getEvent())||!this.graph.isCellSelected(d))};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!(this.graph.isToggleEvent(a.getEvent())&&mxEvent.isAltDown(a.getEvent())||null==b||this.graph.isCellSelected(b.cell)))for(var c=this.graph.model,d=this.graph.view.getState(c.getParent(b.cell));null!=d&&!this.graph.isCellSelected(d.cell)&&(c.isVertex(d.cell)||c.isEdge(d.cell))&&this.isPropagateSelectionCell(b.cell,!0,a)&&d.cell!=this.graph.getCurrentRoot();)b=d,d=this.graph.view.getState(this.graph.getModel().getParent(b.cell));
return null!=b?b.cell:null};mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent())||!mxEvent.isAltDown(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);this.selectCellForEvent(b,a)}};
mxGraphHandler.prototype.selectCellForEvent=function(a,b){var c=this.graph.view.getState(a);if(null!=c){if(!(b.isSource(c.control)||this.graph.isToggleEvent(b.getEvent())&&mxEvent.isAltDown(b.getEvent()))){c=this.graph.getModel();for(var d=c.getParent(a);null!=this.graph.view.getState(d)&&(c.isVertex(d)||c.isEdge(d)&&!this.graph.isToggleEvent(b.getEvent()))&&this.isPropagateSelectionCell(a,!1,b)&&d!=this.graph.getCurrentRoot();)a=d,d=c.getParent(a)}this.graph.selectCellForEvent(a,b.getEvent())}return a};
mxGraphHandler.prototype.consumeMouseEvent=function(a,b){b.consume()};
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();a=b.getEvent();var c=mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)&&!this.graph.isSelectionEmpty();if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null!=b.getState()||c)&&!mxEvent.isMultiTouchEvent(a)){var d=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(d,b);this.cell=null;null==d&&c&&(d=this.graph.getSelectionCell());c=this.graph.getSelectionCount();this.isSelectEnabled()&&
!this.delayedSelection&&this.graph.selectCellForEvent(d,a);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(d)&&0<c&&(this.delayedSelection=this.blockDelayedSelection=!0);this.isMoveEnabled()&&(this.delayedSelection?this.cell=d:this.start(d,b.getX(),b.getY()),this.cellWasClicked=!0,this.graph.isCellLocked(d)||this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b))}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};
mxGraphHandler.prototype.getCells=function(a,b){if(null==b&&!this.delayedSelection&&this.graph.isCellMovable(a))return[this.graph.getCompositeParent(a)];b=null!=b?b:this.graph.getSelectionCells();a=new mxDictionary;for(var c=[],d=0;d<b.length;d++){var e=this.graph.getCompositeParent(b[d]);null==a.get(e)&&(a.put(e,!0),c.push(e))}b=[];for(d=0;d<c.length;d++){for(e=this.graph.model.getParent(c[d]);null==a.get(e)&&null!=e;)e=this.graph.model.getParent(e);null==e&&b.push(c[d])}return this.graph.getMovableCells(b)};
mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.width=Math.max(0,a.width-1),a.height=Math.max(0,a.height-1),a.width<this.minimumSize?(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize):(a.x=Math.round(a.x),a.width=Math.ceil(a.width)),a.height<this.minimumSize?(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize):(a.y=Math.round(a.y),a.height=Math.ceil(a.height)));return a};
mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&null!=e.shape&&null!=e.shape.boundingBox&&(f=e.shape.boundingBox);null==b?b=mxRectangle.fromRectangle(f):b.add(f)}}return b};
mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1,mxClient.IS_IOS&&(a.getSvgScreenOffset=function(){return 0}));return a};
mxGraphHandler.prototype.start=function(a,b,c,d){var e=this.graph.model,f=e.getGeometry(a);if(null==this.first&&this.graph.isCellMovable(a)&&(!e.isEdge(a)||1<this.graph.getSelectionCount()||null!=f.points&&0<f.points.length||null==e.getTerminal(a,!0)||null==e.getTerminal(a,!1)||this.graph.allowDanglingEdges)){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=null!=d?d:this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);
this.allCells=new mxDictionary;this.cloning=!1;for(b=this.cellCount=0;b<this.cells.length;b++)this.cellCount+=this.addStates(this.cells[b],this.allCells);if(this.guidesEnabled){this.guide=new mxGuide(this.graph,this.getGuideStates());var g=this.graph.model.getParent(a),k=2>this.graph.model.getChildCount(g),l=new mxDictionary;a=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell);for(b=0;b<a.length;b++)c=this.graph.view.getState(a[b]),null==c||l.get(c)||l.put(c,!0);this.guide.isStateIgnored=
mxUtils.bind(this,function(m){var n=this.graph.model.getParent(m.cell);return null!=m.cell&&(!this.cloning&&this.isCellMoving(m.cell)||m.cell!=(this.target||g)&&!k&&!l.get(m)&&(null==this.target||2<=this.graph.model.getChildCount(this.target))&&n!=(this.target||g))})}}};
mxGraphHandler.prototype.addStates=function(a,b){var c=this.graph.view.getState(a),d=0;if(null!=c&&null==b.get(a)){b.put(a,c);d++;c=this.graph.model.getChildCount(a);for(var e=0;e<c;e++)d+=this.addStates(this.graph.model.getChildAt(a,e),b)}return d};mxGraphHandler.prototype.isCellMoving=function(a){return null!=this.allCells.get(a)};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(a.getEvent())&&!this.isConstrainedEvent(a):!0};
mxGraphHandler.prototype.snap=function(a){var b=this.scaleGrid?this.graph.view.scale:1;a.x=this.graph.snap(a.x/b)*b;a.y=this.graph.snap(a.y/b)*b;return a};mxGraphHandler.prototype.getDelta=function(a){a=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY());return new mxPoint(a.x-this.first.x-this.graph.panDx,a.y-this.first.y-this.graph.panDy)};mxGraphHandler.prototype.updateHint=function(a){};mxGraphHandler.prototype.removeHint=function(){};
mxGraphHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};mxGraphHandler.prototype.isValidDropTarget=function(a,b){for(b=0;b<this.cells.length;b++)if(this.graph.model.getParent(this.cells[b])!=a)return!0;return!1};
mxGraphHandler.prototype.checkPreview=function(){this.livePreviewActive&&this.cloning?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?this.cloning&&this.livePreviewActive||(this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds))};
mxGraphHandler.prototype.mouseMove=function(a,b){a=this.graph;var c=a.tolerance;if(null==this.first&&this.delayedSelection&&null!=this.cell&&null!=this.mouseDownX&&null!=this.mouseDownY&&(Math.abs(this.mouseDownX-b.getX())>c||Math.abs(this.mouseDownY-b.getY())>c)){this.delayedSelection=!1;this.cellWasClicked=!0;this.graph.isCellSelected(this.cell)||mxEvent.isAltDown(b.getEvent())||(this.graph.isToggleEvent(b.getEvent())?a.addSelectionCell(this.cell):this.graph.isAncestorSelected(this.cell)||a.setSelectionCell(this.cell));
var d=a.getSelectionCells();this.graph.isToggleEvent(b.getEvent())&&mxEvent.isAltDown(b.getEvent())&&!a.isSelectionEmpty()||(d=d.concat(this.cell));this.start(this.cell,this.mouseDownX,this.mouseDownY,this.getCells(null,d))}d=null!=this.first?this.getDelta(b):null;if(b.isConsumed()||!a.isMouseDown||null==this.cell||null==d||null==this.bounds||this.suspended)!this.isMoveEnabled()&&!this.isCloneEnabled()||!this.updateCursor||b.isConsumed()||null==b.getState()&&null==b.sourceState||a.isMouseDown||(d=
a.getCursorForMouseEvent(b),null==d&&a.isEnabled()&&a.isCellMovable(b.getCell())&&(d=a.getModel().isEdge(b.getCell())?mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=d&&null!=b.sourceState&&b.sourceState.setCursor(d));else if(mxEvent.isMultiTouchEvent(b.getEvent()))this.reset();else{if(null!=this.shape||this.livePreviewActive||this.cloning||Math.abs(d.x)>c||Math.abs(d.y)>c){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,
3));c=a.isCloneEvent(b.getEvent())&&a.isCellsCloneable()&&this.isCloneEnabled();var e=a.isGridEnabledEvent(b.getEvent()),f=b.getCell();f=null!=f&&0>mxUtils.indexOf(this.cells,f)?f:a.getCellAt(b.getGraphX(),b.getGraphY(),null,null,null,mxUtils.bind(this,function(n,p,q){return 0<=mxUtils.indexOf(this.cells,n.cell)}));var g=!0,k=null;this.cloning=c;a.isDropEnabled()&&this.highlightEnabled&&(k=a.getDropTarget(this.cells,b.getEvent(),f,c));var l=a.getView().getState(k),m=!1;null!=l&&(c||this.isValidDropTarget(k,
b))?(this.target!=k&&(this.target=k,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),m=!0):(this.target=null,this.connectOnDrop&&null!=f&&1==this.cells.length&&a.getModel().isVertex(f)&&a.isCellConnectable(f)&&(l=a.getView().getState(f),null!=l&&(f=null==a.getEdgeValidationError(null,this.cell,f)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(f),m=!0)));null!=l&&m?this.highlight.highlight(l):this.highlight.hide();null!=this.guide&&this.useGuidesForEvent(b)?
(d=this.guide.move(this.bounds,d,e,c),g=!1):d=a.snapDelta(d,this.bounds,!e,!1,!1);null!=this.guide&&g&&this.guide.hide();this.isConstrainedEvent(b)&&(Math.abs(d.x)>Math.abs(d.y)?d.y=0:d.x=0);this.checkPreview();if(this.currentDx!=d.x||this.currentDy!=d.y)this.currentDx=d.x,this.currentDy=d.y,this.updatePreview()}this.updateHint(b);this.consumeMouseEvent(mxEvent.MOUSE_MOVE,b);mxEvent.consume(b.getEvent())}};
mxGraphHandler.prototype.isConstrainedEvent=function(a){return(null==this.target||this.graph.isCloneEvent(a.getEvent()))&&this.graph.isConstrainedEvent(a.getEvent())};mxGraphHandler.prototype.updatePreview=function(a){this.livePreviewUsed&&!a?null!=this.cells&&(this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!1),this.updateLivePreview(this.currentDx,this.currentDy)):this.updatePreviewShape()};
mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&null!=this.pBounds&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};
mxGraphHandler.prototype.updateLivePreview=function(a,b){if(!this.suspended){var c=[];null!=this.allCells&&this.allCells.visit(mxUtils.bind(this,function(n,p){n=this.graph.view.getState(p.cell);n!=p&&(p.destroy(),null!=n?this.allCells.put(p.cell,n):this.allCells.remove(p.cell),p=n);if(null!=p&&(n=p.clone(),c.push([p,n]),null!=p.shape&&(null==p.shape.originalPointerEvents&&(p.shape.originalPointerEvents=p.shape.pointerEvents),p.shape.pointerEvents=!1,null!=p.text&&(null==p.text.originalPointerEvents&&
(p.text.originalPointerEvents=p.text.pointerEvents),p.text.pointerEvents=!1)),this.graph.model.isVertex(p.cell))){if(!this.cloning||this.graph.isCellCloneable(p.cell))p.x+=a,p.y+=b;this.cloning?null!=p.text&&(p.text.updateBoundingBox(),null!=p.text.boundingBox&&(p.text.boundingBox.x+=a,p.text.boundingBox.y+=b),null!=p.text.unrotatedBoundingBox&&(p.text.unrotatedBoundingBox.x+=a,p.text.unrotatedBoundingBox.y+=b)):(p.view.graph.cellRenderer.redraw(p,!0),p.view.invalidate(p.cell),p.invalid=!1,null!=
p.control&&null!=p.control.node&&(p.control.node.style.visibility="hidden"))}}));if(0==c.length)this.reset();else{for(var d=this.graph.view.scale,e=0;e<c.length;e++){var f=c[e][0];if(this.graph.model.isEdge(f.cell)&&(!this.cloning||this.graph.isCellCloneable(f.cell))){var g=this.graph.getCellGeometry(f.cell),k=[];if(null!=g&&null!=g.points)for(var l=0;l<g.points.length;l++)null!=g.points[l]&&k.push(new mxPoint(g.points[l].x+a/d,g.points[l].y+b/d));g=f.visibleSourceState;l=f.visibleTargetState;var m=
c[e][1].absolutePoints;null!=m&&(null!=g&&this.isCellMoving(g.cell)?f.view.updateFixedTerminalPoint(f,g,!0,this.graph.getConnectionConstraint(f,g,!0)):(g=m[0],f.setAbsoluteTerminalPoint(new mxPoint(g.x+a,g.y+b),!0),g=null),null!=l&&this.isCellMoving(l.cell)?f.view.updateFixedTerminalPoint(f,l,!1,this.graph.getConnectionConstraint(f,l,!1)):(l=m[m.length-1],f.setAbsoluteTerminalPoint(new mxPoint(l.x+a,l.y+b),!1),l=null));f.view.updatePoints(f,k,g,l);f.view.updateFloatingTerminalPoints(f,g,l);f.view.updateEdgeLabelOffset(f);
f.invalid=!1;this.cloning||f.view.graph.cellRenderer.redraw(f,!0)}}this.graph.view.validate();this.redrawHandles(c);this.resetPreviewStates(c)}}};mxGraphHandler.prototype.redrawHandles=function(a){for(var b=0;b<a.length;b++){var c=this.graph.selectionCellsHandler.getHandler(a[b][0].cell);null!=c&&c.redraw(!0)}};mxGraphHandler.prototype.resetPreviewStates=function(a){for(var b=0;b<a.length;b++)a[b][0].setState(a[b][1])};
mxGraphHandler.prototype.suspend=function(){this.suspended||(this.livePreviewUsed&&this.updateLivePreview(0,0),null!=this.shape&&(this.shape.node.style.visibility="hidden"),null!=this.guide&&this.guide.setVisible(!1),this.suspended=!0)};mxGraphHandler.prototype.resume=function(){this.suspended&&(this.suspended=null,this.livePreviewUsed&&(this.livePreviewActive=!0),null!=this.shape&&(this.shape.node.style.visibility="visible"),null!=this.guide&&this.guide.setVisible(!0))};
mxGraphHandler.prototype.resetLivePreview=function(){null!=this.allCells&&(this.allCells.visit(mxUtils.bind(this,function(a,b){null!=b.shape&&null!=b.shape.originalPointerEvents&&(b.shape.pointerEvents=b.shape.originalPointerEvents,b.shape.originalPointerEvents=null,b.shape.bounds=null,null!=b.text&&(b.text.pointerEvents=b.text.originalPointerEvents,b.text.originalPointerEvents=null));null!=b.control&&null!=b.control.node&&"hidden"==b.control.node.style.visibility&&(b.control.node.style.visibility=
"");this.cloning||null!=b.text&&b.text.updateBoundingBox();b.view.invalidate(b.cell)})),this.graph.view.validate())};mxGraphHandler.prototype.setHandlesVisibleForCells=function(a,b,c){if(c||this.handlesVisible!=b)for(this.handlesVisible=b,c=0;c<a.length;c++){var d=this.graph.selectionCellsHandler.getHandler(a[c]);null!=d&&(d.setHandlesVisible(b),b&&d.redraw())}};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed())if(this.livePreviewUsed&&this.resetLivePreview(),null!=this.cell&&null!=this.first&&null!=this.currentDx&&null!=this.currentDy&&(null!=this.shape||this.livePreviewUsed||this.cloning)){a=this.graph;var c=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=c&&a.getModel().isVertex(c)&&a.isCellConnectable(c)&&a.isEdgeValid(null,this.cell,c))a.connectionHandler.connect(this.cell,c,b.getEvent());else{var d=a.getView().scale;c=this.roundLength(this.currentDx/
d);d=this.roundLength(this.currentDy/d);var e=this.target;a.isSplitEnabled()&&a.isSplitTarget(e,this.cells,b.getEvent())?a.splitEdge(e,this.cells,null,c,d,b.getGraphX(),b.getGraphY()):this.moveCells(this.cells,c,d,this.cloning,this.target,b.getEvent())}}else this.isSelectEnabled()&&this.delayedSelection&&!this.blockDelayedSelection&&null!=this.cell&&this.selectDelayed(b);this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()};
mxGraphHandler.prototype.reset=function(){this.livePreviewUsed&&(this.resetLivePreview(),this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!0));this.destroyShapes();this.removeHint();this.delayedSelection=this.blockDelayedSelection=!1;this.livePreviewUsed=this.livePreviewActive=null;this.cellWasClicked=!1;this.cellCount=this.currentDy=this.currentDx=this.suspended=null;this.cloning=!1;this.cell=this.cells=this.first=this.target=this.guides=this.pBounds=this.allCells=
null};mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);d=Math.sin(-d);var e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);!this.graph.isCellSelected(this.cell)&&this.graph.isCellSelected(g)&&(g=this.graph.getModel().getParent(g));null==e&&null!=f&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&
this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=this.graph.model.getParent(a[l]);null==m||k.get(m)||(k.put(m,!0),g.push(m))}}a=this.graph.moveCells(a,b,c,d,e,f);b=[];for(l=0;l<g.length;l++)this.shouldRemoveParent(g[l])&&b.push(g[l]);this.graph.removeCells(b,!1)}finally{this.graph.getModel().endUpdate()}d&&this.graph.setSelectionCells(a);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0])};
mxGraphHandler.prototype.shouldRemoveParent=function(a){a=this.graph.view.getState(a);return null!=a&&(this.graph.model.isEdge(a.cell)||this.graph.model.isVertex(a.cell))&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)};
mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};
mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.refreshHandler&&(this.graph.getModel().removeListener(this.refreshHandler),this.graph.removeListener(this.refreshHandler),this.refreshHandler=null);mxEvent.removeListener(document,"keydown",this.keyHandler);mxEvent.removeListener(document,"keyup",this.keyHandler);this.destroyShapes();
this.removeHint()};
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(b,c){b=c.getProperty("eventName");c=c.getProperty("event");b==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(c)&&(this.start(c),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",c)),c.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(b,c){this.isPinchEnabled()&&(b=
c.getProperty("event"),mxEvent.isConsumed(b)||"gesturestart"!=b.type?"gestureend"==b.type&&null!=this.initialScale&&(this.initialScale=null):(this.initialScale=this.graph.view.scale,this.active||null==this.mouseDownEvent||(this.start(this.mouseDownEvent),this.mouseDownEvent=null)),null!=this.initialScale&&this.zoomGraph(b))}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.mouseUpListener=mxUtils.bind(this,function(){this.active&&this.reset()}),mxEvent.addGestureListeners(document,
null,null,this.mouseUpListener),mxEvent.addListener(document,"mouseleave",this.mouseUpListener))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;
mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.pinchEnabled=!0;mxPanningHandler.prototype.maxScale=8;mxPanningHandler.prototype.minScale=.01;mxPanningHandler.prototype.dx=null;mxPanningHandler.prototype.dy=null;mxPanningHandler.prototype.startX=0;mxPanningHandler.prototype.startY=0;mxPanningHandler.prototype.isActive=function(){return this.active||null!=this.initialScale};mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};
mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};mxPanningHandler.prototype.isPinchEnabled=function(){return this.pinchEnabled};mxPanningHandler.prototype.setPinchEnabled=function(a){this.pinchEnabled=a};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&null==a.getState()&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};
mxPanningHandler.prototype.isForcePanningEvent=function(a){return this.ignoreCell||mxEvent.isMultiTouchEvent(a.getEvent())};mxPanningHandler.prototype.mouseDown=function(a,b){this.mouseDownEvent=b;!b.isConsumed()&&this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b)&&(this.start(b),this.consumePanningTrigger(b))};
mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.dy=this.dx=null;this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
mxPanningHandler.prototype.mouseMove=function(a,b){this.dx=b.getX()-this.startX;this.dy=b.getY()-this.startY;this.active?(this.previewEnabled&&(this.useGrid&&(this.dx=this.graph.snap(this.dx),this.dy=this.graph.snap(this.dy)),this.graph.panGraph(this.dx+this.dx0,this.dy+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))):this.panningTrigger&&(a=this.active,this.active=Math.abs(this.dx)>this.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance,!a&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
"event",b)));(this.active||this.panningTrigger)&&b.consume()};mxPanningHandler.prototype.mouseUp=function(a,b){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){a=this.graph.getView().scale;var c=this.graph.getView().translate;this.graph.panGraph(0,0);this.panGraph(c.x+this.dx/a,c.y+this.dy/a)}b.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b))}this.reset()};
mxPanningHandler.prototype.zoomGraph=function(a){var b=Math.round(this.initialScale*a.scale*100)/100;null!=this.minScale&&(b=Math.max(this.minScale,b));null!=this.maxScale&&(b=Math.min(this.maxScale,b));this.graph.view.scale!=b&&(this.graph.zoomTo(b),mxEvent.consume(a))};mxPanningHandler.prototype.reset=function(){this.panningTrigger=this.graph.isMouseDown=!1;this.mouseDownEvent=null;this.active=!1;this.dy=this.dx=null};
mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.forcePanningHandler);this.graph.removeListener(this.gestureHandler);mxEvent.removeGestureListeners(document,null,null,this.mouseUpListener);mxEvent.removeListener(document,"mouseleave",this.mouseUpListener)};
function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.gestureHandler=mxUtils.bind(this,function(c,d){this.inTolerance=!1}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.screenX=null;mxPopupMenuHandler.prototype.screenY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.screenX=mxEvent.getMainEvent(b.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(b.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};
mxPopupMenuHandler.prototype.mouseMove=function(a,b){this.inTolerance&&null!=this.screenX&&null!=this.screenY&&(Math.abs(mxEvent.getMainEvent(b.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(b.getEvent()).screenY-this.screenY)>this.graph.tolerance)&&(this.inTolerance=!1)};
mxPopupMenuHandler.prototype.mouseUp=function(a,b,c){a=null==c;c=null!=c?c:mxUtils.bind(this,function(e){var f=mxUtils.getScrollOrigin();this.popup(b.getX()+f.x+1,b.getY()+f.y+1,e,b.getEvent())});if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var d=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=d&&!this.graph.isCellSelected(d)?this.graph.setSelectionCell(d):this.clearSelectionOnBackground&&null==d&&this.graph.clearSelection();
this.graph.tooltipHandler.hide();c(d);a&&b.consume()}this.inTolerance=this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.gestureHandler);mxPopupMenu.prototype.destroy.apply(this)};
function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=c?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
mxCellMarker.prototype.process=function(a){var b=null;this.isEnabled()&&(b=this.getState(a),this.setCurrentState(b,a));return b};mxCellMarker.prototype.setCurrentState=function(a,b,c){var d=null!=a?this.isValidState(a):!1;c=null!=c?c:this.getMarkerColor(b.getEvent(),a,d);this.validState=d?a:null;if(a!=this.markedState||c!=this.currentColor)this.currentColor=c,null!=a&&null!=this.currentColor?(this.markedState=a,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())};
mxCellMarker.prototype.markCell=function(a,b){a=this.graph.getView().getState(a);null!=a&&(this.currentColor=null!=b?b:this.validColor,this.markedState=a,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView(),c=this.getCell(a);b=this.getStateToMark(b.getState(c));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.highlight.destroy()};
function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.redrawHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.refresh(!1)});this.refreshHandler=mxUtils.bind(this,function(b,c){this.isEnabled()&&this.refresh(!0)});this.graph.addListener(mxEvent.EDITING_STOPPED,this.redrawHandler);this.graph.addListener(mxEvent.EDITING_STARTED,this.redrawHandler);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
this.redrawHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);
mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};
mxSelectionCellsHandler.prototype.isHandled=function(a){return null!=this.getHandler(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){return this.graph.getSelectionCells()};
mxSelectionCellsHandler.prototype.refresh=function(a){var b=this.handlers;this.handlers=new mxDictionary;var c=mxUtils.sortCells(this.getHandledSelectionCells(),!1);if(!a&&0<this.graph.graphHandler.maxCells&&0<this.graph.getSelectionCount()){var d=b.getCount();0<d&&(a=d<=this.graph.graphHandler.maxCells!=this.graph.getSelectionCount()<=this.graph.graphHandler.maxCells)}for(d=0;d<c.length;d++){var e=this.graph.view.getState(c[d]);if(null!=e){var f=b.remove(c[d]);null!=f&&(f.state!=e?(f.destroy(),f=
null):this.isHandlerActive(f)||(a&&f.refresh(),f.redraw()));null!=f&&this.handlers.put(c[d],f)}}b.visit(mxUtils.bind(this,function(g,k){this.fireEvent(new mxEventObject(mxEvent.REMOVE,"state",k.state));k.destroy()}));for(d=0;d<c.length;d++)e=this.graph.view.getState(c[d]),null!=e&&(f=this.handlers.get(c[d]),null==f?(f=this.graph.createHandler(e),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",e)),this.handlers.put(c[d],f)):f.updateParentHighlight())};
mxSelectionCellsHandler.prototype.isHandlerActive=function(a){return null!=a.index};mxSelectionCellsHandler.prototype.updateHandler=function(a){var b=this.handlers.remove(a.cell);if(null!=b){var c=b.index,d=b.startX,e=b.startY;b.destroy();b=this.graph.createHandler(a);null!=b&&(this.handlers.put(a.cell,b),null!=c&&null!=d&&null!=e&&b.start(d,e,c))}};
mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseDown.apply(e,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseMove.apply(e,c)})}};
mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(d,e){e.mouseUp.apply(e,c)})}};
mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.redrawHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.graph.removeListener(this.redrawHandler),this.refreshHandler=this.redrawHandler=null)};
function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init(),this.escapeHandler=mxUtils.bind(this,function(c,d){this.reset()}),this.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;
mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;
mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=!1;mxConnectionHandler.prototype.outlineConnect=!1;mxConnectionHandler.prototype.livePreview=!1;mxConnectionHandler.prototype.cursor=null;
mxConnectionHandler.prototype.insertBeforeSource=!1;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isInsertBefore=function(a,b,c,d,e){return this.insertBeforeSource&&b!=c&&this.graph.model.getParent(a)==this.graph.model.getParent(b)};mxConnectionHandler.prototype.isCreateTarget=function(a){return this.createTarget};
mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=this.livePreview&&null!=this.edgeState?this.graph.cellRenderer.createShape(this.edgeState):new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=mxConstants.DIALECT_SVG;a.scale=this.graph.view.scale;a.svgStrokeTolerance=0;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):null!=this.previous&&null==this.graph.view.getState(this.previous.cell)&&this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,
this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};
mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b){var c=mxCellMarker.prototype.getCell.apply(a,arguments);this.error=null;null==c&&null!=this.currentPoint&&(c=this.graph.getCellAt(this.currentPoint.x,this.currentPoint.y));if(null!=c&&!this.graph.isCellConnectable(c)){var d=this.graph.getModel().getParent(c);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(c=d)}if(this.graph.isSwimlane(c)&&
null!=this.currentPoint&&this.graph.hitsSwimlaneContent(c,this.currentPoint.x,this.currentPoint.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget(b.getEvent())&&(this.error=null))):this.isValidSource(c,b)||(c=null):!this.isConnecting()||this.isCreateTarget(b.getEvent())||this.graph.allowDanglingEdges||(this.error="");return c});a.isValidState=
mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a,b){return this.graph.isValidSource(a)};
mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return this.isValidTarget(b)?this.graph.getEdgeValidationError(null,a,b):""};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=mxConstants.DIALECT_SVG,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,
e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a});b=mxUtils.bind(this,function(g){mxEvent.isConsumed(g)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
mxConnectionHandler.prototype.redrawIcons=function(a,b){null!=a&&null!=a[0]&&null!=b&&(b=this.getIconPosition(a[0],b),a[0].bounds.x=b.x,a[0].bounds.y=b.y,a[0].redraw())};
mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell);d=0!=f.width?b.x+f.width*c/2:d;e=0!=f.height?b.y+f.height*c/2:e;f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);0!=f&&(c=Math.cos(f),f=Math.sin(f),b=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,b),d=e.x,e=e.y)}return new mxPoint(d-
a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)&&(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
b.getGraphY()),this.edgeState=this.createEdgeState(b),this.mouseDownCounter=1,this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState)),null==this.previous&&null!=this.edgeState&&(a=this.graph.getPointForEvent(b.getEvent()),this.edgeState.cell.geometry.setTerminalPoint(a,!0)),this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous)),b.consume());this.selectedIcon=this.icon;this.icon=null};
mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};mxConnectionHandler.prototype.createEdgeState=function(a){return null};
mxConnectionHandler.prototype.isOutlineConnectEvent=function(a){if(mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent()))return!1;var b=mxUtils.getOffset(this.graph.container),c=a.getEvent(),d=mxEvent.getClientX(c);c=mxEvent.getClientY(c);var e=document.documentElement,f=this.currentPoint.x-this.graph.container.scrollLeft+b.x-((window.pageXOffset||e.scrollLeft)-(e.clientLeft||0));b=this.currentPoint.y-this.graph.container.scrollTop+b.y-((window.pageYOffset||e.scrollTop)-(e.clientTop||
0));return this.outlineConnect&&(mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())||a.isSource(this.marker.highlight.shape)||!mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent())&&null!=a.getState()||this.marker.highlight.isHighlightAt(d,c)||(f!=d||b!=c)&&null==a.getState()&&this.marker.highlight.isHighlightAt(f,b))};
mxConnectionHandler.prototype.updateCurrentState=function(a,b){this.constraintHandler.update(a,null==this.first,!1,null==this.first||a.isSource(this.marker.highlight.shape)?null:b);if(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint)null!=this.marker.highlight&&null!=this.marker.highlight.state&&this.marker.highlight.state.cell==this.constraintHandler.currentFocus.cell?"transparent"!=this.marker.highlight.shape.stroke&&(this.marker.highlight.shape.stroke="transparent",
this.marker.highlight.repaint()):this.marker.markCell(this.constraintHandler.currentFocus.cell,"transparent"),null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,this.constraintHandler.currentFocus.cell),null==this.error&&(this.currentState=this.constraintHandler.currentFocus),(null!=this.error||null!=this.currentState&&!this.isCellEnabled(this.currentState.cell))&&this.constraintHandler.reset());else{this.graph.isIgnoreTerminalEvent(a.getEvent())?(this.marker.reset(),this.currentState=
null):(this.marker.process(a),this.currentState=this.marker.getValidState());null==this.currentState||this.isCellEnabled(this.currentState.cell)||(this.constraintHandler.reset(),this.marker.reset(),this.currentState=null);var c=this.isOutlineConnectEvent(a);null!=this.currentState&&c&&(a.isSource(this.marker.highlight.shape)&&(b=new mxPoint(a.getGraphX(),a.getGraphY())),c=this.graph.getOutlineConstraint(b,this.currentState,a),this.constraintHandler.setFocus(a,this.currentState,!1),this.constraintHandler.currentConstraint=
c,this.constraintHandler.currentPoint=b);this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&(b=this.graph.view.scale,null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(this.marker.highlight.shape.stroke=mxConstants.OUTLINE_HIGHLIGHT_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/b/b,this.marker.highlight.repaint()):this.marker.hasValidState()&&(this.graph.isCellConnectable(a.getCell())&&
this.marker.getValidState()!=a.getState()?(this.marker.highlight.shape.stroke="transparent",this.currentState=null):this.marker.highlight.shape.stroke=mxConstants.DEFAULT_VALID_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/b/b,this.marker.highlight.repaint()))}};mxConnectionHandler.prototype.isCellEnabled=function(a){return!0};
mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
mxConnectionHandler.prototype.snapToPreview=function(a,b){if(!mxEvent.isAltDown(a.getEvent())&&null!=this.previous){var c=this.graph.gridSize*this.graph.view.scale/2,d=null!=this.sourceConstraint?this.first:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());Math.abs(d.x-a.getGraphX())<c&&(b.x=d.x);Math.abs(d.y-a.getGraphY())<c&&(b.y=d.y)}};
mxConnectionHandler.prototype.mouseMove=function(a,b){if(b.isConsumed()||!this.ignoreMouseDown&&null==this.first&&this.graph.isMouseDown)this.constraintHandler.reset();else{this.isEnabled()||null==this.currentState||(this.destroyIcons(),this.currentState=null);a=this.graph.getView();var c=a.scale,d=a.translate;a=new mxPoint(b.getGraphX(),b.getGraphY());this.error=null;this.graph.isGridEnabledEvent(b.getEvent())&&(a=new mxPoint((this.graph.snap(a.x/c-d.x)+d.x)*c,(this.graph.snap(a.y/c-d.y)+d.y)*c));
this.snapToPreview(b,a);this.currentPoint=a;(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&(null!=this.shape||null==this.first||Math.abs(b.getGraphX()-this.first.x)>this.graph.tolerance||Math.abs(b.getGraphY()-this.first.y)>this.graph.tolerance)&&this.updateCurrentState(b,a);if(null!=this.first){var e=null;c=a;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(e=this.constraintHandler.currentConstraint,
c=this.constraintHandler.currentPoint.clone()):null!=this.previous&&mxEvent.isShiftDown(b.getEvent())&&!this.graph.isIgnoreTerminalEvent(b.getEvent())&&(d=new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),null!=this.sourceConstraint&&(d=this.first),Math.abs(d.x-a.x)<Math.abs(d.y-a.y)?a.x=d.x:a.y=d.y);d=this.first;if(null!=this.selectedIcon){var f=this.selectedIcon.bounds.width,g=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(f=this.getIconPosition(this.selectedIcon,
this.currentState),this.selectedIcon.bounds.x=f.x,this.selectedIcon.bounds.y=f.y):(f=new mxRectangle(b.getGraphX()+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,f,g),this.selectedIcon.bounds=f);this.selectedIcon.redraw()}null!=this.edgeState?(this.updateEdgeState(c,e),c=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1],d=this.edgeState.absolutePoints[0]):(null!=this.currentState&&null==this.constraintHandler.currentConstraint&&(f=this.getTargetPerimeterPoint(this.currentState,
b),null!=f&&(c=f)),null==this.sourceConstraint&&null!=this.previous&&(f=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:c,b),null!=f&&(d=f)));if(null==this.currentState&&this.movePreviewAway){f=d;null!=this.edgeState&&2<=this.edgeState.absolutePoints.length&&(e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=e&&(f=e));e=c.x-f.x;f=c.y-f.y;g=Math.sqrt(e*e+f*f);if(0==g)return;this.originalPoint=c.clone();c.x-=4*e/
g;c.y-=4*f/g}else this.originalPoint=null;null==this.shape&&(e=Math.abs(b.getGraphX()-this.first.x),f=Math.abs(b.getGraphY()-this.first.y),e>this.graph.tolerance||f>this.graph.tolerance)&&(this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState),this.updateCurrentState(b,a));null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(a=[d],null!=this.waypoints&&(a=a.concat(this.waypoints)),a.push(c),this.shape.points=a),this.drawPreview());
null!=this.cursor&&(this.graph.container.style.cursor=this.cursor);mxEvent.consume(b.getEvent());b.consume()}else this.isEnabled()&&this.graph.isEnabled()?this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&null==this.constraintHandler.currentConstraint&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous!=
this.currentState||null==this.currentState||null!=this.icons||this.graph.isMouseDown||b.consume():this.constraintHandler.reset();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){a=!1;c=b.getSource();for(d=0;d<this.icons.length&&!a;d++)a=c==this.icons[d].node||c.parentNode==this.icons[d].node;a||this.updateIcons(this.currentState,this.icons,b)}}};
mxConnectionHandler.prototype.updateEdgeState=function(a,b){null!=this.sourceConstraint&&null!=this.sourceConstraint.point&&(this.edgeState.style[mxConstants.STYLE_EXIT_X]=this.sourceConstraint.point.x,this.edgeState.style[mxConstants.STYLE_EXIT_Y]=this.sourceConstraint.point.y);null!=b&&null!=b.point?(this.edgeState.style[mxConstants.STYLE_ENTRY_X]=b.point.x,this.edgeState.style[mxConstants.STYLE_ENTRY_Y]=b.point.y):(delete this.edgeState.style[mxConstants.STYLE_ENTRY_X],delete this.edgeState.style[mxConstants.STYLE_ENTRY_Y]);
this.edgeState.absolutePoints=[null,null!=this.currentState?null:a];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==b&&(b=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,this.currentState,!1,b));a=null;if(null!=this.waypoints)for(a=[],b=0;b<this.waypoints.length;b++){var c=this.waypoints[b].clone();
this.convertWaypoint(c);a[b]=c}this.graph.view.updatePoints(this.edgeState,a,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState)};
mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){b=null;var c=a.view,d=c.getPerimeterFunction(a);if(null!=d){var e=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY());a=d(c.getPerimeterBounds(a),this.edgeState,e,!1);null!=a&&(b=a)}else b=new mxPoint(a.getCenterX(),a.getCenterY());return b};
mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),k=Math.PI/180*-g;0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(k),Math.sin(k),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-k),Math.sin(-k),f)),c=a)}else c=f;return c};
mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x);b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
mxConnectionHandler.prototype.checkConstraints=function(a,b){return null==a||null==b||null==a.point||null==b.point||!a.point.equals(b.point)||a.dx!=b.dx||a.dy!=b.dy||a.perimeter!=b.perimeter};
mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}a=this.sourceConstraint;var c=this.constraintHandler.currentConstraint,d=null!=this.previous?this.previous.cell:null,e=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(e=this.constraintHandler.currentFocus.cell);null==e&&null!=this.currentState&&(e=this.currentState.cell);
null!=this.error||null!=d&&null!=e&&d==e&&!this.checkConstraints(a,c)?(null!=this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,b.getEvent()),null!=this.error&&0<this.error.length&&this.graph.validationAlert(this.error)):this.connect(d,e,b.getEvent(),b.getCell());this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.cursor&&null!=this.graph.container&&(this.graph.container.style.cursor="");this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=this.currentPoint=this.originalPoint=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};
mxConnectionHandler.prototype.drawPreview=function(){this.updatePreview(null==this.error);null!=this.edgeState&&(this.edgeState.shape=this.shape,this.graph.cellRenderer.postConfigureShape(this.edgeState),this.edgeState.shape=null);this.shape.redraw()};mxConnectionHandler.prototype.updatePreview=function(a){this.shape.strokewidth=this.getEdgeWidth(a);this.shape.stroke=this.getEdgeColor(a)};mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};
mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget(c)||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=!1,g=null;e.beginUpdate();try{if(null!=a&&null==b&&!this.graph.isIgnoreTerminalEvent(c)&&this.isCreateTarget(c)&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);f=!0;if(null!=d&&this.graph.getModel().isEdge(d))d=this.graph.getDefaultParent();else{var k=this.graph.getView().getState(d);if(null!=k){var l=e.getGeometry(b);
l.x-=k.origin.x;l.y-=k.origin.y}}this.graph.addCell(b,d)}var m=this.graph.getDefaultParent(),n=this.graph.getReferenceTerminal(a),p=this.graph.getReferenceTerminal(b),q=m;null!=n&&null!=p?q=e.getNearestCommonAncestor(n,p):null!=n&&(q=e.getParent(n));null==q||e.isEdge(q)||q==e.getRoot()||(m=q);p=n=null;null!=this.edgeState&&(n=this.edgeState.cell.value,p=this.edgeState.cell.style);g=this.insertEdge(m,null,n,a,b,p);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(g,
b,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);if(this.isInsertBefore(g,a,b,c,d)&&(null==this.constraintHandler.currentConstraint||this.constraintHandler.currentConstraint.perimeter)){for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&e.add(m,g,l.parent.getIndex(l))}var r=e.getGeometry(g);null==r&&(r=new mxGeometry,r.relative=
!0,e.setGeometry(g,r));if(null!=this.waypoints&&0<this.waypoints.length){var t=this.graph.view.scale,u=this.graph.view.translate;r.points=[];for(a=0;a<this.waypoints.length;a++){var x=this.waypoints[a];r.points.push(new mxPoint(x.x/t-u.x,x.y/t-u.y))}}if(null==b){var y=this.graph.view.translate;t=this.graph.view.scale;x=null!=this.originalPoint?new mxPoint(this.originalPoint.x/t-y.x,this.originalPoint.y/t-y.y):new mxPoint(this.currentPoint.x/t-y.x,this.currentPoint.y/t-y.y);x.x-=this.graph.panDx/this.graph.view.scale;
x.y-=this.graph.panDy/this.graph.view.scale;k=this.graph.getView().getState(e.getParent(g));null!=k&&(x.x-=k.origin.x,x.y-=k.origin.y);r.setTerminalPoint(x,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(A){mxLog.show(),mxLog.debug(A.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return this.graph.addEdge(b,a,d,e)};
mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(a=this.graph.getCellGeometry(b);null!=a&&a.relative;)b=this.graph.getModel().getParent(b),a=this.graph.getCellGeometry(b);var c=this.graph.cloneCell(b);a=this.graph.getModel().getGeometry(c);if(null!=a){var d=this.graph.view.translate,e=this.graph.view.scale,f=new mxPoint(this.currentPoint.x/e-d.x,this.currentPoint.y/e-d.y);a.x=Math.round(f.x-a.width/2-this.graph.panDx/e);a.y=Math.round(f.y-a.height/2-this.graph.panDy/e);f=this.getAlignmentTolerance();
if(0<f){var g=this.graph.view.getState(b);null!=g&&(b=g.x/e-d.x,d=g.y/e-d.y,Math.abs(b-a.x)<=f&&(a.x=Math.round(b)),Math.abs(d-a.y)<=f&&(a.y=Math.round(d)))}}return c};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(b,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())};
mxConstraintHandler.prototype.getCellForEvent=function(a,b){var c=a.getCell();null!=c||null==b||a.getGraphX()==b.x&&a.getGraphY()==b.y||(c=this.graph.getCellAt(b.x,b.y));null==c||this.graph.isCellConnectable(c)||(a=this.graph.getModel().getParent(c),this.graph.getModel().isVertex(a)&&this.graph.isCellConnectable(a)&&(c=a));return this.graph.isCellLocked(c)?null:c};
mxConstraintHandler.prototype.update=function(a,b,c,d){if(this.isEnabled()&&!this.isEventIgnored(a)){null==this.mouseleaveHandler&&null!=this.graph.container&&(this.mouseleaveHandler=mxUtils.bind(this,function(){this.reset()}),mxEvent.addListener(this.graph.container,"mouseleave",this.resetHandler));var e=this.getTolerance(a),f=null!=d?d.x:a.getGraphX(),g=null!=d?d.y:a.getGraphY();f=new mxRectangle(f-e,g-e,2*e,2*e);e=new mxRectangle(a.getGraphX()-e,a.getGraphY()-e,2*e,2*e);var k=this.graph.view.getState(this.getCellForEvent(a,
d));this.isKeepFocusEvent(a)||null!=this.currentFocusArea&&null!=this.currentFocus&&null==k&&this.graph.getModel().isVertex(this.currentFocus.cell)&&mxUtils.intersects(this.currentFocusArea,e)||k==this.currentFocus||(this.currentFocus=this.currentFocusArea=null,this.setFocus(a,k,b));a=this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==k||this.currentFocus==k)){g=e.getCenterX();for(var l=e.getCenterY(),m=0;m<this.focusIcons.length;m++){var n=g-this.focusIcons[m].bounds.getCenterX(),
p=l-this.focusIcons[m].bounds.getCenterY();n=n*n+p*p;if((this.intersects(this.focusIcons[m],e,b,c)||null!=d&&this.intersects(this.focusIcons[m],f,b,c))&&(null==a||n<a)){this.currentConstraint=this.constraints[m];this.currentPoint=this.focusPoints[m];a=n;n=this.focusIcons[m].bounds.clone();n.grow(mxConstants.HIGHLIGHT_SIZE+1);--n.width;--n.height;if(null==this.focusHighlight){p=this.createHighlightShape();p.dialect=mxConstants.DIALECT_SVG;p.pointerEvents=!1;p.init(this.graph.getView().getOverlayPane());
this.focusHighlight=p;var q=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:k});mxEvent.redirectMouseEvents(p.node,this.graph,q)}this.focusHighlight.bounds=n;this.focusHighlight.redraw()}}}null==this.currentConstraint&&this.destroyFocusHighlight()}else this.currentPoint=this.currentFocus=this.currentConstraint=null};
mxConstraintHandler.prototype.redraw=function(){if(null!=this.currentFocus&&null!=this.constraints&&null!=this.focusIcons){var a=this.graph.view.getState(this.currentFocus.cell);this.currentFocus=a;this.currentFocusArea=new mxRectangle(a.x,a.y,a.width,a.height);for(var b=0;b<this.constraints.length;b++){var c=this.graph.getConnectionPoint(a,this.constraints[b]),d=this.getImageForConstraint(a,this.constraints[b],c);d=new mxRectangle(Math.round(c.x-d.width/2),Math.round(c.y-d.height/2),d.width,d.height);
this.focusIcons[b].bounds=d;this.focusIcons[b].redraw();this.currentFocusArea.add(this.focusIcons[b].bounds);this.focusPoints[b]=c}}};
mxConstraintHandler.prototype.setFocus=function(a,b,c){this.constraints=null!=b&&!this.isStateIgnored(b,c)&&this.graph.isCellConnectable(b.cell)?this.isEnabled()?this.graph.getAllConnectionConstraints(b,c)||[]:[]:null;if(null!=this.constraints){this.currentFocus=b;this.currentFocusArea=new mxRectangle(b.x,b.y,b.width,b.height);if(null!=this.focusIcons){for(c=0;c<this.focusIcons.length;c++)this.focusIcons[c].destroy();this.focusPoints=this.focusIcons=null}this.focusPoints=[];this.focusIcons=[];for(c=
0;c<this.constraints.length;c++){var d=this.graph.getConnectionPoint(b,this.constraints[c]),e=this.getImageForConstraint(b,this.constraints[c],d),f=e.src;e=new mxRectangle(Math.round(d.x-e.width/2),Math.round(d.y-e.height/2),e.width,e.height);f=new mxImageShape(e,f);f.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;f.preserveImageAspect=!1;f.init(this.graph.getView().getDecoratorPane());null!=f.node.previousSibling&&f.node.parentNode.insertBefore(f.node,
f.node.parentNode.firstChild);e=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:b});f.redraw();mxEvent.redirectMouseEvents(f.node,this.graph,e);this.currentFocusArea.add(f.bounds);this.focusIcons.push(f);this.focusPoints.push(d)}this.currentFocusArea.grow(this.getTolerance(a))}else this.destroyIcons(),this.destroyFocusHighlight()};
mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxRectangleShape(null,this.highlightColor,this.highlightColor,mxConstants.HIGHLIGHT_STROKEWIDTH);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConstraintHandler.prototype.intersects=function(a,b,c,d){return mxUtils.intersects(a.bounds,b)};
mxConstraintHandler.prototype.destroy=function(){this.reset();null!=this.resetHandler&&(this.graph.model.removeListener(this.resetHandler),this.graph.view.removeListener(this.resetHandler),this.graph.removeListener(this.resetHandler),this.resetHandler=null);null!=this.mouseleaveHandler&&null!=this.graph.container&&(mxEvent.removeListener(this.graph.container,"mouseleave",this.mouseleaveHandler),this.mouseleaveHandler=null)};
function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(b,c){b=c.getProperty("eventName");c=c.getProperty("event");if(b==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(c)){b=mxUtils.getOffset(this.graph.container);var d=mxUtils.getScrollOrigin(this.graph.container);d.x-=b.x;d.y-=b.y;this.start(c.getX()+d.x,c.getY()+d.y);c.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.panHandler=
mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),this.gestureHandler=mxUtils.bind(this,function(b,c){null!=this.first&&this.reset()}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;
mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.fadeOut=!1;mxRubberband.prototype.isEnabled=function(){return this.enabled};mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())&&!mxEvent.isShiftDown(a.getEvent())};
mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&(null==b.getState()||this.graph.isCellLocked(b.getCell()))&&!mxEvent.isMultiTouchEvent(b.getEvent())){a=mxUtils.getOffset(this.graph.container);var c=mxUtils.getScrollOrigin(this.graph.container);c.x-=a.x;c.y-=a.y;this.start(b.getX()+c.x,b.getY()+c.y);b.consume(!1)}};
mxRubberband.prototype.start=function(a,b){function c(e){e=new mxMouseEvent(e);var f=mxUtils.convertPoint(d,e.getX(),e.getY());e.graphX=f.x;e.graphY=f.y;return e}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(e){this.mouseMove(this.graph,c(e))});this.dropHandler=mxUtils.bind(this,function(e){this.mouseUp(this.graph,c(e))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container);a=mxUtils.getOffset(this.graph.container);c.x-=a.x;c.y-=a.y;a=b.getX()+c.x;c=b.getY()+c.y;var d=this.first.x-a,e=this.first.y-c,f=this.graph.tolerance;if(null!=this.div||Math.abs(d)>f||Math.abs(e)>f)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(a,c),b.consume()}};
mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);var a=this.sharedDiv;mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut&&(this.sharedDiv=null);return a};mxRubberband.prototype.isActive=function(a,b){return null!=this.div&&"none"!=this.div.style.display};
mxRubberband.prototype.mouseUp=function(a,b){a=this.isActive();this.reset();a&&(this.execute(b.getEvent()),b.consume())};mxRubberband.prototype.execute=function(a){var b=new mxRectangle(this.x,this.y,this.width,this.height);this.graph.selectRegion(b,a)};
mxRubberband.prototype.reset=function(){if(null!=this.div)if(mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut){var a=this.div;mxUtils.setPrefixedStyle(a.style,"transition","all 0.2s linear");a.style.pointerEvents="none";a.style.opacity=0;window.setTimeout(function(){a.parentNode.removeChild(a)},200)}else this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=
this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;this.div.style.left=this.x+0+"px";this.div.style.top=this.y+0+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,this.height)+"px"}};
mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(a,b,c,d){this.graph=a.view.graph;this.state=a;this.cursor=null!=b?b:this.cursor;this.image=null!=c?c:this.image;this.shape=null!=d?d:null;this.init()}mxHandle.prototype.cursor="default";mxHandle.prototype.image=null;
mxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(a){};mxHandle.prototype.setPosition=function(a,b,c){};mxHandle.prototype.execute=function(a){};mxHandle.prototype.copyStyle=function(a){this.graph.setCellStyles(a,this.state.style[a],[this.state.cell])};
mxHandle.prototype.processEvent=function(a){var b=this.graph.view.scale,c=this.graph.view.translate;c=new mxPoint(a.getGraphX()/b-c.x,a.getGraphY()/b-c.y);null!=this.shape&&null!=this.shape.bounds&&(c.x-=this.shape.bounds.width/b/4,c.y-=this.shape.bounds.height/b/4);b=-mxUtils.toRadians(this.getRotation());var d=-mxUtils.toRadians(this.getTotalRotation())-b;c=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(c,b),this.ignoreGrid||!this.graph.isGridEnabledEvent(a.getEvent())),d));this.setPosition(this.state.getPaintBounds(),
c,a);this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.graph.cellRenderer.configureShape(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0};
mxHandle.prototype.init=function(){var a=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):null==this.shape&&(this.shape=this.createShape(a));this.initShape(a)};mxHandle.prototype.createShape=function(a){a=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(a,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
mxHandle.prototype.initShape=function(a){a&&this.shape.isHtmlAllowed()?(this.shape.dialect=mxConstants.DIALECT_STRICTHTML,this.shape.init(this.graph.container)):(this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,null!=this.cursor&&this.shape.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.shape.node.style.cursor=this.cursor};
mxHandle.prototype.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=this.getPosition(this.state.getPaintBounds());if(null!=a){var b=mxUtils.toRadians(this.getTotalRotation());a=this.rotatePoint(this.flipPoint(a),b);b=this.graph.view.scale;var c=this.graph.view.translate;this.shape.bounds.x=Math.floor((a.x+c.x)*b-this.shape.bounds.width/2);this.shape.bounds.y=Math.floor((a.y+c.y)*b-this.shape.bounds.height/2);this.shape.redraw()}}};
mxHandle.prototype.isHtmlRequired=function(){return null!=this.state.text&&this.state.text.node.parentNode==this.graph.container};mxHandle.prototype.rotatePoint=function(a,b){var c=this.state.getCellBounds();c=new mxPoint(c.getCenterX(),c.getCenterY());return mxUtils.getRotatedPoint(a,Math.cos(b),Math.sin(b),c)};
mxHandle.prototype.flipPoint=function(a){if(null!=this.state.shape){var b=this.state.getCellBounds();this.state.shape.flipH&&(a.x=2*b.x+b.width-a.x);this.state.shape.flipV&&(a.y=2*b.y+b.height-a.y)}return a};mxHandle.prototype.snapPoint=function(a,b){b||(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));return a};mxHandle.prototype.setVisible=function(a){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=a?"":"none")};
mxHandle.prototype.reset=function(){this.setVisible(!0);this.state.style=this.graph.getCellStyle(this.state.cell);this.positionChanged()};mxHandle.prototype.destroy=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null)};
function mxVertexHandler(a){null!=a&&(this.state=a,this.init(),this.escapeHandler=mxUtils.bind(this,function(b,c){this.livePreview&&null!=this.index&&(this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate());this.reset()}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.handlesVisible=!0;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.parentHighlightEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.rotationCursor="crosshair";mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.movePreviewToFront=!1;
mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;mxVertexHandler.prototype.rotationHandleVSpacing=-16;mxVertexHandler.prototype.horizontalOffset=0;mxVertexHandler.prototype.verticalOffset=0;
mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=mxConstants.DIALECT_SVG;this.selectionBorder.svgStrokeTolerance=0;this.selectionBorder.pointerEvents=!1;this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||
"0");this.selectionBorder.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&!this.graph.isCellLocked(this.state.cell)&&this.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX);this.refresh();this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};
mxVertexHandler.prototype.isHandlesVisible=function(){return!this.graph.isCellLocked(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<=mxGraphHandler.prototype.maxCells)};
mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.isDashed=this.isSelectionDashed(),this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.redraw());null!=this.sizers&&this.destroySizers();this.isHandlesVisible()&&(this.sizers=this.createSizers());null!=this.customHandles&&this.destroyCustomHandles();this.isHandlesVisible()&&(this.customHandles=this.createCustomHandles())};
mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!1};mxVertexHandler.prototype.createCustomHandles=function(){return null};
mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){a=this.state.view.scale;var b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createParentHighlightShape=function(a){return this.createSelectionShape(a)};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};
mxVertexHandler.prototype.getSelectionColor=function(){return this.graph.isCellEditable(this.state.cell)?mxConstants.VERTEX_SELECTION_COLOR:mxConstants.LOCKED_HANDLE_FILLCOLOR};mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d,this.handleImage);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(--d.bounds.height,--d.bounds.width,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&d.setCursor(a);this.isSizerVisible(b)||(d.visible=!1);return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
mxVertexHandler.prototype.createSizerShape=function(a,b,c,d){return null!=d?(a=new mxRectangle(a.x,a.y,d.width,d.height),a=new mxImageShape(a,d.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.floor(b-a.bounds.width/2),a.bounds.y=Math.floor(c-a.bounds.height/2),null!=a.node&&"none"!=a.node.style.display&&a.redraw())};
mxVertexHandler.prototype.getHandleForEvent=function(a){var b=mxEvent.isMouseEvent(a.getEvent())?1:this.tolerance,c=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<b)?new mxRectangle(a.getGraphX()-b,a.getGraphY()-b,2*b,2*b):null;b=mxUtils.bind(this,function(e){var f=null!=e&&e.constructor!=mxImageShape&&this.allowHandleBoundsCheck?e.strokewidth+e.svgStrokeTolerance:null;f=null!=f?new mxRectangle(a.getGraphX()-Math.floor(f/2),a.getGraphY()-Math.floor(f/2),f,f):c;return null!=e&&(a.isSource(e)||e.intersectsRectangle(f))});
if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(var d=0;d<this.sizers.length;d++)if(b(this.sizers[d]))return d;if(null!=this.customHandles&&this.isCustomHandleEvent(a))for(d=this.customHandles.length-1;0<=d;d--)if(null!=this.customHandles[d]&&b(this.customHandles[d].shape))return mxEvent.CUSTOM_HANDLE-d;return null};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!0};
mxVertexHandler.prototype.mouseDown=function(a,b){b.isConsumed()||!this.graph.isEnabled()||mxEvent.isAltDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())||(a=this.getHandleForEvent(b),null!=a&&(this.start(b.getGraphX(),b.getGraphY(),a),b.consume()))};mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
mxVertexHandler.prototype.start=function(a,b,c){if(null!=this.selectionBorder)if(this.livePreviewActive=this.livePreview&&0==this.graph.model.getChildCount(this.state.cell),this.inTolerance=!0,this.childOffsetY=this.childOffsetX=0,this.index=c,this.startX=a,this.startY=b,this.index<=mxEvent.CUSTOM_HANDLE&&this.isGhostPreview())this.ghostPreview=this.createGhostPreview();else{a=this.state.view.graph.model;b=a.getParent(this.state.cell);this.state.view.currentRoot!=b&&(a.isVertex(b)||a.isEdge(b))&&
(this.parentState=this.state.view.graph.view.getState(b));this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreviewActive||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")||null==this.state.text||this.state.text.node.parentNode!=this.graph.container?(this.preview.dialect=mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane())):
(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,this.preview.init(this.graph.container));c==mxEvent.ROTATION_HANDLE&&(b=this.getRotationHandlePosition(),a=b.x-this.state.getCenterX(),b=b.y-this.state.getCenterY(),this.startAngle=0!=a?180*Math.atan(b/a)/Math.PI+90:0,this.startDist=Math.sqrt(a*a+b*b));if(this.livePreviewActive)for(this.hideSizers(),c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":c==mxEvent.LABEL_HANDLE?this.labelShape.node.style.display="":null!=this.sizers&&
null!=this.sizers[c]?this.sizers[c].node.style.display="":c<=mxEvent.CUSTOM_HANDLE&&null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-c]&&this.customHandles[mxEvent.CUSTOM_HANDLE-c].setVisible(!0),c=this.graph.getEdges(this.state.cell),this.edgeHandlers=[],a=0;a<c.length;a++)b=this.graph.selectionCellsHandler.getHandler(c[a]),null!=b&&this.edgeHandlers.push(b)}};
mxVertexHandler.prototype.createGhostPreview=function(){var a=this.graph.cellRenderer.createShape(this.state);a.init(this.graph.view.getOverlayPane());a.scale=this.state.view.scale;a.bounds=this.bounds;a.outline=!0;return a};
mxVertexHandler.prototype.setHandlesVisible=function(a){this.handlesVisible=a;if(null!=this.sizers)for(var b=0;b<this.sizers.length;b++)this.sizers[b].node.style.display=a?"":"none";if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)null!=this.customHandles[b]&&this.customHandles[b].setVisible(a)};mxVertexHandler.prototype.hideSizers=function(){this.setHandlesVisible(!1)};
mxVertexHandler.prototype.checkTolerance=function(a){this.inTolerance&&null!=this.startX&&null!=this.startY&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance)&&(this.inTolerance=!1)};mxVertexHandler.prototype.updateHint=function(a){};mxVertexHandler.prototype.removeHint=function(){};mxVertexHandler.prototype.roundAngle=function(a){return Math.round(10*a)/10};
mxVertexHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};
mxVertexHandler.prototype.mouseMove=function(a,b){b.isConsumed()||null==this.index?this.graph.isMouseDown||null==this.getHandleForEvent(b)||b.consume(!1):(this.checkTolerance(b),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-this.index]&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].active=!0,null!=this.ghostPreview?(this.ghostPreview.apply(this.state),
this.ghostPreview.strokewidth=this.getSelectionStrokeWidth()/this.ghostPreview.scale/this.ghostPreview.scale,this.ghostPreview.isDashed=this.isSelectionDashed(),this.ghostPreview.stroke=this.getSelectionColor(),this.ghostPreview.redraw(),null!=this.selectionBounds&&(this.selectionBorder.node.style.display="none")):(this.movePreviewToFront&&this.moveToFront(),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].positionChanged())):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(b):(this.index==mxEvent.ROTATION_HANDLE?
this.rotateVertex(b):this.resizeVertex(b),this.updateHint(b))),b.consume())};mxVertexHandler.prototype.isGhostPreview=function(){return 0<this.state.view.graph.model.getChildCount(this.state.cell)};
mxVertexHandler.prototype.moveLabel=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(a.getEvent())&&(b.x=(this.graph.snap(b.x/d-c.x)+c.x)*d,b.y=(this.graph.snap(b.y/d-c.y)+c.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],b.x,b.y)};
mxVertexHandler.prototype.rotateVertex=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.state.x+this.state.width/2-b.x,d=this.state.y+this.state.height/2-b.y;this.currentAlpha=0!=c?180*Math.atan(d/c)/Math.PI+90:0>d?180:0;0<c&&(this.currentAlpha-=180);this.currentAlpha-=this.startAngle;this.rotationRaster&&this.graph.isGridEnabledEvent(a.getEvent())?(c=b.x-this.state.getCenterX(),d=b.y-this.state.getCenterY(),a=Math.sqrt(c*c+d*d),raster=2>a-this.startDist?15:25>a-this.startDist?5:
1,this.currentAlpha=Math.round(this.currentAlpha/raster)*raster):this.currentAlpha=this.roundAngle(this.currentAlpha);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();this.livePreviewActive&&this.redrawHandles()};
mxVertexHandler.prototype.resizeVertex=function(a){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),d=new mxPoint(a.getGraphX(),a.getGraphY()),e=this.graph.view.translate,f=this.graph.view.scale,g=Math.cos(-c),k=Math.sin(-c),l=d.x-this.startX,m=d.y-this.startY;d=k*l+g*m;l=g*l-k*m;m=d;g=this.graph.getCellGeometry(this.state.cell);this.unscaledBounds=this.union(g,l/f,m/f,this.index,this.graph.isGridEnabledEvent(a.getEvent()),
1,new mxPoint(0,0),this.isConstrainedEvent(a),this.isCenteredEvent(this.state,a));g.relative||(k=this.graph.getMaximumGraphBounds(),null!=k&&null!=this.parentState&&(k=mxRectangle.fromRectangle(k),k.x-=(this.parentState.x-e.x*f)/f,k.y-=(this.parentState.y-e.y*f)/f),this.graph.isConstrainChild(this.state.cell)&&(d=this.graph.getCellContainmentArea(this.state.cell),null!=d&&(l=this.graph.getOverlap(this.state.cell),0<l&&(d=mxRectangle.fromRectangle(d),d.x-=d.width*l,d.y-=d.height*l,d.width+=2*d.width*
l,d.height+=2*d.height*l),null==k?k=d:(k=mxRectangle.fromRectangle(k),k.intersect(d)))),null!=k&&(this.unscaledBounds.x<k.x&&(this.unscaledBounds.width-=k.x-this.unscaledBounds.x,this.unscaledBounds.x=k.x),this.unscaledBounds.y<k.y&&(this.unscaledBounds.height-=k.y-this.unscaledBounds.y,this.unscaledBounds.y=k.y),this.unscaledBounds.x+this.unscaledBounds.width>k.x+k.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-k.x-k.width),this.unscaledBounds.y+this.unscaledBounds.height>
k.y+k.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBounds.height-k.y-k.height)));d=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:e.x*f)+this.unscaledBounds.x*f,(null!=this.parentState?this.parentState.y:e.y*f)+this.unscaledBounds.y*f,this.unscaledBounds.width*f,this.unscaledBounds.height*f);g.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);g=Math.cos(c);
k=Math.sin(c);c=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());l=c.x-b.x;m=c.y-b.y;b=g*l-k*m-l;c=k*l+g*m-m;l=this.bounds.x-this.state.x;m=this.bounds.y-this.state.y;e=g*l-k*m;g=k*l+g*m;this.bounds.x+=b;this.bounds.y+=c;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+b/f);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+c/f);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);
this.graph.isCellCollapsed(this.state.cell)||0==b&&0==c?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+e,this.childOffsetY=this.state.y-this.bounds.y+g);d.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(a),null!=this.preview?this.drawPreview():this.updateParentHighlight())};
mxVertexHandler.prototype.updateLivePreview=function(a){a=this.graph.view.scale;var b=this.graph.view.translate,c=this.state.clone();this.state.x=this.bounds.x;this.state.y=this.bounds.y;this.state.origin=new mxPoint(this.state.x/a-b.x,this.state.y/a-b.y);this.state.width=this.bounds.width;this.state.height=this.bounds.height;b=this.state.absoluteOffset;new mxPoint(b.x,b.y);this.state.absoluteOffset.x=0;this.state.absoluteOffset.y=0;b=this.graph.getCellGeometry(this.state.cell);if(null!=b){var d=
b.offset||this.EMPTY_POINT;null==d||b.relative||(this.state.absoluteOffset.x=this.state.view.scale*d.x,this.state.absoluteOffset.y=this.state.view.scale*d.y);this.state.view.updateVertexLabelOffset(this.state)}b=this.state.cell.geometry.width;d=this.state.cell.geometry.height;this.state.cell.geometry.width=this.roundLength(this.bounds.width/a);this.state.cell.geometry.height=this.roundLength(this.bounds.height/a);this.state.view.graph.cellRenderer.redraw(this.state,!0);this.state.cell.geometry.width=
b;this.state.cell.geometry.height=d;this.state.view.invalidate(this.state.cell);this.state.invalid=!1;this.state.view.validate();this.redrawHandles();this.movePreviewToFront&&this.moveToFront();null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility="hidden");this.state.setState(c)};
mxVertexHandler.prototype.moveToFront=function(){if(null!=this.state.text&&null!=this.state.text.node&&null!=this.state.text.node.nextSibling||null!=this.state.shape&&null!=this.state.shape.node&&null!=this.state.shape.node.nextSibling&&(null==this.state.text||this.state.shape.node.nextSibling!=this.state.text.node))null!=this.state.shape&&null!=this.state.shape.node&&this.state.shape.node.parentNode.appendChild(this.state.shape.node),null!=this.state.text&&null!=this.state.text.node&&this.state.text.node.parentNode.appendChild(this.state.text.node)};
mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());a=this.index;this.index=null;null==this.ghostPreview&&this.state.view.invalidate(this.state.cell,!1,!1);this.graph.getModel().beginUpdate();try{if(a<=mxEvent.CUSTOM_HANDLE){if(null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-a]){var d=this.state.view.graph.getCellStyle(this.state.cell);this.customHandles[mxEvent.CUSTOM_HANDLE-a].active=!1;this.customHandles[mxEvent.CUSTOM_HANDLE-
a].execute(b);null!=this.customHandles&&null!=this.customHandles[mxEvent.CUSTOM_HANDLE-a]&&(this.state.style=d,this.customHandles[mxEvent.CUSTOM_HANDLE-a].positionChanged())}}else if(a==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var e=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=e&&this.rotateCell(this.state.cell,e)}else this.rotateClick();else{var f=this.graph.isGridEnabledEvent(b.getEvent()),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),
k=Math.cos(-g),l=Math.sin(-g),m=c.x-this.startX,n=c.y-this.startY;d=l*m+k*n;m=k*m-l*n;n=d;var p=this.graph.view.scale,q=this.isRecursiveResize(this.state,b);this.resizeCell(this.state.cell,this.roundLength(m/p),this.roundLength(n/p),a,f,this.isConstrainedEvent(b),q)}}finally{this.graph.getModel().endUpdate()}this.state.invalid&&this.state.view.validate();b.consume();this.reset();this.redrawHandles()}};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveResize(this.state)};
mxVertexHandler.prototype.rotateClick=function(){};
mxVertexHandler.prototype.rotateCell=function(a,b,c){if(0!=b){var d=this.graph.getModel();if(d.isVertex(a)||d.isEdge(a)){if(!d.isEdge(a)){var e=(this.graph.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATION]||0)+b;this.graph.setCellStyles(mxConstants.STYLE_ROTATION,e,[a])}e=this.graph.getCellGeometry(a);if(null!=e){var f=this.graph.getCellGeometry(c);null==f||d.isEdge(c)||(e=e.clone(),e.rotate(b,new mxPoint(f.width/2,f.height/2)),d.setGeometry(a,e));if(d.isVertex(a)&&!e.relative||d.isEdge(a))for(c=
d.getChildCount(a),e=0;e<c;e++)this.rotateCell(d.getChildAt(a,e),b,a)}}}};
mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.ghostPreview&&(this.ghostPreview.destroy(),this.ghostPreview=null);if(this.livePreviewActive&&null!=this.sizers){for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&
(this.sizers[a].node.style.display="");null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility="")}if(null!=this.customHandles)for(a=0;a<this.customHandles.length;a++)null!=this.customHandles[a]&&(this.customHandles[a].active?(this.customHandles[a].active=!1,this.customHandles[a].reset()):this.customHandles[a].setVisible(!0));null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),
this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());this.removeHint();this.redrawHandles();this.edgeHandlers=null;this.handlesVisible=!0;this.livePreviewActive=this.unscaledBounds=null};
mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f,g){b=this.graph.model.getGeometry(a);null!=b&&(d==mxEvent.LABEL_HANDLE?(c=-mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0),d=Math.cos(c),e=Math.sin(c),c=this.graph.view.scale,d=mxUtils.getRotatedPoint(new mxPoint(Math.round((this.labelShape.bounds.getCenterX()-this.startX)/c),Math.round((this.labelShape.bounds.getCenterY()-this.startY)/c)),d,e),g||
(d.y=-d.y),b=b.clone(),null==b.offset?b.offset=d:(b.offset.x+=d.x,b.offset.y+=d.y),this.graph.model.setGeometry(a,b)):null!=this.unscaledBounds&&(c=this.graph.view.scale,0==this.childOffsetX&&0==this.childOffsetY||this.moveChildren(a,Math.round(this.childOffsetX/c),Math.round(this.childOffsetY/c)),this.graph.resizeCell(a,this.unscaledBounds,g)))};
mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f),k=this.graph.getCellGeometry(g);null!=k&&(k=k.clone(),k.translate(b,c),d.setGeometry(g,k))}};
mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){e=null!=e?e&&this.graph.gridEnabled:this.graph.gridEnabled;if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,q=p+m;a=a.y-g.y*f;var r=a+n,t=p+m/2,u=a+n/2;4<d?(r+=c,r=e?this.graph.snap(r/f)*f:Math.round(r/f)*f):3>d&&(a+=c,a=e?this.graph.snap(a/f)*f:Math.round(a/f)*f);if(0==d||
3==d||5==d)p+=b,p=e?this.graph.snap(p/f)*f:Math.round(p/f)*f;else if(2==d||4==d||7==d)q+=b,q=e?this.graph.snap(q/f)*f:Math.round(q/f)*f;e=q-p;c=r-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=q-e,a=r-c)));l&&(e+=e-m,c+=c-n,p+=t-(p+e/2),a+=u-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*
f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};mxVertexHandler.prototype.redraw=function(a){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.drawPreview();a||this.redrawHandles()};
mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]&&(this.bounds.width<2*this.sizers[0].bounds.width+2*b||this.bounds.height<2*this.sizers[0].bounds.height+2*b)&&(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b);return a};mxVertexHandler.prototype.getSizerBounds=function(){return this.bounds};
mxVertexHandler.prototype.redrawHandles=function(){var a=this.getSizerBounds(),b=this.tolerance;this.verticalOffset=this.horizontalOffset=0;if(null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c]){var d=this.customHandles[c].shape.node.style.display;this.customHandles[c].redraw();this.customHandles[c].shape.node.style.display=d;this.customHandles[c].shape.node.style.visibility=this.handlesVisible&&this.isHandlesVisible()&&this.isCustomHandleVisible(this.customHandles[c])&&
!this.graph.isEditing()?"":"hidden"}if(null!=a&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]){if(null==this.index&&this.manageSizers&&8<=this.sizers.length){c=this.getHandlePadding();this.horizontalOffset=c.x;this.verticalOffset=c.y;if(0!=this.horizontalOffset||0!=this.verticalOffset)a=new mxRectangle(a.x,a.y,a.width,a.height),a.x-=this.horizontalOffset/2,a.width+=this.horizontalOffset,a.y-=this.verticalOffset/2,a.height+=this.verticalOffset;8<=this.sizers.length&&(a.width<2*this.sizers[0].bounds.width+
2*b||a.height<2*this.sizers[0].bounds.height+2*b?(this.sizers[0].node.style.display="none",this.sizers[2].node.style.display="none",this.sizers[5].node.style.display="none",this.sizers[7].node.style.display="none"):this.handlesVisible&&(this.sizers[0].node.style.display="",this.sizers[2].node.style.display="",this.sizers[5].node.style.display="",this.sizers[7].node.style.display=""))}var e=a.x+a.width,f=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],e,f);else if(b=a.x+a.width/2,
c=a.y+a.height/2,8<=this.sizers.length){var g="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),k=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");d=Math.cos(k);var l=Math.sin(k),m=Math.round(4*k/Math.PI);k=new mxPoint(a.getCenterX(),a.getCenterY());var n=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),d,l,k);this.moveSizerTo(this.sizers[0],n.x,n.y);this.sizers[0].setCursor(g[mxUtils.mod(0+m,g.length)]);n.x=b;n.y=a.y;n=mxUtils.getRotatedPoint(n,
d,l,k);this.moveSizerTo(this.sizers[1],n.x,n.y);this.sizers[1].setCursor(g[mxUtils.mod(1+m,g.length)]);n.x=e;n.y=a.y;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[2],n.x,n.y);this.sizers[2].setCursor(g[mxUtils.mod(2+m,g.length)]);n.x=a.x;n.y=c;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[3],n.x,n.y);this.sizers[3].setCursor(g[mxUtils.mod(7+m,g.length)]);n.x=e;n.y=c;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[4],n.x,n.y);this.sizers[4].setCursor(g[mxUtils.mod(3+
m,g.length)]);n.x=a.x;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[5],n.x,n.y);this.sizers[5].setCursor(g[mxUtils.mod(6+m,g.length)]);n.x=b;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[6],n.x,n.y);this.sizers[6].setCursor(g[mxUtils.mod(5+m,g.length)]);n.x=e;n.y=f;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[7],n.x,n.y);this.sizers[7].setCursor(g[mxUtils.mod(4+m,g.length)]);a=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
!0);n.x=b+this.state.absoluteOffset.x;n.y=c+(a?1:-1)*this.state.absoluteOffset.y;n=mxUtils.getRotatedPoint(n,d,l,k);this.moveSizerTo(this.sizers[8],n.x,n.y)}else 2<=this.state.width&&2<=this.state.height&&null!=this.state.absoluteOffset?this.moveSizerTo(this.sizers[0],b+this.state.absoluteOffset.x,c+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],this.state.x,this.state.y)}if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)this.sizers[c].node.style.visibility=this.isHandlesVisible()?
"":"hidden";null!=this.rotationShape&&(k=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),d=Math.cos(k),l=Math.sin(k),k=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),n=mxUtils.getRotatedPoint(this.getRotationHandlePosition(),d,l,k),null!=this.rotationShape.node&&(this.moveSizerTo(this.rotationShape,n.x,n.y),this.rotationShape.node.style.visibility=!this.state.view.graph.isEditing()&&this.handlesVisible&&this.isHandlesVisible()&&
this.isRotationHandleVisible()?"":"hidden"));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(c=0;c<this.edgeHandlers.length;c++)this.edgeHandlers[c].redraw()};mxVertexHandler.prototype.isCustomHandleVisible=function(a){return 1==this.state.view.graph.getSelectionCount()};
mxVertexHandler.prototype.getRotationHandlePosition=function(){return new mxPoint(this.bounds.x+this.bounds.width/2,this.bounds.y+this.rotationHandleVSpacing)};mxVertexHandler.prototype.isParentHighlightVisible=function(){return!this.graph.isCellSelected(this.graph.model.getParent(this.state.cell))};
mxVertexHandler.prototype.destroyParentHighlight=function(){null!=this.parentHighlight.state&&(delete this.parentHighlight.state.parentHighlight,delete this.parentHighlight.state);this.parentHighlight.destroy();this.parentHighlight=null};
mxVertexHandler.prototype.updateParentHighlight=function(){if(!this.isDestroyed()){var a=this.isParentHighlightVisible(),b=this.graph.model.getParent(this.state.cell),c=this.graph.view.getState(b);null!=this.parentHighlight?this.graph.model.isVertex(b)&&a?(a=this.parentHighlight.bounds,null==c||a.x==c.x&&a.y==c.y&&a.width==c.width&&a.height==c.height||(this.parentHighlight.bounds=mxRectangle.fromRectangle(c),this.parentHighlight.redraw())):this.destroyParentHighlight():this.parentHighlightEnabled&&
a&&this.graph.model.isVertex(b)&&null!=c&&null==c.parentHighlight&&(this.parentHighlight=this.createParentHighlightShape(c),this.parentHighlight.dialect=mxConstants.DIALECT_SVG,this.parentHighlight.svgStrokeTolerance=0,this.parentHighlight.pointerEvents=!1,this.parentHighlight.rotation=Number(c.style[mxConstants.STYLE_ROTATION]||"0"),this.parentHighlight.init(this.graph.getView().getOverlayPane()),this.parentHighlight.redraw(),c.parentHighlight=this.parentHighlight,this.parentHighlight.state=c)}};
mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.getSelectionBorderBounds();this.selectionBorder.redraw();this.updateParentHighlight()};
mxVertexHandler.prototype.getSelectionBorderBounds=function(){return this.bounds};
mxVertexHandler.prototype.createSizers=function(){var a=this.graph.isCellResizable(this.state.cell)&&!this.graph.isCellLocked(this.state.cell),b=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var c=0;a&&(this.singleSizer||(b.push(this.createSizer("nw-resize",c++)),b.push(this.createSizer("n-resize",c++)),b.push(this.createSizer("ne-resize",c++)),b.push(this.createSizer("w-resize",c++)),b.push(this.createSizer("e-resize",c++)),b.push(this.createSizer("sw-resize",
c++)),b.push(this.createSizer("s-resize",c++))),b.push(this.createSizer("se-resize",c++)));a=this.graph.model.getGeometry(this.state.cell);null==a||a.relative||this.graph.isSwimlane(this.state.cell)||!this.graph.isLabelMovable(this.state.cell)||(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),b.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&!a&&2>this.state.width&&2>this.state.height&&
(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,mxEvent.LABEL_HANDLE,null,mxConstants.LABEL_HANDLE_FILLCOLOR),b.push(this.labelShape));null==this.rotationShape&&(this.rotationShape=this.createSizer(this.rotationCursor,mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),b.push(this.rotationShape));return b};
mxVertexHandler.prototype.destroyCustomHandles=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)null!=this.customHandles[a]&&this.customHandles[a].destroy();this.customHandles=null}};mxVertexHandler.prototype.destroySizers=function(){if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy();this.rotationShape=this.sizers=null}};mxVertexHandler.prototype.isDestroyed=function(){return null==this.selectionBorder};
mxVertexHandler.prototype.destroy=function(){null!=this.escapeHandler&&(this.state.view.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.ghostPreview&&(this.ghostPreview.destroy(),this.ghostPreview=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),this.selectionBorder=null);null!=this.parentHighlight&&this.destroyParentHighlight();this.labelShape=null;this.removeHint();this.destroySizers();this.destroyCustomHandles()};
function mxEdgeHandler(a){null!=a&&null!=a.shape&&(this.state=a,this.init(),this.escapeHandler=mxUtils.bind(this,function(b,c){b=null!=this.index;this.reset();b&&this.graph.cellRenderer.redraw(this.state,!1,a.view.isRendering())}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;
mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.dblClickRemoveEnabled=!1;mxEdgeHandler.prototype.mergeRemoveEnabled=!1;mxEdgeHandler.prototype.straightRemoveEnabled=!1;mxEdgeHandler.prototype.virtualBendsEnabled=!1;mxEdgeHandler.prototype.virtualBendOpacity=40;
mxEdgeHandler.prototype.parentHighlightEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;mxEdgeHandler.prototype.tolerance=0;mxEdgeHandler.prototype.outlineConnect=!1;mxEdgeHandler.prototype.manageLabelHandle=!1;
mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.svgStrokeTolerance=0;this.shape.pointerEvents=!1;mxEvent.redirectMouseEvents(this.shape.node,this.graph,
this.state);this.graph.isCellMovable(this.state.cell)&&this.shape.setCursor(mxConstants.CURSOR_MOVABLE_EDGE);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}this.updateParentHighlight();
this.refresh();this.redraw()};mxEdgeHandler.prototype.createLabelShape=function(){var a=this.createLabelHandleShape();this.initBend(a);return a};mxEdgeHandler.prototype.getConstraintHandler=function(){null==this.constraintHandler&&(this.constraintHandler=this.createConstraintHandler());return this.constraintHandler};mxEdgeHandler.prototype.createConstraintHandler=function(){return new mxConstraintHandler(this.graph)};mxEdgeHandler.prototype.isParentHighlightVisible=mxVertexHandler.prototype.isParentHighlightVisible;
mxEdgeHandler.prototype.destroyParentHighlight=mxVertexHandler.prototype.destroyParentHighlight;mxEdgeHandler.prototype.updateParentHighlight=mxVertexHandler.prototype.updateParentHighlight;mxEdgeHandler.prototype.createCustomHandles=function(){return null};
mxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};mxEdgeHandler.prototype.isCellEnabled=function(a){return!0};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};
mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};
mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return this.graph.isCellEditable(this.state.cell)?mxConstants.EDGE_SELECTION_COLOR:mxConstants.LOCKED_HANDLE_FILLCOLOR};mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};
mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,b){return this.outlineConnect?null:this.graph.getCellAt(a,b)};
mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(c){var d=mxCellMarker.prototype.getCell.apply(this,arguments);d!=b.state.cell&&null!=d||null==b.currentPoint||(d=b.graph.getCellAt(b.currentPoint.x,b.currentPoint.y));if(null!=d&&!this.graph.isCellConnectable(d)){var e=this.graph.getModel().getParent(d);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(d=e)}e=b.graph.getModel();if(this.graph.isSwimlane(d)&&null!=b.currentPoint&&
this.graph.hitsSwimlaneContent(d,b.currentPoint.x,b.currentPoint.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&e.isEdge(d)||e.isAncestor(b.state.cell,d))d=null;this.graph.isCellConnectable(d)||(d=null);return d};a.isValidState=function(c){var d=b.graph.getModel();d=b.graph.view.getTerminalPort(c,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource);d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?c.cell:d,b.isSource?d:c.cell);
return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
mxEdgeHandler.prototype.createBends=function(){var a=this.state.cell,b=[];if(null!=this.abspoints)for(var c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1,e=0==c||d;(e||this.graph.isCellBendable(a))&&mxUtils.bind(this,function(f){var g=this.createHandleShape(f,null,f==this.abspoints.length-1);this.initBend(g,mxUtils.bind(this,mxUtils.bind(this,function(){this.dblClickRemoveEnabled&&this.removePoint(this.state,f)})));this.isHandleEnabled(c)&&g.setCursor(e?
mxConstants.CURSOR_TERMINAL_HANDLE:mxConstants.CURSOR_BEND_HANDLE);b.push(g);e||(this.points.push(new mxPoint(0,0)),g.node.style.visibility="hidden")})(c)}return b};mxEdgeHandler.prototype.createVirtualBends=function(){var a=[];if(null!=this.abspoints&&0<this.abspoints.length&&this.graph.isCellBendable(this.state.cell))for(var b=1;b<this.abspoints.length;b++)mxUtils.bind(this,function(c){this.initBend(c);c.setCursor(mxConstants.CURSOR_VIRTUAL_BEND_HANDLE);a.push(c)})(this.createHandleShape());return a};
mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){var b=this.state.getVisibleTerminalState(!0),c=this.state.getVisibleTerminalState(!1),d=this.graph.getCellGeometry(this.state.cell);return(null!=d?this.graph.view.getEdgeStyle(this.state,d.points,b,c):null)!=mxEdgeStyle.EntityRelation||0==a||a==this.abspoints.length-1};
mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&--a;return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
mxEdgeHandler.prototype.createLabelHandleShape=function(){if(null!=this.labelHandleImage){var a=new mxImageShape(new mxRectangle(0,0,this.labelHandleImage.width,this.labelHandleImage.height),this.labelHandleImage.src);a.preserveImageAspect=!1;return a}a=mxConstants.LABEL_HANDLE_SIZE;return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
mxEdgeHandler.prototype.initBend=function(a,b){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);mxClient.IS_TOUCH&&a.node.setAttribute("pointer-events","none")};
mxEdgeHandler.prototype.getHandleForEvent=function(a){var b=null;if(null!=this.state){var c=function(g){if(null!=g&&(a.isSource(g)||g.intersectsRectangle(e))){var k=a.getGraphX()-g.bounds.getCenterX();g=a.getGraphY()-g.bounds.getCenterY();k=k*k+g*g;if(null==f||k<=f)return f=k,!0}return!1},d=mxEvent.isMouseEvent(a.getEvent())?0:2*this.tolerance,e=this.allowHandleBoundsCheck?new mxRectangle(a.getGraphX()-d,a.getGraphY()-d,d,d):null,f=null;if(null!=this.customHandles&&this.isCustomHandleEvent(a))for(d=
this.customHandles.length-1;0<=d;d--)if(c(this.customHandles[d].shape))return mxEvent.CUSTOM_HANDLE-d;null!=this.state.text&&(a.isSource(this.state.text)||c(this.labelShape))&&(b=mxEvent.LABEL_HANDLE);if(null!=this.bends)for(d=0;d<this.bends.length;d++)c(this.bends[d])&&(b=d);if(null!=this.virtualBends&&this.isAddVirtualBendEvent(a))for(d=0;d<this.virtualBends.length;d++)c(this.virtualBends[d])&&(b=mxEvent.VIRTUAL_HANDLE-d)}return b};mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!0};
mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!0};
mxEdgeHandler.prototype.mouseDown=function(a,b){if(this.graph.isCellEditable(this.state.cell)){a=this.getHandleForEvent(b);if(null!=this.bends&&null!=this.bends[a]){var c=this.bends[a].bounds;this.snapPoint=new mxPoint(c.getCenterX(),c.getCenterY())}if(this.addEnabled&&null==a&&this.isAddPointEvent(b.getEvent()))this.addPoint(this.state,b.getEvent()),b.consume();else if(null!=a&&!b.isConsumed()&&this.graph.isEnabled()){if(this.removeEnabled&&this.isRemovePointEvent(b.getEvent()))this.removePoint(this.state,
a);else if(a!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))a<=mxEvent.VIRTUAL_HANDLE&&mxUtils.setOpacity(this.virtualBends[mxEvent.VIRTUAL_HANDLE-a].node,100),this.mouseDownX=b.getX(),this.mouseDownY=b.getY(),this.handle=a;mxEvent.isShiftDown(b.getEvent())||b.consume()}}};
mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c;if(this.index<=mxEvent.CUSTOM_HANDLE&&this.index>
mxEvent.VIRTUAL_HANDLE&&null!=this.customHandles)for(c=0;c<this.customHandles.length;c++)c!=mxEvent.CUSTOM_HANDLE-this.index&&this.customHandles[c].setVisible(!1)};mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return 2};mxEdgeHandler.prototype.updateHint=function(a,b){};mxEdgeHandler.prototype.removeHint=function(){};mxEdgeHandler.prototype.roundLength=function(a){return Math.round(a)};
mxEdgeHandler.prototype.isSnapToTerminalsEvent=function(a){return this.snapToTerminals&&!mxEvent.isAltDown(a.getEvent())};
mxEdgeHandler.prototype.getPointForEvent=function(a){var b=this.graph.getView(),c=b.scale,d=new mxPoint(this.roundLength(a.getGraphX()/c)*c,this.roundLength(a.getGraphY()/c)*c),e=this.getSnapToTerminalTolerance(),f=!1,g=!1;if(0<e&&this.isSnapToTerminalsEvent(a)){var k=function(n){null!=n&&l.call(this,new mxPoint(b.getRoutingCenterX(n),b.getRoutingCenterY(n)))},l=function(n){if(null!=n){var p=n.x;Math.abs(d.x-p)<e&&(d.x=p,f=!0);n=n.y;Math.abs(d.y-n)<e&&(d.y=n,g=!0)}};k.call(this,this.state.getVisibleTerminalState(!0));
k.call(this,this.state.getVisibleTerminalState(!1));k=this.state.absolutePoints;if(null!=k)for(var m=0;m<k.length;m++)(0<m||!this.state.isFloatingTerminalPoint(!0))&&(m<k.length-1||!this.state.isFloatingTerminalPoint(!1))&&l.call(this,this.state.absolutePoints[m])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=b.translate,f||(d.x=(this.graph.snap(d.x/c-a.x)+a.x)*c),g||(d.y=(this.graph.snap(d.y/c-a.y)+a.y)*c));return d};
mxEdgeHandler.prototype.getPreviewTerminalState=function(a){var b=this.getConstraintHandler();b.update(a,this.isSource,!0,a.isSource(this.marker.highlight.shape)?null:this.currentPoint);if(null!=b.currentFocus&&null!=b.currentConstraint)return null!=this.marker.highlight&&null!=this.marker.highlight.state&&this.marker.highlight.state.cell==b.currentFocus.cell?"transparent"!=this.marker.highlight.shape.stroke&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint()):this.marker.markCell(b.currentFocus.cell,
"transparent"),a=this.graph.getModel(),a=this.graph.view.getTerminalPort(this.state,this.graph.view.getState(a.getTerminal(this.state.cell,!this.isSource)),!this.isSource),a=null!=a?a.cell:null,this.error=this.validateConnection(this.isSource?b.currentFocus.cell:a,this.isSource?a:b.currentFocus.cell),a=null,null==this.error&&(a=b.currentFocus),(null!=this.error||null!=a&&!this.isCellEnabled(a.cell))&&b.reset(),a;if(this.graph.isIgnoreTerminalEvent(a.getEvent()))return this.marker.reset(),null;this.marker.process(a);
a=this.marker.getValidState();null==a||this.isCellEnabled(a.cell)||(b.reset(),this.marker.reset());return this.marker.getValidState()};
mxEdgeHandler.prototype.getPreviewPoints=function(a,b){var c=this.graph.getCellGeometry(this.state.cell);c=null!=c.points?c.points.slice():null;var d=new mxPoint(a.x,a.y),e=null;if(this.isSource||this.isTarget)this.graph.resetEdgesOnConnect&&(c=null);else if(this.convertPoint(d,!1),null==c)c=[d];else{this.index<=mxEvent.VIRTUAL_HANDLE&&c.splice(mxEvent.VIRTUAL_HANDLE-this.index,0,d);if(!this.isSource&&!this.isTarget){for(var f=0;f<this.bends.length;f++)if(f!=this.index){var g=this.bends[f];null!=
g&&mxUtils.contains(g.bounds,a.x,a.y)&&(this.index<=mxEvent.VIRTUAL_HANDLE?c.splice(mxEvent.VIRTUAL_HANDLE-this.index,1):c.splice(this.index-1,1),e=c)}if(null==e&&this.straightRemoveEnabled&&(null==b||!mxEvent.isAltDown(b.getEvent()))){b=this.graph.tolerance*this.graph.tolerance;f=this.state.absolutePoints.slice();f[this.index]=a;var k=this.state.getVisibleTerminalState(!0);null!=k&&(g=this.graph.getConnectionConstraint(this.state,k,!0),null==g||null==this.graph.getConnectionPoint(k,g))&&(f[0]=new mxPoint(k.view.getRoutingCenterX(k),
k.view.getRoutingCenterY(k)));k=this.state.getVisibleTerminalState(!1);null!=k&&(g=this.graph.getConnectionConstraint(this.state,k,!1),null==g||null==this.graph.getConnectionPoint(k,g))&&(f[f.length-1]=new mxPoint(k.view.getRoutingCenterX(k),k.view.getRoutingCenterY(k)));g=this.index;0<g&&g<f.length-1&&mxUtils.ptSegDistSq(f[g-1].x,f[g-1].y,f[g+1].x,f[g+1].y,a.x,a.y)<b&&(c.splice(g-1,1),e=c)}}null==e&&this.index>mxEvent.VIRTUAL_HANDLE&&(c[this.index-1]=d)}return null!=e?e:c};
mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){if(mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent()))return!1;var b=mxUtils.getOffset(this.graph.container),c=a.getEvent(),d=mxEvent.getClientX(c);c=mxEvent.getClientY(c);var e=document.documentElement,f=this.currentPoint.x-this.graph.container.scrollLeft+b.x-((window.pageXOffset||e.scrollLeft)-(e.clientLeft||0));b=this.currentPoint.y-this.graph.container.scrollTop+b.y-((window.pageYOffset||e.scrollTop)-(e.clientTop||0));return this.outlineConnect&&
(mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isAltDown(a.getEvent())||a.isSource(this.marker.highlight.shape)||!mxEvent.isShiftDown(a.getEvent())&&mxEvent.isAltDown(a.getEvent())&&null!=a.getState()||this.marker.highlight.isHighlightAt(d,c)||(f!=d||b!=c)&&null==a.getState()&&this.marker.highlight.isHighlightAt(f,b))};
mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d,e){var f=this.isSource?c:this.state.getVisibleTerminalState(!0),g=this.isTarget?c:this.state.getVisibleTerminalState(!1),k=this.graph.getConnectionConstraint(a,f,!0),l=this.graph.getConnectionConstraint(a,g,!1),m=this.getConstraintHandler(),n=m.currentConstraint;null==n&&e&&(null!=c?(d.isSource(this.marker.highlight.shape)&&(b=new mxPoint(d.getGraphX(),d.getGraphY())),n=this.graph.getOutlineConstraint(b,c,d),m.setFocus(d,c,this.isSource),
m.currentConstraint=n,m.currentPoint=b):n=new mxConnectionConstraint);if(this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape){var p=this.graph.view.scale;null!=m.currentConstraint&&null!=m.currentFocus?(this.marker.highlight.shape.stroke=e?mxConstants.OUTLINE_HIGHLIGHT_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/p/p,this.marker.highlight.repaint()):this.marker.hasValidState()&&(this.marker.highlight.shape.stroke=
this.graph.isCellConnectable(d.getCell())&&this.marker.getValidState()!=d.getState()?"transparent":mxConstants.DEFAULT_VALID_COLOR,this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/p/p,this.marker.highlight.repaint())}this.isSource?k=n:this.isTarget&&(l=n);if(this.isSource||this.isTarget)null!=n&&null!=n.point?(a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X]=n.point.x,a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]=n.point.y):
(delete a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X],delete a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]);a.setVisibleTerminalState(f,!0);a.setVisibleTerminalState(g,!1);this.isSource&&null==f||a.view.updateFixedTerminalPoint(a,f,!0,k);this.isTarget&&null==g||a.view.updateFixedTerminalPoint(a,g,!1,l);(this.isSource||this.isTarget)&&null==c&&(a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?
null:""));a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)};
mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getConstraintHandler();this.currentPoint=this.getPointForEvent(b);this.error=null;null!=this.snapPoint&&mxEvent.isShiftDown(b.getEvent())&&!this.graph.isIgnoreTerminalEvent(b.getEvent())&&null==c.currentFocus&&c.currentFocus!=this.state&&(Math.abs(this.snapPoint.x-this.currentPoint.x)<Math.abs(this.snapPoint.y-this.currentPoint.y)?this.currentPoint.x=this.snapPoint.x:this.currentPoint.y=this.snapPoint.y);
if(this.index<=mxEvent.CUSTOM_HANDLE&&this.index>mxEvent.VIRTUAL_HANDLE)null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].positionChanged(),null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display="none"));else if(this.isLabel)this.label.x=this.currentPoint.x,this.label.y=this.currentPoint.y;else{this.points=this.getPreviewPoints(this.currentPoint,b);a=this.isSource||this.isTarget?this.getPreviewTerminalState(b):
null;if(null!=c.currentConstraint&&null!=c.currentFocus&&null!=c.currentPoint)this.currentPoint=c.currentPoint.clone();else if(this.outlineConnect){var d=this.isSource||this.isTarget?this.isOutlineConnectEvent(b):!1;d?a=this.marker.highlight.state:null!=a&&a!=b.getState()&&this.graph.isCellConnectable(b.getCell())&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint(),a=null)}null==a||this.isCellEnabled(a.cell)||(a=null,this.marker.reset());
c=this.clonePreviewState(this.currentPoint,null!=a?a.cell:null);this.updatePreviewState(c,this.currentPoint,a,b,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=c.absolutePoints;this.active=!0;this.updateHint(b,this.currentPoint,c)}this.drawPreview();mxEvent.consume(b.getEvent());b.consume()}else mxEvent.isShiftDown(b.getEvent())||null==this.handle||null==this.mouseDownX||null==this.mouseDownY||(d=this.graph.tolerance,(Math.abs(this.mouseDownX-
b.getX())>d||Math.abs(this.mouseDownY-b.getY())>d)&&this.start(this.mouseDownX,this.mouseDownY,this.handle))};
mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display="");a=this.state.cell;var c=this.index;this.index=null;if(b.getX()!=this.startX||b.getY()!=this.startY){var d=!this.graph.isIgnoreTerminalEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable();if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(c<=mxEvent.CUSTOM_HANDLE&&
c>mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){var e=this.graph.getModel();e.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-c].execute(b),null!=this.shape&&null!=this.shape.node&&(this.shape.apply(this.state),this.shape.redraw())}finally{e.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget)if(c=null,null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&
(c=this.constraintHandler.currentFocus.cell),null==c&&this.marker.hasValidState()&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&&"white"!=this.marker.highlight.shape.stroke&&(c=this.marker.validState.cell),null!=c){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=e.getGeometry(a),k=this.graph.cloneCell(a);e.add(f,k,e.getChildCount(f));null!=g&&(g=g.clone(),e.setGeometry(k,g));var l=e.getTerminal(a,!this.isSource);
this.graph.connectCell(k,l,!this.isSource);a=k}a=this.connect(a,c,this.isSource,d,b)}finally{e.endUpdate()}}else this.graph.isAllowDanglingEdges()&&(g=this.abspoints[this.isSource?0:this.abspoints.length-1],g.x=this.roundLength(g.x/this.graph.view.scale-this.graph.view.translate.x),g.y=this.roundLength(g.y/this.graph.view.scale-this.graph.view.translate.y),k=this.graph.getView().getState(this.graph.getModel().getParent(a)),null!=k&&(g.x-=k.origin.x,g.y-=k.origin.y),g.x-=this.graph.panDx/this.graph.view.scale,
g.y-=this.graph.panDy/this.graph.view.scale,a=this.changeTerminalPoint(a,g,this.isSource,d));else this.active?a=this.changePoints(a,this.points,d):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().validate(this.state.cell))}else this.graph.isToggleEvent(b.getEvent())&&this.graph.selectCellForEvent(this.state.cell,b.getEvent());null!=this.marker&&(this.reset(),a!=this.state.cell&&this.graph.setSelectionCell(a));b.consume()}else null==this.handle||null==this.bends||mxEvent.isAltDown(b.getEvent())||
0!=this.handle&&this.handle!=this.bends.length-1||(c=this.state.getVisibleTerminal(0==this.handle),null!=c&&(this.graph.selectCellForEvent(c,b.getEvent()),b.consume()));this.mouseDownY=this.mouseDownX=this.handle=null};
mxEdgeHandler.prototype.reset=function(){this.active&&this.refresh();this.snapPoint=this.mouseDownY=this.mouseDownX=this.startY=this.startX=this.handle=this.points=this.label=this.index=this.error=null;this.active=this.isTarget=this.isSource=this.isLabel=!1;if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");null!=this.marker&&this.marker.reset();null!=this.constraintHandler&&this.constraintHandler.reset();if(null!=
this.customHandles)for(a=0;a<this.customHandles.length;a++)this.customHandles[a].reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.removeHint();this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);b=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=b&&(a.x-=b.origin.x,a.y-=b.origin.y);return a};
mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale;e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=Math.round(1E4*g.x)/1E4;e.y=Math.round(g.y);e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint(Math.round((b-g.x)/f),Math.round((c-g.y)/f))}else{var k=a.absolutePoints;g=k[0];k=k[k.length-1];null!=g&&null!=k&&(e.offset=new mxPoint(Math.round((b-
(g.x+(k.x-g.x)/2))/f),Math.round((c-(g.y+(k.y-g.y)/2))/f)),e.x=0,e.y=0)}d.setGeometry(a.cell,e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){d=this.graph.getModel();d.beginUpdate();try{var f=null!=this.constraintHandler?this.constraintHandler.currentConstraint:null;null==f&&(f=new mxConnectionConstraint);this.graph.connectCell(a,b,c,f)}finally{d.endUpdate()}return a};
mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c,d){var e=this.graph.getModel();e.beginUpdate();try{if(d){var f=e.getParent(a),g=e.getTerminal(a,!c);a=this.graph.cloneCell(a);e.add(f,a,e.getChildCount(f));e.setTerminal(a,g,!c)}var k=e.getGeometry(a);null!=k&&(k=k.clone(),k.setTerminalPoint(b,c),e.setGeometry(a,k),this.graph.connectCell(a,null,c,new mxConnectionConstraint))}finally{e.endUpdate()}return a};
mxEdgeHandler.prototype.changePoints=function(a,b,c){var d=this.graph.getModel();d.beginUpdate();try{if(c){var e=d.getParent(a),f=d.getTerminal(a,!0),g=d.getTerminal(a,!1);a=this.graph.cloneCell(a);d.add(e,a,d.getChildCount(e));d.setTerminal(a,f,!0);d.setTerminal(a,g,!1)}var k=d.getGeometry(a);null!=k&&(k=k.clone(),k.points=b,d.setGeometry(a,k))}finally{d.endUpdate()}return a};
mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();var e=this.graph.view.translate;c=this.graph.view.scale;e=new mxPoint(e.x*c,e.y*c);var f=this.graph.model.getParent(this.state.cell);this.graph.model.isVertex(f)&&(e=this.graph.view.getState(f),e=new mxPoint(e.x,e.y));c=mxUtils.findNearestSegment(a,b.x*c+e.x,b.y*c+e.y);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.refresh();
this.redraw()}};mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.refresh(),this.redraw())}};
mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
mxEdgeHandler.prototype.redraw=function(a){if(null!=this.state&&null!=this.state.absolutePoints){this.abspoints=this.state.absolutePoints.slice();var b=this.graph.getModel().getGeometry(this.state.cell);if(null!=b&&(b=b.points,null!=this.bends&&0<this.bends.length&&null!=b)){null==this.points&&(this.points=[]);for(var c=1;c<this.bends.length-1;c++)null!=this.bends[c]&&null!=this.abspoints[c]&&(this.points[c-1]=b[c-1])}this.drawPreview();a||this.redrawHandles()}};
mxEdgeHandler.prototype.isTerminalHandleVisible=function(a){return!0};
mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell;if(null!=this.labelShape){var b=this.labelShape.bounds;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b.width/2),Math.round(this.label.y-b.height/2),b.width,b.height);b=this.graph.getLabel(a);this.labelShape.visible=null!=b&&0<b.length&&this.graph.isCellEditable(this.state.cell)&&this.graph.isLabelMovable(a)&&this.isHandlesVisible()}if(null!=
this.bends&&0<this.bends.length){var c=this.abspoints.length-1;a=this.abspoints[0];var d=a.x,e=a.y;b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.floor(d-b.width/2),Math.floor(e-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[0].bounds);this.bends[0].node.style.visibility=this.isHandlesVisible()&&this.isTerminalHandleVisible(!0)?"":"hidden";c=this.abspoints[c];d=c.x;e=c.y;
var f=this.bends.length-1;b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.floor(d-b.width/2),Math.floor(e-b.height/2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[f].bounds);this.bends[f].node.style.visibility=this.isHandlesVisible()&&this.isTerminalHandleVisible(!1)?"":"hidden";this.redrawInnerBends(a,c)}if(null!=this.abspoints&&null!=this.virtualBends&&0<this.virtualBends.length)for(c=
this.abspoints[0],a=0;a<this.virtualBends.length;a++)null!=this.virtualBends[a]&&null!=this.abspoints[a+1]&&(d=this.abspoints[a+1],b=this.virtualBends[a],b.bounds=new mxRectangle(Math.floor(c.x+(d.x-c.x)/2-b.bounds.width/2),Math.floor(c.y+(d.y-c.y)/2-b.bounds.height/2),b.bounds.width,b.bounds.height),b.redraw(),mxUtils.setOpacity(b.node,this.virtualBendOpacity),c=d,this.manageLabelHandle&&this.checkLabelHandle(b.bounds),b.node.style.visibility=this.isHandlesVisible()?"":"hidden");null!=this.labelShape&&
this.labelShape.redraw();if(null!=this.customHandles)for(a=0;a<this.customHandles.length;a++)b=this.customHandles[a].shape.node.style.display,this.customHandles[a].redraw(),this.customHandles[a].shape.node.style.display=b,this.customHandles[a].shape.node.style.visibility=!this.graph.isEditing()&&this.isHandlesVisible()&&this.isCustomHandleVisible(this.customHandles[a])?"":"hidden"};mxEdgeHandler.prototype.isCustomHandleVisible=function(a){return 1==this.state.view.graph.getSelectionCount()};
mxEdgeHandler.prototype.setHandlesVisible=function(a){if(null!=this.bends)for(var b=0;b<this.bends.length;b++)null!=this.bends[b]&&(this.bends[b].node.style.display=a?"":"none");if(null!=this.virtualBends)for(b=0;b<this.virtualBends.length;b++)null!=this.virtualBends[b]&&(this.virtualBends[b].node.style.display=a?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=a?"":"none");if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)this.customHandles[b].setVisible(a)};
mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(a=1;a<this.bends.length-1;a++)if(null!=this.bends[a])if(null!=this.abspoints[a]){b=this.abspoints[a].x;var c=this.abspoints[a].y,d=this.bends[a].bounds;this.bends[a].bounds=new mxRectangle(Math.round(b-d.width/2),Math.round(c-d.height/2),d.width,d.height);this.manageLabelHandle?this.checkLabelHandle(this.bends[a].bounds):null==this.handleImage&&this.labelShape.visible&&mxUtils.intersects(this.bends[a].bounds,this.labelShape.bounds)&&(w=mxConstants.HANDLE_SIZE+
3,h=mxConstants.HANDLE_SIZE+3,this.bends[a].bounds=new mxRectangle(Math.round(b-w/2),Math.round(c-h/2),w,h));this.bends[a].redraw();this.bends[a].node.style.visibility=this.isHandlesVisible()?"":"hidden"}else this.bends[a].destroy(),this.bends[a]=null};mxEdgeHandler.prototype.checkLabelHandle=function(a){if(null!=this.labelShape){var b=this.labelShape.bounds;mxUtils.intersects(a,b)&&(a.getCenterY()<b.getCenterY()?b.y=a.y+a.height:b.y=a.y-b.height)}};
mxEdgeHandler.prototype.drawPreview=function(){try{if(this.isLabel){var a=this.labelShape.bounds,b=new mxRectangle(Math.round(this.label.x-a.width/2),Math.round(this.label.y-a.height/2),a.width,a.height);this.labelShape.bounds.equals(b)||(this.labelShape.bounds=b,this.labelShape.redraw())}null==this.shape||mxUtils.equalPoints(this.shape.points,this.abspoints)||(this.shape.apply(this.state),this.shape.points=this.abspoints.slice(),this.shape.scale=this.state.view.scale,this.shape.isDashed=this.isSelectionDashed(),
this.shape.stroke=this.getSelectionColor(),this.shape.strokewidth=this.getSelectionStrokeWidth()/this.shape.scale/this.shape.scale,this.shape.isShadow=!1,this.shape.redraw());this.updateParentHighlight()}catch(c){}};mxEdgeHandler.prototype.isHandlesVisible=function(){return!this.graph.isCellLocked(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<=mxGraphHandler.prototype.maxCells)};
mxEdgeHandler.prototype.refresh=function(){null!=this.state&&(this.abspoints=this.getSelectionPoints(this.state),this.points=[],null!=this.shape&&(this.shape.isDashed=this.isSelectionDashed(),this.shape.stroke=this.getSelectionColor(),this.shape.isShadow=!1,this.shape.redraw()),null!=this.bends&&(this.destroyBends(this.bends),this.bends=null),this.isHandlesVisible()&&(this.bends=this.createBends()),null!=this.virtualBends&&(this.destroyBends(this.virtualBends),this.virtualBends=null),this.isHandlesVisible()&&
(this.virtualBends=this.createVirtualBends()),null!=this.customHandles&&(this.destroyBends(this.customHandles),this.customHandles=null),this.isHandlesVisible()&&(this.customHandles=this.createCustomHandles()),null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null),this.isHandlesVisible()&&(this.labelShape=this.createLabelShape(),null!=this.labelShape&&null!=this.labelShape.node&&null!=this.labelShape.node.parentNode&&this.labelShape.node.parentNode.appendChild(this.labelShape.node)))};
mxEdgeHandler.prototype.isDestroyed=function(){return null==this.shape};mxEdgeHandler.prototype.destroyBends=function(a){if(null!=a)for(var b=0;b<a.length;b++)null!=a[b]&&a[b].destroy()};
mxEdgeHandler.prototype.destroy=function(){null!=this.escapeHandler&&(this.state.view.graph.removeListener(this.escapeHandler),this.escapeHandler=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.parentHighlight&&this.destroyParentHighlight();this.destroyBends(this.virtualBends);
this.virtualBends=null;this.destroyBends(this.customHandles);this.customHandles=null;this.destroyBends(this.bends);this.bends=null;this.removeHint()};function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);a.push(this.createVirtualBend(mxUtils.bind(this,function(c){!mxEvent.isConsumed(c)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,c),mxEvent.consume(c))})));this.points.push(new mxPoint(0,0));b=this.createHandleShape(2,null,!0);this.initBend(b);b.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(b);return a};
mxElbowEdgeHandler.prototype.createVirtualBends=function(){return null};mxElbowEdgeHandler.prototype.createVirtualBend=function(a){var b=this.createHandleShape();this.initBend(b,a);b.setCursor(this.getCursorForBend());this.graph.isCellBendable(this.state.cell)||(b.node.style.display="none");return b};
mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;null==this.bends||null==this.bends[1]||a!=this.bends[1].node&&a.parentNode!=this.bends[1].node||(b=this.doubleClickOrientationResource,b=mxResources.get(b)||b);return b};
mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y);return a};
mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));b=this.bends[1].bounds;a=b.width;
b=b.height;a=new mxRectangle(Math.round(e.x-a/2),Math.round(e.y-b/2),a,b);this.manageLabelHandle?this.checkLabelHandle(a):null==this.handleImage&&this.labelShape.visible&&mxUtils.intersects(a,this.labelShape.bounds)&&(a=mxConstants.HANDLE_SIZE+3,b=mxConstants.HANDLE_SIZE+3,a=new mxRectangle(Math.floor(e.x-a/2),Math.floor(e.y-b/2),a,b));this.bends[1].bounds=a;this.bends[1].redraw();this.manageLabelHandle&&this.checkLabelHandle(this.bends[1].bounds)};
function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxElbowEdgeHandler);
mxEdgeSegmentHandler.prototype.getCurrentPoints=function(){var a=this.state.absolutePoints;if(null!=a){var b=Math.max(1,this.graph.view.scale);if(2==a.length||3==a.length&&(Math.abs(a[0].x-a[1].x)<b&&Math.abs(a[1].x-a[2].x)<b||Math.abs(a[0].y-a[1].y)<b&&Math.abs(a[1].y-a[2].y)<b)){b=a[0].x+(a[a.length-1].x-a[0].x)/2;var c=a[0].y+(a[a.length-1].y-a[0].y)/2;a=[a[0],new mxPoint(b,c),new mxPoint(b,c),a[a.length-1]]}}return a};
mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);var b=this.getCurrentPoints(),c=this.convertPoint(b[0].clone(),!1);a=this.convertPoint(a.clone(),!1);for(var d=[],e=1;e<b.length;e++){var f=this.convertPoint(b[e].clone(),!1);e==this.index&&(0==Math.round(c.x-f.x)&&(c.x=a.x,f.x=a.x),0==Math.round(c.y-f.y)&&(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){b=this.state.getVisibleTerminalState(!0);
c=this.state.getVisibleTerminalState(!1);f=this.state.view.getScale();var g=this.state.view.getTranslate();e=d[0].x*f+g.x;f=d[0].y*f+g.y;if(null!=b&&mxUtils.contains(b,e,f)||null!=c&&mxUtils.contains(c,e,f))d=[a,a]}return d};
mxEdgeSegmentHandler.prototype.updatePreviewState=function(a,b,c,d){mxEdgeHandler.prototype.updatePreviewState.apply(this,arguments);if(!this.isSource&&!this.isTarget){b=this.convertPoint(b.clone(),!1);for(var e=a.absolutePoints,f=e[0],g=e[1],k=[],l=2;l<e.length;l++){var m=e[l];0==Math.round(f.x-g.x)&&0==Math.round(g.x-m.x)||0==Math.round(f.y-g.y)&&0==Math.round(g.y-m.y)||k.push(this.convertPoint(g.clone(),!1));f=g;g=m}f=this.state.getVisibleTerminalState(!0);g=this.state.getVisibleTerminalState(!1);
l=this.state.absolutePoints;if(0==k.length&&(0==Math.round(e[0].x-e[e.length-1].x)||0==Math.round(e[0].y-e[e.length-1].y)))k=[b,b];else if(5==e.length&&2==k.length&&null!=f&&null!=g&&null!=l&&0==Math.round(l[0].x-l[l.length-1].x)){k=this.graph.getView();l=k.getScale();m=k.getTranslate();e=k.getRoutingCenterY(f)/l-m.y;var n=this.graph.getConnectionConstraint(a,f,!0);null!=n&&(n=this.graph.getConnectionPoint(f,n),null!=n&&(this.convertPoint(n,!1),e=n.y));k=k.getRoutingCenterY(g)/l-m.y;if(l=this.graph.getConnectionConstraint(a,
g,!1))n=this.graph.getConnectionPoint(g,l),null!=n&&(this.convertPoint(n,!1),k=n.y);k=[new mxPoint(b.x,e),new mxPoint(b.x,k)]}this.points=k;a.view.updateFixedTerminalPoints(a,f,g);a.view.updatePoints(a,this.points,f,g);a.view.updateFloatingTerminalPoints(a,f,g)}};
mxEdgeSegmentHandler.prototype.connect=function(a,b,c,d,e){var f=this.graph.getModel(),g=f.getGeometry(a),k=null;if(null!=g&&null!=g.points&&0<g.points.length){var l=this.abspoints,m=l[0],n=l[1];k=[];for(var p=2;p<l.length;p++){var q=l[p];0==Math.round(m.x-n.x)&&0==Math.round(n.x-q.x)||0==Math.round(m.y-n.y)&&0==Math.round(n.y-q.y)||k.push(this.convertPoint(n.clone(),!1));m=n;n=q}}f.beginUpdate();try{null!=k&&(g=f.getGeometry(a),null!=g&&(g=g.clone(),g.points=k,f.setGeometry(a,g))),a=mxEdgeHandler.prototype.connect.apply(this,
arguments)}finally{f.endUpdate()}return a};mxEdgeSegmentHandler.prototype.getTooltipForNode=function(a){return null};mxEdgeSegmentHandler.prototype.start=function(a,b,c){mxEdgeHandler.prototype.start.apply(this,arguments);null==this.bends||null==this.bends[c]||this.isSource||this.isTarget||mxUtils.setOpacity(this.bends[c].node,100)};
mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.getCurrentPoints();if(null!=b){var c=this.createHandleShape(0);this.initBend(c);c.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(c);if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<b.length-1;d++){c=this.createVirtualBend();a.push(c);var e=0==Math.round(b[d].x-b[d+1].x);0==Math.round(b[d].y-b[d+1].y)&&d<b.length-2&&(e=0==Math.round(b[d].x-b[d+2].x));c.setCursor(e?"col-resize":
"row-resize");this.points.push(new mxPoint(0,0))}}c=this.createHandleShape(b.length,null,!0);this.initBend(c);c.setCursor(mxConstants.CURSOR_TERMINAL_HANDLE);a.push(c)}return a};mxEdgeSegmentHandler.prototype.createVirtualBends=function(){return null};
mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=this.getCurrentPoints();if(null!=c&&1<c.length){var d=!1;if(4==c.length&&0==Math.round(c[1].x-c[2].x)&&0==Math.round(c[1].y-c[2].y))if(d=!0,0==Math.round(c[0].y-c[c.length-1].y)){var e=c[0].x+(c[c.length-1].x-c[0].x)/2;c[1]=new mxPoint(e,c[1].y);c[2]=new mxPoint(e,c[2].y)}else e=c[0].y+(c[c.length-1].y-c[0].y)/2,c[1]=new mxPoint(c[1].x,e),c[2]=new mxPoint(c[2].x,e);for(e=0;e<c.length-
1;e++)null!=this.bends[e+1]&&(a=c[e],b=c[e+1],a=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2),b=this.bends[e+1].bounds,this.bends[e+1].bounds=new mxRectangle(Math.floor(a.x-b.width/2),Math.floor(a.y-b.height/2),b.width,b.height),this.bends[e+1].redraw(),this.manageLabelHandle&&this.checkLabelHandle(this.bends[e+1].bounds));d&&(mxUtils.setOpacity(this.bends[1].node,this.virtualBendOpacity),mxUtils.setOpacity(this.bends[3].node,this.virtualBendOpacity))}}};
function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(c){this.keyDown(c)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null==a||mxEvent.isAltDown(a)?null:this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]};
mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.isEnabledForEvent(a))if(27==a.keyCode)this.escape(a);else if(!this.isEventIgnored(a)){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
mxKeyHandler.prototype.isEnabledForEvent=function(a){return this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};mxKeyHandler.prototype.isEventIgnored=function(a){return this.graph.isEditing()};mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};
mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;
mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.destroyed=!1;mxTooltipHandler.prototype.enabled=!1;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){"A"!=mxEvent.getSource(a).nodeName&&this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),a=this.getStateForEvent(b),(this.isHideOnHover()||a!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=a&&this.stateSource==(b.isSource(a.shape)||!b.isSource(a.text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var k=
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerText="")};
mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.style.whiteSpace="",this.div.innerText="",this.div.appendChild(a)):(this.div.style.whiteSpace="pre-line",this.div.innerHTML=a);this.div.style.visibility="";mxUtils.fit(this.div)}};
mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.opacity=mxConstants.HIGHLIGHT_OPACITY,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var e=this.graph.view.getState(this.state.cell);null==e?this.hide():(this.state=e,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,
this.repaintHandler),this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=null;mxCellHighlight.prototype.state=null;
mxCellHighlight.prototype.spacing=0;mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
mxCellHighlight.prototype.createShape=function(){var a=this.graph.cellRenderer.createShape(this.state);a.svgStrokeTolerance=this.graph.tolerance;a.points=this.state.absolutePoints;a.apply(this.state);a.stroke=this.highlightColor;a.opacity=this.opacity;a.isDashed=this.dashed;a.isShadow=!1;a.dialect=mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);this.graph.dialect!=mxConstants.DIALECT_SVG?a.pointerEvents=!1:a.svgPointerEvents=
"stroke";return a};mxCellHighlight.prototype.getStrokeWidth=function(a){return this.strokeWidth};
mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.shape.scale=this.state.view.scale,this.graph.model.isEdge(this.state.cell)?(this.shape.strokewidth=this.getStrokeWidth(),this.shape.points=this.state.absolutePoints,this.shape.outline=!1):(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||
"0"),this.shape.strokewidth=this.getStrokeWidth()/this.state.view.scale,this.shape.outline=!0),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
mxCellHighlight.prototype.isHighlightAt=function(a,b){var c=!1;if(null!=this.shape&&null!=document.elementFromPoint)for(a=document.elementFromPoint(a,b);null!=a;){if(a==this.shape.node){c=!0;break}a=a.parentNode}return c};mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){b=mxUtils.getFunctionName(a);var c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.duplicates=[];this.objects=[]}mxCodec.allowlist=null;mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.duplicates=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){if(null!=this.duplicates[a])throw Error(this.duplicates[a]);return this.objects[a]=b};
mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};mxCodec.prototype.getElementById=function(a){this.updateElements();return this.elements[a]};mxCodec.prototype.updateElements=function(){null==this.elements&&(this.elements={},null!=this.document.documentElement&&this.addElement(this.document.documentElement))};
mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("id");null!=b&&(null==this.elements[b]?this.elements[b]=a:this.elements[b]!=a&&(this.duplicates[b]="Duplicate ID '"+b+"'",null!=window.console&&console.error("mxCodec.addElement: "+this.duplicates[b])))}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};mxCodec.prototype.isObjectIgnored=function(a){return null==a};
mxCodec.prototype.getId=function(a){var b=null;null==a||this.isObjectIgnored(a)||(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor&&!this.isObjectIgnored(a)){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxUtils.importNode(this.document,a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
mxCodec.prototype.decode=function(a,b){this.updateElements();var c=null;null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT&&(c=this.getConstructor(a.nodeName),c=mxCodecRegistry.getCodec(c),null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as")));return c};mxCodec.prototype.isConstructorAllowed=function(a){return null==mxCodec.allowlist||0<=mxUtils.indexOf(mxCodec.allowlist,a)};mxCodec.prototype.getConstructor=function(a){var b=null;try{this.isConstructorAllowed(a)&&(b=window[a])}catch(c){}return b};
mxCodec.prototype.encodeCell=function(a,b,c){if(!this.isObjectIgnored(a)){var d=this.encode(a);null!=d&&b.appendChild(d);if(null==c||c)for(c=a.getChildCount(),d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};
mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;if(null!=b){if(b==a)throw Error(b.id+": Self Reference");b.insert(a)}null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.allowEval=!1;mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null==f||this.isExcluded(b,e,f,!0)||(mxUtils.isInteger(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=1==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(1==d||0==d)};
mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.value;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d),isNaN(d)||!isFinite(d))&&(d=0);return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return c.constructor==mxGeometry&&("x"==b.name||"y"==b.name||"width"==b.name||"height"==b.name)||c.constructor==mxPoint&&("x"==b.name||"y"==b.name)||mxUtils.isNumeric(b.value)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};
mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};
mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};mxObjectCodec.prototype.isIgnoredAttribute=function(a,b,c){return"as"==b.nodeName||"id"==b.nodeName||"function"===typeof c[b.nodeName]};
mxObjectCodec.prototype.decodeAttribute=function(a,b,c){if(!this.isIgnoredAttribute(a,b,c)){var d=b.nodeName;b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType!=mxConstants.NODETYPE_ELEMENT||this.processInclude(a,b,c)||this.decodeChild(a,b,c);b=d}};
mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b);"add"==b.nodeName?(a=b.getAttribute("value"),null==a&&mxObjectCodec.allowEval&&(a=mxUtils.eval(mxUtils.getTextContent(b)))):a=a.decode(b,e);try{this.addObjectValue(c,d,a,e)}catch(f){throw Error(f.message+" "+b.nodeName+(null!=d?" as "+d:""));}}};
mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){if(null!=c&&c!=d)if(null!=b&&0<b.length)a[b]=c;else if(a.constructor===Array)a.push(c);else throw Error("Could not add object");};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};
mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&mxUtils.isNode(d)};a.afterEncode=function(b,c,d){if(null!=c.value&&mxUtils.isNode(c.value)){var e=
d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));
if(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);if(null==k){var l=b.getElementById(g);null!=l?k=(mxCodecRegistry.codecs[l.nodeName]||this).decode(b,l):null!=window.console&&console.error("mxCellCodec.beforeDecode: "+this.idrefs[c]+" "+g+" not found for cell "+d.getId())}d[f]=k}}return e};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(b,c,d){var e=b.document.createElement("root");b.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(b,c,d){"root"==c.nodeName?this.decodeRoot(b,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(b,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=b.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(b,c,d){b.encodeCell(c.root,d);return d};a.beforeDecode=function(b,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=b.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,b.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(b,c,
d){d.previous=d.root;return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(b,c,d,e){return"child"!=c||e&&!b.model.contains(b.previous)?0<=mxUtils.indexOf(this.idrefs,c):!0};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&null!=d&&("previous"==c||"parent"==c)&&!b.model.contains(d)};a.afterEncode=function(b,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",
b.getId(c.child)):b.encodeCell(c.child,d);return d};a.beforeDecode=function(b,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.child=b.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==b.lookup(f)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=b.getObject(e);return c};
a.afterDecode=function(b,c,d){null!=d.child&&(null!=d.child.parent&&null!=d.previous&&d.child.parent!=d.previous&&(d.previous=d.child.parent),d.child.parent=d.previous,d.previous=d.parent,d.previousIndex=d.index);return d};return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(b,c,d){d.previous=d.terminal;return d};return a}());
var mxGenericChangeCodec=function(a,b){a=new mxObjectCodec(a,["model","previous"],["cell"]);a.afterDecode=function(c,d,e){mxUtils.isNode(e.cell)&&(e.cell=c.decodeCell(e.cell,!1));e.previous=e[b];return e};return a};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));
mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(b,c){return this.encodeCell(b,c,c.graph.getModel().getRoot())};a.encodeCell=function(b,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var k=e.getChildCount(d),l=c.graph.getCellGeometry(d),m=null;g==e.getRoot()?m="layer":null==g?m="graph":e.isEdge(d)?m="edge":0<k&&null!=l?m="group":e.isVertex(d)&&(m="vertex");if(null!=m){var n=b.document.createElement(m);null!=c.graph.getLabel(d)&&
(n.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&n.setAttribute("html",!0));if(null==g){var p=c.getGraphBounds();null!=p&&(n.setAttribute("x",Math.round(p.x)),n.setAttribute("y",Math.round(p.y)),n.setAttribute("width",Math.round(p.width)),n.setAttribute("height",Math.round(p.height)));n.setAttribute("scale",c.scale)}else if(null!=f&&null!=l){for(p in f.style)g=f.style[p],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&"function"!=typeof g&&"object"!=
typeof g&&n.setAttribute(p,g);g=f.absolutePoints;if(null!=g&&0<g.length){l=Math.round(g[0].x)+","+Math.round(g[0].y);for(p=1;p<g.length;p++)l+=" "+Math.round(g[p].x)+","+Math.round(g[p].y);n.setAttribute("points",l)}else n.setAttribute("x",Math.round(f.x)),n.setAttribute("y",Math.round(f.y)),n.setAttribute("width",Math.round(f.width)),n.setAttribute("height",Math.round(f.height));p=f.absoluteOffset;null!=p&&(0!=p.x&&n.setAttribute("dx",Math.round(p.x)),0!=p.y&&n.setAttribute("dy",Math.round(p.y)))}for(p=
0;p<k;p++)f=this.encodeCell(b,c,e.getChildAt(d,p)),null!=f&&n.appendChild(f)}}return n};return a}());
var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(b,c){var d=b.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=b.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var k in f){var l=this.getStringValue(k,f[k]);if(null!=l){var m=b.document.createElement("add");m.setAttribute("value",l);m.setAttribute("as",k);g.appendChild(m)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!1;
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
Editor=function(b,e,g,m,v){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=m||this.createGraph(e,g);this.editable=null!=v?v:!b;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(n,A){this.status=n;this.statusFunction=A;this.fireEvent(new mxEventObject("statusChanged"))};
this.getStatus=function(){return this.status};this.graphChangeListener=function(n,A){n=null!=A?A.getProperty("edit"):null;null!=n&&n.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()};mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;
Editor.pageCounter=0;(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.smallScreenWidth=1024;Editor.helpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDc4LTI0MHEyMSAwIDM1LjUtMTQuNVQ1MjgtMjkwcTAtMjEtMTQuNS0zNS41VDQ3OC0zNDBxLTIxIDAtMzUuNSAxNC41VDQyOC0yOTBxMCAyMSAxNC41IDM1LjVUNDc4LTI0MFptLTM2LTE1NGg3NHEwLTMzIDcuNS01MnQ0Mi41LTUycTI2LTI2IDQxLTQ5LjV0MTUtNTYuNXEwLTU2LTQxLTg2dC05Ny0zMHEtNTcgMC05Mi41IDMwVDM0Mi02MThsNjYgMjZxNS0xOCAyMi41LTM5dDUzLjUtMjFxMzIgMCA0OCAxNy41dDE2IDM4LjVxMCAyMC0xMiAzNy41VDUwNi01MjZxLTQ0IDM5LTU0IDU5dC0xMCA3M1ptMzggMzE0cS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptMC04MHExMzQgMCAyMjctOTN0OTMtMjI3cTAtMTM0LTkzLTIyN3QtMjI3LTkzcS0xMzQgMC0yMjcgOTN0LTkzIDIyN3EwIDEzNCA5MyAyMjd0MjI3IDkzWm0wLTMyMFoiLz48L3N2Zz4=";
Editor.menuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTI0MHYtODBoNzIwdjgwSDEyMFptMC0yMDB2LTgwaDcyMHY4MEgxMjBabTAtMjAwdi04MGg3MjB2ODBIMTIwWiIvPjwvc3ZnPg==";Editor.moveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=";
Editor.zoomInImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzg0LTEyMCA1MzItMzcycS0zMCAyNC02OSAzOHQtODMgMTRxLTEwOSAwLTE4NC41LTc1LjVUMTIwLTU4MHEwLTEwOSA3NS41LTE4NC41VDM4MC04NDBxMTA5IDAgMTg0LjUgNzUuNVQ2NDAtNTgwcTAgNDQtMTQgODN0LTM4IDY5bDI1MiAyNTItNTYgNTZaTTM4MC00MDBxNzUgMCAxMjcuNS01Mi41VDU2MC01ODBxMC03NS01Mi41LTEyNy41VDM4MC03NjBxLTc1IDAtMTI3LjUgNTIuNVQyMDAtNTgwcTAgNzUgNTIuNSAxMjcuNVQzODAtNDAwWm0tNDAtNjB2LTgwaC04MHYtODBoODB2LTgwaDgwdjgwaDgwdjgwaC04MHY4MGgtODBaIi8+PC9zdmc+";
Editor.zoomOutImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzg0LTEyMCA1MzItMzcycS0zMCAyNC02OSAzOHQtODMgMTRxLTEwOSAwLTE4NC41LTc1LjVUMTIwLTU4MHEwLTEwOSA3NS41LTE4NC41VDM4MC04NDBxMTA5IDAgMTg0LjUgNzUuNVQ2NDAtNTgwcTAgNDQtMTQgODN0LTM4IDY5bDI1MiAyNTItNTYgNTZaTTM4MC00MDBxNzUgMCAxMjcuNS01Mi41VDU2MC01ODBxMC03NS01Mi41LTEyNy41VDM4MC03NjBxLTc1IDAtMTI3LjUgNTIuNVQyMDAtNTgwcTAgNzUgNTIuNSAxMjcuNVQzODAtNDAwWk0yODAtNTQwdi04MGgyMDB2ODBIMjgwWiIvPjwvc3ZnPg==";
Editor.fullscreenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtMjAwaDgwdjEyMGgxMjB2ODBIMTIwWm01MjAgMHYtODBoMTIwdi0xMjBoODB2MjAwSDY0MFpNMTIwLTY0MHYtMjAwaDIwMHY4MEgyMDB2MTIwaC04MFptNjQwIDB2LTEyMEg2NDB2LTgwaDIwMHYyMDBoLTgwWiIvPjwvc3ZnPg==";Editor.fullscreenExitImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjQwLTEyMHYtMTIwSDEyMHYtODBoMjAwdjIwMGgtODBabTQwMCAwdi0yMDBoMjAwdjgwSDcyMHYxMjBoLTgwWk0xMjAtNjQwdi04MGgxMjB2LTEyMGg4MHYyMDBIMTIwWm01MjAgMHYtMjAwaDgwdjEyMGgxMjB2ODBINjQwWiIvPjwvc3ZnPg==";
Editor.zoomFitImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTMyMHEtNjYgMC0xMTMtNDd0LTQ3LTExM3EwLTY2IDQ3LTExM3QxMTMtNDdxNjYgMCAxMTMgNDd0NDcgMTEzcTAgNjYtNDcgMTEzdC0xMTMgNDdabTAtODBxMzMgMCA1Ni41LTIzLjVUNTYwLTQ4MHEwLTMzLTIzLjUtNTYuNVQ0ODAtNTYwcS0zMyAwLTU2LjUgMjMuNVQ0MDAtNDgwcTAgMzMgMjMuNSA1Ni41VDQ4MC00MDBabTAtODBaTTIwMC0xMjBxLTMzIDAtNTYuNS0yMy41VDEyMC0yMDB2LTE2MGg4MHYxNjBoMTYwdjgwSDIwMFptNDAwIDB2LTgwaDE2MHYtMTYwaDgwdjE2MHEwIDMzLTIzLjUgNTYuNVQ3NjAtMTIwSDYwMFpNMTIwLTYwMHYtMTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoMTYwdjgwSDIwMHYxNjBoLTgwWm02NDAgMHYtMTYwSDYwMHYtODBoMTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2MTYwaC04MFoiLz48L3N2Zz4=";
Editor.layersImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTExOCAxMjAtMzk4bDY2LTUwIDI5NCAyMjggMjk0LTIyOCA2NiA1MC0zNjAgMjgwWm0wLTIwMkwxMjAtNjAwbDM2MC0yODAgMzYwIDI4MC0zNjAgMjgwWm0wLTI4MFptMCAxNzggMjMwLTE3OC0yMzAtMTc4LTIzMCAxNzggMjMwIDE3OFoiLz48L3N2Zz4=";Editor.editImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTIwMGg1N2wzOTEtMzkxLTU3LTU3LTM5MSAzOTF2NTdabS04MCA4MHYtMTcwbDUyOC01MjdxMTItMTEgMjYuNS0xN3QzMC41LTZxMTYgMCAzMSA2dDI2IDE4bDU1IDU2cTEyIDExIDE3LjUgMjZ0NS41IDMwcTAgMTYtNS41IDMwLjVUODE3LTY0N0wyOTAtMTIwSDEyMFptNjQwLTU4NC01Ni01NiA1NiA1NlptLTE0MSA4NS0yOC0yOSA1NyA1Ny0yOS0yOFoiLz48L3N2Zz4=";
Editor.duplicateImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzYwLTI0MHEtMzMgMC01Ni41LTIzLjVUMjgwLTMyMHYtNDgwcTAtMzMgMjMuNS01Ni41VDM2MC04ODBoMzYwcTMzIDAgNTYuNSAyMy41VDgwMC04MDB2NDgwcTAgMzMtMjMuNSA1Ni41VDcyMC0yNDBIMzYwWm0wLTgwaDM2MHYtNDgwSDM2MHY0ODBaTTIwMC04MHEtMzMgMC01Ni41LTIzLjVUMTIwLTE2MHYtNTYwaDgwdjU2MGg0NDB2ODBIMjAwWm0xNjAtMjQwdi00ODAgNDgwWiIvPjwvc3ZnPg==";
Editor.crossImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMiAxOSA2LjQxeiIvPjwvc3ZnPg==";Editor.trashImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjgwLTEyMHEtMzMgMC01Ni41LTIzLjVUMjAwLTIwMHYtNTIwaC00MHYtODBoMjAwdi00MGgyNDB2NDBoMjAwdjgwaC00MHY1MjBxMCAzMy0yMy41IDU2LjVUNjgwLTEyMEgyODBabTQwMC02MDBIMjgwdjUyMGg0MDB2LTUyMFpNMzYwLTI4MGg4MHYtMzYwaC04MHYzNjBabTE2MCAwaDgwdi0zNjBoLTgwdjM2MFpNMjgwLTcyMHY1MjAtNTIwWiIvPjwvc3ZnPg==";
Editor.hiddenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6bTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNS0uNTkgMS4yMi0xLjQyIDIuMjctMi40MSAzLjEybDEuNDEgMS40MWMxLjM5LTEuMjMgMi40OS0yLjc3IDMuMTgtNC41M0MyMS4yNyA3LjExIDE3IDQgMTIgNGMtMS4yNyAwLTIuNDkuMi0zLjY0LjU3bDEuNjUgMS42NUMxMC42NiA2LjA5IDExLjMyIDYgMTIgNnptLTEuMDcgMS4xNEwxMyA5LjIxYy41Ny4yNSAxLjAzLjcxIDEuMjggMS4yOGwyLjA3IDIuMDdjLjA4LS4zNC4xNC0uNy4xNC0xLjA3QzE2LjUgOS4wMSAxNC40OCA3IDEyIDdjLS4zNyAwLS43Mi4wNS0xLjA3LjE0ek0yLjAxIDMuODdsMi42OCAyLjY4QzMuMDYgNy44MyAxLjc3IDkuNTMgMSAxMS41IDIuNzMgMTUuODkgNyAxOSAxMiAxOWMxLjUyIDAgMi45OC0uMjkgNC4zMi0uODJsMy40MiAzLjQyIDEuNDEtMS40MUwzLjQyIDIuNDUgMi4wMSAzLjg3em03LjUgNy41bDIuNjEgMi42MWMtLjA0LjAxLS4wOC4wMi0uMTIuMDItMS4zOCAwLTIuNS0xLjEyLTIuNS0yLjUgMC0uMDUuMDEtLjA4LjAxLS4xM3ptLTMuNC0zLjRsMS43NSAxLjc1Yy0uMjMuNTUtLjM2IDEuMTUtLjM2IDEuNzggMCAyLjQ4IDIuMDIgNC41IDQuNSA0LjUuNjMgMCAxLjIzLS4xMyAxLjc3LS4zNmwuOTguOThjLS44OC4yNC0xLjguMzgtMi43NS4zOC0zLjc5IDAtNy4xNy0yLjEzLTguODItNS41LjctMS40MyAxLjcyLTIuNjEgMi45My0zLjUzeiIvPjwvc3ZnPg==";
Editor.visibleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMy43OSAwIDcuMTcgMi4xMyA4LjgyIDUuNUMxOS4xNyAxNC44NyAxNS43OSAxNyAxMiAxN3MtNy4xNy0yLjEzLTguODItNS41QzQuODMgOC4xMyA4LjIxIDYgMTIgNm0wLTJDNyA0IDIuNzMgNy4xMSAxIDExLjUgMi43MyAxNS44OSA3IDE5IDEyIDE5czkuMjctMy4xMSAxMS03LjVDMjEuMjcgNy4xMSAxNyA0IDEyIDR6bTAgNWMxLjM4IDAgMi41IDEuMTIgMi41IDIuNVMxMy4zOCAxNCAxMiAxNHMtMi41LTEuMTItMi41LTIuNVMxMC42MiA5IDEyIDltMC0yYy0yLjQ4IDAtNC41IDIuMDItNC41IDQuNVM5LjUyIDE2IDEyIDE2czQuNS0yLjAyIDQuNS00LjVTMTQuNDggNyAxMiA3eiIvPjwvc3ZnPg==";
Editor.lockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PGcgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6Ii8+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBvcGFjaXR5PSIuODciLz48L2c+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2djJINmMtMS4xIDAtMiAuOS0yIDJ2MTBjMCAxLjEuOSAyIDIgMmgxMmMxLjEgMCAyLS45IDItMlYxMGMwLTEuMS0uOS0yLTItMnpNOSA2YzAtMS42NiAxLjM0LTMgMy0zczMgMS4zNCAzIDN2Mkg5VjZ6bTkgMTRINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
Editor.unlockedImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDhoLTFWNmMwLTIuNzYtMi4yNC01LTUtNVM3IDMuMjQgNyA2aDJjMC0xLjY2IDEuMzQtMyAzLTNzMyAxLjM0IDMgM3YySDZjLTEuMSAwLTIgLjktMiAydjEwYzAgMS4xLjkgMiAyIDJoMTJjMS4xIDAgMi0uOSAyLTJWMTBjMC0xLjEtLjktMi0yLTJ6bTAgMTJINlYxMGgxMnYxMHptLTYtM2MxLjEgMCAyLS45IDItMnMtLjktMi0yLTItMiAuOS0yIDIgLjkgMiAyIDJ6Ii8+PC9zdmc+";
Editor.printImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNjQwLTY0MHYtMTIwSDMyMHYxMjBoLTgwdi0yMDBoNDgwdjIwMGgtODBabS00ODAgODBoNjQwLTY0MFptNTYwIDEwMHExNyAwIDI4LjUtMTEuNVQ3NjAtNTAwcTAtMTctMTEuNS0yOC41VDcyMC01NDBxLTE3IDAtMjguNSAxMS41VDY4MC01MDBxMCAxNyAxMS41IDI4LjVUNzIwLTQ2MFptLTgwIDI2MHYtMTYwSDMyMHYxNjBoMzIwWm04MCA4MEgyNDB2LTE2MEg4MHYtMjQwcTAtNTEgMzUtODUuNXQ4NS0zNC41aDU2MHE1MSAwIDg1LjUgMzQuNVQ4ODAtNTIwdjI0MEg3MjB2MTYwWm04MC0yNDB2LTE2MHEwLTE3LTExLjUtMjguNVQ3NjAtNTYwSDIwMHEtMTcgMC0yOC41IDExLjVUMTYwLTUyMHYxNjBoODB2LTgwaDQ4MHY4MGg4MFoiLz48L3N2Zz4=";
Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE3LjY1IDYuMzVDMTYuMiA0LjkgMTQuMjEgNCAxMiA0Yy00LjQyIDAtNy45OSAzLjU4LTcuOTkgOHMzLjU3IDggNy45OSA4YzMuNzMgMCA2Ljg0LTIuNTUgNy43My02aC0yLjA4Yy0uODIgMi4zMy0zLjA0IDQtNS42NSA0LTMuMzEgMC02LTIuNjktNi02czIuNjktNiA2LTZjMS42NiAwIDMuMTQuNjkgNC4yMiAxLjc4TDEzIDExaDdWNGwtMi4zNSAyLjM1eiIvPjwvc3ZnPg==";
Editor.backImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTcuNTEgMy44N0wxNS43MyAyLjEgNS44NCAxMmw5LjkgOS45IDEuNzctMS43N0w5LjM4IDEybDguMTMtOC4xM3oiLz48L3N2Zz4=";Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTIgMkM2LjQ3IDIgMiA2LjQ3IDIgMTJzNC40NyAxMCAxMCAxMCAxMC00LjQ3IDEwLTEwUzE3LjUzIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTMuNTktMTNMMTIgMTAuNTkgOC40MSA3IDcgOC40MSAxMC41OSAxMiA3IDE1LjU5IDguNDEgMTcgMTIgMTMuNDEgMTUuNTkgMTcgMTcgMTUuNTkgMTMuNDEgMTIgMTcgOC40MXoiLz48L3N2Zz4=";
Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
Editor.minusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=";Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.addBoxImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDQwLTI4MGg4MHYtMTYwaDE2MHYtODBINTIwdi0xNjBoLTgwdjE2MEgyODB2ODBoMTYwdjE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0wLTgwaDU2MHYtNTYwSDIwMHY1NjBabTAtNTYwdjU2MC01NjBaIi8+PC9zdmc+";
Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNjAwLTM2MFpNMzIwLTI0MnExMCAxIDE5LjUgMS41dDIwLjUuNXExMSAwIDIwLjUtLjVUNDAwLTI0MnY4Mmg0MDB2LTQwMGgtODJxMS0xMCAxLjUtMTkuNXQuNS0yMC41cTAtMTEtLjUtMjAuNVQ3MTgtNjQwaDgycTMzIDAgNTYuNSAyMy41VDg4MC01NjB2NDAwcTAgMzMtMjMuNSA1Ni41VDgwMC04MEg0MDBxLTMzIDAtNTYuNS0yMy41VDMyMC0xNjB2LTgyWm00MC03OHEtMTE3IDAtMTk4LjUtODEuNVQ4MC02MDBxMC0xMTcgODEuNS0xOTguNVQzNjAtODgwcTExNyAwIDE5OC41IDgxLjVUNjQwLTYwMHEwIDExNy04MS41IDE5OC41VDM2MC0zMjBabTAtODBxODMgMCAxNDEuNS01OC41VDU2MC02MDBxMC04My01OC41LTE0MS41VDM2MC04MDBxLTgzIDAtMTQxLjUgNTguNVQxNjAtNjAwcTAgODMgNTguNSAxNDEuNVQzNjAtNDAwWm0wLTIwMFoiLz48L3N2Zz4=";
Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMzUyLTUyMiA4Ni04Ny01Ni01Ny00NCA0NC01Ni01NiA0My00NC00NS00NS04NyA4NyAxNTkgMTU4Wm0zMjggMzI5IDg3LTg3LTQ1LTQ1LTQ0IDQzLTU2LTU2IDQzLTQ0LTU3LTU2LTg2IDg2IDE1OCAxNTlabTI0LTU2NyA1NyA1Ny01Ny01N1pNMjkwLTEyMEgxMjB2LTE3MGwxNzUtMTc1TDgwLTY4MGwyMDAtMjAwIDIxNiAyMTYgMTUxLTE1MnExMi0xMiAyNy0xOHQzMS02cTE2IDAgMzEgNnQyNyAxOGw1MyA1NHExMiAxMiAxOCAyN3Q2IDMxcTAgMTYtNiAzMC41VDgxNi02NDdMNjY1LTQ5NWwyMTUgMjE1TDY4MC04MCA0NjUtMjk1IDI5MC0xMjBabS05MC04MGg1NmwzOTItMzkxLTU3LTU3LTM5MSAzOTJ2NTZabTQyMC00MTktMjktMjkgNTcgNTctMjgtMjhaIi8+PC9zdmc+";
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjgwLTIwMHYtODBoMjg0cTYzIDAgMTA5LjUtNDBUNzIwLTQyMHEwLTYwLTQ2LjUtMTAwVDU2NC01NjBIMzEybDEwNCAxMDQtNTYgNTYtMjAwLTIwMCAyMDAtMjAwIDU2IDU2LTEwNCAxMDRoMjUycTk3IDAgMTY2LjUgNjNUODAwLTQyMHEwIDk0LTY5LjUgMTU3VDU2NC0yMDBIMjgwWiIvPjwvc3ZnPg==";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzk2LTIwMHEtOTcgMC0xNjYuNS02M1QxNjAtNDIwcTAtOTQgNjkuNS0xNTdUMzk2LTY0MGgyNTJMNTQ0LTc0NGw1Ni01NiAyMDAgMjAwLTIwMCAyMDAtNTYtNTYgMTA0LTEwNEgzOTZxLTYzIDAtMTA5LjUgNDBUMjQwLTQyMHEwIDYwIDQ2LjUgMTAwVDM5Ni0yODBoMjg0djgwSDM5NloiLz48L3N2Zz4=";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTE1IDIxLTYtMi4xLTQuNjUgMS44cS0uNS4yLS45MjUtLjExM1EzIDIwLjI3NSAzIDE5Ljc1di0xNHEwLS4zMjUuMTg4LS41NzUuMTg3LS4yNS41MTItLjM3NUw5IDNsNiAyLjEgNC42NS0xLjhxLjUtLjIuOTI1LjExMi40MjUuMzEzLjQyNS44Mzh2MTRxMCAuMzI1LS4xODguNTc1LS4xODcuMjUtLjUxMi4zNzVabS0xLTIuNDVWNi44NWwtNC0xLjR2MTEuN1ptMiAwIDMtMVY1LjdsLTMgMS4xNVpNNSAxOC4zbDMtMS4xNVY1LjQ1bC0zIDFaTTE2IDYuODV2MTEuN1ptLTgtMS40djExLjdaIi8+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTEyIDE1LjM3NS02LTYgMS40LTEuNCA0LjYgNC42IDQuNi00LjYgMS40IDEuNFoiLz48L3N2Zz4=";Editor.expandLessImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTcuNCAxNS4zNzUtMS40LTEuNCA2LTYgNiA2LTEuNCAxLjQtNC42LTQuNloiLz48L3N2Zz4=";Editor.gearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTkuMjUgMjItLjQtMy4ycS0uMzI1LS4xMjUtLjYxMi0uMy0uMjg4LS4xNzUtLjU2My0uMzc1TDQuNyAxOS4zNzVsLTIuNzUtNC43NSAyLjU3NS0xLjk1UTQuNSAxMi41IDQuNSAxMi4zMzd2LS42NzVxMC0uMTYyLjAyNS0uMzM3TDEuOTUgOS4zNzVsMi43NS00Ljc1IDIuOTc1IDEuMjVxLjI3NS0uMi41NzUtLjM3NS4zLS4xNzUuNi0uM2wuNC0zLjJoNS41bC40IDMuMnEuMzI1LjEyNS42MTMuMy4yODcuMTc1LjU2Mi4zNzVsMi45NzUtMS4yNSAyLjc1IDQuNzUtMi41NzUgMS45NXEuMDI1LjE3NS4wMjUuMzM3di42NzVxMCAuMTYzLS4wNS4zMzhsMi41NzUgMS45NS0yLjc1IDQuNzUtMi45NS0xLjI1cS0uMjc1LjItLjU3NS4zNzUtLjMuMTc1LS42LjNsLS40IDMuMlptMi44LTYuNXExLjQ1IDAgMi40NzUtMS4wMjVRMTUuNTUgMTMuNDUgMTUuNTUgMTJxMC0xLjQ1LTEuMDI1LTIuNDc1UTEzLjUgOC41IDEyLjA1IDguNXEtMS40NzUgMC0yLjQ4OCAxLjAyNVE4LjU1IDEwLjU1IDguNTUgMTJxMCAxLjQ1IDEuMDEyIDIuNDc1UTEwLjU3NSAxNS41IDEyLjA1IDE1LjVabTAtMnEtLjYyNSAwLTEuMDYyLS40MzgtLjQzOC0uNDM3LS40MzgtMS4wNjJ0LjQzOC0xLjA2MnEuNDM3LS40MzggMS4wNjItLjQzOHQxLjA2My40MzhxLjQzNy40MzcuNDM3IDEuMDYydC0uNDM3IDEuMDYycS0uNDM4LjQzOC0xLjA2My40MzhaTTEyIDEyWm0tMSA4aDEuOTc1bC4zNS0yLjY1cS43NzUtLjIgMS40MzgtLjU4OC42NjItLjM4NyAxLjIxMi0uOTM3bDIuNDc1IDEuMDI1Ljk3NS0xLjctMi4xNS0xLjYyNXEuMTI1LS4zNS4xNzUtLjczOC4wNS0uMzg3LjA1LS43ODd0LS4wNS0uNzg4cS0uMDUtLjM4Ny0uMTc1LS43MzdsMi4xNS0xLjYyNS0uOTc1LTEuNy0yLjQ3NSAxLjA1cS0uNTUtLjU3NS0xLjIxMi0uOTYzLS42NjMtLjM4Ny0xLjQzOC0uNTg3TDEzIDRoLTEuOTc1bC0uMzUgMi42NXEtLjc3NS4yLTEuNDM3LjU4Ny0uNjYzLjM4OC0xLjIxMy45MzhMNS41NSA3LjE1bC0uOTc1IDEuNyAyLjE1IDEuNnEtLjEyNS4zNzUtLjE3NS43NS0uMDUuMzc1LS4wNS44IDAgLjQuMDUuNzc1dC4xNzUuNzVsLTIuMTUgMS42MjUuOTc1IDEuNyAyLjQ3NS0xLjA1cS41NS41NzUgMS4yMTMuOTYyLjY2Mi4zODggMS40MzcuNTg4WiIvPjwvc3ZnPg==";
Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.colorDropperImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTYgNDJ2LTguNGwxOC44NS0xOC44NS0zLjYtMy42TDIzLjMgOS4xbDQuNiA0LjZMMzUgNi42cS41NS0uNTUgMS4xNzUtLjU1dDEuMTc1LjU1bDQuMDUgNC4wNXEuNTUuNTUuNTUgMS4xNzVUNDEuNCAxM2wtNy4xIDcuMSA0LjYgNC42LTIuMDUgMi4wNS0zLjYtMy42TDE0LjQgNDJabTMtM2g0LjM1TDMxLjEgMjEuMjVsLTQuMzUtNC4zNUw5IDM0LjY1Wm0yMy4xNS0yMSA2LjItNi4yLTIuMTUtMi4xNS02LjIgNi4yWm0wIDBMMzAgMTUuODUgMzIuMTUgMThaIi8+PC9zdmc+";
Editor.magnifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik03ODQtMTIwIDUzMi0zNzJxLTMwIDI0LTY5IDM4dC04MyAxNHEtMTA5IDAtMTg0LjUtNzUuNVQxMjAtNTgwcTAtMTA5IDc1LjUtMTg0LjVUMzgwLTg0MHExMDkgMCAxODQuNSA3NS41VDY0MC01ODBxMCA0NC0xNCA4M3QtMzggNjlsMjUyIDI1Mi01NiA1NlpNMzgwLTQwMHE3NSAwIDEyNy41LTUyLjVUNTYwLTU4MHEwLTc1LTUyLjUtMTI3LjVUMzgwLTc2MHEtNzUgMC0xMjcuNSA1Mi41VDIwMC01ODBxMCA3NSA1Mi41IDEyNy41VDM4MC00MDBaIi8+PC9zdmc+";
Editor.sendImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0xMjAtMTYwdi02NDBsNzYwIDMyMC03NjAgMzIwWm04MC0xMjAgNDc0LTIwMC00NzQtMjAwdjE0MGwyNDAgNjAtMjQwIDYwdjE0MFptMCAwdi00MDAgNDAwWiIvPjwvc3ZnPg==";Editor.sparklesImage="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KDTwhLS0gVXBsb2FkZWQgdG86IFNWRyBSZXBvLCB3d3cuc3ZncmVwby5jb20sIFRyYW5zZm9ybWVkIGJ5OiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4KPHN2ZyB3aWR0aD0iODAwcHgiIGhlaWdodD0iODAwcHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBpZD0iaWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZjZmY0NyIgZGF0YS1kYXJrcmVhZGVyLWlubGluZS1maWxsPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLWZpbGw6ICNkNmQ4NTA7IC0tZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlOiAjZDZkODUwOyIgc3Ryb2tlPSIjZmNmZjQ3IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIj4KDTxnIGlkPSJTVkdSZXBvX2JnQ2FycmllciIgc3Ryb2tlLXdpZHRoPSIwIi8+Cg08ZyBpZD0iU1ZHUmVwb190cmFjZXJDYXJyaWVyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KDTxnIGlkPSJTVkdSZXBvX2ljb25DYXJyaWVyIj4KDTxwYXRoIGQ9Ik0yNTkuOTIsMjYyLjkxLDIxNi40LDE0OS43N2E5LDksMCwwLDAtMTYuOCwwTDE1Ni4wOCwyNjIuOTFhOSw5LDAsMCwxLTUuMTcsNS4xN0wzNy43NywzMTEuNmE5LDksMCwwLDAsMCwxNi44bDExMy4xNCw0My41MmE5LDksMCwwLDEsNS4xNyw1LjE3TDE5OS42LDQ5MC4yM2E5LDksMCwwLDAsMTYuOCwwbDQzLjUyLTExMy4xNGE5LDksMCwwLDEsNS4xNy01LjE3TDM3OC4yMywzMjguNGE5LDksMCwwLDAsMC0xNi44TDI2NS4wOSwyNjguMDhBOSw5LDAsMCwxLDI1OS45MiwyNjIuOTFaIiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iMTA4IDY4IDg4IDE2IDY4IDY4IDE2IDg4IDY4IDEwOCA4OCAxNjAgMTA4IDEwOCAxNjAgODggMTA4IDY4IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxOS45NjgiIGRhdGEtZGFya3JlYWRlci1pbmxpbmUtc3Ryb2tlPSIiIHN0eWxlPSItLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZTogIzE4MWExYjsiLz4KDTxwb2x5Z29uIHBvaW50cz0iNDI2LjY3IDExNy4zMyA0MDAgNDggMzczLjMzIDExNy4zMyAzMDQgMTQ0IDM3My4zMyAxNzAuNjcgNDAwIDI0MCA0MjYuNjcgMTcwLjY3IDQ5NiAxNDQgNDI2LjY3IDExNy4zMyIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTkuOTY4IiBkYXRhLWRhcmtyZWFkZXItaW5saW5lLXN0cm9rZT0iIiBzdHlsZT0iLS1kYXJrcmVhZGVyLWlubGluZS1zdHJva2U6ICMxODFhMWI7Ii8+Cg08L2c+Cg08L3N2Zz4=";
Editor.arrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAwLTI4MHYtNDAwbDIwMCAyMDAtMjAwIDIwMFoiLz48L3N2Zz4=";Editor.arrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM2MCAyODAtNTYwaDQwMEw0ODAtMzYwWiIvPjwvc3ZnPg==";
Editor.arrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjgwLTQwMCAyMDAtMjAwIDIwMCAyMDBIMjgwWiIvPjwvc3ZnPg==";Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTE2MHEtMTM0IDAtMjI3LTkzdC05My0yMjdxMC0xMzQgOTMtMjI3dDIyNy05M3E2OSAwIDEzMiAyOC41VDcyMC02OTB2LTExMGg4MHYyODBINTIwdi04MGgxNjhxLTMyLTU2LTg3LjUtODhUNDgwLTcyMHEtMTAwIDAtMTcwIDcwdC03MCAxNzBxMCAxMDAgNzAgMTcwdDE3MCA3MHE3NyAwIDEzOS00NHQ4Ny0xMTZoODRxLTI4IDEwNi0xMTQgMTczdC0xOTYgNjdaIi8+PC9zdmc+";
Editor.checkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzgyLTI0MCAxNTQtNDY4bDU3LTU3IDE3MSAxNzEgMzY3LTM2NyA1NyA1Ny00MjQgNDI0WiIvPjwvc3ZnPg==";Editor.dockRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0xMjAtODB2LTU2MEgyMDB2NTYwaDEyMFptODAgMGgzNjB2LTU2MEg0MDB2NTYwWm0tODAgMEgyMDBoMTIwWiIvPjwvc3ZnPg==";
Editor.toFrontImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzYwLTI4MHEtMzMgMC01Ni41LTIzLjVUMjgwLTM2MHYtNDAwcTAtMzMgMjMuNS01Ni41VDM2MC04NDBoNDAwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NDAwcTAgMzMtMjMuNSA1Ni41VDc2MC0yODBIMzYwWm0wLTgwaDQwMHYtNDAwSDM2MHY0MDBaTTIwMC0yMDB2ODBxLTMzIDAtNTYuNS0yMy41VDEyMC0yMDBoODBabS04MC04MHYtODBoODB2ODBoLTgwWm0wLTE2MHYtODBoODB2ODBoLTgwWm0wLTE2MHYtODBoODB2ODBoLTgwWm0xNjAgNDgwdi04MGg4MHY4MGgtODBabTE2MCAwdi04MGg4MHY4MGgtODBabTE2MCAwdi04MGg4MHY4MGgtODBaIi8+PC9zdmc+";
Editor.toBackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNDgwaDgwdjQ4MGg0ODB2ODBIMjAwWm0xNjAtMjQwdjgwcS0zMyAwLTU2LjUtMjMuNVQyODAtMzYwaDgwWm0tODAtODB2LTgwaDgwdjgwaC04MFptMC0xNjB2LTgwaDgwdjgwaC04MFptODAtMTYwaC04MHEwLTMzIDIzLjUtNTYuNVQzNjAtODQwdjgwWm04MCA0ODB2LTgwaDgwdjgwaC04MFptMC00ODB2LTgwaDgwdjgwaC04MFptMTYwIDB2LTgwaDgwdjgwaC04MFptMCA0ODB2LTgwaDgwdjgwaC04MFptMTYwLTQ4MHYtODBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MGgtODBabTAgNDAwaDgwcTAgMzMtMjMuNSA1Ni41VDc2MC0yODB2LTgwWm0wLTgwdi04MGg4MHY4MGgtODBabTAtMTYwdi04MGg4MHY4MGgtODBaIi8+PC9zdmc+";
Editor.fillColorImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjQ3LTkwNCA1Ny01NiAzNDMgMzQzcTIzIDIzIDIzIDU3dC0yMyA1N0w0NTctMzEzcS0yMyAyMy01NyAyM3QtNTctMjNMMTUzLTUwM3EtMjMtMjMtMjMtNTd0MjMtNTdsMTkwLTE5MS05Ni05NlptMTUzIDE1M0wyMDktNTYwaDM4Mkw0MDAtNzUxWm0zNjAgNDcxcS0zMyAwLTU2LjUtMjMuNVQ2ODAtMzYwcTAtMjEgMTIuNS00NXQyNy41LTQ1cTktMTIgMTktMjV0MjEtMjVxMTEgMTIgMjEgMjV0MTkgMjVxMTUgMjEgMjcuNSA0NXQxMi41IDQ1cTAgMzMtMjMuNSA1Ni41VDc2MC0yODBaTTgwIDB2LTE2MGg4MDBWMEg4MFoiLz48L3N2Zz4=";
Editor.strokeColorImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAgMHYtMTYwaDgwMFYwSDgwWm0xNjAtMzIwaDU2bDMxMi0zMTEtMjktMjktMjgtMjgtMzExIDMxMnY1NlptLTgwIDgwdi0xNzBsNDQ4LTQ0N3ExMS0xMSAyNS41LTE3dDMwLjUtNnExNiAwIDMxIDZ0MjcgMThsNTUgNTZxMTIgMTEgMTcuNSAyNnQ1LjUgMzFxMCAxNS01LjUgMjkuNVQ3NzctNjg3TDMzMC0yNDBIMTYwWm01NjAtNTA0LTU2LTU2IDU2IDU2Wk02MDgtNjMxbC0yOS0yOS0yOC0yOCA1NyA1N1oiLz48L3N2Zz4=";
Editor.fontColorImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAgMHYtMTYwaDgwMFYwSDgwWm0xNDAtMjgwIDIxMC01NjBoMTAwbDIxMCA1NjBoLTk2bC01MC0xNDRIMzY4bC01MiAxNDRoLTk2Wm0xNzYtMjI0aDE2OGwtODItMjMyaC00bC04MiAyMzJaIi8+PC9zdmc+";Editor.backgroundColorImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAgMHYtMTYwaDgwMFYwSDgwWm01MDQtNDgwTDQ4MC01ODQgMzIwLTQyNGwxMDMgMTA0IDE2MS0xNjBabS00Ny0xNjAgMTAzIDEwMyAxNjAtMTU5LTEwNC0xMDQtMTU5IDE2MFptLTg0LTI5IDIxNiAyMTYtMTg5IDE5MHEtMjQgMjQtNTYuNSAyNFQzNjctMjYzbC0yNyAyM0gxNDBsMTI2LTEyNXEtMjQtMjQtMjUtNTcuNXQyMy01Ny41bDE4OS0xODlabTAgMCAxODctMTg3cTI0LTI0IDU2LjUtMjR0NTYuNSAyNGwxMDQgMTAzcTI0IDI0IDI0IDU2LjVUODU3LTY0MEw2NjktNDUzIDQ1My02NjlaIi8+PC9zdmc+";
Editor.shadowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTYwLTgwcS0zMyAwLTU2LjUtMjMuNVQ4MC0xNjB2LTQ4MHEwLTMzIDIzLjUtNTYuNVQxNjAtNzIwaDgwdi04MHEwLTMzIDIzLjUtNTYuNVQzMjAtODgwaDQ4MHEzMyAwIDU2LjUgMjMuNVQ4ODAtODAwdjQ4MHEwIDMzLTIzLjUgNTYuNVQ4MDAtMjQwaC04MHY4MHEwIDMzLTIzLjUgNTYuNVQ2NDAtODBIMTYwWm0xNjAtMjQwaDQ4MHYtNDgwSDMyMHY0ODBaIi8+PC9zdmc+";
Editor.boldImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjcyLTIwMHYtNTYwaDIyMXE2NSAwIDEyMCA0MHQ1NSAxMTFxMCA1MS0yMyA3OC41VDYwMi00OTFxMjUgMTEgNTUuNSA0MXQzMC41IDkwcTAgODktNjUgMTI0LjVUNTAxLTIwMEgyNzJabTEyMS0xMTJoMTA0cTQ4IDAgNTguNS0yNC41VDU2Ni0zNzJxMC0xMS0xMC41LTM1LjVUNDk0LTQzMkgzOTN2MTIwWm0wLTIyOGg5M3EzMyAwIDQ4LTE3dDE1LTM4cTAtMjQtMTctMzl0LTQ0LTE1aC05NXYxMDlaIi8+PC9zdmc+";
Editor.italicImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTIwMHYtMTAwaDE2MGwxMjAtMzYwSDMyMHYtMTAwaDQwMHYxMDBINTgwTDQ2MC0zMDBoMTQwdjEwMEgyMDBaIi8+PC9zdmc+";Editor.underlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHYtODBoNTYwdjgwSDIwMFptMjgwLTE2MHEtMTAxIDAtMTU3LTYzdC01Ni0xNjd2LTMzMGgxMDN2MzM2cTAgNTYgMjggOTF0ODIgMzVxNTQgMCA4Mi0zNXQyOC05MXYtMzM2aDEwM3YzMzBxMCAxMDQtNTYgMTY3dC0xNTcgNjNaIi8+PC9zdmc+";
Editor.strikethroughImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDg2LTE2MHEtNzYgMC0xMzUtNDV0LTg1LTEyM2w4OC0zOHExNCA0OCA0OC41IDc5dDg1LjUgMzFxNDIgMCA3Ni0yMHQzNC02NHEwLTE4LTctMzN0LTE5LTI3aDExMnE1IDE0IDcuNSAyOC41VDY5NC0zNDBxMCA4Ni02MS41IDEzM1Q0ODYtMTYwWk04MC00ODB2LTgwaDgwMHY4MEg4MFptNDAyLTMyNnE2NiAwIDExNS41IDMyLjVUNjc0LTY3NGwtODggMzlxLTktMjktMzMuNS01MlQ0ODQtNzEwcS00MSAwLTY4IDE4LjVUMzg2LTY0MGgtOTZxMi02OSA1NC41LTExNy41VDQ4Mi04MDZaIi8+PC9zdmc+";
Editor.verticalTextImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTE2MGgtODB2LTUyOGwtNDIgNDItNTYtNTYgMTM4LTEzOCAxNDAgMTM4LTU4IDU2LTQyLTQydjUyOFpNNTYwLTI3NiAxMjAtNDQwdi04MGw0NDAtMTY0djc2bC0xMTIgMzh2MTc4bDExMiA0MHY3NlpNMzg0LTQxNHYtMTMybC0xODIgNjR2NGwxODIgNjRaIi8+PC9zdmc+";Editor.alignLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFptMC0xNjB2LTgwaDQ4MHY4MEgxMjBabTAtMTYwdi04MGg3MjB2ODBIMTIwWm0wLTE2MHYtODBoNDgwdjgwSDEyMFptMC0xNjB2LTgwaDcyMHY4MEgxMjBaIi8+PC9zdmc+";
Editor.alignCenterImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFptMTYwLTE2MHYtODBoNDAwdjgwSDI4MFpNMTIwLTQ0MHYtODBoNzIwdjgwSDEyMFptMTYwLTE2MHYtODBoNDAwdjgwSDI4MFpNMTIwLTc2MHYtODBoNzIwdjgwSDEyMFoiLz48L3N2Zz4=";Editor.alignRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTc2MHYtODBoNzIwdjgwSDEyMFptMjQwIDE2MHYtODBoNDgwdjgwSDM2MFpNMTIwLTQ0MHYtODBoNzIwdjgwSDEyMFptMjQwIDE2MHYtODBoNDgwdjgwSDM2MFpNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFoiLz48L3N2Zz4=";
Editor.alignJustifyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFptMC0xNjB2LTgwaDcyMHY4MEgxMjBabTAtMTYwdi04MGg3MjB2ODBIMTIwWm0wLTE2MHYtODBoNzIwdjgwSDEyMFptMC0xNjB2LTgwaDcyMHY4MEgxMjBaIi8+PC9zdmc+";Editor.alignTopImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTYwLTc2MHYtODBoNjQwdjgwSDE2MFptMjgwIDY0MHYtNDA4TDMzNi00MjRsLTU2LTU2IDIwMC0yMDAgMjAwIDIwMC01NiA1Ni0xMDQtMTA0djQwOGgtODBaIi8+PC9zdmc+";
Editor.alignMiddleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDQwLTgwdi0xNjhsLTY0IDY0LTU2LTU2IDE2MC0xNjAgMTYwIDE2MC01NiA1Ni02NC02NHYxNjhoLTgwWk0xNjAtNDQwdi04MGg2NDB2ODBIMTYwWm0zMjAtMTIwTDMyMC03MjBsNTYtNTYgNjQgNjR2LTE2OGg4MHYxNjhsNjQtNjQgNTYgNTYtMTYwIDE2MFoiLz48L3N2Zz4=";Editor.alignBottomImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTYwLTEyMHYtODBoNjQwdjgwSDE2MFptMzIwLTE2MEwyODAtNDgwbDU2LTU2IDEwNCAxMDR2LTQwOGg4MHY0MDhsMTA0LTEwNCA1NiA1Ni0yMDAgMjAwWiIvPjwvc3ZnPg==";
Editor.alignHorizontalLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAtODB2LTgwMGg4MHY4MDBIODBabTE2MC0yMDB2LTEyMGg0MDB2MTIwSDI0MFptMC0yODB2LTEyMGg2NDB2MTIwSDI0MFoiLz48L3N2Zz4=";Editor.alignHorizontalCenterImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDQwLTgwdi0yMDBIMjQwdi0xMjBoMjAwdi0xNjBIMTIwdi0xMjBoMzIwdi0yMDBoODB2MjAwaDMyMHYxMjBINTIwdjE2MGgyMDB2MTIwSDUyMHYyMDBoLTgwWiIvPjwvc3ZnPg==";
Editor.alignHorizontalRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAwLTgwdi04MDBoODB2ODAwaC04MFpNMzIwLTI4MHYtMTIwaDQwMHYxMjBIMzIwWk04MC01NjB2LTEyMGg2NDB2MTIwSDgwWiIvPjwvc3ZnPg==";Editor.alignVerticalTopImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjgwLTgwdi02NDBoMTIwdjY0MEgyODBabTI4MC0yNDB2LTQwMGgxMjB2NDAwSDU2MFpNODAtODAwdi04MGg4MDB2ODBIODBaIi8+PC9zdmc+";
Editor.alignVerticalMiddleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjgwLTEyMHYtMzIwSDgwdi04MGgyMDB2LTMyMGgxMjB2MzIwaDE2MHYtMjAwaDEyMHYyMDBoMjAwdjgwSDY4MHYyMDBINTYwdi0yMDBINDAwdjMyMEgyODBaIi8+PC9zdmc+";Editor.alignVerticalBottomImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAtODB2LTgwaDgwMHY4MEg4MFptMjAwLTE2MHYtNjQwaDEyMHY2NDBIMjgwWm0yODAgMHYtNDAwaDEyMHY0MDBINTYwWiIvPjwvc3ZnPg==";
Editor.subscriptImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTE2MHYtODBxMC0xNyAxMS41LTI4LjVUODAwLTI4MGg4MHYtNDBINzYwdi00MGgxMjBxMTcgMCAyOC41IDExLjVUOTIwLTMyMHY0MHEwIDE3LTExLjUgMjguNVQ4ODAtMjQwaC04MHY0MGgxMjB2NDBINzYwWm0tNTI1LTgwIDE4NS0yOTEtMTcyLTI2OWgxMDZsMTI0IDIwMGg0bDEyMy0yMDBoMTA3TDUzOS01MzFsMTg2IDI5MUg2MThMNDgyLTQ1N2gtNEwzNDItMjQwSDIzNVoiLz48L3N2Zz4=";
Editor.superscriptImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTYwMHYtODBxMC0xNyAxMS41LTI4LjVUODAwLTcyMGg4MHYtNDBINzYwdi00MGgxMjBxMTcgMCAyOC41IDExLjVUOTIwLTc2MHY0MHEwIDE3LTExLjUgMjguNVQ4ODAtNjgwaC04MHY0MGgxMjB2NDBINzYwWk0yMzUtMTYwbDE4NS0yOTEtMTcyLTI2OWgxMDZsMTI0IDIwMGg0bDEyMy0yMDBoMTA3TDUzOS00NTFsMTg2IDI5MUg2MThMNDgyLTM3N2gtNEwzNDItMTYwSDIzNVoiLz48L3N2Zz4=";
Editor.orderedListImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTgwdi02MGgxMDB2LTMwaC02MHYtNjBoNjB2LTMwSDEyMHYtNjBoMTIwcTE3IDAgMjguNSAxMS41VDI4MC0yODB2NDBxMCAxNy0xMS41IDI4LjVUMjQwLTIwMHExNyAwIDI4LjUgMTEuNVQyODAtMTYwdjQwcTAgMTctMTEuNSAyOC41VDI0MC04MEgxMjBabTAtMjgwdi0xMTBxMC0xNyAxMS41LTI4LjVUMTYwLTUxMGg2MHYtMzBIMTIwdi02MGgxMjBxMTcgMCAyOC41IDExLjVUMjgwLTU2MHY3MHEwIDE3LTExLjUgMjguNVQyNDAtNDUwaC02MHYzMGgxMDB2NjBIMTIwWm02MC0yODB2LTE4MGgtNjB2LTYwaDEyMHYyNDBoLTYwWm0xODAgNDQwdi04MGg0ODB2ODBIMzYwWm0wLTI0MHYtODBoNDgwdjgwSDM2MFptMC0yNDB2LTgwaDQ4MHY4MEgzNjBaIi8+PC9zdmc+";
Editor.unorderedListImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzYwLTIwMHYtODBoNDgwdjgwSDM2MFptMC0yNDB2LTgwaDQ4MHY4MEgzNjBabTAtMjQwdi04MGg0ODB2ODBIMzYwWk0yMDAtMTYwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjQwcTAtMzMgMjMuNS01Ni41VDIwMC0zMjBxMzMgMCA1Ni41IDIzLjVUMjgwLTI0MHEwIDMzLTIzLjUgNTYuNVQyMDAtMTYwWm0wLTI0MHEtMzMgMC01Ni41LTIzLjVUMTIwLTQ4MHEwLTMzIDIzLjUtNTYuNVQyMDAtNTYwcTMzIDAgNTYuNSAyMy41VDI4MC00ODBxMCAzMy0yMy41IDU2LjVUMjAwLTQwMFptMC0yNDBxLTMzIDAtNTYuNS0yMy41VDEyMC03MjBxMC0zMyAyMy41LTU2LjVUMjAwLTgwMHEzMyAwIDU2LjUgMjMuNVQyODAtNzIwcTAgMzMtMjMuNSA1Ni41VDIwMC02NDBaIi8+PC9zdmc+";
Editor.indentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFptMzIwLTE2MHYtODBoNDAwdjgwSDQ0MFptMC0xNjB2LTgwaDQwMHY4MEg0NDBabTAtMTYwdi04MGg0MDB2ODBINDQwWk0xMjAtNzYwdi04MGg3MjB2ODBIMTIwWm0wIDQ0MHYtMzIwbDE2MCAxNjAtMTYwIDE2MFoiLz48L3N2Zz4=";Editor.outdentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTIwLTEyMHYtODBoNzIwdjgwSDEyMFptMzIwLTE2MHYtODBoNDAwdjgwSDQ0MFptMC0xNjB2LTgwaDQwMHY4MEg0NDBabTAtMTYwdi04MGg0MDB2ODBINDQwWk0xMjAtNzYwdi04MGg3MjB2ODBIMTIwWm0xNjAgNDQwTDEyMC00ODBsMTYwLTE2MHYzMjBaIi8+PC9zdmc+";
Editor.removeFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtNTI4LTU0Ni05My05My0xMjEtMTIxaDQ4NnYxMjBINTY4bC00MCA5NFpNNzkyLTU2IDQ2MC0zODhsLTgwIDE4OEgyNDlsMTE5LTI4MEw1Ni03OTJsNTYtNTYgNzM2IDczNi01NiA1NloiLz48L3N2Zz4=";Editor.textFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTIwMHYtODBoNTYwdjgwSDIwMFptNzYtMTYwIDE2NC00NDBoODBsMTY0IDQ0MGgtNzZsLTM4LTExMkgzOTJsLTQwIDExMmgtNzZabTEzOC0xNzZoMTMybC02NC0xODJoLTRsLTY0IDE4MloiLz48L3N2Zz4=";
Editor.codeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTI0MCA4MC00ODBsMjQwLTI0MCA1NyA1Ny0xODQgMTg0IDE4MyAxODMtNTYgNTZabTMyMCAwLTU3LTU3IDE4NC0xODQtMTgzLTE4MyA1Ni01NiAyNDAgMjQwLTI0MCAyNDBaIi8+PC9zdmc+";Editor.linkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDQwLTI4MEgyODBxLTgzIDAtMTQxLjUtNTguNVQ4MC00ODBxMC04MyA1OC41LTE0MS41VDI4MC02ODBoMTYwdjgwSDI4MHEtNTAgMC04NSAzNXQtMzUgODVxMCA1MCAzNSA4NXQ4NSAzNWgxNjB2ODBaTTMyMC00NDB2LTgwaDMyMHY4MEgzMjBabTIwMCAxNjB2LTgwaDE2MHE1MCAwIDg1LTM1dDM1LTg1cTAtNTAtMzUtODV0LTg1LTM1SDUyMHYtODBoMTYwcTgzIDAgMTQxLjUgNTguNVQ4ODAtNDgwcTAgODMtNTguNSAxNDEuNVQ2ODAtMjgwSDUyMFoiLz48L3N2Zz4=";
Editor.imageImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0wLTgwaDU2MHYtNTYwSDIwMHY1NjBabTQwLTgwaDQ4MEw1NzAtNDgwIDQ1MC0zMjBsLTkwLTEyMC0xMjAgMTYwWm0tNDAgODB2LTU2MCA1NjBaIi8+PC9zdmc+";
Editor.horizontalRuleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTYwLTQ0MHYtODBoNjQwdjgwSDE2MFoiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm0yNDAtMjQwSDIwMHYxNjBoMjQwdi0xNjBabTgwIDB2MTYwaDI0MHYtMTYwSDUyMFptLTgwLTgwdi0xNjBIMjAwdjE2MGgyNDBabTgwIDBoMjQwdi0xNjBINTIwdjE2MFpNMjAwLTY4MGg1NjB2LTgwSDIwMHY4MFoiLz48L3N2Zz4=";
Editor.spacingImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjQwLTgwIDgwLTI0MGwxNjAtMTYwIDU3IDU2LTY0IDY0aDQ5NGwtNjMtNjQgNTYtNTYgMTYwIDE2MEw3MjAtODBsLTU3LTU2IDY0LTY0SDIzM2w2MyA2NC01NiA1NlptMzYtMzYwIDE2NC00NDBoODBsMTY0IDQ0MGgtNzZsLTM4LTExMkgzOTJsLTQwIDExMmgtNzZabTEzOC0xNzZoMTMybC02NC0xODJoLTRsLTY0IDE4MloiLz48L3N2Zz4=";Editor.addColumnLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODAwLTIwMHYtNTYwSDU2MHY1NjBoMjQwWm0tNjQwIDgwdi0xNjBoODB2ODBoMjQwdi01NjBIMjQwdjgwaC04MHYtMTYwaDcyMHY3MjBIMTYwWm0zMjAtMzYwWm04MCAwaC04MCA4MFptMCAwWk0xNjAtMzYwdi04MEg4MHYtODBoODB2LTgwaDgwdjgwaDgwdjgwaC04MHY4MGgtODBaIi8+PC9zdmc+";
Editor.addColumnRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMTYwLTc2MHY1NjBoMjQwdi01NjBIMTYwWk04MC0xMjB2LTcyMGg3MjB2MTYwaC04MHYtODBINDgwdjU2MGgyNDB2LTgwaDgwdjE2MEg4MFptNDAwLTM2MFptLTgwIDBoODAtODBabTAgMFptMzIwIDEyMHYtODBoLTgwdi04MGg4MHYtODBoODB2ODBoODB2ODBoLTgwdjgwaC04MFoiLz48L3N2Zz4=";Editor.removeColumnImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIiB0cmFuc2Zvcm09InJvdGF0ZSg5MCkgc2NhbGUoMSwtMSkiPjxwYXRoIGQ9Ik01NjAtMjgwSDEyMHYtNDAwaDcyMHYxMjBoLTgwdi00MEgyMDB2MjQwaDM2MHY4MFptLTM2MC04MHYtMjQwIDI0MFptNDQwIDEwNCA4NC04NC04NC04NCA1Ni01NiA4NCA4NCA4NC04NCA1NiA1Ni04MyA4NCA4MyA4NC01NiA1Ni04NC04My04NCA4My01Ni01NloiLz48L3N2Zz4=";
Editor.addRowAboveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTE2MGg1NjB2LTI0MEgyMDB2MjQwWm02NDAgODBIMTIwdi03MjBoMTYwdjgwaC04MHYyNDBoNTYwdi0yNDBoLTgwdi04MGgxNjB2NzIwWk00ODAtNDgwWm0wIDgwdi04MCA4MFptMCAwWm0tNDAtMjQwdi04MGgtODB2LTgwaDgwdi04MGg4MHY4MGg4MHY4MGgtODB2ODBoLTgwWiIvPjwvc3ZnPg==";Editor.addRowBelowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTU2MGg1NjB2LTI0MEgyMDB2MjQwWm0tODAgNDAwdi03MjBoNzIwdjcyMEg2ODB2LTgwaDgwdi0yNDBIMjAwdjI0MGg4MHY4MEgxMjBabTM2MC0zMjBabTAtODB2ODAtODBabTAgMFpNNDQwLTgwdi04MGgtODB2LTgwaDgwdi04MGg4MHY4MGg4MHY4MGgtODB2ODBoLTgwWiIvPjwvc3ZnPg==";
Editor.removeRowImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNTYwLTI4MEgxMjB2LTQwMGg3MjB2MTIwaC04MHYtNDBIMjAwdjI0MGgzNjB2ODBabS0zNjAtODB2LTI0MCAyNDBabTQ0MCAxMDQgODQtODQtODQtODQgNTYtNTYgODQgODQgODQtODQgNTYgNTYtODMgODQgODMgODQtNTYgNTYtODQtODMtODQgODMtNTYtNTZaIi8+PC9zdmc+";Editor.autosizeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAtNDB2LTI0MGg4MHYtNDAwSDQwdi0yNDBoMjQwdjgwaDQwMHYtODBoMjQwdjI0MGgtODB2NDAwaDgwdjI0MEg2ODB2LTgwSDI4MHY4MEg0MFptMjQwLTE2MGg0MDB2LTgwaDgwdi00MDBoLTgwdi04MEgyODB2ODBoLTgwdjQwMGg4MHY4MFptMzItMTIwIDEzNi0zNjBoNjRsMTM2IDM2MGgtNjJsLTMyLTkySDQwOGwtMzIgOTJoLTY0Wm0xMTQtMTQ0aDEwOGwtNTItMTUwaC00bC01MiAxNTBaTTEyMC03NjBoODB2LTgwaC04MHY4MFptNjQwIDBoODB2LTgwaC04MHY4MFptMCA2NDBoODB2LTgwaC04MHY4MFptLTY0MCAwaDgwdi04MGgtODB2ODBabTgwLTY0MFptNTYwIDBabTAgNTYwWm0tNTYwIDBaIi8+PC9zdmc+";
Editor.checkmarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjJweCIgaGVpZ2h0PSIxOHB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDQgMCkiIGQ9Ik03LjE4MSwxNS4wMDdhMSwxLDAsMCwxLS43OTMtMC4zOTFMMy4yMjIsMTAuNUExLDEsMCwxLDEsNC44MDgsOS4yNzRMNy4xMzIsMTIuM2w2LjA0NC04Ljg2QTEsMSwwLDEsMSwxNC44Myw0LjU2OWwtNi44MjMsMTBhMSwxLDAsMCwxLS44LjQzN0g3LjE4MVoiIGZpbGw9IiMwMDAwMDAiLz48L3N2Zz4=";
Editor.swapImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzIwLTQ0MHYtMjg3TDIxNy02MjRsLTU3LTU2IDIwMC0yMDAgMjAwIDIwMC01NyA1Ni0xMDMtMTAzdjI4N2gtODBaTTYwMC04MCA0MDAtMjgwbDU3LTU2IDEwMyAxMDN2LTI4N2g4MHYyODdsMTAzLTEwMyA1NyA1Nkw2MDAtODBaIi8+PC9zdmc+";Editor.copyImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNzYwLTIwMEgzMjBxLTMzIDAtNTYuNS0yMy41VDI0MC0yODB2LTU2MHEwLTMzIDIzLjUtNTYuNVQzMjAtOTIwaDI4MGwyNDAgMjQwdjQwMHEwIDMzLTIzLjUgNTYuNVQ3NjAtMjAwWk01NjAtNjQwdi0yMDBIMzIwdjU2MGg0NDB2LTM2MEg1NjBaTTE2MC00MHEtMzMgMC01Ni41LTIzLjVUODAtMTIwdi01NjBoODB2NTYwaDQ0MHY4MEgxNjBabTE2MC04MDB2MjAwLTIwMCA1NjAtNTYwWiIvPjwvc3ZnPg==";
Editor.doubleArrowUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJtMjk2LTIyNC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWm0wLTI0MC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4My0xODQgMTgzWiIvPjwvc3ZnPg==";Editor.doubleArrowDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTIwMCAyNDAtNDQwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWm0wLTI0MEwyNDAtNjgwbDU2LTU2IDE4NCAxODMgMTg0LTE4MyA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=[];Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#121212";Editor.darkColorVar="--ge-dark-color";Editor.fontSizeUnit="px";Editor.transitionDelay=.1;Editor.pageSizeUnit=mxConstants.INCHES;Editor.isDarkMode=function(){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};Editor.convertHtmlToText=function(b){if(null!=b){var e=document.createElement("div");e.innerHTML=Graph.sanitizeHtml(b);return mxUtils.extractTextWithWhitespace(e.childNodes)}return null};
Editor.extractGraphModelFromPng=function(b){var e=null;try{var g=b.substring(b.indexOf(",")+1),m=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0);EditorUi.parsePng(m,mxUtils.bind(this,function(v,n,A){v=m.substring(v+8,v+8+A);"zTXt"==n?(A=v.indexOf(String.fromCharCode(0)),"mxGraphModel"==v.substring(0,A)&&(v=pako.inflateRaw(Graph.stringToArrayBuffer(v.substring(A+2)),{to:"string"}).replace(/\+/g," "),null!=v&&0<v.length&&(e=v))):"tEXt"==n&&(v=v.split(String.fromCharCode(0)),1<v.length&&("mxGraphModel"==
v[0]||"mxfile"==v[0])&&(e=v[1]));if(null!=e||"IDAT"==n)return!0}))}catch(v){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};
Editor.soundex=function(b){if(null==b||0==b.length)return"";var e=[],g=1;e[0]=b[0].toUpperCase();for(var m=1,v=b.length;m<v;m++){var n=b[m].toUpperCase().charCodeAt(0)-65;if(0<=n&&25>=n&&"0"!="01230120022455012603010202"[n]&&("01230120022455012603010202"[n]!=e[g-1]&&(e[g]="01230120022455012603010202"[n],g++),3<g))break}if(3>=g)for(;3>=g;)e[g]="0",g++;return e.join("")};
Editor.selectFilename=function(b){var e=b.value.lastIndexOf(".");if(0<e){var g=b.value.substring(e+1);"drawio"!=g&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],g)&&(g=b.value.lastIndexOf(".drawio.",e),0<g&&(e=g))}e=0<e?e:b.value.length;Editor.selectSubstring(b,0,e)};
Editor.selectSubstring=function(b,e,g){b.focus();"undefined"!=typeof b.selectionStart?(b.selectionStart=e,b.selectionEnd=g):document.selection&&document.selection.createRange&&(b.select(),b=document.selection.createRange(),b.collapse(!0),b.moveEnd("character",g),b.moveStart("character",e),b.select())};
Editor.toUnit=function(b,e){return e==mxConstants.INCHES?Math.round(100*b/mxConstants.PIXELS_PER_INCH)/100:e==mxConstants.MILLIMETERS?Math.round(100*b/mxConstants.PIXELS_PER_MM)/100:e==mxConstants.METERS?Math.round(1E3*b/(1E3*mxConstants.PIXELS_PER_MM))/1E3:Math.round(b)};
Editor.fromUnit=function(b,e){return e==mxConstants.INCHES?Math.round(b*mxConstants.PIXELS_PER_INCH):e==mxConstants.MILLIMETERS?Math.round(b*mxConstants.PIXELS_PER_MM):e==mxConstants.METERS?Math.round(b*mxConstants.PIXELS_PER_MM*1E3):Math.round(b)};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.origin+window.location.pathname;Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
Editor.prototype.editAsNew=function(b,e,g,m){e=null!=e?"?title="+encodeURIComponent(e):"";g?(e+=(0<e.length?"&":"?")+"lightbox=1",null!=m&&(e+="&page-id="+m)):null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var v=null,n=mxUtils.bind(this,function(A){"ready"==A.data&&A.source==v&&(mxEvent.removeListener(window,"message",n),v.postMessage(b,"*"))});mxEvent.addListener(window,"message",
n);v=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var g=b.isCssTransformsSupported,m=this;b.isCssTransformsSupported=function(){return g.apply(this,arguments)&&(!m.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(v){return!this.isExternalProtocol(v)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var g=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(g)||(this.graph.pageFormat=new mxRectangle(0,0,e,g));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}}else if("root"==b.nodeName){this.resetGraph();var g=e.document.createElement("mxGraphModel");g.appendChild(b);e.decode(g,this.graph.getModel());this.updateGraphComponents()}else throw{message:mxResources.get("cannotOpenFile"),
node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear();this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){if(null!=b?b:1){var e=new mxCodec(mxUtils.createXmlDocument());b=e.encode(this.graph.getModel());e.document.appendChild(b)}else b=this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",
this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",
this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};
Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,v){e.undoableEditHappened(v.getProperty("edit"))};var g=mxUtils.bind(this,function(m,v){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,v){m=v.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);v=!1;if(0<m.length){for(var n=[],A=0;A<m.length;A++)null!=b.view.getState(m[A])&&(n.push(m[A]),
v||(b.scrollCellToVisible(m[A]),v=!0));b.setSelectionCells(n)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
function Dialog(b,e,g,m,v,n,A,G,Q,F,L){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));v&&document.body.appendChild(this.bg);v=b.createDiv(Q?"geTransDialog":"geDialog");v.style.width=g+60+"px";v.style.height=m+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(v.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",v.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");v.appendChild(e);document.body.appendChild(v);if(n&&(e=document.createElement("div"),
e.className="geButton",e.setAttribute("title",mxResources.get("close")),e.style.backgroundImage="url("+Editor.crossImage+")",e.style.position="absolute",e.style.top="0px",e.style.right="0px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),v.appendChild(e),!L)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(f){c=!0}),null,mxUtils.bind(this,function(f){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=A;this.container=v;b.editor.fireEvent(new mxEventObject("showDialog"))}
Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};
Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
var ErrorDialog=function(b,e,g,m,v,n,A,G,Q,F,L){Q=null!=Q?Q:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="10px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,e);f.setAttribute("title",e);c.appendChild(f)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);c.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=n&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=L&&L()}),F.className="geBtn",g.appendChild(F));
var k=mxUtils.button(m,function(){Q&&b.hideDialog();null!=v&&v()});k.className="geBtn";g.appendChild(k);null!=A&&(m=mxUtils.button(A,function(){Q&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){k.focus()};c.appendChild(g);this.container=c},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};
PrintDialog.prototype.create=function(b){function e(k){var t=A.checked||F.checked,q=parseInt(c.value)/100;isNaN(q)&&(q=1,c.value="100%");mxClient.IS_SF&&(q*=.75);var D=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/g.pageScale;if(t){var O=A.checked?1:parseInt(L.value);isNaN(O)||(H=mxUtils.getScaleForPageCount(O,g,D))}var J=O=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*q);D.height=Math.ceil(D.height*q);H*=q;!t&&g.pageVisible?(q=g.getPageLayout(),O-=q.x*D.width,J-=q.y*D.height):
t=!0;t=PrintDialog.createPrintPreview(g,H,D,0,O,J,t);t.open();k&&PrintDialog.printPreview(t)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var n=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("fitPage"));
G.appendChild(Q);mxEvent.addListener(Q,"click",function(k){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(k)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});n.appendChild(G);v.appendChild(n);n=n.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);Q=document.createElement("span");mxUtils.write(Q," "+mxResources.get("posterPrint")+":");G.appendChild(Q);mxEvent.addListener(Q,
"click",function(k){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(k)});n.appendChild(G);var L=document.createElement("input");L.setAttribute("value","1");L.setAttribute("type","number");L.setAttribute("min","1");L.setAttribute("size","4");L.setAttribute("disabled","disabled");L.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(L);mxUtils.write(G," "+mxResources.get("pages")+" (max)");n.appendChild(G);v.appendChild(n);mxEvent.addListener(F,"change",
function(){F.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");A.checked=!F.checked});n=n.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");n.appendChild(G);G=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";G.appendChild(c);n.appendChild(G);v.appendChild(n);n=document.createElement("tr");G=document.createElement("td");G.colSpan=2;
G.style.paddingTop="20px";G.setAttribute("align","right");Q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});Q.className="geBtn";b.editor.cancelFirst&&G.appendChild(Q);if(PrintDialog.previewEnabled){var f=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});f.className="geBtn";G.appendChild(f)}f=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||
G.appendChild(Q);n.appendChild(G);v.appendChild(n);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};
PrintDialog.createPrintPreview=function(b,e,g,m,v,n,A){e=new mxPrintPreview(b,e,g,m,v,n);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var Q=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(Q.apply(this,arguments))};return e};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function e(){var q=c;null!=q&&null!=q.originalSrc&&(q=b.createImageForPageLink(q.originalSrc,null));null!=q&&null!=q.src?(L.style.backgroundImage="url("+q.src+")",L.style.display="inline-block"):(L.style.backgroundImage="",L.style.display="none");L.style.backgroundColor="";null!=f&&f!=mxConstants.NONE&&(L.style.backgroundColor=f,L.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");
var n=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");n.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var G=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");n.appendChild(A);
A=document.createElement("td");A.style.whiteSpace="nowrap";var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=g.getGridSize();A.appendChild(Q);mxEvent.addListener(Q,"change",function(){var q=parseInt(Q.value);Q.value=Math.max(1,isNaN(q)?g.getGridSize():q)});n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");
n.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var L=document.createElement("div");L.style.display="inline-block";L.style.verticalAlign="middle";L.style.backgroundPosition="center center";L.style.backgroundRepeat="no-repeat";L.style.backgroundSize="contain";L.style.border="1px solid lightGray";L.style.borderRadius="4px";L.style.marginRight="14px";L.style.height="32px";
L.style.width="64px";L.style.cursor="pointer";L.style.padding="4px";var c=g.backgroundImage,f=g.background,k=g.shadowVisible,t=function(q){b.showBackgroundImageDialog(function(D,H,O,J){H||(null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src}),c=D,k=J);f=O;e()},c,f,!0);mxEvent.consume(q)};mxEvent.addListener(F,"click",t);mxEvent.addListener(L,"click",t);e();A.appendChild(L);A.appendChild(F);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");
A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);t=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var q=parseInt(Q.value);isNaN(q)||g.gridSize===q||g.setGridSize(q);q=new ChangePageSetup(b,f,c,G.get());q.ignoreColor=g.background==f;q.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=c?c.src:null);null!=k&&
(q.shadowVisible=k);g.pageFormat.width==q.previousFormat.width&&g.pageFormat.height==q.previousFormat.height&&q.ignoreColor&&q.ignoreImage&&q.shadowVisible==g.shadowVisible||g.model.execute(q)});t.className="geBtn gePrimaryBtn";A.appendChild(t);b.editor.cancelFirst||A.appendChild(F);n.appendChild(A);v.appendChild(n);m.appendChild(v);this.container=m};
PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var v=document.createElement("input");v.setAttribute("name",e);v.setAttribute("type","radio");v.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",e);n.setAttribute("type","radio");n.setAttribute("value","landscape");var A=document.createElement("select");A.style.position="relative";A.style.marginBottom="4px";A.style.borderRadius="4px";A.style.borderWidth="1px";A.style.borderStyle="solid";
A.style.boxSizing="border-box";A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);n.style.marginLeft="10px";n.style.marginRight="6px";G.appendChild(n);var Q=document.createElement("span");Q.style.width="100px";mxUtils.write(Q,
mxResources.get("landscape"));G.appendChild(Q);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var L=document.createElement("input");L.setAttribute("size","7");L.setAttribute("title",mxResources.get("width"));L.style.textAlign="right";F.appendChild(L);mxUtils.write(F," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
"right";F.appendChild(c);var f=document.createElement("select");f.style.marginLeft="4px";f.style.maxWidth="78px";f.style.width="78px";for(var k=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],t=0;t<k.length;t++){var q=document.createElement("option");q.setAttribute("value",k[t].unit);mxUtils.write(q,k[t].label);f.appendChild(q)}f.value=Editor.pageSizeUnit;F.appendChild(f);
G.style.display="none";F.style.display="none";var D={},H=PageSetupDialog.getFormats();for(t=0;t<H.length;t++)k=H[t],D[k.key]=k,q=document.createElement("option"),q.setAttribute("value",k.key),mxUtils.write(q,k.title),A.appendChild(q);var O=function(){A.value="custom";for(var I=0;I<H.length;I++){var Z=H[I];null!=Z.format&&("a4"==Z.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==Z.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),
g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==Z.format.width&&g.height==Z.format.height?(A.value=Z.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,detected=!0):g.width==Z.format.height&&g.height==Z.format.width&&(A.value=Z.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,detected=n.checked=!0))}"custom"==
A.value?(L.value=Editor.toUnit(g.width,f.value),c.value=Editor.toUnit(g.height,f.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};O();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var J=function(I,Z){I=D[A.value];null!=I.format?(L.value=Editor.toUnit(n.checked?I.format.height:I.format.width,f.value),c.value=Editor.toUnit(n.checked?I.format.width:I.format.height,f.value),F.style.display=
"none",G.style.display=""):(G.style.display="none",F.style.display="");I=parseFloat(L.value);if(isNaN(I)||0>=I)L.value=Editor.toUnit(g.width,f.value);I=parseFloat(c.value);if(isNaN(I)||0>=I)c.value=Editor.toUnit(g.height,f.value);I=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(L.value),f.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),f.value)));Z||I.width==g.width&&I.height==g.height||(g=I,null!=m&&m(g))};mxEvent.addListener(e,"click",function(I){v.checked=!0;J(I);mxEvent.consume(I)});
mxEvent.addListener(Q,"click",function(I){n.checked=!0;J(I);mxEvent.consume(I)});mxEvent.addListener(L,"blur",J);mxEvent.addListener(L,"click",J);mxEvent.addListener(c,"blur",J);mxEvent.addListener(c,"click",J);mxEvent.addListener(n,"change",J);mxEvent.addListener(v,"change",J);mxEvent.addListener(A,"change",function(I){J(I,"custom"==A.value);mxEvent.consume(I)});mxEvent.addListener(f,"change",function(I){L.value=Editor.toUnit(Editor.fromUnit(L.value,Editor.pageSizeUnit),f.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
Editor.pageSizeUnit),f.value);Editor.pageSizeUnit=f.value;J(I,!0);mxEvent.consume(I)});J(null,!0);return{set:function(I){g=I;O(null,null,!0)},get:function(){return g},widthInput:L,heightInput:c}};
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,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
var FilenameDialog=function(b,e,g,m,v,n,A,G,Q,F,L){Q=null!=Q?Q:!0;var c=document.createElement("div"),f=document.createElement("div");f.style.width="100%";f.style.display="grid";f.style.gap="5px 8px";f.style.gridAutoColumns="auto 1fr";f.style.boxSizing="border-box";f.style.padding="3px";var k=document.createElement("div");k.style.display="inline-flex";k.style.alignItems="center";k.style.justifyContent="flex-end";k.style.minWidth="0";var t=document.createElement("div");t.style.display="inline-block";
t.style.textOverflow="ellipsis";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.fontSize="10pt";t.style.padding="2px 0";t.setAttribute("title",v||mxResources.get("filename"));mxUtils.write(t,(v||mxResources.get("filename"))+":");k.appendChild(t);f.appendChild(k);var q=document.createElement("input");q.setAttribute("value",e||"");q.style.flexGrow="1";var D=mxUtils.button(g,function(){if(null==n||n(q.value))Q&&b.hideDialog(),m(q.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
v||null==A)if(null!=L?Editor.selectFilename(q):(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=f.parentNode;if(null!=H){var O=null;mxEvent.addListener(H,"dragleave",function(J){null!=O&&(O.style.backgroundColor="",O=null);J.stopPropagation();J.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(J){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=q,O.style.backgroundColor=
"#ebf2f9");J.stopPropagation();J.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(J){null!=O&&(O.style.backgroundColor="",O=null);0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(J.dataTransfer.getData("text/uri-list")),D.click());J.stopPropagation();J.preventDefault()}))}}};k=document.createElement("div");k.style.display="inline-flex";k.style.alignItems="center";k.style.gap="4px";k.style.whiteSpace="nowrap";k.appendChild(q);f.appendChild(k);
null==v&&null!=A||null==L||null==b.editor.diagramFileTypes||(k=document.createElement("div"),k.style.display="inline-flex",k.style.alignItems="center",k.style.textOverflow="ellipsis",k.style.justifyContent="flex-end",k.style.fontSize="10pt",mxUtils.write(k,mxResources.get("type")+":"),f.appendChild(k),k=document.createElement("div"),k.style.display="inline-flex",k.style.alignItems="center",k.style.whiteSpace="nowrap",f.appendChild(k),e=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
e.style.width="100%",k.appendChild(e));null!=A&&f.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=L?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});k.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));
b.editor.cancelFirst&&row.appendChild(k);mxEvent.addListener(q,"keypress",function(H){13==H.keyCode&&D.click()});row.appendChild(D);b.editor.cancelFirst||row.appendChild(k);f.appendChild(row);c.appendChild(f);this.container=c};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var v=document.createElement("option");v.setAttribute("value",b);mxUtils.write(v,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(v)}mxEvent.addListener(m,"change",function(n){n=g[m.value].extension;var A=e.value.lastIndexOf(".drawio.");A=0<A?A:e.value.lastIndexOf(".");"drawio"!=n&&(n="drawio."+n);e.value=0<A?e.value.substring(0,A+1)+n:e.value+"."+n;"createEvent"in
document?(n=document.createEvent("HTMLEvents"),n.initEvent("change",!1,!0),e.dispatchEvent(n)):e.fireEvent("onchange")});b=function(n){n=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var Q=g[G].extension,F=null;"drawio"!=Q&&(F=Q,Q=".drawio."+Q);if(n.substring(n.length-Q.length-1)=="."+Q||null!=F&&n.substring(n.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
var WrapperWindow=function(b,e,g,m,v,n,A,G){G=null!=G?G:document.createElement("div");this.window=new mxWindow(e,G,g,m,v,n,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);A(G)};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var Q=A.container.firstChild;null!=Q&&Q.nodeType!=mxConstants.NODETYPE_ELEMENT;)Q=Q.nextSibling;null!=Q&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(A.container),Q.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,Q),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=
A.tooltipHandler&&A.tooltipHandler.isHideOnHover()&&A.tooltipHandler.hide();A.isMouseDown&&!mxEvent.isConsumed(F)&&A.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(F))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=G,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
mxGraphView.prototype.validateBackgroundStyles=function(A,G,Q){var F=this.graph;A=null!=A?A:1;var L=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,c=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,f=null!=L&&this.gridColor!=L.toLowerCase()?this.gridColor:"#ffffff",k="none",t="";"simple"==F.getAdaptiveColors()&&F.background!=mxConstants.NONE&&null!=F.background&&(L=F.background);if(F.isGridEnabled()||F.gridVisible){t=
10;mxClient.IS_SVG?(k=unescape(encodeURIComponent(this.createSvgGrid(f,A))),k=window.btoa?btoa(k):Base64.encode(k,!0),k="url(data:image/svg+xml;base64,"+k+")",t=F.gridSize*this.scale*this.gridSteps*A):k="url("+this.gridImage+")";var q=f=0;G=null!=G?G-this.translate.x*this.scale:0;Q=null!=Q?Q-this.translate.y*this.scale:0;var D=F.gridSize*this.scale*this.gridSteps,H=G%D;D=Q%D;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);t=-Math.round(t-mxUtils.mod(this.translate.x*
this.scale-f+G,t)+H*A)+"px "+-Math.round(t-mxUtils.mod(this.translate.y*this.scale-q+Q,t)+D*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);f=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=t,F.view.backgroundPageShape.node.style.backgroundImage=k,F.view.backgroundPageShape.node.style.backgroundColor=L,F.view.backgroundPageShape.node.style.borderColor=c,F.view.backgroundPageShape.node.style.colorScheme=
"none"==F.getAdaptiveColors()?"light":"",A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=f?F.diagramBackgroundColor:""):(A.style.backgroundPosition=t,A.style.backgroundImage=k,"1"==urlParams.transparent?F.container.style.background="transparent":!f||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=L:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,
G){for(var Q=this.graph.gridSize*this.scale*(null!=G?G:1);Q<this.minGridSize;)Q*=2;G=this.gridSteps*Q;for(var F=[],L=1;L<this.gridSteps;L++){var c=L*Q;F.push("M 0 "+c+" L "+G+" "+c+" M "+c+" 0 L "+c+" "+G)}A=mxUtils.getLightDarkColor(A);Q="color-scheme: light dark;";mxClient.IS_SF&&(Q="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+Q+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
G+'" height="'+G+'" patternUnits="userSpaceOnUse"><path d="'+F.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" opacity="0.2" stroke-width="1"/><path d="M '+G+" 0 L 0 0 0 "+G+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){b.apply(this,arguments);
if(null!=this.shiftPreview1){var Q=this.view.canvas;null!=Q.ownerSVGElement&&(Q=Q.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+G,F))+"px";Q.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,Q){var F=this.view.scale,L=this.view.translate,c=this.pageFormat,f=F*this.pageScale,k=this.view.getBackgroundPageBounds();
G=k.width;Q=k.height;var t=new mxRectangle(F*L.x,F*L.y,c.width*f,c.height*f),q=(A=A&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(Q/t.height)-1:0,D=A?Math.ceil(G/t.width)-1:0,H=k.x+G,O=k.y+Q;null==this.horizontalPageBreaks&&0<q&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(J){if(null!=J){for(var I=J==this.horizontalPageBreaks?q:D,Z=0;Z<=I;Z++){var ia=J==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),
Math.round(k.y+(Z+1)*t.height)),new mxPoint(Math.round(H),Math.round(k.y+(Z+1)*t.height))]:[new mxPoint(Math.round(k.x+(Z+1)*t.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(Z+1)*t.width),Math.round(O))];null!=J[Z]?(J[Z].points=ia,J[Z].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),J[Z]=ia)}for(Z=I;Z<J.length;Z++)null!=J[Z]&&J[Z].destroy();J.splice(I,J.length-I)}});
A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,Q){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var L=this.graph.getCellGeometry(G[F]);if(null!=L&&L.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,Q){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(),G=0<A.width?A.x/this.scale-this.translate.x:0,Q=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,
L=this.graph.pageScale,c=F.width*L;F=F.height*L;L=Math.floor(Math.min(0,G)/c);var f=Math.floor(Math.min(0,Q)/F);return new mxRectangle(this.scale*(this.translate.x+L*c),this.scale*(this.translate.y+f*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/c)-L)*c,this.scale*(Math.ceil(Math.max(1,Q+A.height/this.scale)/F)-f)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,Q,F,L,c){var f=v.apply(this,arguments);null==c||c||mxEvent.addListener(f,"mousedown",function(k){mxEvent.consume(k)});return f};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(A,G,Q){var F=this.graph.model.getParent(A);if(G){var L=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);L=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=L&&L.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(L=n.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))L=F,this.graph.isTable(L)||(L=this.graph.model.getParent(L)),L=!this.graph.selectionCellsHandler.isHandled(L)||this.graph.isCellSelected(L)&&this.graph.isToggleEvent(Q.getEvent())||
this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(Q.getEvent())||this.graph.isTableCell(A)&&this.graph.isCellSelected(F);return L};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),Q=G.getParent(A),F=this.graph.view.getState(Q),L=this.graph.isCellSelected(A);null!=F&&(G.isVertex(Q)||G.isEdge(Q));){var c=this.graph.isCellSelected(Q);L=L||c;if(c||!L&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=Q;Q=G.getParent(Q)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var n=v.getGraphBounds;v.getGraphBounds=function(){var X=n.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ka=this.view.translate,da=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ka.x+ba.x)*da,(ka.y+ba.y)*da,ba.width*da,ba.height*da))}return X};v.useCssTransforms&&
(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ba){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){v.isEnabled=
function(){return!1};v.panningHandler.isForcePanningEvent=function(X){for(var ba=X.getSource();null!=ba&&ba!=v.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,Q=!1;this.setDefaultStyle=function(X){try{v.getModel().isEdge(X)?
Q=v.pasteEdgeStyle=!1:G=!1;var ba=v.getCellStyle(X,!1),ka=[],da=[],W;for(W in ba)ka.push(ba[W]),da.push(W);v.getModel().isEdge(X)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ka,"cells",[X],"force",!0));v.getModel().isEdge(X)?Q=v.pasteEdgeStyle=!0:G=!0}catch(U){this.handleError(U)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=Q=v.pasteEdgeStyle=
!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(X,ba){v.pasteCellStyles(v.includeDescendants(ba.getProperty("cells")))});v.addListener("textInserted",function(X,ba){v.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(X){null==X&&(X=window.event);return v.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&
!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=
navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ka){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ba=mxEvent.getSource(X);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return F(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&
(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var L=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();L.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(X){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ba.y-this.diagramContainer.clientHeight?
this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ba){return m.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){16==X.which?this.shiftDown=!0:32!=X.which||v.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||
mxEvent.getSource(X)!=v.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(X){return f.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&
(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var k=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(X){return k.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var t=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||t.apply(this,arguments)};var q=mxUtils.bind(this,
function(){if(null!=this.toolbar)for(var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var ka=ba.getAttribute("data-min-width");null!=ka&&parseInt(ka)>X?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),D=!1,H=null,O=null,J=null,I=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=v.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ba=[];null!=X;){var ka=X.nextSibling;
X.parentNode.removeChild(X);ba.push(X);X=ka}X=this.toolbar.fontMenu;ka=this.toolbar.sizeMenu;if(null==J)this.toolbar.createTextToolbar();else{for(var da=0;da<J.length;da++)this.toolbar.container.appendChild(J[da]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=O}D=v.cellEditor.isContentEditing();H=X;O=ka;J=ba;q()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();I()}));this.addListener("currentThemeChanged",
q);mxEvent.addListener(window,"resize",q);q();var Z=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){Z.apply(this,arguments);I();if(v.cellEditor.isContentEditing()){var X=!1,ba=function(){X||(X=!0,window.setTimeout(function(){var ka=v.getSelectedEditingElement();null!=ka&&(ka=mxUtils.getCurrentStyle(ka),null!=ka&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ka.fontFamily)),m.toolbar.setFontSize(parseInt(ka.fontSize))));X=!1},0))};mxEvent.addListener(v.cellEditor.textarea,
"input",ba);mxEvent.addListener(v.cellEditor.textarea,"touchend",ba);mxEvent.addListener(v.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(v.cellEditor.textarea,"keyup",ba);ba()}};var ia=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(X,ba){try{ia.apply(this,arguments),I()}catch(ka){m.handleError(ka)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(X){}var ha=v.fireMouseEvent;
v.fireMouseEvent=function(X,ba,ka){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),ha.apply(this,arguments)}catch(da){m.handleError(da)}};var ca=v.foldCells;v.foldCells=function(X,ba,ka,da,W){try{ca.apply(this,arguments)}catch(U){m.handleError(U)}};v.popupMenuHandler.autoExpand=!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ba,ka){this.menus.createPopupMenu(X,ba,ka)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){v.popupMenuHandler.hideMenu()}));
this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(X,ba){var ka=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ka.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(v.view.getState(ka[ka.length-1]))},0));v.pasteCellStyles(ka)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ba){X=ba.getProperty("force");(this.updateDefaultStyle||
X)&&v.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,Q);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&"1"==v.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,
Format.curvedImage.src):"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||null==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):
this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,
Format.linkEdgeImage.src):"flexArrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=v.currentVertexStyle.fontFamily||"Helvetica",ba=String(v.currentVertexStyle.fontSize||"12"),ka=v.getView().getState(v.getSelectionCell());
null!=ka&&(X=ka.style[mxConstants.STYLE_FONTFAMILY]||X,ba=ka.style[mxConstants.STYLE_FONTSIZE]||ba,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ba)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,b));v.addListener(mxEvent.CELLS_ADDED,function(X,ba){X=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&v.getModel().isLayer(ba)&&!v.isCellVisible(ba)&&null!=X&&0<X.length&&v.getModel().setVisible(ba,
!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var X=v.getLayerForCells(v.getSelectionCells());null!=X&&v.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var na=null;this.resizeHandler=mxUtils.bind(this,function(){null!=na&&window.clearTimeout(na);
na=window.setTimeout(mxUtils.bind(this,function(){na=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));
this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,g){function m(G,Q){var F=n;n+=Q;return G.substring(F,n)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var n=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(n-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
"keydown",mxUtils.bind(this,function(m){this.onKeyDown(m)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(m){this.onKeyPress(m)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,g=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,v=0;v<e.length;v++){var n=b.getCurrentCellStyle(e[v]);"0"!=mxUtils.getValue(n,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[v],e,m),m=!1)}this.updateSelectionStateForTableCells(g);if(Editor.enableCustomProperties&&null!=this.format){g.customProperties={};b=g.vertices;e=g.edges;for(v=0;v<b.length;v++)this.findCommonProperties(b[v],g.customProperties,
0==v,g);for(v=0;v<e.length;v++)this.findCommonProperties(e[v],g.customProperties,0==b.length&&0==v,g)}return g};
EditorUi.prototype.findCommonProperties=function(b,e,g,m){if(null!=e){var v=mxUtils.bind(this,function(A){if(null!=A)if(g)for(var G=0;G<A.length;G++){if("function"!==typeof A[G].isVisible||A[G].isVisible(m,this.format))e[A[G].name]=A[G]}else for(var Q in e){var F=!1;for(G=0;G<A.length;G++)if(A[G].name==Q&&A[G].type==e[Q].type){F=!0;break}F||delete e[Q]}}),n=this.editor.graph.view.getState(b);null!=n&&null!=n.shape&&(n.shape.commonCustomPropAdded||(n.shape.commonCustomPropAdded=!0,n.shape.customProperties=
n.shape.customProperties||[],n.cell.vertex?Array.prototype.push.apply(n.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(n.shape.customProperties,Editor.commonEdgeProperties)),v(n.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{v(JSON.parse(b))}catch(A){}}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var n=m.getIndex(e[0]),A=v.getIndex(m),G=null,Q=1,F=1,L=0,c=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),n):null;L<e.length-1;){var f=e[++L];null==c||c!=f||null!=G&&Q!=G||(G=Q,Q=0,F++,m=g.getParent(c),c=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),n):null);var k=this.editor.graph.view.getState(f);
if(f==g.getChildAt(m,n+Q)&&null!=k&&1==mxUtils.getValue(k.style,"colspan",1)&&1==mxUtils.getValue(k.style,"rowspan",1))Q++;else break}L==F*Q-1&&(b.mergeCell=e[0],b.colspan=Q,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,v=null,n=mxUtils.bind(this,function(G){v.clear()&&(m=!1,G=null!=G?G:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(G):this.handleError(G))}),A=window.setTimeout(n,null!=b?b:this.timeout);v={clear:function(){window.clearTimeout(A);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(v)}),n);return v};
EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,n=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var Q=0;Q<v.length;Q++)try{var F=G[v[Q]];if(mxUtils.isLightDarkColor(F)){var L=mxUtils.getLightDarkColor(F);m.setCellStyles(v[Q],L.light,[b[A]])}}catch(f){}e&&m.isHtmlLabel(b[A])&&
"0"!=mxUtils.getValue(G,"html","0")&&(n.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(n,null,null,function(f,k,t){return mxUtils.isLightDarkColor(t)?(t=mxUtils.getLightDarkColor(t),f.style.setProperty(k,t.light),!0):!1})&&m.cellLabelChanged(b[A],n.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){L=mxUtils.getLightDarkColor(m.background);var c=new ChangePageSetup(this,L.light);c.ignoreImage=!0;m.model.execute(c)}}finally{m.model.endUpdate()}return b};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);
b.vertices.push(e);var v=g.getCellGeometry(e);if(null!=v&&(0<v.width?null==b.width?b.width=v.width:b.width!=v.width&&(b.width=""):b.containsLabel=!0,0<v.height?null==b.height?b.height=v.height:b.height!=v.height&&(b.height=""):b.containsLabel=!0,!v.relative||null!=v.offset)){var n=v.relative?v.offset.x:v.x;v=v.relative?v.offset.y:v.y;null==b.x?b.x=n:b.x!=n&&(b.x="");null==b.y?b.y=v:b.y!=v&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);n=g.view.getState(e);null!=n&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(n),b.glass=b.glass&&g.isGlassState(n),b.rounded=b.rounded&&g.isRoundedState(n),b.lineJumps=b.lineJumps&&g.isLineJumpState(n),b.image=b.image||g.isImageState(n),b.shadow=b.shadow&&g.isShadowState(n),b.fill=b.fill&&g.isFillState(n),b.gradient=b.fill&&g.isGradientState(n),b.stroke=b.stroke&&g.isStrokeState(n),e=mxUtils.getValue(n.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
"image"==e,g.mergeStyle(n.style,b.style,m))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(Q,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(Q)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.x,L.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
g);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();n.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(Q,F,L){var c=L.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?A.apply(this,arguments):this.graph.connectVertex(Q.cell,F,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(f,k,t){var q=b.getCompositeParent(Q.cell);f=b.getCellGeometry(q);for(L.consume();null!=q&&b.model.isVertex(q)&&null!=f&&f.relative;)cell=
q,q=b.model.getParent(cell),f=b.getCellGeometry(q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(L.getGraphX(),L.getGraphY(),q,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),F)}),30)}),mxUtils.bind(this,function(f){this.graph.selectCellsForConnectVertex(f,c,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(Q,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var L=
F.getProperty("arrow"),c=F.getProperty("direction"),f=F.getProperty("event");L=L.getBoundingClientRect();var k=mxUtils.getOffset(b.container),t=b.container.scrollLeft+L.x-k.x;k=b.container.scrollTop+L.y-k.y;var q=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,k,q,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(q,c,b.defaultEdgeLength,f,!0,!1,function(O,J,I){I(H);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(H))},
function(O){b.selectCellsForConnectVertex(O)},f,this.hoverIcons)}),c,!0);null!=D&&(this.centerShapePicker(D,L,t,k,c),mxUtils.setOpacity(D,30),mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)}),mxEvent.addListener(D,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(Q,F){null!=G&&window.clearTimeout(G)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,g,m,v){if(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();v==mxConstants.DIRECTION_NORTH?(g-=n.width/2-10,m-=n.height+6):v==mxConstants.DIRECTION_SOUTH?(g-=n.width/2-10,m+=e.height+6):v==mxConstants.DIRECTION_WEST?(g-=n.width+6,m-=n.height/2-10):v==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=n.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};
EditorUi.prototype.showShapePicker=function(b,e,g,m,v,n,A,G,Q){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,n,G),n,A,G,Q),null!=F&&(null==this.hoverIcons||n||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};
EditorUi.prototype.createShapePicker=function(b,e,g,m,v,n,A,G,Q,F,L){L=null!=L?L:!0;var c=this.editor.graph,f=null;Q=null!=Q?Q:function(q){q=q[0];var D=0,H=0,O=q.geometry;null!=O&&(c.model.isEdge(q)&&(q=O.getTerminalPoint(!1),O=new mxRectangle(0,0,q.x,q.y)),D=O.width/2,H=O.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-D),c.snap(Math.round(e/c.view.scale)-c.view.translate.y-H))};if(null!=A&&0<A.length){var k=this;c=this.editor.graph;f=document.createElement("div");
v=c.view.getState(g);var t=null==g||null!=v&&c.isTransparentState(v)?null:c.copyStyle(g);f.className="geShapePicker";f.setAttribute("title",mxResources.get("sidebarTooltip"));f.style.left=Math.round(b)+"px";f.style.top=Math.round(e)+"px";mxClient.IS_POINTER&&(f.style.touchAction="none");G||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");c.container.appendChild(f);v=mxUtils.bind(this,function(q){var D=document.createElement("a");f.appendChild(D);null!=t&&"1"!=urlParams.sketch?
this.sidebar.graph.pasteStyle(t,[q]):this.sidebar.graph.pasteCellStyles([q],c.currentVertexStyle,c.currentEdgeStyle);var H=q.geometry;c.model.isEdge(q)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([q],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(O){if(!mxEvent.isShiftDown(O)||null==g&&c.isSelectionEmpty()){var J=c.cloneCell(q);if(null!=m)m(J);else{var I=Q([J]);c.model.isEdge(J)?J.geometry.translate(I.x,I.y):(J.geometry.x=
I.x,J.geometry.y=I.y);c.model.beginUpdate();try{c.addCell(J),c.model.isVertex(J)&&c.isAutoSizeCell(J)&&c.updateCellSize(J)}finally{c.model.endUpdate()}c.setSelectionCell(J);c.scrollCellToVisible(J);L&&c.startEditing(J);null!=k.hoverIcons&&k.hoverIcons.update(c.view.getState(J))}}else J=c.getEditableCells(null!=g?[g]:c.getSelectionCells()),c.updateShapes(q,J);null!=n&&n(O);mxEvent.consume(O)}),25,25,null,null,g),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",D.appendChild(H))});
for(F=0;F<(G?Math.min(A.length,4):A.length);F++)v(A[F]);A=f.offsetTop+f.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<A&&(f.style.top=Math.max(c.container.scrollTop+22,e-A)+"px");A=f.offsetLeft+f.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<A&&(f.style.left=Math.max(c.container.scrollLeft+22,b-A)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(n,A,G,Q){return m.createVertex(null,null,Q||"",0,0,A||120,G||60,n,!1)});e=mxUtils.bind(this,function(n,A,G){n=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),n);n.geometry.setTerminalPoint(new mxPoint(0,0),!0);n.geometry.setTerminalPoint(new mxPoint(n.geometry.width,null!=A?A:0),!1);n.geometry.points=null!=A?[new mxPoint(n.geometry.width/2,A)]:[];n.geometry.relative=!0;n.edge=
!0;return n});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(n){b=null}null==b&&(b=v(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,v("whiteSpace=wrap;html=1;"),v("ellipse;whiteSpace=wrap;html=1;",80,80),v("rhombus;whiteSpace=wrap;html=1;",
80,80),v("rounded=1;whiteSpace=wrap;html=1;"),v("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),v("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),v("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),v("triangle;whiteSpace=wrap;html=1;",
60,80),v("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),v("shape=tape;whiteSpace=wrap;html=1;",120,100),v("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),v("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),v("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),
e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;"),e("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;",this.editor.graph.defaultEdgeLength/2)]));return b};EditorUi.prototype.isShapePickerVisible=function(b){return null!=this.shapePicker};
EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};EditorUi.prototype.isSpaceDown=function(){return this.spaceDown};EditorUi.prototype.isShiftDown=function(){return this.shiftDown};
EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var g=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!g&&!mxClient.IS_IE&&!mxClient.IS_IE11){var m=window.getSelection(),v=0<m.rangeCount?m.getRangeAt(0).commonAncestorContainer:null;g=null!=v&&("LI"==v.nodeName||null!=v.parentNode&&"LI"==
v.parentNode.nodeName)}g?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(n){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(null,String.fromCharCode(b.which)))};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
EditorUi.prototype.updateCssForMarker=function(b,e,g,m,v){g=this.getImageForMarker(m,v,g);b.innerHTML="";null==g?b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")):(m=document.createElement("img"),m.setAttribute("src",g),"end"==e&&mxUtils.setPrefixedStyle(m.style,"transform","scaleX(-1)"),b.appendChild(m))};
EditorUi.prototype.getImageForMarker=function(b,e,g){return"flexArrow"==g?null!=b&&b!=mxConstants.NONE?Format.blockMarkerImage.src:null:b==mxConstants.ARROW_CLASSIC?"1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?"1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?
"1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK_THIN?"1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?"1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?"1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?"1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==
b?"1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:
"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};
EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(n){n.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(n){var A=null;if(n.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||n.getSelectionCells();A=n.getExportableCells(n.model.getTopmostCells(A));for(var G={},Q=n.createCellLookup(A),F=n.cloneCells(A,null,G),L=new mxGraphModel,c=L.getChildAt(L.getRoot(),
0),f=0;f<F.length;f++){L.add(c,F[f]);var k=n.view.getState(A[f]);if(null!=k){var t=n.getCellGeometry(F[f]);null!=t&&t.relative&&!L.isEdge(A[f])&&null==Q[mxObjectIdentity.get(L.getParent(A[f]))]&&(t.offset=null,t.relative=!1,t.x=k.x/k.view.scale-k.view.translate.x,t.y=k.y/k.view.scale-k.view.translate.y)}}n.updateCustomLinks(n.createCellMapping(G,Q),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(n){var A=
null;n.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):A=g.apply(this,arguments);b.updatePasteActionStates();return A};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var v=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(n,A){v.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,
this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,Y){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,Y,aa){if(null!=b.container&&!b.isViewer()){Y=null!=Y?Y:0;aa=null!=aa?aa:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),va=mxUtils.hasScrollbars(b.container),ta=b.view.translate,qa=b.view.scale,
Ba=mxRectangle.fromRectangle(la);Ba.x=Ba.x/qa-ta.x;Ba.y=Ba.y/qa-ta.y;Ba.width/=qa;Ba.height/=qa;ta=b.container.scrollTop;var ya=b.container.scrollLeft,La=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)La+=3;var Aa=b.container.offsetWidth-La;La=b.container.offsetHeight-La;P=P?Math.max(.3,Math.min(T||1,Aa/Ba.width)):qa;T=(Aa-P*Ba.width)/2/P;var Da=0==this.lightboxVerticalDivider?0:(La-P*Ba.height)/this.lightboxVerticalDivider/P;va&&(T=Math.max(T,0),Da=Math.max(Da,
0));if(va||la.width<Aa||la.height<La)b.view.scaleAndTranslate(P,Math.floor(T-Ba.x),Math.floor(Da-Ba.y)),b.container.scrollTop=ta*P/qa,b.container.scrollLeft=ya*P/qa;else if(0!=Y||0!=aa)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+Y/qa),Math.floor(la.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var v=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.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var A=0;n=mxUtils.bind(this,function(P,T,Y){A++;
var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=Y&&aa.setAttribute("title",Y);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&n(mxUtils.bind(this,function(P){window.location.href=
G;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var Q=n(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.chevronLeftImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var L=n(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,P+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+
": "+this.currentPage.getName());Q.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());L.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});Q.style.paddingLeft="0px";Q.style.paddingRight="4px";L.style.paddingLeft="4px";L.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(L.style.display="",Q.style.display=
"",F.style.display="inline-block"):(L.style.display="none",Q.style.display="none",F.style.display="none");c()});if(null!=this.menus){var k=this.menus.get("pages");null!=k&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(k.funct);T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var Y=mxUtils.getOffset(F);T.popup(Y.x,Y.y+F.offsetHeight,null,P);mxEvent.addListener(T.div,
"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c)}n(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var t=null,q=null,D=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);t=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);t=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),
600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var O=n(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=O.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
T.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),J=b.getModel();J.addListener(mxEvent.CHANGE,function(){O.style.display=1<J.getChildCount(J.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var I=this.lightboxToolbarActions[f];I.elem=n(I.fn,I.icon,I.tooltip)}if(null!=v.refreshBtn){var Z=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);n(mxUtils.bind(this,function(P){null!=
Z?window.location.href=Z:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(P){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&n(mxUtils.bind(this,function(P){"1"==urlParams.close||v.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||
(mxEvent.isShiftDown(P)||H(30),D())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?D():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?D():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ia=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ia&&Math.abs(this.scrollTop-b.container.scrollTop)<
ia&&Math.abs(this.startX-T.getGraphX())<ia&&Math.abs(this.startY-T.getGraphY())<ia&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?D():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ha=b.view.validate,ca=new mxPoint,na=!1,X=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&X!=g.currentPage){X=g.currentPage;na=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ca,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var Y=b.getPageSize();P=T.x-(this.x0||0)*Y.width;T=T.y-(this.y0||0)*Y.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}ha.apply(this,arguments)};
if(!b.isViewer()){var ba=b.sizeDidChange;b.sizeDidChange=function(){var P=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),Y=this.getDefaultTranslate(T),aa=this.view.translate.x,la=this.view.translate.y;if(Y.x!=aa||Y.y!=la){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(Y.x,Y.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((Y.x-aa)*this.view.scale),
this.container.scrollTop+=Math.round((Y.y-la)*this.view.scale));return}}ba.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ka=b.view.getBackgroundPane(),da=b.view.getDrawPane();b.cumulativeZoomFactor=1;var W=null,U=null,l=null,B=null,K=null,S=function(P){null!=W&&window.clearTimeout(W);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||B)W=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&
null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),da.style.transformOrigin="",ka.style.transformOrigin="",mxClient.IS_SF?(da.style.transform="scale(1)",ka.style.transform="scale(1)",window.setTimeout(function(){da.style.transform="";ka.style.transform=""},0)):(da.style.transform="",ka.style.transform=""),b.view.getDecoratorPane().style.opacity=
"",b.view.getOverlayPane().style.opacity="");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Y=mxUtils.getOffset(b.container),aa=b.view.scale,la=0,va=0;null!=U&&(la=b.container.offsetWidth/2-U.x+Y.x,va=b.container.offsetHeight/2-U.y+Y.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=l&&(la+=T.x-l.x,va+=T.y-l.y),null!=e&&g.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-1),va*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||
0==la&&0==va||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=va*(b.cumulativeZoomFactor-1)));null!=K&&da.setAttribute("filter",K);b.cumulativeZoomFactor=1;K=B=U=l=W=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,Y,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(U=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?
this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==K&&""!=da.getAttribute("filter")&&(K=da.getAttribute("filter"),da.removeAttribute("filter"));l=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==U?b.container.scrollLeft+b.container.clientWidth/2:U.x+b.container.scrollLeft-b.container.offsetLeft;var la=T||null==U?b.container.scrollTop+b.container.clientHeight/
2:U.y+b.container.scrollTop-b.container.offsetTop;da.style.transformOrigin=aa+"px "+la+"px";da.style.transform="scale("+P+")";ka.style.transformOrigin=aa+"px "+la+"px";ka.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==U?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":U.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+
"px")+" "+(T||null==U?b.container.clientHeight/2+b.container.scrollTop-aa.offsetTop+"px":U.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}S(b.isFastZoomEnabled()?Y:0)};mxEvent.addGestureListeners(b.container,
function(P){null!=W&&window.clearTimeout(W)},null,function(P){1!=b.cumulativeZoomFactor&&S(0)});mxEvent.addListener(b.container,"scroll",function(P){null==W||b.isMouseDown||1==b.cumulativeZoomFactor||S(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,Y,aa,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!Y&&b.isScrollWheelEvent(P))Y=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(Y.x+(T?
-aa:aa),Y.y):b.view.setTranslate(Y.x,Y.y+(T?aa:-aa));else if(Y||b.isZoomWheelEvent(P))for(var va=mxEvent.getSource(P);null!=va;){if(va==b.container)return b.tooltipHandler.hideTooltip(),U=null!=aa&&null!=la?new mxPoint(aa,la):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),B=Y,Y=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?Y=1+Math.abs(P.deltaY)/20*(Y-1):null!=P.movementY&&"pointermove"==P.type&&(Y=1+Math.max(1,Math.abs(P.movementY))/
20*(Y-1),aa=-1),b.lazyZoom(T,null,aa,Y),mxEvent.consume(P),!1;va=va.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;if(null!=this.format){var e=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+e+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),
1E3*e)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};
EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var g=mxUtils.parseXml(b);this.editor.setGraphXml(g.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPrintDialog=function(b,e){this.showDialog((new PrintDialog(this,b,e)).container,300,180,!0,!0)};EditorUi.prototype.showPopupMenu=function(b,e,g,m){this.editor.graph.popupMenuHandler.hideMenu();var v=new mxPopupMenu(b);v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);v.destroy()});v.popup(e,g,null,m);this.setCurrentMenu(v)};
EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(g){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml()}};EditorUi.prototype.updateDiagramData=function(b,e){this.replaceDiagramData(xUtils.getXml(e))};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.beginUpdate();try{this.editor.setGraphXml(mxUtils.parseXml(b).documentElement)}finally{this.editor.graph.model.endUpdate()}};
EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,g;for(g in urlParams)b=0==e?b+"?":b+"&",b+=g+"="+urlParams[g],e++;return b};
EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,g=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();g!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};
EditorUi.prototype.fitDiagramToWindow=function(){var b=this.editor.graph,e=b.isSelectionEmpty()?mxRectangle.fromRectangle(b.getGraphBounds()):b.getBoundingBox(b.getSelectionCells()),g=b.view.translate,m=b.view.scale;e.x=e.x/m-g.x;e.y=e.y/m-g.y;e.width/=m;e.height/=m;null!=b.backgroundImage&&e.add(new mxRectangle(0,0,b.backgroundImage.width,b.backgroundImage.height));0==e.width||0==e.height?(b.zoomTo(1),this.resetScrollbars()):(g=Editor.fitWindowBorders,null!=g&&(e.x-=g.x,e.y-=g.y,e.width+=g.width+
g.x,e.height+=g.height+g.y),b.fitWindow(e))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph,e=b.container;if(!this.editor.extendCanvas)e.scrollTop=0,e.scrollLeft=0,mxUtils.hasScrollbars(e)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(e))if(b.pageVisible){var g=b.getPagePadding();e.scrollTop=Math.floor(g.y);e.scrollLeft=Math.floor(Math.min(g.x,(e.scrollWidth-e.clientWidth)/2));g=b.getGraphBounds();0<g.width&&0<g.height&&(g.x>e.scrollLeft+.9*e.clientWidth&&(e.scrollLeft=Math.min(g.x+
g.width-e.clientWidth,g.x-10)),g.y>e.scrollTop+.9*e.clientHeight&&(e.scrollTop=Math.min(g.y+g.height-e.clientHeight,g.y-10)))}else if(g=b.getGraphBounds(),0==g.width&&0==g.height)e.scrollLeft=(e.scrollWidth-e.clientWidth)/2,e.scrollTop=(e.scrollHeight-e.clientHeight)/2;else{var m=Math.max(g.height,b.scrollTileSize.height*b.view.scale);e.scrollLeft=Math.floor(Math.max(0,g.x-Math.max(0,(e.clientWidth-Math.max(g.width,b.scrollTileSize.width*b.view.scale))/2)));e.scrollTop=Math.floor(Math.max(0,g.y-Math.max(20,
(e.clientHeight-m)/4)))}else{g=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());m=b.view.translate;var v=b.view.scale;g.x=g.x/v-m.x;g.y=g.y/v-m.y;g.width/=v;g.height/=v;b.view.setTranslate(Math.floor(Math.max(0,(e.clientWidth-g.width)/2)-g.x+2),Math.floor((b.pageVisible?0:Math.max(0,(e.clientHeight-g.height)/4))-g.y+1))}};
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,v=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,v=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var n=e.getSelectionCells();e.clearSelection();e.setSelectionCells(n)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-v);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(v,n){if(!this.minimized){var A=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;v=Math.min(v,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());n=Math.min(n,A-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(v,n){var A=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,Q=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-Q));n=Math.max(0,Math.min(n,G-F));this.getX()==v&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(Q,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),n=b.window.getY();b.window.setLocation(v,n)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,g,m,v){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=v;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,
e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=b))};
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousPageScale=m.pageScale;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);return m};mxCodecRegistry.register(b)})();EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
EditorUi.prototype.setGridColor=function(b,e){e=null!=e?e:Editor.isDarkMode();var g=this.editor.graph;e?g.view.defaultDarkGridColor=b:g.view.defaultGridColor=b;g.view.gridColor="light-dark("+g.view.defaultGridColor+", "+g.view.defaultDarkGridColor+")";g.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var b=this.editor.undoManager,e=mxUtils.bind(this,function(){this.updateActionStates()});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(v,n){m.apply(this,arguments);
e()};e()};
EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),g=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),m=!this.editor.chromeless||this.editor.editable,v="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),n=0;n<v.length;n++)this.actions.get(v[n]).setEnabled(0<
e.cells.length);this.actions.get("grid").setEnabled(m);this.actions.get("undo").setEnabled(this.canUndo()&&m);this.actions.get("redo").setEnabled(this.canRedo()&&m);this.actions.get("swap").setEnabled(2==e.cells.length&&2==e.vertices.length);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());
this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("clearAnchors").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<
e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(1<e.cells.length||1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0]));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));
this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("copyData").setEnabled(1==e.cells.length);this.actions.get("copyAsText").setEnabled(1==e.cells.length);this.actions.get("editLink").setEnabled(1==
e.cells.length);this.actions.get("editStyle").setEnabled(0<e.cells.length);this.actions.get("editTooltip").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(g);this.actions.get("selectEdges").setEnabled(g);this.actions.get("selectAll").setEnabled(g);this.actions.get("selectNone").setEnabled(g);m=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);
this.actions.get("expand").setEnabled(m);this.actions.get("collapse").setEnabled(m);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(g);this.menus.get("insert").setEnabled(g);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};
EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};EditorUi.prototype.refresh=function(b){var e=this.sidebarContainer.style.width,g=this.formatContainer.style.width;this.sidebarContainer.style.width=this.hsplitPosition+"px";this.formatContainer.style.width=null!=this.format&&0<this.formatWidth?"":"0";(b||e!=this.sidebarContainer.style.width||g!=this.formatContainer.style.width)&&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.hsplit=this.createDiv("geHsplit");this.editor.chromeless||(this.tabContainer=this.createTabContainer())};
EditorUi.prototype.createSidebarContainer=function(){var b=document.createElement("div");b.className="geSidebarContainer";return b};
EditorUi.prototype.createUi=function(){this.statusContainer=this.createStatusContainer();this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);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(b){this.hsplitPosition=b;this.refresh()})))};
EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var g=mxEvent.getSource(e);if(g!=b)for(;g.parentNode!=b;)g=g.parentNode;if("A"!=g.nodeName){var m=g.getAttribute("data-action");if("statusFunction"==m&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=m)g=this.actions.get(m),null!=g&&g.funct();else{m=g.getAttribute("data-title");var v=g.getAttribute("data-message");
null!=m&&null!=v?this.showError(m,v):(g=g.getAttribute("data-link"),null!=g&&this.editor.graph.openLink(g))}mxEvent.consume(e)}}));return b};
EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(g){mxUtils.setOpacity(g,0);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(g.style,
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.className="geStatusDiv";e.setAttribute("title",b);e.innerText=b;return e};
EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(c){if(null!=A){var f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));m(Math.max(0,G+(e?f.x-A.x:A.y-f.y)-g));mxEvent.consume(c);G!=L()&&(Q=!0,F=null)}}function n(c){v(c);A=G=null}var A=null,G=null,Q=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var L=mxUtils.bind(this,function(){var c=parseInt(e?b.offsetLeft:b.offsetTop);e||(c+=g);return c});mxEvent.addGestureListeners(b,function(c){A=new mxPoint(mxEvent.getClientX(c),
mxEvent.getClientY(c));G=L();Q=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!Q&&this.hsplitClickEnabled){var f=null!=F?F-g:0;F=L();m(f);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,v,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,n)})};
EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,g,m,v){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(v=mxUtils.htmlEntities(b.message));this.showError(e,v,n,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};
EditorUi.prototype.showError=function(b,e,g,m,v,n,A,G,Q,F,L,c,f){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,n,A,c,G,Q);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,L||100+20*e,!0,!1,f);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,n,A,G,Q,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,n,A,G,Q,F);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var v=this.dialogs.length-1;0<=v;v--)if(!this.dialogs[v].closing){m=this.dialogs[v];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(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.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],v=0;v<e.length;v++){var n=b.isTableCell(e[v])?b.model.getParent(e[v]):e[v];null==n||g.get(n)||(g.put(n,!0),m.push(n))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(A){this.handleError(A)}};
EditorUi.prototype.pickColor=function(b,e,g,m,v){var n=this.editor.graph,A=n.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(Q){n.cellEditor.restoreSelection(A);e(Q)},function(){n.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),n=0;n<m;++n){for(var A=1024*n,G=Math.min(A+1024,g),Q=Array(G-A),F=0;A<G;++F,++A)Q[F]=b[A].charCodeAt(0);v[n]=new Uint8Array(Q)}return new Blob(v,{type:e})};
EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var v=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};
EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>g&&(e=b.substring(g,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(v){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(v){try{var n=this.parseHtmlData(v),A="text/plain"!=n.getAttribute("data-type")?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var G=A.lastIndexOf("%3E");
0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(L){}try{var Q=n.getElementsByTagName("span"),F=null!=Q&&0<Q.length?mxUtils.trim(decodeURIComponent(Q[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(L){}}catch(L){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(g){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&
"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&
(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(e,b),asHtml=!1)):(g=e.getElementsByTagName("img"),1==g.length&&(g=g[0],b=g.getAttribute("src"),null!=b&&g.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(g=Editor.extractGraphModelFromPng(b),null!=g&&0<g.length&&(b=g)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,g=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?g=b.getData("Text"):(g=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==g||0==g.length)&&(g=b.getData("text/plain"))),null!=g&&(g=Graph.zapGremlins(mxUtils.trim(g)),b=this.extractGraphModelFromHtml(g),null!=b&&(g=b))));null!=g&&this.isCompatibleString(g)&&
(e=g);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,340,96,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}))}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,
"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(g){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}))}}};
EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var g=new mxCompositeLayout(this.editor.graph,b),m=this.editor.graph.getSelectionCells();g.execute(this.editor.graph.getDefaultParent(),0==m.length?null:m)}),!0,e)};
EditorUi.prototype.executeLayout=function(b,e,g){var m=this.editor.graph;m.getModel().beginUpdate();try{b()}catch(v){throw v;}finally{this.allowAnimation&&e&&m.isEnabled()?(b=new mxMorphing(m),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){m.getModel().endUpdate();null!=g&&g()})),b.startAnimation()):(m.getModel().endUpdate(),null!=g&&g())}};
EditorUi.prototype.showImageDialog=function(b,e,g,m){m=this.editor.graph.cellEditor;var v=m.saveSelection(),n=mxUtils.prompt(b,e);m.restoreSelection(v);if(null!=n&&0<n.length){var A=new Image;A.onload=function(){g(n,A.width,A.height)};A.onerror=function(){g(null);mxUtils.alert(mxResources.get("fileNotFound"))};A.src=n}else g(null)};EditorUi.prototype.showLinkDialog=function(b,e,g){b=new LinkDialog(this,b,e,g);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&"undefined"!==typeof window.EditDataDialog&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.bind(this,function(m){m=new ChangePageSetup(this,null,m);m.ignoreColor=!0;this.editor.graph.model.execute(m)});var g=mxUtils.prompt(mxResources.get("backgroundImage"),null!=e?e.src:"");null!=g&&0<g.length?(e=new Image,e.onload=function(){b(new mxImage(g,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.src=g):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,g){mxUtils.confirm(b)?null!=e&&e():null!=g&&g()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
EditorUi.prototype.createKeyHandler=function(b){function e(c,f,k){if(!m.isSelectionEmpty()&&m.isEnabled()){f=null!=f?f:1;var t=m.getCompositeParents(m.getSelectionCells()),q=0<t.length?t[0]:null;if(null!=q)if(k){m.getModel().beginUpdate();try{for(q=0;q<t.length;q++)if(m.getModel().isVertex(t[q])&&m.isCellResizable(t[q])){var D=m.getCellGeometry(t[q]);null!=D&&(D=D.clone(),37==c?D.width=Math.max(0,D.width-f):38==c?D.height=Math.max(0,D.height-f):39==c?D.width+=f:40==c&&(D.height+=f),m.getModel().setGeometry(t[q],
D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(q);var H=m.getView().scale;k=null;1==m.getSelectionCount()&&m.model.isVertex(q)&&null!=m.layoutManager&&!m.isCellLocked(q)&&(k=m.layoutManager.getLayout(D));if(null!=k&&k.constructor==mxStackLayout)f=D.getIndex(q),37==c||38==c?m.model.add(D,q,Math.max(0,f-1)):(39==c||40==c)&&m.model.add(D,q,Math.min(m.model.getChildCount(D),f+1));else{var O=m.graphHandler;null!=O&&(null==O.first&&O.start(q,0,0,m.getMovableCells(t)),null!=O.first&&(q=
t=0,37==c?t=-f:38==c?q=-f:39==c?t=f:40==c&&(q=f),O.currentDx+=t*H,O.currentDy+=q*H,O.checkPreview(),O.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=O.first){var J=O.roundLength(O.currentDx/H),I=O.roundLength(O.currentDy/H);O.moveCells(O.cells,J,I);O.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),n=v.isEventIgnored;v.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};v.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
(null==g.dialogs||0==g.dialogs.length)};v.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},Q=v.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(m.isEnabled()){var f=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?f=g.actions.get(g.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
f=g.actions.get(g.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(f=g.actions.get(g.ctrlAltActions[c.keyCode]));if(null!=f)return f.funct;if("/"==c.key&&!this.isControlDown(c)&&!mxEvent.isAltDown(c))return function(){var k=document.getElementById("geOmniSearch");null!=k&&30<k.clientWidth&&k.focus()};if(null!=G[c.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(m.model.isVertex(m.getSelectionCell()))return function(){var k=
m.connectVertex(m.getSelectionCell(),G[c.keyCode],m.defaultEdgeLength,c,!0);null!=k&&0<k.length&&(1==k.length&&m.model.isEdge(k[0])?m.setSelectionCell(m.model.getTerminal(k[0],!1)):m.setSelectionCell(k[k.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(c)?function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null,!0)}:function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null)}}return Q.apply(this,
arguments)};v.bindAction=mxUtils.bind(this,function(c,f,k,t){var q=this.actions.get(k);null!=q&&(k=function(){q.isEnabled()&&q.funct.apply(this,arguments)},f?t?v.bindControlShiftKey(c,k):v.bindControlKey(c,k):t?v.bindShiftKey(c,k):v.bindKey(c,k))});var F=this,L=v.escape;v.escape=function(c){L.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});
v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,"zoomIn");v.bindAction(222,!0,"zoomIn");v.bindAction(173,!0,"zoomOut");v.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)v.bindAction(79,!0,"outline",!0),v.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),v.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),v.bindControlKey(13,function(){F.ctrlEnter()}),v.bindAction(8,
!1,"delete"),v.bindAction(8,!0,"deleteAll"),v.bindAction(8,!1,"deleteLabels",!0),v.bindAction(46,!1,"delete"),v.bindAction(46,!0,"deleteAll"),v.bindAction(46,!1,"deleteLabels",!0),v.bindAction(36,!1,"resetView"),v.bindAction(72,!0,"fitWindow",!0),v.bindAction(74,!0,"fitPage"),v.bindAction(74,!0,"fitTwoPages",!0),v.bindAction(48,!0,"customZoom"),v.bindAction(82,!0,"turn"),v.bindAction(82,!0,"clearDefaultStyle",!0),v.bindAction(83,!0,"save"),v.bindAction(83,!0,"saveAs",!0),v.bindAction(65,!0,"selectAll"),
v.bindAction(65,!0,"selectNone",!0),v.bindAction(73,!0,"selectVertices",!0),v.bindAction(69,!0,"selectEdges",!0),v.bindAction(69,!0,"editStyle"),v.bindAction(66,!0,"bold"),v.bindAction(66,!0,"toBack",!0),v.bindAction(70,!0,"toFront",!0),v.bindAction(68,!0,"duplicate"),v.bindAction(68,!0,"setAsDefaultStyle",!0),v.bindAction(90,!0,"undo"),v.bindAction(90,!0,"redo",!0),v.bindAction(89,!0,"redo"),v.bindAction(89,!0,"autosize",!0),v.bindAction(88,!0,"cut"),v.bindAction(67,!0,"copy"),v.bindAction(86,!0,
"paste"),v.bindAction(71,!0,"group"),v.bindAction(77,!0,"editData"),v.bindAction(71,!0,"grid",!0),v.bindAction(73,!0,"italic"),v.bindAction(76,!0,"lockUnlock"),v.bindAction(76,!0,"layers",!0),v.bindAction(80,!0,"format",!0),v.bindAction(85,!0,"underline"),v.bindAction(85,!0,"ungroup",!0),v.bindAction(109,!0,"decreaseFontSize",!0),v.bindAction(107,!0,"increaseFontSize",!0),v.bindAction(219,!0,"decreaseFontSize",!0),v.bindAction(221,!0,"increaseFontSize",!0),v.bindAction(190,!0,"superscript"),v.bindAction(188,
!0,"subscript"),v.bindAction(13,!1,"keyPressEnter"),v.bindKey(113,function(){m.isEnabled()&&m.startEditingAtCell()});return v};EditorUi.prototype.createMenuElement=function(b,e,g){var m=document.createElement("a");this.addMenuHandler(m,e,g);mxUtils.write(m,b);m.className="geItem";return m};
EditorUi.prototype.addMenuHandler=function(b,e,g,m){if(null!=e){var v=null,n=!0,A=mxUtils.bind(this,function(G){null!=g&&g(G);if(!mxEvent.isConsumed(G)&&n&&(null==b.enabled||b.enabled)){this.editor.graph.popupMenuHandler.hideMenu();var Q=new mxPopupMenu(e);Q.smartSeparators=!0;Q.showDisabled=!0;Q.autoExpand=!0;Q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(Q,arguments);this.resetCurrentMenu();v=null;Q.destroy()});this.menus.autoPopup||null==this.currentMenu||this.hideCurrentMenu();
var F=mxUtils.getOffset(b);Q.popup(F.x,F.y+b.offsetHeight,null,G);this.setCurrentMenu(Q,b);v=Q}m||mxEvent.consume(G)});mxEvent.addListener(b,"mousemove",mxUtils.bind(this,function(G){if(this.menus.autoPopup&&null!=this.currentMenu&&this.currentMenuElt!=b&&null!=this.currentMenuElt){var Q=this.currentMenuElt;this.hideCurrentMenu();Q.parentNode==b.parentNode&&"INPUT"!=b.nodeName&&A(G)}}));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(G){!this.menus.autoPopup&&
null!=this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(G)&&this.hideCurrentMenu();n=null==this.currentMenu;"INPUT"!=mxEvent.getSource(G).nodeName?G.preventDefault():G.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(G){A(G);n=!0}));m&&(mxEvent.addListener(b,"focus",mxUtils.bind(this,function(G){A(G);n=!0})),mxEvent.addListener(b,"blur",mxUtils.bind(this,function(G){this.currentMenu==v&&this.hideCurrentMenu()})),mxEvent.addListener(b,"keyup",mxUtils.bind(this,
function(G){this.hideCurrentMenu();13!=G.keyCode&&27!=G.keyCode&&(A(G),n=!0)})))}};
EditorUi.prototype.addShapePicker=function(b,e){var g=this.editor.graph;mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){if(this.isShapePickerVisible())this.hideShapePicker();else{var v=mxUtils.getOffset(b);Editor.inlineFullscreen||null==this.embedViewport?e?(v.x-=this.diagramContainer.offsetLeft+30,v.y=b.offsetHeight-2):(v.x+=16+b.offsetHeight+this.sketchPickerMenuElt.offsetWidth/2,v.y+=20):(v.x=0,v.y=b.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,
v.x)),this.diagramContainer.scrollTop+v.y,null,null,null,null,mxUtils.bind(this,function(n){return g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(n,!0))}),e,!1)}mxEvent.consume(m)}))};
EditorUi.prototype.createZoomInput=function(b){var e=document.createElement("input");e.className="geButton geZoomInput";e.style.backgroundImage="url("+Editor.thinExpandImage+")";e.setAttribute("type","text");e.setAttribute("value","100%");var g=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){e.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&e.setAttribute("readonly","true");var m=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,
function(v){m=!1;mxClient.IS_TOUCH||mxEvent.getSource(v)!=e||document.activeElement==e||(e.focus(),mxClient.IS_GC||mxClient.IS_FF?e.select():document.execCommand("selectAll",!1,null),m=!0)}),mxUtils.bind(this,function(v){mxEvent.getSource(v)==e&&m&&mxEvent.consume(v)}),mxUtils.bind(this,function(v){m&&(mxEvent.consume(v),m=!1)}));this.addMenuHandler(e,g.funct);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(A){mxEvent.isAltDown(A)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
mxEvent.consume(A)):mxEvent.isShiftDown(A)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(A))}));var n=mxUtils.bind(this,function(A,G,Q){e.value=Math.round(100*this.editor.graph.view.scale*(null!=Q?Q:1))+"%";document.activeElement==e&&this.editor.graph.container.focus()});mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(A){if(27==A.keyCode||13==A.keyCode||9==A.keyCode)27==A.keyCode||isNaN(parseInt(e.value))?n():this.editor.graph.zoomTo(parseInt(e.value)/100),
this.hideCurrentMenu(),mxEvent.consume(A)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,n);this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",n);mxEvent.addListener(e,"blur",n);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(A,G){n(A,G,G.getProperty("factor"))}))})(e);return e};
EditorUi.prototype.createHelpIcon=function(b,e){e=document.createElement("img");e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));e.className="geHelpIcon";mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(g)}));return e};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(this.selectionStateListener),this.selectionStateListener=null);null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&
(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=
null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=
null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var v=0;v<b.length;v++)m=m.replace(new RegExp("&"+b[v][0]+";","g"),"&#"+b[v][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,v,n,A){return g(Graph.sanitizeHtml(m),v,n,A)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var v=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=1<arguments.length?arguments[1]:void 0,A;if("undefined"!==typeof n){if(!e(n))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(A=
arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var Q=e(this)?Object(new this(G)):Array(G),F=0,L;F<G;)L=v[F],Q[F]=n?"undefined"===typeof A?n(L,F):n.call(A,L,F):L,F+=1;Q.length=G;return Q}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,v,n){return"default"==v&&null!=n?"fillcolor"==m.nodeName?n.shapeBackgroundColor:n.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();
(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,n,A,G,Q){var F=b.apply(this,arguments);if(null!=g){var L=F.getElementsByTagName("img");0<L.length&&(L[0].className="geButton")}return F}})();
Graph=function(b,e,g,m,v,n){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(W){W=this.getCurrentCellStyle(W);
return null!=W?"1"==W.html||"wrap"==W[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,Q=null,F=null,L=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,U){if("mouseDown"==U.getProperty("eventName")&&this.isEnabled()){W=U.getProperty("event");var l=W.getState();U=this.view.scale;if(!mxEvent.isAltDown(W.getEvent())&&null!=l&&(c=this.isCellSelected(l.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(W.getEvent()))){var B=this.selectionCellsHandler.getHandler(l.cell);
if(null==B||null==B.getHandleForEvent(W)){var K=new mxRectangle(W.getGraphX()-1,W.getGraphY()-1),S=mxEvent.isTouchEvent(W.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;B=S+2;K.grow(S);if(this.isTableCell(l.cell)&&this.isCellMovable(l.cell)&&!this.isCellSelected(l.cell)&&!(mxUtils.contains(l,W.getGraphX()-B,W.getGraphY()-B)&&mxUtils.contains(l,W.getGraphX()-B,W.getGraphY()+B)&&mxUtils.contains(l,W.getGraphX()+B,W.getGraphY()+B)&&mxUtils.contains(l,W.getGraphX()+
B,W.getGraphY()-B))){var P=this.model.getParent(l.cell);B=this.model.getParent(P);if(!this.isCellSelected(B)){S*=U;var T=2*S;if(this.model.getChildAt(B,0)!=P&&mxUtils.intersects(K,new mxRectangle(l.x,l.y-S,l.width,T))||this.model.getChildAt(P,0)!=l.cell&&mxUtils.intersects(K,new mxRectangle(l.x-S,l.y,T,l.height))||mxUtils.intersects(K,new mxRectangle(l.x,l.y+l.height-S,l.width,T))||mxUtils.intersects(K,new mxRectangle(l.x+l.width-S,l.y,T,l.height)))P=this.selectionCellsHandler.isHandled(B),this.selectCellForEvent(B,
W.getEvent()),B=this.selectionCellsHandler.getHandler(B),null!=B&&(S=B.getHandleForEvent(W),null!=S&&(B.start(W.getGraphX(),W.getGraphY(),S),B.blockDelayedSelection=!P,W.consume()))}}for(;!W.isConsumed()&&null!=l&&(this.isTableCell(l.cell)||this.isTableRow(l.cell)||this.isTable(l.cell));)this.isSwimlane(l.cell)&&this.isCellMovable(l.cell)&&(B=this.getActualStartSize(l.cell),(0<B.x||0<B.width)&&mxUtils.intersects(K,new mxRectangle(l.x+(B.x-B.width-1)*U+(0==B.x?l.width:0),l.y,1,l.height))||(0<B.y||
0<B.height)&&mxUtils.intersects(K,new mxRectangle(l.x,l.y+(B.y-B.height-1)*U+(0==B.y?l.height:0),l.width,1)))&&(this.selectCellForEvent(l.cell,W.getEvent()),B=this.selectionCellsHandler.getHandler(l.cell),null!=B&&null!=B.customHandles&&(S=mxEvent.CUSTOM_HANDLE-B.customHandles.length+1,B.start(W.getGraphX(),W.getGraphY(),S),W.consume())),l=this.view.getState(this.model.getParent(l.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(W,U){if("mouseDown"==U.getProperty("eventName")&&
this.isEnabled()){W=U.getProperty("event");var l=W.getState();mxEvent.isAltDown(W.getEvent())||mxEvent.isControlDown(U)||mxEvent.isShiftDown(U)||c||null==l||!this.model.isEdge(l.cell)||(A=new mxPoint(W.getGraphX(),W.getGraphY()),L=this.isCellSelected(l.cell),Q=l,G=W,null!=l.text&&null!=l.text.boundingBox&&mxUtils.contains(l.text.boundingBox,W.getGraphX(),W.getGraphY())?F=mxEvent.LABEL_HANDLE:(U=this.selectionCellsHandler.getHandler(l.cell),null!=U&&null!=U.bends&&0<U.bends.length&&(F=U.getHandleForEvent(W))))}}));
this.addMouseListener({mouseDown:function(W,U){},mouseMove:mxUtils.bind(this,function(W,U){W=this.selectionCellsHandler.handlers.map;for(var l in W)if(null!=W[l].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(U.getEvent())){var B=this.tolerance;if(null!=A&&null!=Q&&null!=G){if(l=Q,null!=F||Math.abs(A.x-U.getGraphX())>B||Math.abs(A.y-U.getGraphY())>B){var K=null;mxEvent.isShiftDown(U.getEvent())||(K=this.selectionCellsHandler.getHandler(l.cell));if(null!=K&&null!=
K.bends&&0<K.bends.length){K.redrawHandles();var S=null!=F?F:K.getHandleForEvent(G),P=this.view.getEdgeStyle(l),T=P==mxEdgeStyle.EntityRelation;B=l.absolutePoints;L||(S=F);S!=mxEvent.LABEL_HANDLE&&null!=B&&(S=F,null==S&&(W=new mxRectangle(A.x,A.y),W.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(W,B[0].x,B[0].y)?S=0:mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?S=K.bends.length-1:null!=B&&(null==P&&null==S||P==mxEdgeStyle.SegmentConnector||P==mxEdgeStyle.OrthConnector)&&
(null!=P&&(2==B.length||3==B.length&&(0==Math.round(B[0].x-B[1].x)&&0==Math.round(B[1].x-B[2].x)||0==Math.round(B[0].y-B[1].y)&&0==Math.round(B[1].y-B[2].y)))?S=2:(S=mxUtils.findNearestSegment(l,A.x,A.y),S=null==P?mxEvent.VIRTUAL_HANDLE-S:S+1))),null==S&&(S=mxEvent.VIRTUAL_HANDLE));W=S==mxEvent.LABEL_HANDLE||0==S||S==K.bends.length-1;if(!T&&(null!=l.visibleSourceState||null!=l.visibleTargetState)||W)K.start(U.getGraphX(),U.getGraphX(),S),U.consume(),this.graphHandler.reset()}null!=K&&(this.selectionCellsHandler.isHandlerActive(K)?
this.isCellSelected(l.cell)||(this.selectionCellsHandler.handlers.put(l.cell,K),this.selectCellForEvent(l.cell,U.getEvent())):this.isCellSelected(l.cell)||K.destroy());L=!1;A=G=Q=F=null}}else if(l=U.getState(),null!=l&&this.isCellEditable(l.cell)){W=this.model.getParent(l.cell);K=null;if(this.model.isEdge(l.cell)&&!this.isCellSelected(l.cell)&&!mxEvent.isAltDown(U.getEvent())&&!mxEvent.isShiftDown(U.getEvent())&&!this.isAncestorSelected(l.cell)&&(this.isSwimlane(W)||this.model.isLayer(W)||this.getCurrentRoot()==
W)){if(W=new mxRectangle(U.getGraphX(),U.getGraphY()),W.grow(mxEdgeHandler.prototype.handleImage.width/2),B=l.absolutePoints,null!=B)null!=l.text&&null!=l.text.boundingBox&&mxUtils.contains(l.text.boundingBox,U.getGraphX(),U.getGraphY())?K="move":mxUtils.contains(W,B[0].x,B[0].y)||mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?K="pointer":(P=this.view.getEdgeStyle(l),P==mxEdgeStyle.EntityRelation||null==l.visibleSourceState&&null==l.visibleTargetState||(K="crosshair",P!=mxEdgeStyle.SegmentConnector&&
P!=mxEdgeStyle.OrthConnector))||(U=mxUtils.findNearestSegment(l,U.getGraphX(),U.getGraphY()),U<B.length-1&&0<=U&&(K=0==Math.round(B[U].x-B[U+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(U.getEvent())){B=mxShape.prototype.svgStrokeTolerance/2;W=new mxRectangle(U.getGraphX(),U.getGraphY());W.grow(B);if(this.isTableCell(l.cell)&&this.isCellMovable(l.cell)&&(U=this.model.getParent(l.cell),B=this.model.getParent(U),!this.isCellSelected(B)))if(mxUtils.intersects(W,new mxRectangle(l.x,
l.y-2,l.width,4))&&this.model.getChildAt(B,0)!=U||mxUtils.intersects(W,new mxRectangle(l.x,l.y+l.height-2,l.width,4)))K="row-resize";else if(mxUtils.intersects(W,new mxRectangle(l.x-2,l.y,4,l.height))&&this.model.getChildAt(U,0)!=l.cell||mxUtils.intersects(W,new mxRectangle(l.x+l.width-2,l.y,4,l.height)))K="col-resize";for(U=l;null==K&&null!=U&&(this.isTableCell(U.cell)||this.isTableRow(U.cell)||this.isTable(U.cell));)this.isSwimlane(U.cell)&&this.isCellMovable(U.cell)&&(B=this.getActualStartSize(U.cell),
S=this.view.scale,(0<B.x||0<B.width)&&mxUtils.intersects(W,new mxRectangle(U.x+(B.x-B.width-1)*S+(0==B.x?U.width*S:0),U.y,1,U.height))?K="col-resize":(0<B.y||0<B.height)&&mxUtils.intersects(W,new mxRectangle(U.x,U.y+(B.y-B.height-1)*S+(0==B.y?U.height:0),U.width,1))&&(K="row-resize")),U=this.view.getState(this.model.getParent(U.cell))}null!=K&&l.setCursor(K)}}}),mouseUp:mxUtils.bind(this,function(W,U){F=A=G=Q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var f=document.createElement("div");this.cellRenderer.getLabelValue=
function(W){var U=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);W.view.graph.isHtmlLabel(W.cell)&&("0"==mxUtils.getValue(W.style,"html","0")?U=mxUtils.htmlEntities(U,!1):(W.lastLabelValue!=U&&(W.lastLabelValue=U,W.lastSanitizedLabelValue=Graph.sanitizeHtml(U),f.innerHTML=W.lastSanitizedLabelValue,Graph.addLightDarkColors(f,null,"simple"==W.view.graph.getAdaptiveColors())&&(W.lastSanitizedLabelValue=f.innerHTML)),U=W.lastSanitizedLabelValue));return U};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(W,U){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var k=this.graphHandler.getGuideStates;
this.graphHandler.getGuideStates=function(){var W=k.apply(this,arguments);if(this.graph.pageVisible){var U=[],l=this.graph.pageFormat,B=this.graph.pageScale,K=l.width*B;l=l.height*B;B=this.graph.view.translate;for(var S=this.graph.view.scale,P=this.graph.getPageLayout(),T=0;T<P.width;T++)U.push(new mxRectangle(((P.x+T)*K+B.x)*S,(P.y*l+B.y)*S,K*S,l*S));for(T=1;T<P.height;T++)U.push(new mxRectangle((P.x*K+B.x)*S,((P.y+T)*l+B.y)*S,K*S,l*S));W=U.concat(W)}return W};mxDragSource.prototype.dragElementZIndex=
mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(W,U){return null==W.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(W){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var t=this.graphHandler.getCells;this.graphHandler.getCells=function(W){for(var U=t.apply(this,arguments),l=new mxDictionary,B=[],K=0;K<U.length;K++){var S=
this.graph.isTableCell(W)&&this.graph.isTableCell(U[K])&&this.graph.isCellSelected(U[K])?this.graph.model.getParent(U[K]):this.graph.isTableRow(W)&&this.graph.isTableRow(U[K])&&this.graph.isCellSelected(U[K])?U[K]:this.graph.getCompositeParent(U[K]);null==S||l.get(S)||(l.put(S,!0),B.push(S))}return B};var q=this.graphHandler.start;this.graphHandler.start=function(W,U,l,B){var K=!1;this.graph.isTableCell(W)&&(this.graph.isCellSelected(W)?K=!0:W=this.graph.model.getParent(W));K||this.graph.isTableRow(W)&&
this.graph.isCellSelected(W)||(W=this.graph.getCompositeParent(W));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(W,U){U=this.graph.getCompositeParent(U);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(W,U,l,B,K,S){var P=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=B&&this.graph.applyNewEdgeStyle(B,[P]);return P};var D=new mxRubberband(this);this.getRubberband=function(){return D};
var H=(new Date).getTime(),O=0,J=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var W=this.currentState;J.apply(this,arguments);W!=this.currentState?(H=(new Date).getTime(),O=0):O=(new Date).getTime()-H};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(W){return mxEvent.isShiftDown(W.getEvent())&&mxEvent.isAltDown(W.getEvent())?!1:null!=this.currentState&&W.getState()==this.currentState&&2E3<O||(null==this.currentState||
"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(W){return Z.apply(this,arguments)||mxEvent.isShiftDown(W)};var ia=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ia=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=
ia)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(W){return mxEvent.isMouseEvent(W.getEvent())};var ha=this.click;this.click=function(W){var U=null==W.state&&null!=W.sourceState&&this.isCellLocked(this.getLayerForCell(W.sourceState.cell));if(this.isEnabled()&&!U||W.isConsumed())return ha.apply(this,arguments);var l=U?W.sourceState.cell:W.getCell();if(null!=l){var B=this.getClickableLinkForCell(l);null!=B?this.isCustomLink(B)?this.customLinkClicked(B,l):this.openLink(B):
U&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};var ca=this.tooltipHandler.show;this.tooltipHandler.show=function(){ca.apply(this,arguments);if(null!=this.div)for(var W=this.div.getElementsByTagName("a"),U=0;U<W.length;U++)null!=W[U].getAttribute("href")&&null==W[U].getAttribute("target")&&W[U].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};this.getCursorForMouseEvent=function(W){var U=null==
W.state&&null!=W.sourceState&&this.isCellLocked(W.sourceState.cell);return this.getCursorForCell(U?W.sourceState.cell:W.getCell())};var na=this.getCursorForCell;this.getCursorForCell=function(W){if(!this.isEnabled()||this.isCellLocked(W)){if(null!=this.getClickableLinkForCell(W))return"pointer";if(this.isCellLocked(W))return"default"}return na.apply(this,arguments)};this.selectRegion=function(W,U){var l=mxEvent.isAltDown(U)?W:null;W=this.getCells(W.x,W.y,W.width,W.height,null,null,l,null,!0);if(this.isToggleEvent(U))for(l=
0;l<W.length;l++)this.selectCellForEvent(W[l],U);else this.selectCellsForEvent(W,U);return W};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(W,U,l){return this.graph.isCellSelected(W)?!1:X.apply(this,arguments)};var ba=this.updateMouseEvent;this.updateMouseEvent=function(W){W=ba.apply(this,arguments);null!=W.state&&this.isCellLocked(this.getLayerForCell(W.getCell()))&&(null==this.getLinkForCell(W.getCell())?W.state=this.view.getState(this.getCellAt(W.getGraphX(),
W.getGraphY(),null,null,null,mxUtils.bind(this,function(U,l,B){return W.state==U||this.isCellLocked(this.getLayerForCell(U.cell))&&null==this.getLinkForCell(U.cell)}))):W.state=null);return W};var ka=this.isCellSelectable;this.isCellSelectable=function(W){return ka.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(W))};this.isCellLocked=function(W){for(;null!=W;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(W),"locked","0"))return!0;W=this.model.getParent(W)}return!1};var da=null;
this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,U){"mouseDown"==U.getProperty("eventName")&&(W=U.getProperty("event").getState(),da=null==W||this.isSelectionEmpty()||this.isCellSelected(W.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(W,U){if(!mxEvent.isMultiTouchEvent(U)){W=U.getProperty("event");var l=U.getProperty("cell");null==l?(W=mxUtils.convertPoint(this.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),D.start(W.x,
W.y)):null!=da?this.addSelectionCells(da):1<this.getSelectionCount()&&this.isCellSelected(l)&&this.removeSelectionCell(l);da=null;U.consume()}}));this.connectionHandler.selectCells=function(W,U){this.graph.setSelectionCell(U||W)};this.connectionHandler.constraintHandler.isStateIgnored=function(W,U){var l=W.view.graph;return U&&(l.isCellSelected(W.cell)||l.isTableRow(W.cell)&&l.selectionCellsHandler.isHandled(l.model.getParent(W.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var W=this.connectionHandler.constraintHandler;null!=W.currentFocus&&W.isStateIgnored(W.currentFocus,!0)&&(W.currentFocus=null,W.constraints=null,W.destroyIcons());W.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved linecap linejoin".split(" ");Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shadow glass dashed dashPattern comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents opacity strokeColor strokeWidth align verticalAlign spacingLeft spacingRight spacingTop spacingBottom spacing arcSize absoluteArcSize comicStyle swimlaneFillColor shadowOffsetX shadowOffsetY shadowBlur shadowColor shadowOpacity".split(" "),Graph.textStyles),
Graph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";
Graph.getDefaultAdaptiveColorsKey=function(){return"auto"==Graph.defaultAdaptiveColors?"automatic":Graph.defaultAdaptiveColors};
Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
Graph.createSvgImage=function(b,e,g,m,v){g=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=m&&null!=v?'viewBox="0 0 '+m+" "+v+'" ':"")+'version="1.1" style="color-scheme: light dark;">'+g+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0)),b,e)};
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
Graph.createSvgNode=function(b,e,g,m,v){var n=mxUtils.createXmlDocument(),A=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=v&&A.setAttribute("style","background: "+v.light+"; background-color: "+v.cssText+";");null==n.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);A.setAttribute("version","1.1");A.setAttribute("width",
g+"px");A.setAttribute("height",m+"px");A.setAttribute("viewBox",b+" "+e+" "+g+" "+m);n.appendChild(A);return A};
Graph.htmlToPng=function(b,e,g,m,v,n){v=null!=v?v:"";n=null!=n?n:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*n;A.height=g*n;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(n,n);F.drawImage(G,0,0);m(A.toDataURL())}catch(L){m(null)}});var Q=mxUtils.createXmlDocument();Q=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"svg"):Q.createElement("svg");b=(new mxSvgCanvas2D(Q)).convertHtml(b);G.onerror=
function(F){m(null)};G.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=v?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+v+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
Graph.addLightDarkColors=function(b,e,g,m){function v(f,k,t){return null!=m?m(f,k,t):mxUtils.isValidColor(t)?(null==A&&null!=e&&(A={}),null!=A&&(A[k]=f.style.getPropertyValue(k)),t=mxUtils.getLightDarkColor(t,null,null,g),f.style.setProperty(k,t.cssText),!0):!1}for(var n=b.getElementsByTagName("*"),A=null,G=!1,Q=0;Q<n.length;Q++)if(n[Q]!=b&&null!=n[Q].style){A=null;for(var F=0;F<n[Q].style.length;F++){var L=n[Q].style.item(F),c=n[Q].style.getPropertyValue(L);G=v(n[Q],L,c)||G}"FONT"==n[Q].nodeName&&
""==n[Q].style.getPropertyValue("color")&&(c=n[Q].getAttribute("color"),G=v(n[Q],"color",c)||G);null!=e&&null!=A&&n[Q].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var n=JSON.parse(v),A;for(A in n){var G=n[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(Q){}return g};
Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var v=JSON.parse(m);null!=v&&null!=v[e]&&("color"==e&&"FONT"==b.nodeName&&""==v[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=v[e]&&(g=v[e]))}}catch(n){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};
Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",n=b.getElementsByTagName("*"),A=[],G=0;G<n.length;G++)A.push({node:n[G],value:n[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(n=b[G].getAttribute(Graph.backupStyleAttribute),null!=n){var Q=JSON.parse(n);Q[v]=
"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(Q))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{n=b[G].getAttribute(Graph.backupStyleAttribute),Q=null!=n?JSON.parse(n):{},Q[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(Q))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=
g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)v=m.nextSibling,e.appendChild(m),m=v;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),v=1,n=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){n=g;break}for(g=n+1;-1<n&&g<b.byteLength&&g<n+e.length-1;g++){if(b[g]!=e.charCodeAt(v))return Graph.arrayBufferIndexOfString(b,e,n+1);v++}return v==e.length-1?n:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};
Graph.fadeNodes=function(b,e,g,m,v){v=null!=v?v:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+v+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},v)},0)};
Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function n(c){c.view.states.visit(function(f,k){null!=k.shape&&c.model.isEdge(c.model.getParent(k.cell))?k.shape.node.parentNode.appendChild(k.shape.node):null!=k.text&&c.model.isEdge(k.cell)&&k.text.node.parentNode.appendChild(k.text.node)})}function A(c,f){if(c.getModel().isVertex(f)){var k=c.container.scrollWidth/2,t=c.container.scrollHeight/2;c.rootCell=
f.referenceCell||f;c.getModel().beginUpdate();try{pageSize=6+Math.floor((c.container.scrollWidth-800)/100);for(var q=f.referenceCell||f,D=m.model.getCell(q.sourceCellId),H=m.getEdges(D,null,!0,!0,!1,!0),O=[],J=0;J<H.length;J++)null!=H[J].getTerminal(!0)&&null!=H[J].getTerminal(!1)&&m.isCellVisible(H[J])&&!m.isEdgeIgnored(H[J])&&m.isCellVisible(H[J].getTerminal(!0))&&m.isCellVisible(H[J].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(H[J]))&&O.push(H[J]);O=H=O;if(null!=f.startIndex||0<pageSize&&
H.length>pageSize){var I=f.startIndex||0;O=H.slice(Math.max(0,I),Math.min(H.length,I+pageSize))}O=m.getOpposites(O,D).concat(O);var Z=c.cloneCells(O);for(J=0;J<O.length;J++)if(Z[J].sourceCellId=O[J].id,c.model.isEdge(Z[J]))for(Z[J].geometry.x=0,Z[J].geometry.y=0,Z[J].geometry.points=null,Z[J].setStyle(Z[J].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffe0;textOpacity=100;"),Z[J].setTerminal(q,null==Z[J].getTerminal(!0)),D=0;D<Z[J].getChildCount();D++){var ia=
Z[J].getChildAt(D);null!=ia.geometry&&ia.geometry.relative&&(ia.setStyle(ia.getStyle()+";labelBackgroundColor=#ffffffe0;textOpacity=100;"),ia.geometry.offset=new mxPoint(0,0),ia.geometry.y=0,ia.geometry.x=.5>ia.geometry.x?-.8:.5<ia.geometry.x?.8:0)}if(0<f.startIndex){var ha=c.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((f.startIndex||0)/pageSize)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ha.referenceCell=
q;ha.startIndex=Math.max(0,(f.startIndex||0)-pageSize);Z.splice(0,0,ha)}if(H.length>(f.startIndex||0)+pageSize){var ca=c.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((f.startIndex||0)/pageSize)+2)+"/"+Math.ceil(H.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=q;ca.startIndex=(f.startIndex||0)+pageSize;Z.splice(0,0,ca)}for(var na in c.getModel().cells){var X=c.getModel().getCell(na);X!=c.rootCell&&!c.getModel().isAncestor(c.rootCell,
X)&&c.getModel().isVertex(X)&&c.removeCells([X])}c.addCells(Z);var ba=c.getModel().getGeometry(c.rootCell);null!=ba&&(ba=ba.clone(),ba.x=k-ba.width/2,ba.y=t-ba.height/3,c.getModel().setGeometry(c.rootCell,ba));f=[];for(na in c.getModel().cells)X=c.getModel().getCell(na),X!=c.rootCell&&c.getModel().isVertex(X)&&c.getModel().getParent(X)==c.getDefaultParent()&&(f.push(X),ba=c.getModel().getGeometry(X),null!=ba&&(ba.x=k-ba.width/2,ba.y=t-ba.height/2));var ka=f.length,da=2*Math.PI/ka,W=Math.max(minSize,
Math.min(c.container.scrollWidth/2-40,c.container.scrollHeight/2-80));for(k=0;k<ka;k++)ba=c.getModel().getGeometry(f[k]),null!=ba&&(ba=ba.clone(),ba.x+=W*Math.sin(k*da),ba.y+=W*Math.cos(k*da),c.getModel().setGeometry(f[k],ba))}finally{c.getModel().endUpdate()}}}var G=document.createElement("div");G.style.position="absolute";G.style.display="block";G.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";G.style.width="100%";G.style.height="100%";G.style.left="0px";G.style.top="0px";G.style.zIndex=
2;var Q=document.createElement("img");Q.setAttribute("src",Editor.closeBlackImage);Q.style.position="absolute";Q.style.cursor="pointer";Q.style.right="10px";Q.style.top="10px";G.appendChild(Q);var F=document.createElement("div");F.style.position="absolute";F.style.cursor="pointer";F.style.right="38px";F.style.top="14px";F.style.textAlign="right";F.style.verticalAlign="top";mxUtils.write(F,mxResources.get("close"));G.appendChild(F);document.body.appendChild(G);var L=function(c){27==c.keyCode&&Q.click()};
mxEvent.addListener(document,"keydown",L);(function(c){if(mxClient.isBrowserSupported()){var f=new Graph(c);f.keepEdgesInBackground=!0;f.isCellResizable=function(){return!1};f.isCellRotatable=function(){return!1};f.getCursorForCell=function(O){return this.model.isVertex(O)?"pointer":null};f.getFoldingImage=function(){return null};var k=function(){mxEvent.removeListener(document,"keydown",L);c.parentNode.removeChild(c);m.scrollCellToVisible(v)};mxEvent.addListener(Q,"click",k);mxEvent.addListener(F,
"click",k);f.setEnabled(!1);var t=f.click;f.click=function(O){var J=O.getCell(),I=null!=J?null!=J.referenceCell?J.referenceCell:J:null;null!=J&&f.rootCell!=J&&0<f.getEdges(I).length?A(f,J):t.apply(this,arguments)};k=f.container.scrollWidth/2;var q=f.container.scrollHeight/3;f.model.beginUpdate();var D=f.importCells([v])[0];D.sourceCellId=v.id;D.geometry.x=k-D.geometry.width/2;D.geometry.y=q-D.geometry.height/2;f.model.endUpdate();var H=!1;f.getModel().addListener(mxEvent.CHANGE,function(O,J){H||(O=
J.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,f.labelsVisible=!1,H=!0,mxEffects.animateChanges(f,O,function(){var I=new mxParallelEdgeLayout(f);I.spacing=60;var Z=I.layout;I.layout=function(ia){I.spacing=Math.min(60,Math.max(30,60-5*ia.length));Z.apply(this,arguments)};I.execute(f.getDefaultParent());mxText.prototype.enableBoundingBox=!0;f.labelsVisible=!0;f.tooltipHandler.hide();f.refresh();n(f);H=!1}))});A(f,D)}else mxUtils.error("Browser is not supported!",200,!1)})(G)})(b,
e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};
Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==
g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};
Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var v=e.getElementsByTagName("svg");if(0<v.length){document.body.appendChild(e);try{m=g=1;var n=v[0].getAttribute("width"),A=v[0].getAttribute("height");n=null!=n&&"%"!=n.charAt(n.length-
1)?parseFloat(n):NaN;A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;var G=v[0].getAttribute("viewBox");if(null!=G&&!isNaN(n)&&!isNaN(A)){var Q=G.split(" ");4<=G.length&&(g=parseFloat(Q[2])/n,m=parseFloat(Q[3])/A,new mxRectangle(parseFloat(Q[0]),parseFloat(Q[1]),parseFloat(Q[2]),parseFloat(Q[3])))}var F=v[0].getBBox();if(0<F.width&&0<F.height){n=0;var L=v[0].querySelectorAll("[stroke-width]");for(A=0;A<L.length;A++)n=Math.max(n,parseFloat(L[A].getAttribute("stroke-width")));F=new mxRectangle(F.x,
F.y,F.width,F.height);F.grow(n/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",F.x+" "+F.y+" "+F.width+" "+F.height);e.getElementsByTagName("svg")[0].setAttribute("width",F.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",F.height/m)}}catch(c){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(v[0]))}}}catch(c){}return b};
Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
Graph.rewritePageLinks=function(b,e){function g(v,n){var A=v.getAttribute(n);if(null!=A){Graph.isPageLink(A)&&(A="#"+A.substring(A.indexOf(":")+1));var G=n;e&&"xlink:href"==n&&(v.removeAttribute(n),G="href");v.setAttribute(G,A)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
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=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBackground=!1;Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, #000000)";Graph.prototype.shapeForegroundColor="light-dark(#000000, #ffffff)";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(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.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,n=!0,A=null,G=mxUtils.bind(this,function(L){n=!0;A=new mxPoint(mxEvent.getClientX(L),mxEvent.getClientY(L))}),Q=mxUtils.bind(this,function(L){n=n&&null!=A&&Math.abs(A.x-mxEvent.getClientX(L))<v&&Math.abs(A.y-mxEvent.getClientY(L))<v}),F=mxUtils.bind(this,function(L){if(n)for(var c=mxEvent.getSource(L);null!=
c&&c!=m.node;){if("a"==c.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,c,L);break}c=c.parentNode}});mxEvent.addGestureListeners(m.node,G,Q,F);mxEvent.addListener(m.node,"click",function(L){mxEvent.consume(L)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(A){return!this.isSpecialColor(A.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(A.style,"lineShape",null)&&(this.model.isVertex(A.cell)||"arrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(A.style,
mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var Q=G?"color":"background-color",F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,
Q);null==F&&null!=A&&A!=this.cellEditor.textarea.parentNode;)F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,Q),A=A.parentNode;if("rgba(0, 0, 0, 0)"==F||"transparent"==F)F=mxConstants.NONE;return F};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return"label"==A||"rectangle"==
A||"internalStorage"==A||"ext"==A||"umlLifeline"==A||"swimlane"==A||"process"==A};Graph.prototype.isRoundedState=function(A){return null!=A.shape?A.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(A){var G=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(A.style,mxConstants.STYLE_CURVED,!1)&&("connector"==G||"filledEdge"==G||"wire"==G)};Graph.prototype.isAutoSizeState=
function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var Q=this.model;return Q.filterDescendants(function(F){return A&&Q.isVertex(F)||G&&Q.isEdge(F)},Q.getRoot())};Graph.prototype.applyNewEdgeStyle=function(A,G,Q){A=this.getCellStyle(A).newEdgeStyle;
if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),L;for(L in F)this.setCellStyles(L,F[L],G),"edgeStyle"==L&&"elbowEdgeStyle"==F[L]&&null!=Q&&this.setCellStyles("elbow",Q==mxConstants.DIRECTION_SOUTH||Q==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},Q=0;Q<A.length;Q++){var F=this.view.getState(A[Q]);null!=F&&this.mergeStyle(F.style,G,0==Q)}return G};Graph.prototype.mergeStyle=function(A,G,Q){if(null!=
A){var F={},L;for(L in A){var c=A[L];null!=c&&(F[L]=!0,null==G[L]&&Q?G[L]=c:G[L]!=c&&delete G[L])}for(L in G)F[L]||delete G[L]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(A)&&
(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var Q=this.model.getChildAt(A,G);if(this.isCellEditable(Q)){A=Q;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,Q,F){null!=A&&(F||(Q=null!=Q?Q:Graph.cellStyles,Graph.removeKeys(A,function(L){return 0>mxUtils.indexOf(Q,L)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=function(A,G,Q,
F,L,c,f){var k=!1,t=!1;if(0<A.length)for(var q=0;q<A.length&&(k=this.getModel().isVertex(A[q])||k,!(t=this.getModel().isEdge(A[q])||t)||!k);q++);else t=k=!0;k=k&&!c;t=t&&!f;for(q=0;q<G.length;q++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[q]),"strokeColor"!=G[q]||null!=Q[q]&&"none"!=Q[q])if(0<=mxUtils.indexOf(Graph.cellStyles,G[q])||"shape"==G[q])if("shape"!=G[q]&&(k||A)&&(null==Q[q]?delete F[G[q]]:F[G[q]]=Q[q]),t||A)null==Q[q]?delete L[G[q]]:L[G[q]]=Q[q]};Graph.prototype.includeDescendants=function(A){for(var G=
[],Q=0;Q<A.length;Q++)G=G.concat(this.model.getDescendants(A[Q]));return G};Graph.prototype.pasteCellStyles=function(A,G,Q,F,L){G=null!=G?G:this.currentVertexStyle;Q=null!=Q?Q:this.currentEdgeStyle;L=null!=L?L:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<A.length;c++){var f=A[c],k=this.model.getStyle(f),t=!1;null!=f.style&&(pairs=f.style.split(";"),t=t||0<=mxUtils.indexOf(pairs,"text"));if(t)var q=Graph.textStyles;else if(q=Graph.cellStyles.slice(),!F)for(var D=null!=k?k.split(";"):
[],H=0;H<D.length;H++){var O=D[H],J=O.indexOf("=");if(0<=J){var I=O.substring(0,J),Z=mxUtils.indexOf(q,I);0<=Z&&q.splice(Z,1);for(t=0;t<Graph.cellStyleGroups.length;t++){var ia=Graph.cellStyleGroups[t];if(0<=mxUtils.indexOf(ia,I))for(var ha=0;ha<ia.length;ha++){var ca=mxUtils.indexOf(q,ia[ha]);0<=ca&&q.splice(ca,1)}}}}var na=this.model.isEdge(f);t=na?Q:G;for(H=0;H<q.length;H++){I=q[H];var X=t[I];null!=X&&("edgeStyle"!=I||L)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,I))&&(k=mxUtils.setStyle(k,
I,X),"fontFamily"==I&&null==t.fontSource&&(k=mxUtils.setStyle(k,"fontSource",null)),na&&"rounded"==I&&"1"==X&&null==t.curved&&(k=mxUtils.setStyle(k,"curved",null)))}Editor.simpleLabels&&(k=mxUtils.setStyle(mxUtils.setStyle(k,"html",null),"whiteSpace",null));this.model.setStyle(f,k)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var Q=0;Q<G.length;Q++)if(this.model.isVertex(G[Q])||this.model.isEdge(G[Q])){var F=this.getCellStyle(G[Q],
!1),L=F[mxConstants.STYLE_PERIMETER],c=!1;for(k in A){var f=A[k];if(F[k]!=f){if(k==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[k]&&"umlLifeline"!=f){c=!0;var k="participant"}this.setCellStyles(k,f,[G[Q]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,L,[G[Q]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(A,G,Q,F,L,c){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,Q,F,L,c){F=null!=F?F:!0;L=null!=L?L:!0;null==Q&&(Q=this.getCurrentRoot(),null==Q&&(Q=this.getModel().getRoot()));if(null!=Q)for(var f=
this.model.getChildCount(Q)-1;0<=f;f--){var k=this.model.getChildAt(Q,f),t=this.getScaledCellAt(A,G,k,F,L,c);if(null!=t)return t;if(this.isCellVisible(k)&&(L&&this.model.isEdge(k)||F&&this.model.isVertex(k))&&(t=this.view.getState(k),null!=t&&(null==c||!c(t,A,G))&&this.intersects(t,A,G)))return k}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)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,Q=[],F=0;F<A.length;F++){var L=this.getCompositeParent(A[F]);
this.isTableCell(L)&&(L=this.graph.model.getParent(L));this.isTableRow(L)&&(L=this.graph.model.getParent(L));null==L||G.get(L)||(G.put(L,!0),Q.push(L))}return Q};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);
if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var Q=[],F=0;F<G.length;F++)A(G[F])||Q.push(G[F]);G=Q}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,Q=this.currentTranslate;A=new mxRectangle((A.x+2*Q.x)*G-Q.x,(A.y+2*Q.y)*G-Q.y,A.width*G,A.height*G)}b.apply(this,arguments)};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 G=this.graph.currentTranslate,Q=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*Q,(A.y+G.y)*Q,A.width*Q,A.height*Q)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;
mxGraphView.prototype.validate=function(A){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);e.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)};var g=mxGraph.prototype.getCellsForGroup;
Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],Q=0;Q<A.length;Q++)this.isTableRow(A[Q])||this.isTableCell(A[Q])||G.push(A[Q]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],Q=0;Q<A.length;Q++)this.isTable(A[Q])||this.isTableRow(A[Q])||this.isTableCell(A[Q])||G.push(A[Q]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=
A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var Q=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+Q+","+Q+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};
var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,Q=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=Q)};var n=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,Q){var F=this.useCssTransforms,L=this.view.scale,c=this.view.translate;F&&(this.view.scale=1,this.view.translate=
new mxPoint(0,0),this.useCssTransforms=!1);n.apply(this,arguments);F&&(this.view.scale=L,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};
Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)!=this.baseUrl||"#"!=b.charAt(this.baseUrl.length)||"_top"!=e||window!=window.top||navigator.standalone)m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null);else{var v=b.split("#")[1];window.location.hash=="#"+v&&(window.location.hash="");window.location.hash=v}}catch(n){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var g=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(g,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,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.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.sortEdges="1"==mxUtils.getValue(b,"sortEdges","0"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,
"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),
e.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==String(b.childLayout).charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(m){null!=
window.console&&console.error(m)}}return null}};
Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[g].layout)){var m="mxOrgChartLayout"==b[g].layout&&null!=b[g].config?new window[b[g].layout](this,b[g].config.branchOptimizer):new window[b[g].layout](this);if(null!=b[g].config)for(var v in b[g].config)if("mxOrgChartLayout"!=b[g].layout||"branchOptimizer"!=v)m[v]=b[g].config[v];e.push(m)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[g].layout]));return e};
Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var v={};v.id=b[m].id;var n=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(v.value=this.getLabel(b[m]));if(null!=n)for(var A=0;A<n.length;A++)v[n[A].nodeName]=n[A].nodeValue;else v.label=this.convertValueToString(b[m]);g.push(v)}return g};
Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var v=this.cellRenderer.getShapesForState(m),n=0;n<v.length;n++)null!=v[n]&&null!=v[n].node&&e.push(v[n].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var v=this.view.getState(b[m]);null!=v&&null!=v.shape&&(this.model.isEdge(v.cell)&&null!=v.absolutePoints&&1<v.absolutePoints.length?g.push(this.createEdgeWipeAnimation(v,e)):this.model.isVertex(v.cell)&&null!=v.shape.bounds&&g.push(this.createVertexWipeAnimation(v,e)))}return g};
Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,n=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var Q=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,L=1;L<n;L++)if(F<=m[L-1]){Q.push(new mxPoint(g[L-1].x+(g[L].x-g[L-1].x)*F/m[L-1],g[L-1].y+(g[L].y-g[L-1].y)*F/m[L-1]));break}else F-=m[L-1],Q.push(g[L]);b.shape.points=Q;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=G)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,v){null!=b.shape&&(v=m/v,e||(v=1-v),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*v,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=v))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var v=null,n=0,A=mxUtils.bind(this,function(){if(n==g||this.stoppingCustomActions){window.clearInterval(v);for(var G=0;G<b.length;G++)b[G].stop();null!=e&&e()}else for(G=0;G<b.length;G++)b[G].execute(n,g);n++});v=window.setInterval(A,m);A()};
Graph.prototype.getPageSize=function(){return this.pageVisible&&null!=this.pageFormat?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(b,e,g){b=null!=b?b:this.getGraphBounds();e=null!=e?e:this.view.translate;g=null!=g?g:this.view.scale;var m=this.getPageSize();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var v=Math.floor(Math.ceil(b.x/g-e.x)/m.width),n=Math.floor(Math.ceil(b.y/g-e.y)/m.height);return new mxRectangle(v,n,Math.ceil((Math.floor((b.x+b.width)/g)-e.x)/m.width)-v,Math.ceil((Math.floor((b.y+b.height)/g)-e.y)/m.height)-n)};
Graph.prototype.getDefaultTranslate=function(b){var e=this.getPagePadding(),g=this.getPageSize();return new mxPoint(e.x-b.x*g.width,e.y-b.y*g.height)};Graph.prototype.updateMinimumSize=function(){var b=this.getPageLayout(),e=this.getPagePadding(),g=this.getPageSize(),m=Math.ceil(2*e.x+b.width*g.width);b=Math.ceil(2*e.y+b.height*g.height);if(null==this.minimumGraphSize||this.minimumGraphSize.width!=m||this.minimumGraphSize.height!=b)this.minimumGraphSize=new mxRectangle(0,0,m,b)};
Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var g=this.model.cells[e];this.isReplacePlaceholders(g)&&(this.view.invalidate(g,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};
Graph.prototype.isSplitTarget=function(b,e,g){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(g)&&!mxEvent.isShiftDown(g)&&!this.isCellLocked(this.getLayerForCell(b))&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};
Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,g){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 m=this.dateFormatCache,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,A=function(H,O){H=String(H);for(O=O||2;H.length<O;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",Q=b[G+"Date"](),F=b[G+"Day"](),L=b[G+"Month"](),c=b[G+"FullYear"](),f=b[G+"Hours"](),k=b[G+"Minutes"](),t=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var q=g?0:b.getTimezoneOffset(),D={d:Q,dd:A(Q),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:L+1,mm:A(L+1),mmm:m.i18n.monthNames[L],mmmm:m.i18n.monthNames[L+
12],yy:String(c).slice(2),yyyy:c,h:f%12||12,hh:A(f%12||12),H:f,HH:A(f),M:k,MM:A(k),s:t,ss:A(t),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+A(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<Q%10?0:(10!=Q%100-Q%10)*Q%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in D?D[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),n=0;n<v;n++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(L.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(L.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var Q=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[Q]));var L=document.createElement("img");L.setAttribute("draggable","false");L.setAttribute("align","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.width="16px";L.style.padding="0px 6px 0 4px";e&&(L.style.filter="invert(100%)",L.style.top="-2px");F.appendChild(L);mxUtils.write(F,Q);g.appendChild(F);
mxEvent.addListener(F,"click",function(){m.setVisible(A,!m.isVisible(A));G();null!=b&&b(A)});G()})(m.getChildAt(m.root,n));return g};
Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=n.substring(1);else{var G=n.substring(1,n.length-1),Q={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);
null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,Q[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,Q[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,Q[G.substring(7)])))}else if(0>G.indexOf("{"))for(Q=b;null==A&&null!=
Q;)null!=Q.value&&"object"==typeof Q.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=Q.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=Q.hasAttribute(G)?null!=Q.getAttribute(G)?Q.getAttribute(G):"":null)),Q=this.model.getParent(Q);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:n));v=match.index+n.length}}m.push(e.substring(v))}return m.join("")};
Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),n=this.model.getParent(e);if(v==this.model.getParent(n)){b=m.getIndex(b);m=v.getIndex(m);var A=n.getIndex(e),G=v.getIndex(n);n=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=n;m++){G=this.model.getChildAt(v,m);for(var Q=e;Q<=b;Q++)A.push(this.model.getChildAt(G,Q))}0<A.length&&(1<A.length||1<this.getSelectionCount()||
!this.isCellSelected(A[0]))&&(this.setSelectionCells(A),g=!0)}}return g};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],v=this.getCellGeometry(m);if(null!=v){v=v.clone();if(this.getModel().isVertex(m))v.x=Math.round(v.x/e)*e,v.y=Math.round(v.y/e)*e,v.width=Math.round(v.width/e)*e,v.height=Math.round(v.height/e)*e;else if(this.getModel().isEdge(m)&&null!=v.points)for(var n=0;n<v.points.length;n++)v.points[n].x=Math.round(v.points[n].x/e)*e,v.points[n].y=Math.round(v.points[n].y/e)*e;this.getModel().setGeometry(m,
v)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};
Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.getStyle(b),v=g?this.stylesheet.getCellStyle(m,{},!1):null;null!=v&&null==v[mxConstants.STYLE_SHAPE]&&(this.model.isVertex(b)?v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultVertexStyle()[mxConstants.STYLE_SHAPE]:this.model.isEdge(b)&&(v[mxConstants.STYLE_SHAPE]=this.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_SHAPE]));for(var n=0;n<e.length;n++){if(this.model.isVertex(b)&&this.model.isVertex(e[n])||
this.model.isEdge(b)&&this.model.isEdge(e[n]))if(g){var A=this.model.getStyle(e[n]);if(null!=A){var G=A.split(";");0<G.length&&0>G[0].indexOf("=")&&(G=G.slice(1));this.model.setStyle(e[n],G.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[n]]);this.setCellStyles("points",null,[e[n]]);this.pasteStyle(v,[e[n]],null,!0)}else v=this.copyStyle(e[n]),this.model.setStyle(e[n],m),this.pasteStyle(v,[e[n]]);"1"==mxUtils.getValue(this.getCellStyle(e[n],!1),"composite","0")&&this.removeChildCells(e[n])}}finally{this.model.endUpdate()}};
Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};
Graph.prototype.connectVertex=function(b,e,g,m,v,n,A,G){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var Q=this.isCloneConnectSource(b),F=Q?b:this.getCompositeParent(b),L=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(L.x+=F.geometry.width/2,L.y-=g):e==
mxConstants.DIRECTION_SOUTH?(L.x+=F.geometry.width/2,L.y+=F.geometry.height+g):(L.x=e==mxConstants.DIRECTION_WEST?L.x-g:L.x+(F.geometry.width+g),L.y+=F.geometry.height/2);var c=this.view.getState(this.model.getParent(b));g=this.view.scale;var f=this.view.translate;F=f.x*g;f=f.y*g;null!=c&&this.model.isVertex(c.cell)&&(F=c.x,f=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(L.x+=b.parent.geometry.x,L.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(F+L.x*g,f+L.y*g)).grow(40*g);n=null!=n?
this.getCells(0,0,0,0,null,null,n,null,!0):null;c=this.view.getState(b);var k=null,t=null;if(null!=n){n=n.reverse();for(var q=0;q<n.length;q++)if(!this.isCellLocked(n[q])&&!this.model.isEdge(n[q])&&n[q]!=b)if(!this.model.isAncestor(b,n[q])&&this.isContainer(n[q])&&(null==k||n[q]==this.model.getParent(b)))k=n[q];else if(null==t&&this.isCellConnectable(n[q])&&!this.model.isAncestor(n[q],b)&&!this.isSwimlane(n[q])){var D=this.view.getState(n[q]);null==c||null==D||mxUtils.intersects(c,D)||(t=n[q])}}var H=
!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;H&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?L.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=b.geometry.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-b.geometry.width/2:L.x+b.geometry.width/2);var O=[],J=t;t=k;v=mxUtils.bind(this,function(I){if(null==A||null!=I||null==t&&Q){this.model.beginUpdate();try{if(null==J&&H){var Z=this.getAbsoluteParent(null!=I?I:b);Z=Q?b:this.getCompositeParent(Z);J=null!=I?I:this.duplicateCells([Z],
!1)[0];null!=I&&this.addCells([J],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(J);null!=ia&&(null!=I&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?L.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?L.y+=ia.height/2:L.x=e==mxConstants.DIRECTION_WEST?L.x-ia.width/2:L.x+ia.width/2),ia.x=L.x-ia.width/2,ia.y=L.y-ia.height/2);null!=k?(this.addCells([J],k,null,null,null,!0),t=null):H&&!Q&&this.addCells([J],this.getDefaultParent(),null,null,null,!0)}var ha=mxEvent.isControlDown(m)&&
mxEvent.isShiftDown(m)&&H||null==t&&Q?null:this.insertEdge(this.model.getParent(b),null,"",b,J,this.createCurrentEdgeStyle());null!=ha&&(O.push(ha),this.applyNewEdgeStyle(b,[ha],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ha,b));if(null==t&&null!=J&&null!=b.parent&&Q&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,J,ca)}null==t&&null!=J&&O.push(J);null==J&&null!=ha&&ha.geometry.setTerminalPoint(L,!1);null!=ha&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[ha]))}finally{this.model.endUpdate()}}if(null!=G)G(O);else return O});if(null==A||null!=J||!H||null==t&&Q)return v(J);A(F+L.x*g,f+L.y*g,v)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,v=0;v<b.length;v++)if(m=b[v],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),
null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var g=this.model.getParent(b);this.model.isVertex(g)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(g),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e&&null!=this.shapeBackgroundColor&&null!=this.shapeForegroundColor){b=this.shapeBackgroundColor;var g=this.shapeForegroundColor;this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,g);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,g);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,g);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,g);this.replaceDefaultColor(e,
mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,g);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return e};Graph.prototype.replaceDefaultColor=function(b,e,g){null!=b&&null!=g&&"none"!=g&&""!=g&&"default"==b[e]&&(b[e]=this.getDefaultColor(b,e,g))};
Graph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<g.length;n++){var A=this.view.getState(g[n]),G=this.getCellGeometry(g[n]);if(null!=A&&null!=G){var Q=0,F=0;if(G.alternateBounds)Q=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var L=this.useCssTransforms?1:this.view.scale;
Q=Math.round(G.width-A.width/L);F=Math.round(G.height-A.height/L)}if(0!=F||0!=Q){var c=this.model.getParent(g[n]),f=this.layoutManager.getLayout(c);null==f?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,c,Q,F):null!=v&&mxEvent.isAltDown(v)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,Q,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var v=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<v.length;e++)if(v[e]!=b.cell){var n=this.view.getState(v[e]),A=this.getCellGeometry(v[e]);null!=n&&null!=A&&(A=A.clone(),A.translate(Math.round(g*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(v[e],A))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var v=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==v&&!e.resizeLast;){var n=this.getCellGeometry(b),A=this.view.getState(b);null!=A&&null!=n&&(n=n.clone(),e.horizontal?n.width+=g+Math.min(0,A.width/this.view.scale-n.width):n.height+=m+Math.min(0,A.height/this.view.scale-n.height),this.model.setGeometry(b,
n));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,g){g=g||this.getDefaultParent();this.isCellLocked(g)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,e,g){var m=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(m)&&(m=null);return m};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
Graph.prototype.fitPages=function(b,e){var g=1;null==b&&(g=this.getPageLayout(),b=g.width,g=g.height);var m=this.pageScale,v=this.pageFormat,n=this.container.clientHeight-10;b=(this.container.clientWidth-10)/(b*v.width)/m;this.zoomTo(Math.floor(20*(e?b:Math.min(b,n/(g*v.height)/m)))/20);mxUtils.hasScrollbars(this.container)&&(b=this.getPagePadding(),this.container.scrollLeft=Math.min(b.x*this.view.scale,(this.container.scrollWidth-this.container.clientWidth)/2),e||(this.container.scrollTop=Math.min(b.y*
this.view.scale,(this.container.scrollHeight-this.container.clientHeight)/2)))};
Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var g=this.container.clientWidth-e,m=this.container.clientHeight-e;this.zoomTo(Math.floor(20*Math.min(g/b.width,m/b.height))/20);mxUtils.hasScrollbars(this.container)&&window.setTimeout(mxUtils.bind(this,function(){var v=this.view.translate;this.container.scrollLeft=(b.x+v.x)*this.view.scale-Math.max((g-b.width*this.view.scale)/2+e/2,0);this.container.scrollTop=(b.y+v.y)*this.view.scale-Math.max((m-b.height*this.view.scale)/2+e/2,0)}),0)};
Graph.prototype.convertValueToTooltip=function(b){var e=null;mxUtils.isNode(b.value)&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage)),null==e&&(e=b.value.getAttribute("tooltip")),null!=e&&(null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),e=Graph.sanitizeHtml(e)));return e};
Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)&&(e=this.convertValueToTooltip(b),null==e)){var g=this.builtInProperties;b=b.value.attributes;var m=[];e="";this.isEnabled()&&(g.push("linkTarget"),g.push("link"));for(var v=0;v<b.length;v++)(Graph.translateDiagram&&"label"==b[v].nodeName||0>mxUtils.indexOf(g,b[v].nodeName))&&0<b[v].nodeValue.length&&m.push({name:b[v].nodeName,value:b[v].nodeValue});m.sort(function(n,A){return n.name<A.name?-1:n.name>A.name?1:0});for(v=
0;v<m.length;v++)"link"==m[v].name&&this.isCustomLink(m[v].value)||(e+=("link"!=m[v].name?"<b>"+mxUtils.htmlEntities(m[v].name)+":</b> ":"")+mxUtils.htmlEntities(m[v].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}return e};
Graph.prototype.addFlowAnimationToNode=function(b,e,g,m){if(null!=b&&null!=m){var v=b.getAttribute("stroke-dasharray");if(""==v||null==v){var n=String(mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");v=1==mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,!1)||null==e.dashPattern?1:mxUtils.getNumber(e,mxConstants.STYLE_STROKEWIDTH,1);if(0<n.length)for(var A=0;A<n.length;A++)n[A]=Math.round(Number(n[A])*g*v*100)/100;b.setAttribute("stroke-dasharray",n.join(" "))}else n=v.split(" ");if(0<
n.length){for(A=v=0;A<n.length;A++){var G=parseFloat(n[A]);isNaN(G)||(v+=parseFloat(n[A]))}0!=n.length%2&&(v*=2);g=Math.round(v/g/16*parseInt(mxUtils.getValue(e,"flowAnimationDuration",500)));n=mxUtils.getValue(e,"flowAnimationTimingFunction","linear");e=mxUtils.getValue(e,"flowAnimationDirection","normal");b.style.animation=m+" "+g+"ms "+mxUtils.htmlEntities(n)+" infinite "+mxUtils.htmlEntities(e);b.style.strokeDashoffset=v}}};
Graph.prototype.addFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationId){this.flowAnimationId="ge-flow-animation-"+Editor.guid();var e=document.createElement("style");e.innerHTML=this.createFlowAnimationCss(this.flowAnimationId);b.appendChild(e)}return this.flowAnimationId};Graph.prototype.createFlowAnimationCss=function(b){return"@keyframes "+b+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};
Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;
HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');
HoverIcons.prototype.triangleRight=Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.triangleDown=Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');
HoverIcons.prototype.refreshTarget=new mxImage("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGhlaWdodD0iMzZweCI+PGVsbGlwc2UgZmlsbD0iIzI5YjZmMiIgY3g9IjEyIiBjeT0iMTIiIHJ4PSIxMiIgcnk9IjEyIi8+PHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjgpIHRyYW5zbGF0ZSgyLjQsIDIuNCkiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iI2ZmZiIgZD0iTTEyIDZ2M2w0LTQtNC00djNjLTQuNDIgMC04IDMuNTgtOCA4IDAgMS41Ny40NiAzLjAzIDEuMjQgNC4yNkw2LjcgMTQuOGMtLjQ1LS44My0uNy0xLjc5LS43LTIuOCAwLTMuMzEgMi42OS02IDYtNnptNi43NiAxLjc0TDE3LjMgOS4yYy40NC44NC43IDEuNzkuNyAyLjggMCAzLjMxLTIuNjkgNi02IDZ2LTNsLTQgNCA0IDR2LTNjNC40MiAwIDgtMy41OCA4LTggMC0xLjU3LS40Ni0zLjAzLTEuMjQtNC4yNnoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+Cg==",38,
38);HoverIcons.prototype.tolerance=mxClient.IS_TOUCH?6:0;
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(g){null!=g.relatedTarget&&
mxEvent.getSource(g)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(g){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(g){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(g.getEvent())||this.graph.model.isVertex(g.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(g,
m){e=!1;g=m.getEvent();this.isResetEvent(g)?this.reset():this.isActive()||(m=this.getState(m.getState()),null==m&&mxEvent.isTouchEvent(g)||this.update(m));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(g,m){g=m.getEvent();this.isResetEvent(g)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(g)||this.update(this.getState(m.getState()),m.getGraphX(),m.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
function(g,m){g=m.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g));this.isResetEvent(g)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),m):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(m.getGraphX(),m.getGraphY())))):mxEvent.isTouchEvent(g)||null!=
this.bbox&&mxUtils.contains(this.bbox,m.getGraphX(),m.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(g)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
HoverIcons.prototype.createArrow=function(b,e,g){var m=null;m=mxUtils.createImage(b.src);m.style.width=b.width+"px";m.style.height=b.height+"px";m.style.padding=this.tolerance+"px";null!=e&&m.setAttribute("title",e);m.style.position="absolute";m.style.cursor=this.cssCursor;mxEvent.addGestureListeners(m,mxUtils.bind(this,function(v){null==this.currentState||this.isResetEvent(v)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(v),mxEvent.getClientY(v)),this.drag(v,
this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=m,this.setDisplay("none"),mxEvent.consume(v))}));mxEvent.redirectMouseEvents(m,this.graph,this.currentState);mxEvent.addListener(m,"mouseenter",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&(null!=this.activeArrow&&this.activeArrow!=m&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(m,100),this.activeArrow=m,this.fireEvent(new mxEventObject("focus",
"arrow",m,"direction",g,"event",v)))}));mxEvent.addListener(m,"mouseleave",mxUtils.bind(this,function(v){mxEvent.isMouseEvent(v)&&this.fireEvent(new mxEventObject("blur","arrow",m,"direction",g,"event",v));this.graph.isMouseDown||this.resetActiveArrow()}));return m};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(b,e,g){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,g),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,g){return this.graph.view.getState(this.graph.getCellAt(e,g))};
HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),v=g.getGraphX(),n=g.getGraphY();v=this.getStateAt(b,v,n);null==v||!this.graph.model.isEdge(v.cell)||this.graph.isCloneEvent(m)||v.getVisibleTerminalState(!0)!=b&&v.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,g):(this.graph.setSelectionCell(v.cell),this.reset());g.consume()};
HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(G,Q,F){if(null!=g){var L=new mxRectangle(Q,F,G.clientWidth,G.clientHeight);mxUtils.intersects(L,g)&&(G==this.arrowUp?F-=L.y+L.height-g.y:G==this.arrowRight?Q+=g.x+g.width-L.x:G==this.arrowDown?F+=g.y+g.height-L.y:G==this.arrowLeft&&(Q-=L.x+L.width-g.x))}G.style.left=Q+"px";G.style.top=F+"px";mxUtils.setOpacity(G,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),v=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==v&&v==b&&(b=v=m=e=null);var n=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,Q){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,
this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==n||F.height<3*n.height&&F.width<3*n.width)?Q.style.visibility="visible":Q.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,this.arrowUp);A(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,e,g){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var m=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,m=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,g))}),this.updateDelay+10))):null!=this.startTime&&(m=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&m<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,g)?this.reset(!1):(null!=this.currentState||m>this.activationDelay)&&this.currentState!=b&&(m>this.updateDelay&&null!=
b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.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=b};
Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var v=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(v=v.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));v=Editor.convertHtmlToText(v);this.cellLabelChanged(b,v);m=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return m};Graph.prototype.createParent=function(b,e,g,m,v){b=this.cloneCell(b);for(var n=0;n<g;n++){var A=this.cloneCell(e),G=this.getCellGeometry(A);null!=G&&(G.x+=n*m,G.y+=n*v);b.insert(A)}return b};
Graph.prototype.createTable=function(b,e,g,m,v,n,A,G,Q){g=null!=g?g:60;m=null!=m?m:40;n=null!=n?n:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";Q=null!=Q?Q:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
null,null!=v?v:"",0,0,e*g,b*m+(null!=v?n:0),null!=A?A:"shape=table;startSize="+(null!=v?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,Q),e,g,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),v=0;v<m.length;v++)if(null!=g&&(m[v].value=g[v]),null!=e)for(var n=this.model.getChildCells(m[v],!0),A=0;A<n.length;A++)null!=e[v][A]&&(n[A].value=e[v][A]);return b};
Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,n,A,G,Q){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
Q=null!=Q?Q:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=n?n:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");n=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=n;v.geometry.height+=
n;A=this.createVertex(null,null,"",0,n,e*g+n,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",n,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+n,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",n,0,g,m,Q),e,g,0),b-1,0,m)):v};
Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var n=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),Q=null,F=[],L=0;L<A.length;L++){var c=this.getCellGeometry(A[L]),f={cell:A[L],rospan:1,colspan:1,row:v,col:L,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;f.point=new mxPoint(c.width+(null!=Q?Q.point.x:b.x+n.x),c.height+(null!=g&&null!=
g[0]?g[0].point.y:b.y+n.y));f.actual=f;null!=g&&null!=g[L]&&1<g[L].rowspan?(f.rowspan=g[L].rowspan-1,f.colspan=g[L].colspan,f.actual=g[L].actual):null!=Q&&1<Q.colspan?(f.rowspan=Q.rowspan,f.colspan=Q.colspan-1,f.actual=Q.actual):(Q=this.getCurrentCellStyle(A[L],!0),null!=Q&&(f.rowspan=parseInt(Q.rowspan||1),f.colspan=parseInt(Q.colspan||1)));Q=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(f,A.length,
m.length,b.x+(Q?n.x:0),b.y+(Q?n.y:0));F.push(f);Q=f}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(n,A,G,Q,F){e&&n.row<G-1&&(null==m[n.row]&&(m[n.row]=[new mxPoint(Q,n.point.y)]),1<n.rowspan&&m[n.row].push(null),m[n.row].push(n.point));g&&n.col<A-1&&(null==v[n.col]&&(v[n.col]=[new mxPoint(n.point.x,F)]),1<n.colspan&&v[n.col].push(null),v[n.col].push(n.point))}));return m.concat(v)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var n=m.getParent(b),A=m.getChildCells(n,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var Q=A[G+1],F=this.getCellGeometry(Q);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(Q,F))}}var L=this.getCellGeometry(n);null!=L&&(g||(g=b==A[A.length-1]),g&&(L=L.clone(),L.height+=e,m.setGeometry(n,L)))}}finally{m.endUpdate()}};
Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),n=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var Q=m.getChildCells(n,!0),F=0;F<Q.length;F++){v=Q[F];A=m.getChildCells(v,!0);var L=A[b],c=this.getCellGeometry(L);null!=c&&(c=c.clone(),c.width+=e,null!=c.alternateBounds&&(c.alternateBounds.width+=e),m.setGeometry(L,c));b<A.length-1&&(L=A[b+1],c=this.getCellGeometry(L),null!=c&&(c=c.clone(),
c.x+=e,g||(c.width-=e,null!=c.alternateBounds&&(c.alternateBounds.width-=e)),m.setGeometry(L,c)))}if(G||g){var f=this.getCellGeometry(n);null!=f&&(f=f.clone(),f.width+=e,m.setGeometry(n,f))}null!=this.layoutManager&&this.layoutManager.executeLayout(n)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var v=this.graph.getCellGeometry(b[m]);null!=v&&(g+=e?v.width:v.height)}return g};
TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var v=[];m=m.x;for(var n=0;n<g.length;n++){var A=this.graph.getCellGeometry(g[n]);null!=A&&(m+=(null!=A.alternateBounds?A.alternateBounds.width:A.width)*e/b,v.push(Math.round(m)))}return v};
TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),n=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var Q=0;Q<n.length;Q++){var F=this.graph.getCellGeometry(n[Q]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[Q],F.width=e[Q+1]-F.x,Q==n.length-1&&Q<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,Q==n.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,
0,F.width,F.height),v.setGeometry(n[Q],F))}return G};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),n="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var Q=g.height-e.y-e.height,F=g.width-e.x-e.width,L=A.getChildCells(b,!0),c=0;c<L.length;c++)A.setVisible(L[c],!0);var f=this.getSize(L,!1);if(0<Q&&0<F&&0<
L.length&&0<f){if(v){var k=this.graph.getCellGeometry(L[L.length-1]);null!=k&&(k=k.clone(),k.height=Q-f+k.height,A.setGeometry(L[L.length-1],k))}var t=n?null:this.getRowLayout(L[0],F),q=[],D=e.y;for(c=0;c<L.length;c++)k=this.graph.getCellGeometry(L[c]),null!=k&&(k=k.clone(),k.x=e.x,k.width=F,k.y=Math.round(D),D=v||m?D+k.height:D+k.height/f*Q,k.height=Math.round(D)-k.y,A.setGeometry(L[c],k)),G=Math.max(G,this.layoutRow(L[c],t,k.height,F,q));m&&Q<f&&(g=g.clone(),g.height=D+e.height,A.setGeometry(b,
g));n&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){A.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var O=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=O.width}H.actual.col==H.col&&(O=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=O.height)}}))}else for(c=0;c<L.length;c++)A.setVisible(L[c],
!1)}finally{A.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(c,f){f=null!=f?f:!0;var k=this.getState(c);null!=k&&f&&this.graph.model.isEdge(k.cell)&&null!=k.style&&1!=k.style[mxConstants.STYLE_CURVED]&&!k.invalid&&this.updateLineJumps(k)&&this.graph.cellRenderer.redraw(k,!1,this.isRendering());k=e.apply(this,
arguments);null!=k&&f&&this.graph.model.isEdge(k.cell)&&null!=k.style&&1!=k.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(k);return k};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var c=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
c)for(var f=0;f<c.length;f++)if("hidden"!=c[f].getAttribute("visibility"))return c[f];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(c){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(c){c=m.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var v=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,f){return v.apply(this,arguments)||null!=c.routedPoints&&null!=f.routedPoints&&!mxUtils.equalPoints(f.routedPoints,c.routedPoints)};var n=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){n.apply(this,arguments);
this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var f=c.absolutePoints;if(Graph.lineJumpsEnabled){var k=null!=c.routedPoints,t=null;if(null!=f&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var q=function(da,W,U){var l=new mxPoint(W,U);l.type=da;t.push(l);l=null!=c.routedPoints?c.routedPoints[t.length-1]:null;return null==l||l.type!=da||l.x!=W||l.y!=U},D=.5*this.scale;
k=!1;t=[];for(var H=0;H<f.length-1;H++){for(var O=f[H+1],J=f[H],I=[],Z=f[H+2];H<f.length-2&&mxUtils.ptSegDistSq(J.x,J.y,Z.x,Z.y,O.x,O.y)<1*this.scale*this.scale;)O=Z,H++,Z=f[H+2];k=q(0,J.x,J.y)||k;for(var ia=0;ia<this.validEdges.length;ia++){var ha=this.validEdges[ia],ca=ha.absolutePoints;if(null!=ca&&mxUtils.intersects(c,ha)&&"1"!=ha.style.noJump){var na=null;for(ha=0;ha<ca.length-1;ha++){var X=ca[ha+1],ba=ca[ha];for(Z=ca[ha+2];ha<ca.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,Z.x,Z.y,X.x,X.y)<1*this.scale*
this.scale;)X=Z,ha++,Z=ca[ha+2];var ka=mxUtils.intersection(J.x,J.y,O.x,O.y,ba.x,ba.y,X.x,X.y);if(null!=ka&&(Math.abs(ka.x-J.x)>D||Math.abs(ka.y-J.y)>D)&&(Math.abs(ka.x-O.x)>D||Math.abs(ka.y-O.y)>D)&&(null==na||mxUtils.ptLineDist(J.x,J.y,O.x,O.y,na.x,na.y)>D||mxUtils.ptLineDist(J.x,J.y,O.x,O.y,ba.x,ba.y)>D)&&(null==Z||mxUtils.ptLineDist(J.x,J.y,O.x,O.y,Z.x,Z.y)>D||mxUtils.ptLineDist(J.x,J.y,O.x,O.y,X.x,X.y)>D)){Z=ka.x-J.x;na=ka.y-J.y;ka={distSq:Z*Z+na*na,x:ka.x,y:ka.y};for(Z=0;Z<I.length;Z++)if(I[Z].distSq>
ka.distSq){I.splice(Z,0,ka);ka=null;break}null==ka||0!=I.length&&I[I.length-1].x===ka.x&&I[I.length-1].y===ka.y||I.push(ka)}na=ba}}}for(ha=0;ha<I.length;ha++)k=q(1,I[ha].x,I[ha].y)||k}ka=f[f.length-1];k=q(0,ka.x,ka.y)||k}c.routedPoints=t;return k}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,f,k){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)A.apply(this,
arguments);else{var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,q=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,D=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,O=null,J=null,I=[],Z=null;c.begin();for(var ia=0;ia<this.state.routedPoints.length;ia++){var ha=this.state.routedPoints[ia],ca=new mxPoint(ha.x/this.scale,ha.y/this.scale);0==ia?ca=f[0]:ia==this.state.routedPoints.length-1&&(ca=f[f.length-1]);var na=
!1;if(null!=O&&1==ha.type){var X=this.state.routedPoints[ia+1];ha=X.x/this.scale-ca.x;X=X.y/this.scale-ca.y;ha=ha*ha+X*X;null==Z&&(Z=new mxPoint(ca.x-O.x,ca.y-O.y),J=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<J?(Z.x=Z.x*q/J,Z.y=Z.y*q/J):Z=null);ha>q*q&&0<J&&(ha=O.x-ca.x,X=O.y-ca.y,ha=ha*ha+X*X,ha>q*q&&(na=new mxPoint(ca.x-Z.x,ca.y-Z.y),ha=new mxPoint(ca.x+Z.x,ca.y+Z.y),I.push(na),this.addPoints(c,I,k,t,!1,null,H),I=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==D?(c.lineTo(na.x-Z.y*
I,na.y+Z.x*I),c.lineTo(ha.x-Z.y*I,ha.y+Z.x*I),c.lineTo(ha.x,ha.y)):"line"==D?(c.moveTo(na.x+Z.y*I,na.y-Z.x*I),c.lineTo(na.x-Z.y*I,na.y+Z.x*I),c.moveTo(ha.x-Z.y*I,ha.y+Z.x*I),c.lineTo(ha.x+Z.y*I,ha.y-Z.x*I),c.moveTo(ha.x,ha.y)):"arc"==D?(I*=1.3,c.curveTo(na.x-Z.y*I,na.y+Z.x*I,ha.x-Z.y*I,ha.y+Z.x*I,ha.x,ha.y)):(c.moveTo(ha.x,ha.y),H=!0),I=[ha],na=!0))}else Z=null;na||(I.push(ca),O=ca)}this.addPoints(c,I,k,t,!1,null,H);c.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
function(c,f,k,t){return null!=f&&"centerPerimeter"==f.style[mxConstants.STYLE_PERIMETER]?new mxPoint(f.getCenterX(),f.getCenterY()):G.apply(this,arguments)};var Q=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,f,k,t){if(null==f||null==c||"1"!=f.style.snapToPoint&&"1"!=c.style.snapToPoint)Q.apply(this,arguments);else{f=this.getTerminalPort(c,f,t);var q=this.getNextPoint(c,k,t),D=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||
"0")),O=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=H){var J=Math.cos(-H),I=Math.sin(-H);q=mxUtils.getRotatedPoint(q,J,I,O)}J=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);J+=parseFloat(c.style[t?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);q=this.getPerimeterPoint(f,q,0==H&&D,J);0!=H&&(J=Math.cos(H),I=Math.sin(H),q=mxUtils.getRotatedPoint(q,J,I,O));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,f,k,t,q),t)}};mxGraphView.prototype.snapToAnchorPoint=
function(c,f,k,t,q){if(null!=f&&null!=c){c=this.graph.getAllConnectionConstraints(f);t=k=null;if(null!=c)for(var D=0;D<c.length;D++){var H=this.graph.getConnectionPoint(f,c[D]);if(null!=H){var O=(H.x-q.x)*(H.x-q.x)+(H.y-q.y)*(H.y-q.y);if(null==t||O<t)k=H,t=O}}null!=k&&(q=k)}return q};var F=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,f,k){var t=F.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=k.state&&(t=k.state.view.graph.replacePlaceholders(k.state.cell,
t));return t};var L=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var k=f.substring(8,f.length-1),t=mxUtils.parseXml(Graph.decompress(k));return new mxShape(new mxStencil(t.documentElement))}catch(q){null!=window.console&&console.log("Error in shape: "+q)}}return L.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var v=e[m];if(!mxStencilRegistry.isFileLoaded(v))if(mxStencilRegistry.setFileLoaded(v),".xml"==v.toLowerCase().substring(v.length-4,v.length))mxStencilRegistry.loadStencilSet(v,
null);else if(".js"==v.toLowerCase().substring(v.length-3,v.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(v);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,v,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var g=2;g<b.length-1;g++)e+="/"+b[g]}return e};
mxStencilRegistry.loadStencilSet=function(b,e,g,m){var v=mxStencilRegistry.packages[b];if(null!=g&&g||null==v){var n=!1;if(null==v)try{if(m){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(A){null!=A&&null!=A.documentElement&&(mxStencilRegistry.packages[b]=A,n=!0,mxStencilRegistry.parseStencilSet(A.documentElement,e,n))}));return}v=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=v;n=!0}catch(A){null!=window.console&&console.log("error in loadStencilSet:",b,A)}null!=v&&null!=
v.documentElement&&mxStencilRegistry.parseStencilSet(v.documentElement,e,n)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(g){e(200<=g.getStatus()&&299>=g.getStatus()?g.getXml():null)}),mxUtils.bind(this,function(g){e(null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
mxStencilRegistry.parseStencilSet=function(b,e,g){if("stencils"==b.nodeName)for(var m=b.firstChild;null!=m;)"shapes"==m.nodeName&&mxStencilRegistry.parseStencilSet(m,e,g),m=m.nextSibling;else{g=null!=g?g:!0;m=b.firstChild;var v="";b=b.getAttribute("name");for(null!=b&&(v=b+".");null!=m;){if(m.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=m.getAttribute("name"),null!=b)){v=v.toLowerCase();var n=b.replace(/ /g,"_");g&&mxStencilRegistry.addStencil(v+n.toLowerCase(),new mxStencil(m));if(null!=e){var A=m.getAttribute("w"),
G=m.getAttribute("h");A=null==A?80:parseInt(A,10);G=null==G?80:parseInt(G,10);e(v,n,b,A,G)}}m=m.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,N){switch(N){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(3)}}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_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=50;mxConstants.HIGHLIGHT_SIZE=
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)||mxEvent.isShiftDown(y)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return g.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(y){return m.apply(this,arguments)||this.graph.isEdgeIgnored(y)};var v=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=v.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
"crosshair";mxConnectionHandler.prototype.createEdgeState=function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var N in this.graph.currentEdgeStyle)y.style[N]=this.graph.currentEdgeStyle[N];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var V=JSON.parse(R);for(N in V)y.style[N]=V[N]}catch(fa){}}y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};
var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=n.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return y};mxConnectionHandler.prototype.updatePreview=function(y){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=A.apply(this,arguments),N=y.getCell;y.getCell=mxUtils.bind(this,function(R){var V=N.apply(this,arguments);this.error=null;return V});
return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",N="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<N.length;R++)null!=
this.currentEdgeStyle[N[R]]&&(y+=N[R]+"="+this.currentEdgeStyle[N[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,N){N=null!=N?N:{};for(var R=0;R<y.length;R++){var V=y[R];N[mxObjectIdentity.get(V)]=V.getId();for(var fa=this.model.getChildCount(V),ja=0;ja<fa;ja++)this.createCellLookup([this.model.getChildAt(V,ja)],N)}return N};Graph.prototype.createCellMapping=function(y,N,R){R=null!=R?R:{};for(var V in y){var fa=N[V];null==R[fa]&&(R[fa]=y[V].getId()||"")}return R};Graph.prototype.importGraphModel=function(y,
N,R,V){N=null!=N?N:0;R=null!=R?R:0;var fa=new mxCodec(y.ownerDocument),ja=new mxGraphModel;fa.decode(y,ja);y=[];fa={};var oa={},ua=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),fa));if(null!=ua){var ra=this.createCellLookup([ja.root]);ua=ua.slice();this.model.beginUpdate();try{if(1!=ua.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ua.length;ja++)xa=this.model.getChildren(this.moveCells([ua[ja]],N,R,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=
ja.getChildren(ua[0]);null!=xa&&(y=this.moveCells(xa,N,R,!1,this.getDefaultParent()),oa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(fa,ra,oa),this.updateCustomLinks(oa,y),V)){this.isGridEnabled()&&(N=this.snap(N),R=this.snap(R));var Ga=this.getBoundingBoxFromGeometry(y,!0);null!=Ga&&this.moveCells(y,N-Ga.x,R-Ga.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var N={},R=this.cloneCells(y,null,N),V=
new mxDictionary,fa=0;fa<y.length;fa++)V.put(y[fa],!0);var ja=new mxCodec,oa=new mxGraphModel,ua=oa.getChildAt(oa.getRoot(),0);for(fa=0;fa<R.length;fa++){oa.add(ua,R[fa]);var ra=this.view.getState(y[fa]);if(null!=ra){var xa=this.getCellGeometry(R[fa]);null!=xa&&xa.relative&&!this.model.isEdge(y[fa])&&null==V.get(this.model.getParent(y[fa]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(N,
this.createCellLookup(y)),R);return ja.encode(oa)};Graph.prototype.isSwimlane=function(y,N){var R=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(R=this.getCurrentCellStyle(y,N)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(y){return null!=y&&G.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellEditable(this.model.getParent(y)):
!0:!1};var Q=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(y){return null!=y&&Q.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellMovable(this.model.getParent(y)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var N=this.model.getParent(y);if(null!=N){var R=this.getCurrentCellStyle(N);if(null!=R.expand)return"0"!=R.expand}return F.apply(this,arguments)&&(null==N||!this.isTable(N))};var L=Graph.prototype.splitEdge;
Graph.prototype.splitEdge=function(y,N,R,V,fa,ja,oa,ua){null==ua&&(ua=this.model.getParent(y),this.isTable(ua)||this.isTableRow(ua))&&(ua=this.getCellAt(ja,oa,null,!0,!1));R=null;this.model.beginUpdate();try{R=L.apply(this,[y,N,R,V,fa,ja,oa,ua]);this.model.setValue(R,"");var ra=this.getChildCells(R,!0);for(N=0;N<ra.length;N++){var xa=this.getCellGeometry(ra[N]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[N])}var Ga=this.getChildCells(y,!0);for(N=0;N<Ga.length;N++)xa=this.getCellGeometry(Ga[N]),
null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Ga[N]);var Ka=this.model.getTerminal(R,!1);if(null!=Ka){var Sa=this.getCurrentCellStyle(Ka);null!=Sa&&"1"==Sa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,
N,R){if(N||R)c.apply(this,arguments);else{var V=this.getSelectionCell(),fa=null,ja=[],oa=mxUtils.bind(this,function(ua){if(null!=this.view.getState(ua)&&(this.model.isVertex(ua)||this.model.isEdge(ua)))if(ja.push(ua),ua==V)fa=ja.length-1;else if(y&&null==V&&0<ja.length||null!=fa&&y&&ja.length>fa||!y&&0<fa)return;for(var ra=0;ra<this.model.getChildCount(ua);ra++)oa(this.model.getChildAt(ua,ra))});oa(this.model.root);0<ja.length&&(fa=null!=fa?mxUtils.mod(fa+(y?1:-1),ja.length):0,this.setSelectionCell(ja[fa]))}};
Graph.prototype.swapShapes=function(y,N){if(this.model.isVertex(y)&&this.model.isVertex(N)&&2==this.getMovableCells([y,N]).length){var R=this.getCellGeometry(y),V=this.getCellGeometry(N);if(null!=R&&null!=V){var fa=R.clone(),ja=V.clone();this.model.beginUpdate();try{fa.x=V.getCenterX()-R.width/2,fa.y=V.getCenterY()-R.height/2,ja.x=R.getCenterX()-V.width/2,ja.y=R.getCenterY()-V.height/2,this.model.setGeometry(y,fa),this.model.setGeometry(N,ja)}finally{this.model.endUpdate()}}}};var f=Graph.prototype.moveCells;
Graph.prototype.moveCells=function(y,N,R,V,fa,ja,oa){oa=null!=oa?oa:{};if(this.isTable(fa)){for(var ua=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ua=ua.concat(this.model.getChildCells(y[ra],!0).reverse()):ua.push(y[ra]);y=ua}this.model.beginUpdate();try{ua=[];for(ra=0;ra<y.length;ra++)if(null!=fa&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Ga=this.getCellGeometry(y[ra]);this.isTable(xa)&&ua.push(xa);if(null!=xa&&null!=Ga&&this.isTable(xa)&&this.isTable(fa)&&(V||xa!=fa)){if(!V){var Ka=
this.getCellGeometry(xa);null!=Ka&&(Ka=Ka.clone(),Ka.height-=Ga.height,this.model.setGeometry(xa,Ka))}Ka=this.getCellGeometry(fa);null!=Ka&&(Ka=Ka.clone(),Ka.height+=Ga.height,this.model.setGeometry(fa,Ka));var Sa=this.model.getChildCells(fa,!0);if(0<Sa.length){y[ra]=V?this.cloneCell(y[ra]):y[ra];var Pa=this.model.getChildCells(y[ra],!0),$a=this.model.getChildCells(Sa[0],!0),Oa=$a.length-Pa.length;if(0<Oa)for(var Ma=0;Ma<Oa;Ma++){var fb=this.cloneCell(Pa[Pa.length-1]);null!=fb&&(fb.value="",this.model.add(y[ra],
fb))}else if(0>Oa)for(Ma=0;Ma>Oa;Ma--)this.model.remove(Pa[Pa.length+Ma-1]);Pa=this.model.getChildCells(y[ra],!0);for(Ma=0;Ma<$a.length;Ma++){var cb=this.getCellGeometry($a[Ma]),ab=this.getCellGeometry(Pa[Ma]);null!=cb&&null!=ab&&(ab=ab.clone(),ab.width=cb.width,this.model.setGeometry(Pa[Ma],ab))}}}}var db=f.apply(this,arguments);for(ra=0;ra<ua.length;ra++)!V&&this.model.contains(ua[ra])&&0==this.model.getChildCount(ua[ra])&&this.model.remove(ua[ra]);V&&this.updateCustomLinks(this.createCellMapping(oa,
this.createCellLookup(y)),db)}finally{this.model.endUpdate()}return db};var k=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,N){var R=[];this.model.beginUpdate();try{for(var V=0;V<y.length;V++)if(this.isTableCell(y[V])){var fa=this.model.getParent(y[V]),ja=this.model.getParent(fa);1==this.model.getChildCount(fa)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(R,ja)&&R.push(ja):this.labelChanged(y[V],"")}else{if(this.isTableRow(y[V])&&(ja=this.model.getParent(y[V]),
0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(R,ja))){for(var oa=this.model.getChildCells(ja,!0),ua=0,ra=0;ra<oa.length;ra++)0<=mxUtils.indexOf(y,oa[ra])&&ua++;ua==oa.length&&R.push(ja)}R.push(y[V])}R=k.apply(this,[R,N])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(y,N,R){R=null!=R?R:new Graph;for(var V=0;V<N.length;V++)null!=N[V]&&R.updateCustomLinksForCell(y,N[V],R)};Graph.prototype.updateCustomLinksForCell=function(y,N){this.doUpdateCustomLinksForCell(y,N);for(var R=
this.model.getChildCount(N),V=0;V<R;V++)this.updateCustomLinksForCell(y,this.model.getChildAt(N,V))};Graph.prototype.doUpdateCustomLinksForCell=function(y,N){};Graph.prototype.getAllConnectionConstraints=function(y,N){if(null!=y){N=mxUtils.getValue(y.style,"points",null);if(null!=N){y=[];try{var R=JSON.parse(N);for(N=0;N<R.length;N++){var V=R[N];y.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ja){}return y}if(null!=
y.shape&&null!=y.shape.bounds){V=y.shape.direction;N=y.shape.bounds;var fa=y.shape.scale;R=N.width/fa;N=N.height/fa;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=R,R=N,N=V;N=y.shape.getConstraints(y.style,R,N);if(null!=N)return N;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=y){var N=this.getCurrentCellStyle(y);N=
mxUtils.getValue(N,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,N,[y])}};Graph.prototype.isValidRoot=function(y){for(var N=this.model.getChildCount(y),R=0,V=0;V<N;V++){var fa=this.model.getChildAt(y,V);this.model.isVertex(fa)&&(fa=this.getCellGeometry(fa),null==fa||fa.relative||R++)}return 0<R||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,N,
R){for(var V=this.getCurrentCellStyle(y),fa=!0,ja=!0,oa=0;oa<N.length&&ja;oa++)fa=fa&&this.isTable(N[oa]),ja=ja&&this.isTableRow(N[oa]);return!this.isCellLocked(y)&&(this.isTargetShape(y,N,R)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ja||fa))};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,
arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var N=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(N&&null!=y&&null!=this.layoutManager){var R=this.model.getParent(y);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(N=!1))}return N};Graph.prototype.getPreferredSizeForCell=function(y,N,R){R=null!=R?R:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=
10,V.height+=4,R&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(y,N){var R=this.getModel(),V=[];R.beginUpdate();try{for(var fa=0;fa<y.length;fa++){var ja=y[fa];if(R.isEdge(ja)){var oa=R.getTerminal(ja,!0),ua=R.getTerminal(ja,!1);R.setTerminal(ja,ua,!0);R.setTerminal(ja,oa,!1);var ra=R.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Ga=ra.getTerminalPoint(!1);ra.setTerminalPoint(xa,
!1);ra.setTerminalPoint(Ga,!0);R.setGeometry(ja,ra);var Ka=this.view.getState(ja),Sa=this.view.getState(oa),Pa=this.view.getState(ua);if(null!=Ka){var $a=null!=Sa?this.getConnectionConstraint(Ka,Sa,!0):null,Oa=null!=Pa?this.getConnectionConstraint(Ka,Pa,!1):null;this.setConnectionConstraint(ja,oa,!0,Oa);this.setConnectionConstraint(ja,ua,!1,$a);var Ma=mxUtils.getValue(Ka.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ka.style,
mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ma,[ja])}V.push(ja)}}else if(R.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var fb=ra.width;ra.width=ra.height;ra.height=fb;R.setGeometry(ja,ra)}var cb=this.view.getState(ja);if(null!=cb){var ab=[mxConstants.DIRECTION_EAST,
mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,ab[mxUtils.mod(mxUtils.indexOf(ab,db)+(N?-1:1),ab.length)],[ja])}V.push(ja)}}}finally{R.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
y=y.nextSibling}return!1};var t=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var N=y.cell;this.isTableCell(N)&&(N=this.model.getParent(N));this.isTableRow(N)&&(N=this.model.getParent(N));var R=this.view.getState(N);null!=R&&null!=R.shape&&(this.view.invalidate(N),R.shape.bounds=null)}t.apply(this,arguments);
y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var N=0;N<y.length;N++){var R=this.view.getState(y[N]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(y[N]):this.isReplacePlaceholders(y[N])&&this.view.invalidate(y[N],!1,!1)}};
Graph.prototype.replaceElement=function(y,N){N=y.ownerDocument.createElement(null!=N?N:"span");for(var R=Array.prototype.slice.call(y.attributes);attr=R.pop();)N.setAttribute(attr.nodeName,attr.nodeValue);N.innerHTML=y.innerHTML;y.parentNode.replaceChild(N,y)};Graph.prototype.processElements=function(y,N){if(null!=y){y=y.getElementsByTagName("*");for(var R=0;R<y.length;R++)null!=y[R]&&N(y[R])}};Graph.prototype.updateLabelElements=function(y,N,R){y=null!=y?y:this.getSelectionCells();for(var V=document.createElement("div"),
fa=0;fa<y.length;fa++){var ja=this.getCurrentCellStyle(y[fa]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(y[fa]),null!=ja&&0<ja.length)){V.innerHTML=Graph.sanitizeHtml(ja);for(var oa=V.getElementsByTagName(null!=R?R:"*"),ua=0;ua<oa.length;ua++)N(oa[ua]);V.innerHTML!=ja&&this.cellLabelChanged(y[fa],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,N,R){N=Graph.zapGremlins(N);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
null!=y.getAttribute("placeholder"))for(var V=y.getAttribute("placeholder"),fa=y;null!=fa;){if(fa==this.model.getRoot()||null!=fa.value&&"object"==typeof fa.value&&fa.hasAttribute(V)){this.setAttributeForCell(fa,V,N);break}fa=this.model.getParent(fa)}var ja=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,N):ja.setAttribute("label",N);N=ja}mxGraph.prototype.cellLabelChanged.apply(this,
arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var N=new mxDictionary,R=0;R<y.length;R++)N.put(y[R],!0);var V=[];for(R=0;R<y.length;R++){var fa=this.model.getParent(y[R]);null==fa||N.get(fa)||(N.put(fa,!0),V.push(fa))}for(R=0;R<V.length;R++)if(fa=this.view.getState(V[R]),null!=fa&&(this.model.isEdge(fa.cell)||this.model.isVertex(fa.cell))&&this.isCellDeletable(fa.cell)&&this.isTransparentState(fa)){for(var ja=!0,oa=0;oa<this.model.getChildCount(fa.cell)&&
ja;oa++)N.get(this.model.getChildAt(fa.cell,oa))||(ja=!1);ja&&y.push(fa.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var N=[],R=0;R<y.length;R++)this.isCellDeletable(y[R])&&this.isTransparentState(this.view.getState(y[R]))&&N.push(y[R]);y=N;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,N){this.setAttributeForCell(y,"link",N)};Graph.prototype.setTooltipForCell=function(y,
N){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,R,N)};Graph.prototype.getAttributeForCell=function(y,N,R){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(N):null;return null!=y?y:R};Graph.prototype.setAttributeForCell=function(y,N,R){if(null!=y.value&&"object"==typeof y.value)var V=y.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),
V.setAttribute("label",y.value||"");null!=R?V.setAttribute(N,R):V.removeAttribute(N);this.model.setValue(y,V)};Graph.prototype.isTargetShape=function(y,N,R){y=mxUtils.getValue(this.getCurrentCellStyle(y),mxConstants.STYLE_SHAPE,"");for(R=0;R<N.length;R++){var V=mxUtils.getValue(this.getCurrentCellStyle(N[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,y))return!0}return!1};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,N,R,V){if(mxEvent.isAltDown(N))return null;
for(var fa=0;fa<y.length;fa++){var ja=this.model.getParent(y[fa]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(y,ja))return null}ja=q.apply(this,arguments);var oa=!0;for(fa=0;fa<y.length&&oa;fa++)oa=oa&&this.isTableRow(y[fa]);oa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};
Graph.prototype.dblClick=function(y,N){this.isEnabled()&&(N=this.insertTextForEvent(y,N),mxGraph.prototype.dblClick.call(this,y,N))};Graph.prototype.insertTextForEvent=function(y,N){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(N)){var V=this.model.isEdge(N)?this.view.getState(N):null,fa=mxEvent.getSource(y);this.firstClickState!=V||this.firstClickSource!=fa||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&
(mxUtils.contains(V.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(y)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&fa==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(R.x,R.y))),N=this.addText(R.x,R.y,V))}return N};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),N=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=
this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),fa=this.getPageSize();N=Math.max(N,V.x*fa.width);R=Math.max(R,V.y*fa.height)}return new mxPoint(this.snap(N+y),this.snap(R+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,N=this.getGraphBounds(),R=this.getInsertPoint(),V=this.snap(Math.round(Math.max(R.x,N.x/y.scale-y.translate.x+(0==N.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(R.y,(N.y+N.height)/y.scale-
y.translate.y+2*this.gridSize)));return new mxPoint(V,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/
2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(y,N){y=null!=y?y:"";null!=N&&(0<y.length&&";"!=y.charAt(y.length-1)&&(y+=";"),y+="fontSize="+N+";");return y};Graph.prototype.addText=function(y,N,R){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){V.style=
"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var fa=this.view.getRelativePoint(R,y,N);V.geometry.x=Math.round(1E4*fa.x)/1E4;V.geometry.y=Math.round(fa.y);V.geometry.offset=new mxPoint(0,0);fa=this.view.getPoint(R,V.geometry);var ja=this.view.scale;V.geometry.offset=new mxPoint(Math.round((y-fa.x)/ja),Math.round((N-fa.y)/ja))}else fa=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(y/this.view.scale)-fa.x-(null!=R?R.origin.x:0),V.geometry.y=Math.round(N/this.view.scale)-fa.y-(null!=R?R.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(y,N,R){var V=mxUtils.bind(this,
function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Ga=this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Ga&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Ga),null!=N&&mxEvent.addGestureListeners(ra[xa],null,null,N))}});this.model.addListener(mxEvent.CHANGE,V);V();var fa=this.container.style.cursor,ja=this.getTolerance(),oa=this,ua={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&
y!=mxConstants.NONE?new mxCellHighlight(oa,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var xa=ra.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))ra=oa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ga,Ka,Sa){return null==oa.getLinkForCell(Ga.cell)}),xa=null==xa||oa.model.isAncestor(ra,xa.cell)?oa.view.getState(ra):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},
mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(oa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>ja||xa>ja)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=
ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ra,xa){var Ga=xa.getSource();for(ra=xa.getEvent();null!=Ga&&"a"!=Ga.nodeName.toLowerCase();)Ga=Ga.parentNode;null==
Ga&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ga=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ga||null==N||N(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||
(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Ga?oa.linkTarget:"_top",oa.openLink(this.currentLink,ra),xa.consume())):null!=R&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&Math.abs(this.startX-xa.getGraphX())<ja&&Math.abs(this.startY-xa.getGraphY())<ja&&R(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ra.cell));null!=this.currentLink&&
(this.currentTarget=oa.getLinkTargetForCell(ra.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=oa.container&&(oa.container.style.cursor=fa);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ra){};oa.addMouseListener(ua);mxEvent.addListener(document,"mouseleave",function(ra){ua.clear()})};Graph.prototype.duplicateCells=
function(y,N){y=null!=y?y:this.getSelectionCells();N=null!=N?N:!0;for(var R=0;R<y.length;R++)this.isTableCell(y[R])&&(y[R]=this.model.getParent(y[R]));y=this.model.getTopmostCells(y);var V=this.getModel(),fa=this.gridSize,ja=[];V.beginUpdate();try{var oa={},ua=this.createCellLookup(y),ra=this.cloneCells(y,!1,oa,!0);for(R=0;R<y.length;R++){var xa=V.getParent(y[R]);if(null!=xa){var Ga=this.moveCells([ra[R]],fa,fa,!1)[0];ja.push(Ga);if(N)V.add(xa,ra[R]);else{var Ka=xa.getIndex(y[R]);V.add(xa,ra[R],Ka+
1)}if(this.isTable(xa)){var Sa=this.getCellGeometry(ra[R]),Pa=this.getCellGeometry(xa);null!=Sa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Sa.height,V.setGeometry(xa,Pa))}}else ja.push(ra[R])}this.updateCustomLinks(this.createCellMapping(oa,ua),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{V.endUpdate()}return ja};Graph.prototype.insertImage=function(y,N,R){if(null!=y&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),fa=
[],ja=0;ja<V.length;ja++)fa.push(V[ja]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==fa.length+1)for(ja=y.length-1;0<=ja;ja--)if(0==ja||y[ja]!=fa[ja-1]){y[ja].setAttribute("width",N);y[ja].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var N=this.cellEditor.textarea.getElementsByTagName("a"),R=[],V=
0;V<N.length;V++)R.push(N[V]);document.execCommand("createlink",!1,mxUtils.trim(y));N=this.cellEditor.textarea.getElementsByTagName("a");if(N.length==R.length+1)for(V=N.length-1;0<=V;V--)if(N[V]!=R[V-1]){for(N=N[V].getElementsByTagName("a");0<N.length;){for(R=N[0].parentNode;null!=N[0].firstChild;)R.insertBefore(N[0].firstChild,N[0]);R.removeChild(N[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var N=mxGraph.prototype.isCellResizable.apply(this,
arguments),R=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(N||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,N,R){null==N&&(N=this.getSelectionCells());if(null!=N&&1<N.length){for(var V=[],fa=null,ja=null,oa=0,ua=0;ua<N.length;ua++)if(this.getModel().isVertex(N[ua])){var ra=this.view.getState(N[ua]);if(null!=ra){var xa=y?ra.getCenterX():ra.getCenterY();fa=null!=fa?Math.max(fa,
xa):xa;ja=null!=ja?Math.min(ja,xa):xa;R&&(oa+=y?ra.width:ra.height);V.push(ra)}}if(2<V.length){V.sort(function($a,Oa){return y?$a.x-Oa.x:$a.y-Oa.y});R&&(oa-=y?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ra=this.view.translate;xa=this.view.scale;ja=ja/xa-(y?ra.x:ra.y);fa=fa/xa-(y?ra.x:ra.y);this.getModel().beginUpdate();try{var Ga=(fa-ja-oa)/(V.length-1),Ka=ja+(R?y?V[0].width/2:V[0].height/2:0);for(ua=1;ua<V.length-1;ua++){var Sa=this.view.getState(this.model.getParent(V[ua].cell)),
Pa=this.getCellGeometry(V[ua].cell);Ka+=Ga;null!=Pa&&null!=Sa&&(Pa=Pa.clone(),y?Pa.x=Math.round(Ka-(R?0:Pa.width/2))-Sa.origin.x:Pa.y=Math.round(Ka-(R?0:Pa.height/2))-Sa.origin.y,this.getModel().setGeometry(V[ua].cell,Pa));R&&(Ka+=y?V[ua].width:V[ua].height)}}finally{this.getModel().endUpdate()}}}return N};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(y){y=new mxImageExport;y.addCellData=
function(R,V,fa){V.setAttribute("data-cell-id",R.id);if(fa)if(mxUtils.isNode(R.value))for(fa=0;fa<R.value.attributes.length;fa++){var ja=R.value.attributes[fa];V.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof R.value)for(ja in R.value)V.setAttribute("data-cell-"+ja,R.value[ja]);else null!=R.value&&V.setAttribute("data-cell-value",R.value);return V};var N=y.visitStatesRecursive;y.visitStatesRecursive=function(R,V,fa){if(null!=R){var ja=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(R.cell,
null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ja.appendChild(V.root);N.apply(this,arguments);V.root=ja}};y.getLinkForCellState=mxUtils.bind(this,function(R,V){return this.getLinkForCell(R.cell)});y.getTitleForCellState=mxUtils.bind(this,function(R,V){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return y};Graph.prototype.parseBackgroundImage=function(y){var N=null;null!=y&&0<y.length&&(y=JSON.parse(y),N=new mxImage(y.src,
y.width,y.height));return N};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,N,R,V,fa,ja,oa,ua,ra,xa,Ga,Ka,Sa,Pa,$a,Oa){var Ma=null;if(null!=Pa)for(Ma=new mxDictionary,Ga=0;Ga<Pa.length;Ga++)Ma.put(Pa[Ga],!0);Pa=this.useCssTransforms;var fb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Pa&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{N=null!=N?N:1;R=null!=R?R:0;fa=null!=fa?fa:!0;ja=null!=ja?ja:!0;oa=null!=oa?oa:
!0;xa=null!=xa?xa:!1;var cb="page"==Sa?this.view.getBackgroundPageBounds():ja&&null==Ma||V||"diagram"==Sa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ab=this.backgroundImage,db=this.view.translate,lb=this.view.scale;"diagram"==Sa&&null!=ab&&null!=ab.width&&null!=ab.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((db.x+ab.x)*lb,(db.y+ab.y)*lb,ab.width*lb,ab.height*lb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=N/lb;var kb=Math.max(1,Math.ceil(cb.width*
V)+2*R)+(xa&&0==R?5:0),pb=Math.max(1,Math.ceil(cb.height*V)+2*R)+(xa&&0==R?5:0);xa=fa?-.5:0;var gb=mxUtils.getLightDarkColor(y),ob=Graph.createSvgNode(xa,xa,kb,pb,gb),tb=ob.ownerDocument;if(null!=y){var eb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,"rect");eb.setAttribute("fill",gb.light);eb.style.fill=gb.cssText;eb.setAttribute("width","100%");eb.setAttribute("height","100%");eb.setAttribute("x","0");eb.setAttribute("y","0");ob.appendChild(eb)}var nb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,
"g");ob.appendChild(nb);var mb=this.createSvgCanvas(nb);mb.foOffset=fa?-.5:0;mb.textOffset=fa?-.5:0;mb.imageOffset=fa?-.5:0;mb.translate(Math.floor(R/N-cb.x/lb),Math.floor(R/N-cb.y/lb));mb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=mb.getAlternateText;mb.getAlternateText=function(ib,Ab,sb,wb,yb,rb,Bb,d,p,z,u,x,C){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var E=
Math.ceil(2*wb/this.state.fontSize),ea=[],M=0,sa=0;(0==E||M<E)&&sa<rb.length;){var ma=rb.charCodeAt(sa);if(10==ma||13==ma){if(0<M)break}else ea.push(rb.charAt(sa)),255>ma&&M++;sa++}ea.length<rb.length&&1<rb.length-ea.length&&(rb=mxUtils.trim(ea.join(""))+"...");return rb}catch(Ya){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=ab&&null!=ab.width&&null!=ab.height&&(y=lb/N,xa=new mxRectangle((ab.x+db.x)*y,(ab.y+db.y)*y,ab.width*y,ab.height*y),mxUtils.intersects(cb,xa)&&
mb.image(ab.x+db.x,ab.y+db.y,ab.width,ab.height,ab.src,!0));mb.scale(V);mb.textEnabled=oa;ua=null!=ua?ua:this.createSvgImageExport();var zb=ua.getLinkForCellState;ua.getLinkForCellState=function(ib,Ab){var sb=ib.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==sb||ib.view.graph.isCustomLink(sb)?null:sb};ua.getLinkTargetForCellState=function(ib,Ab){return ib.view.graph.getLinkTargetForCell(ib.cell)};var Cb=ua.drawCellState,xb=null,vb=mxUtils.bind(this,function(){if(null==xb){xb="ge-flow-animation-"+
Editor.guid();var ib=null!=tb.createElementNS?tb.createElementNS(mxConstants.NS_SVG,"style"):tb.createElement("style");ib.innerHTML=this.createFlowAnimationCss(xb);tb.getElementsByTagName("defs")[0].appendChild(ib)}return xb});ua.drawCellState=function(ib,Ab){for(var sb=ib.view.graph,wb=null!=Ma?Ma.get(ib.cell):sb.isCellSelected(ib.cell),yb=sb.model.getParent(ib.cell);!(ja&&null==Ma||wb)&&null!=yb;)wb=null!=Ma?Ma.get(yb):sb.isCellSelected(yb),yb=sb.model.getParent(yb);if(null!=ib.shape)try{var rb=
ib.shape.isFlowAnimationEnabled,Bb=ib.shape.addFlowAnimationToShape;ib.shape.isFlowAnimationEnabled=function(){return fb&&sb.model.isEdge(ib.cell)&&"1"==mxUtils.getValue(ib.style,"flowAnimation","0")};ib.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),ib.style,N,vb())};if(ja&&null==Ma||wb)sb.view.redrawEnumerationState(ib),Cb.apply(this,arguments),this.doDrawShape(ib.secondLabel,Ab)}finally{ib.shape.isFlowAnimationEnabled=rb,ib.shape.addFlowAnimationToShape=
Bb}};var jb=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ua.drawState(this.getView().getState(jb),mb);this.addForeignObjectWarning(mb,ob);Oa?this.disableSvgLinks(ob):this.updateSvgLinks(ob,ra,!0);return ob}finally{this.enableFlowAnimation=fb,Pa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,N){if("0"!=urlParams["svg-warning"]&&0<N.getElementsByTagName("foreignObject").length){var R=y.createElement("switch"),
V=y.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var fa=y.createElement("a");fa.setAttribute("transform","translate(0,-5)");null==fa.setAttributeNS||N.ownerDocument!=document&&null==document.documentMode?(fa.setAttribute("xlink:href",Graph.foreignObjectWarningLink),fa.setAttribute("target","_blank")):(fa.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),fa.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));
y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);R.appendChild(V);fa.appendChild(y);R.appendChild(fa);N.appendChild(R)}};Graph.prototype.disableSvgLinks=function(y,N){y=y.getElementsByTagName("a");for(var R=0;R<y.length;R++){var V=y[R].getAttribute("href");null==V&&(V=y[R].getAttribute("xlink:href"));null!=V&&(y[R].style.pointerEvents="none",y[R].setAttribute("href",
""));N&&N(y[R])}};Graph.prototype.updateSvgLinks=function(y,N,R){y=y.getElementsByTagName("a");for(var V=0;V<y.length;V++)if(null==y[V].getAttribute("target")){var fa=y[V].getAttribute("href");null==fa&&(fa=y[V].getAttribute("xlink:href"));null!=fa&&(null!=N&&/^https?:\/\//.test(fa)?y[V].setAttribute("target",N):R&&this.isCustomLink(fa)&&y[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
y.adaptiveColors=this.getAdaptiveColors();y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var N=window.getSelection();N.getRangeAt&&N.rangeCount&&(y=N.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){var y=null;if(null!=this.cellEditor.textarea)for(y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=
y.parentNode;return y};Graph.prototype.getParentByName=function(y,N,R){for(;null!=y&&y.nodeName!=N;){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,N,R){for(;null!=y&&!(0<=mxUtils.indexOf(N,y.nodeName));){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var N=null;if(window.getSelection){if(N=window.getSelection(),N.getRangeAt&&N.rangeCount){var R=document.createRange();R.selectNode(y);N.removeAllRanges();N.addRange(R)}}else(N=
document.selection)&&"Control"!=N.type&&(y=N.createRange(),y.collapse(!0),R=N.createRange(),R.setEndPoint("StartToStart",y),R.select())};Graph.prototype.flipEdgePoints=function(y,N,R){var V=this.getCellGeometry(y);if(null!=V){V=V.clone();if(null!=V.points)for(var fa=0;fa<V.points.length;fa++)N?V.points[fa].x=R+(R-V.points[fa].x):V.points[fa].y=R+(R-V.points[fa].y);fa=function(ja){null!=ja&&(N?ja.x=R+(R-ja.x):ja.y=R+(R-ja.y))};fa(V.getTerminalPoint(!0));fa(V.getTerminalPoint(!1));this.model.setGeometry(y,
V)}};Graph.prototype.flipChildren=function(y,N,R){this.model.beginUpdate();try{for(var V=this.model.getChildCount(y),fa=0;fa<V;fa++){var ja=this.model.getChildAt(y,fa);if(this.model.isEdge(ja))this.flipEdgePoints(ja,N,R);else{var oa=this.getCellGeometry(ja);null!=oa&&(oa=oa.clone(),N?oa.x=R+(R-oa.x-oa.width):oa.y=R+(R-oa.y-oa.height),this.model.setGeometry(ja,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,N){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);
for(var R=[],V=0;V<y.length;V++)if(this.model.isEdge(y[V])){var fa=this.view.getState(y[V]);null!=fa&&this.flipEdgePoints(y[V],N,(N?fa.getCenterX():fa.getCenterY())/this.view.scale-(N?fa.origin.x:fa.origin.y)-(N?this.view.translate.x:this.view.translate.y))}else{var ja=this.getCellGeometry(y[V]);null!=ja&&this.flipChildren(y[V],N,N?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);R.push(y[V])}this.toggleCellStyles(N?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};
Graph.prototype.deleteCells=function(y,N){var R=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var V=0;V<y.length;V++){var fa=this.model.getParent(y[V]);if(this.isTable(fa)){var ja=this.getCellGeometry(y[V]),oa=this.getCellGeometry(fa);null!=ja&&null!=oa&&(oa=oa.clone(),oa.height-=ja.height,this.model.setGeometry(fa,oa))}}var ua=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,N)}finally{this.model.endUpdate()}if(null!=ua)for(R=[],V=0;V<ua.length;V++)this.model.contains(ua[V])&&
(this.model.isVertex(ua[V])||this.model.isEdge(ua[V]))&&R.push(ua[V])}return R};Graph.prototype.insertTableColumn=function(y,N){var R=this.getModel();R.beginUpdate();try{var V=y,fa=0;if(this.isTableCell(y)){var ja=R.getParent(y);V=R.getParent(ja);fa=mxUtils.indexOf(R.getChildCells(ja,!0),y)}else this.isTableRow(y)?V=R.getParent(y):y=R.getChildCells(V,!0)[0],N||(fa=R.getChildCells(y,!0).length-1);var oa=R.getChildCells(V,!0),ua=Graph.minTableColumnWidth;for(y=0;y<oa.length;y++){var ra=R.getChildCells(oa[y],
!0)[fa],xa=R.cloneCell(ra,!1);null==xa&&(xa=this.createVertex());var Ga=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Ga){null!=Ga.alternateBounds&&(Ga.width=Ga.alternateBounds.width,Ga.height=Ga.alternateBounds.height,Ga.alternateBounds=null);ua=Ga.width;var Ka=this.getCellGeometry(oa[y]);null!=Ka&&(Ga.height=Ka.height)}R.add(oa[y],xa,fa+(N?0:1))}var Sa=this.getCellGeometry(V);null!=Sa&&(Sa=Sa.clone(),Sa.width+=
ua,R.setGeometry(V,Sa))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(y){var N=this.getModel();N.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:N.getParent(y);var V=N.getChildCells(R,!0);0==V.length?N.remove(R):(R==y&&(y=V[V.length-1]),N.remove(y))}finally{N.endUpdate()}};Graph.prototype.insertLane=function(y,N){var R=this.getModel();R.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){V=y;var fa=R.getChildCells(V,
!0);y=fa[N?0:fa.length-1]}else V=R.getParent(y);var ja=V.getIndex(y);y=R.cloneCell(y,!1);y.value=null;R.add(V,y,ja+(N?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(y,N){var R=this.getModel();R.beginUpdate();try{var V=y,fa=y;if(this.isTableCell(y))fa=R.getParent(y),V=R.getParent(fa);else if(this.isTableRow(y))V=R.getParent(y);else{var ja=R.getChildCells(V,!0);fa=ja[N?0:ja.length-1]}var oa=R.getChildCells(fa,!0),ua=V.getIndex(fa);fa=R.cloneCell(fa,!1);fa.value=null;var ra=this.getCellGeometry(fa);
if(null!=ra){for(ja=0;ja<oa.length;ja++){y=R.cloneCell(oa[ja],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);fa.insert(y)}R.add(V,fa,ua+(N?0:1));var Ga=this.getCellGeometry(V);null!=Ga&&(Ga=Ga.clone(),Ga.height+=ra.height,R.setGeometry(V,Ga))}}finally{R.endUpdate()}};
Graph.prototype.deleteTableColumn=function(y){var N=this.getModel();N.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(V=N.getParent(y));this.isTableRow(V)&&(R=N.getParent(V));var fa=N.getChildCells(R,!0);if(0==fa.length)N.remove(R);else{this.isTableRow(V)||(V=fa[0]);var ja=N.getChildCells(V,!0);if(1>=ja.length)N.remove(R);else{var oa=ja.length-1;this.isTableCell(y)&&(oa=mxUtils.indexOf(ja,y));for(V=y=0;V<fa.length;V++){var ua=N.getChildCells(fa[V],!0)[oa];N.remove(ua);var ra=this.getCellGeometry(ua);
null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(R);null!=xa&&(xa=xa.clone(),xa.width-=y,N.setGeometry(R,xa))}}}finally{N.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var N=this.getModel();N.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(y=V=N.getParent(y));this.isTableRow(y)&&(R=N.getParent(V));var fa=N.getChildCells(R,!0);if(1>=fa.length)N.remove(R);else{this.isTableRow(V)||(V=fa[fa.length-1]);N.remove(V);y=0;var ja=this.getCellGeometry(V);null!=ja&&(y=ja.height);
var oa=this.getCellGeometry(R);null!=oa&&(oa=oa.clone(),oa.height-=y,N.setGeometry(R,oa))}}finally{N.endUpdate()}};Graph.prototype.insertRow=function(y,N){for(var R=y.tBodies[0],V=R.rows[0].cells,fa=y=0;fa<V.length;fa++){var ja=V[fa].getAttribute("colspan");y+=null!=ja?parseInt(ja):1}N=R.insertRow(N);for(fa=0;fa<y;fa++)mxUtils.br(N.insertCell(-1));return N.cells[0]};Graph.prototype.deleteRow=function(y,N){y.tBodies[0].deleteRow(N)};Graph.prototype.insertColumn=function(y,N){var R=y.tHead;if(null!=
R)for(var V=0;V<R.rows.length;V++){var fa=document.createElement("th");R.rows[V].appendChild(fa);mxUtils.br(fa)}y=y.tBodies[0];for(R=0;R<y.rows.length;R++)V=y.rows[R].insertCell(N),mxUtils.br(V);return y.rows[0].cells[0<=N?N:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,N){if(0<=N){y=y.tBodies[0].rows;for(var R=0;R<y.length;R++)y[R].cells.length>N&&y[R].deleteCell(N)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var N=window.getSelection();if(N.getRangeAt&&
N.rangeCount){N=N.getRangeAt(0);N.deleteContents();var R=document.createElement("div");R.innerHTML=y;y=document.createDocumentFragment();for(var V;V=R.firstChild;)lastNode=y.appendChild(V);N.insertNode(y)}}else(N=document.selection)&&"Control"!=N.type&&N.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,N,R){function V(ja,oa){ja.length>oa&&(ja=ja.substring(0,Math.round(oa/2))+"..."+ja.substring(ja.length-Math.round(oa/4)));return ja}y=null!=y?y:"javascript:void(0);";if(null==
N||0==N.length)N=this.isCustomLink(y)?this.getLinkTitle(y):y;var fa=document.createElement("a");fa.setAttribute("rel",this.linkRelation);fa.setAttribute("href",this.getAbsoluteUrl(y));fa.setAttribute("title",V(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&fa.setAttribute("target",this.linkTarget);mxUtils.write(fa,V(N,40));this.isCustomLink(y)&&mxEvent.addListener(fa,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(y,R);mxEvent.consume(ja)}));return fa};Graph.prototype.initTouch=
function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,oa){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=y.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var oa=this.getCellAt(ja.graphX,ja.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(oa),
null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var N=!1,R=!1,V=!1,fa=this.fireMouseEvent;this.fireMouseEvent=function(ja,oa,ua){ja==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),N=this.isCellSelected(oa.getCell()),R=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());fa.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,
function(ja,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var ua=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!ua&&(R&&null==oa.getCell()&&this.isSelectionEmpty()||N&&this.isCellSelected(oa.getCell())));ua=!N||ua?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();
this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ra,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,oa,ua])}})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var N=this.textarea.ownerDocument.defaultView.getSelection(),R=N.getRangeAt(0);y=Graph.createTabNode(y);R.insertNode(y);R.setStartAfter(y);R.setEndAfter(y);N.removeAllRanges();N.addRange(R)};mxCellEditor.prototype.alignText=function(y,N){var R=this.graph.getView().getState(this.editingCell);
if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=R&&"vertical-"==R.substring(0,9),fa=null!=N&&mxEvent.isShiftDown(N);if(fa||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(oa){fa||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ja=!1});(ja||V)&&this.graph.cellEditor.setAlign(y)}V||document.execCommand("justify"+
y.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var N=[],R=0,V=y.rangeCount;R<V;++R)N.push(y.getRangeAt(R));return N}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var N=0,R=y.length;N<
R;++N)sel.addRange(y[N])}else document.selection&&y.select&&y.select()}catch(V){}};var D=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));D.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,N){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var O=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,N){y=this.graph.getStartEditingCell(y,N);O.apply(this,arguments);var R=this.graph.view.getState(y);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?
"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y)};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var N=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ua=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ua.length&&"\n"==ua.charAt(ua.length-1)&&(ua=ua.substring(0,
ua.length-1));ua=Graph.sanitizeHtml(N?ua.replace(/\n/g,"<br/>"):ua,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);N=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),fa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(y.style,
mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
Math.round(ra)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=fa?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=N;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=ua&&(this.textarea.innerHTML=ua,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,
"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var ua=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ua=mxUtils.replaceTrailingNewlines(ua,"<div><br></div>"));ua=Graph.sanitizeHtml(N?ua.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ua,!0);this.textarea.className=
"mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"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.width="";this.textarea.style.padding=
"2px";this.textarea.innerHTML!=ua&&(this.textarea.innerHTML=ua);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=R;this.resize()}};var J=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,N){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var R=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&
0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var V=null!=y.text?y.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-
4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",J.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,N){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
var R=this.graph.getEditingValue(y.cell,N);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(y,N){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(y.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var N=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(y.style,"nl2Br","1")?(N=N.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<N.length&&("<br/>"==N.substring(N.length-5)||"<br>"==N.substring(N.length-4))&&(N=N.substring(0,N.lastIndexOf("<br"))+"<div><br/></div>")):
N=N.replace(/\r\n/g,"").replace(/\n/g,"");return N};var I=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();I.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,N){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==N&&this.graph.isCellDeletable(y.cell)&&
0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getBorderColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getMinimumSize=
function(y){var N=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*N+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,N){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(N.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||
this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var N=this.graph.view.translate,R=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/R-N.x);N=this.roundLength((this.bounds.y+this.currentDy)/R-N.y);R=this.graph.view.unit;this.hint.innerHTML=e(y,R)+", "+e(N,R);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ia=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,N){ia.apply(this,arguments);var R=this.graph.getCellStyle(y);if(null==R.childLayout){var V=this.graph.model.getParent(y),fa=null!=V?this.graph.getCellGeometry(V):null;if(null!=fa&&(R=this.graph.getCellStyle(V),"stackLayout"==R.childLayout)){var ja=
parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);fa=fa.clone();R?fa.height=N.height+oa.y+oa.height+2*ja:fa.width=N.width+oa.x+oa.width+2*ja;this.graph.model.setGeometry(V,fa)}}};var ha=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ua){R.get(ua)||(R.put(ua,!0),fa.push(ua))}for(var N=ha.apply(this,
arguments),R=new mxDictionary,V=this.graph.model,fa=[],ja=0;ja<N.length;ja++){var oa=N[ja];this.graph.isTableCell(oa)?y(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&y(V.getParent(oa));y(oa)}return fa};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(y){return ca.apply(this,arguments)&&!mxEvent.isControlDown(y.getEvent())&&!mxEvent.isShiftDown(y.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var N=X.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};var ba=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(y){var N=ba.apply(this,arguments);N.stroke="#C0C0C0";N.strokewidth=1;return N};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,N){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(N.getEvent())};
mxVertexHandler.prototype.isCenteredEvent=function(y,N){return mxEvent.isControlDown(N.getEvent())||mxEvent.isMetaDown(N.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var W=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||W.apply(this,arguments)&&
(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var U=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return U.apply(this,arguments).grow(-this.getSelectionBorderInset())};var l=null,B=mxVertexHandler.prototype.createCustomHandles;
mxVertexHandler.prototype.createCustomHandles=function(){null==l&&(l=mxCellRenderer.defaultShapes.tableLine);var y=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var N=function($a,Oa,Ma){for(var fb=[],cb=0;cb<$a.length;cb++){var ab=$a[cb];fb.push(null==ab?null:new mxPoint((ra+ab.x+Oa)*ja,(xa+ab.y+Ma)*ja))}return fb},R=this,V=this.graph,fa=V.model,ja=V.view.scale,oa=this.state,ua=this.selectionBorder,ra=this.state.origin.x+V.view.translate.x,
xa=this.state.origin.y+V.view.translate.y;null==y&&(y=[]);var Ga=V.view.getCellStates(fa.getChildCells(this.state.cell,!0));if(0<Ga.length){var Ka=fa.getChildCells(Ga[0].cell,!0),Sa=V.getTableLines(this.state.cell,!1,!0),Pa=V.getTableLines(this.state.cell,!0,!1);for(fa=0;fa<Ga.length;fa++)mxUtils.bind(this,function($a){var Oa=Ga[$a],Ma=null;if(V.isCellMovable(Oa.cell)){Ma=$a<Ga.length-1?Ga[$a+1]:null;Ma=null!=Ma?V.getCellGeometry(Ma.cell):null;var fb=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:
Ma;Ma=null!=Pa[$a]?new l(Pa[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ma.isDashed=ua.isDashed;Ma.svgStrokeTolerance++;Ma=new mxHandle(Oa,"row-resize",null,Ma);Ma.tableHandle=!0;var cb=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:ua.stroke;if(this.shape.constructor==l)this.shape.line=N(Pa[$a],0,cb),this.shape.updateBoundsFromLine();else{var db=
V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ja;this.shape.bounds.x=oa.x+($a==Ga.length-1?0:db.x*ja);this.shape.bounds.width=oa.width-($a==Ga.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var ab=!1;Ma.setPosition=function(db,lb,kb){cb=Math.max(Graph.minTableRowHeight-db.height,lb.y-db.y-db.height);ab=mxEvent.isShiftDown(kb.getEvent());null!=fb&&ab&&(cb=Math.min(cb,fb.height-Graph.minTableRowHeight))};Ma.execute=function(db){if(0!=
cb)V.setTableRowHeight(this.state.cell,cb,!ab);else if(!R.blockDelayedSelection){var lb=V.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(lb,db)}cb=0};Ma.reset=function(){cb=0}}y.push(Ma)})(fa);for(fa=0;fa<Ka.length;fa++)mxUtils.bind(this,function($a){var Oa=V.view.getState(Ka[$a]),Ma=V.getCellGeometry(Ka[$a]),fb=null!=Ma.alternateBounds?Ma.alternateBounds:Ma;null==Oa&&(Oa=new mxCellState(V.view,Ka[$a],V.getCellStyle(Ka[$a])),Oa.x=oa.x+Ma.x*ja,Oa.y=oa.y+Ma.y*ja,
Oa.width=fb.width*ja,Oa.height=fb.height*ja,Oa.updateCachedBounds());Ma=$a<Ka.length-1?Ka[$a+1]:null;Ma=null!=Ma?V.getCellGeometry(Ma):null;var cb=null!=Ma&&null!=Ma.alternateBounds?Ma.alternateBounds:Ma;Ma=null!=Sa[$a]?new l(Sa[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ma.isDashed=ua.isDashed;Ma.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Ma);Oa.tableHandle=!0;var ab=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);
Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:ua.stroke;if(this.shape.constructor==l)this.shape.line=N(Sa[$a],ab,0),this.shape.updateBoundsFromLine();else{var lb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(fb.width+ab)*ja;this.shape.bounds.y=oa.y+($a==Ka.length-1?0:lb.y*ja);this.shape.bounds.height=oa.height-($a==Ka.length-1?0:(lb.height+lb.y)*ja)}this.shape.redraw()}};var db=!1;Oa.setPosition=function(lb,kb,pb){ab=
Math.max(Graph.minTableColumnWidth-fb.width,kb.x-lb.x-fb.width);db=mxEvent.isShiftDown(pb.getEvent());null==cb||db||(ab=Math.min(ab,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(lb){if(0!=ab)V.setTableColumnWidth(this.state.cell,ab,db);else if(!R.blockDelayedSelection){var kb=V.getCellAt(lb.getGraphX(),lb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(kb,lb)}ab=0};Oa.positionChanged=function(){};Oa.reset=function(){ab=0};y.push(Oa)})(fa)}}return null!=y?y.reverse():null};var K=
mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){K.apply(this,arguments);if(null!=this.moveHandles)for(var N=0;N<this.moveHandles.length;N++)null!=this.moveHandles[N]&&(this.moveHandles[N].node.style.visibility=y?"":"hidden");if(null!=this.cornerHandles)for(N=0;N<this.cornerHandles.length;N++)this.cornerHandles[N].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.isMoveHandlesVisible();y&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():y||null==this.moveHandles||this.destroyMoveHandles();if(y&&null==this.moveHandles){for(y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var y=
this.graph,N=y.model,R=[],V=0;V<N.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(fa){if(null!=fa&&N.isVertex(fa.cell)&&y.isCellMovable(fa.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=fa;ja.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,
mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(fa.cell)||this.graph.selectCellForEvent(fa.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),fa.cell,oa),mxEvent.consume(oa))}));R.push(ja)}else R.push(null)})(this.graph.view.getState(N.getChildAt(this.state.cell,V)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
function(){if(null!=this.cornerHandles){for(var y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}};var S=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){S.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var y=0;4>y;y++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();
y=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(y,N)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),N=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var fa=this.customHandles[V].shape.bounds,ja=fa.getCenterX(),oa=fa.getCenterY();if(Math.abs(this.state.x-ja)<fa.width/2||Math.abs(this.state.y-oa)<fa.height/2||Math.abs(this.state.x+this.state.width-ja)<fa.width/2||Math.abs(this.state.y+this.state.height-oa)<fa.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(N/=2,this.graph.isTable(this.state.cell)&&(N+=7),y.x=
this.sizers[0].bounds.width+N,y.y=this.sizers[0].bounds.height+N):y=P.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var N=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),N)+" x "+e(this.roundLength(this.bounds.height/
y),N)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.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 T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var y=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);this.updateLinkHint(y,N)};var Y=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,N){Y.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,N){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,N,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,fa=this.graph.view.scale,ja=this.roundLength(N.x/fa-V.x);V=this.roundLength(N.y/fa-V.y);var oa=
this.graph.view.unit;this.hint.innerHTML=e(ja,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(R.length/fa):e(R.length/fa,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*
R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),N.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=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);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxVertexHandler.prototype.rowHandleImage=Graph.createSvgImage(14,
12,'<rect x="2" y="2" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/><rect x="2" y="7" width="10" height="3" stroke-width="1" stroke="#ffffff" fill="'+HoverIcons.prototype.arrowFill+'"/>');mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=
HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;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);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=32;mxGraphHandler.prototype.previewColor="light-dark(#000000, #cccccc)";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(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.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(y){return mxEvent.isMouseEvent(y.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var N=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(N)||mxEvent.isPopupTrigger(N)&&(null==y.getState()||mxEvent.isControlDown(N)||mxEvent.isShiftDown(N))}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var N=y.getEvent();return mxEvent.isLeftMouseButton(N)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(N)&&!mxEvent.isShiftDown(N))||this.usePopupTrigger&&mxEvent.isPopupTrigger(N)};
mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,N){if(this.cancelled)this.cancelled=!1,N.consume();else{var R=
null!=this.div&&"none"!=this.div.style.display,V=null,fa=null,ja=y=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,fa=this.first.y,y=(this.currentX-V)/this.graph.view.scale,ja=(this.currentY-fa)/this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||(y=this.graph.snap(y),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(R){if(this.isSpaceEvent(N)){this.graph.model.beginUpdate();
try{var oa=this.graph.getCellsBeyond(V,fa,this.graph.getDefaultParent(),!0,!0);for(R=0;R<oa.length;R++)if(this.graph.isCellMovable(oa[R])){var ua=this.graph.view.getState(oa[R]),ra=this.graph.getCellGeometry(oa[R]);null!=ua&&null!=ra&&(ra=ra.clone(),ra.translate(y,ja),this.graph.model.setGeometry(oa[R],ra))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,N.getEvent());N.consume()}}};mxRubberband.prototype.mouseMove=function(y,
N){if(!N.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);y=mxUtils.getOffset(this.graph.container);R.x-=y.x;R.y-=y.y;y=N.getX()+R.x;R=N.getY()+R.y;var V=this.first.x-y,fa=this.first.y-R,ja=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ja||Math.abs(fa)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,R),this.isSpaceEvent(N)?(y=this.x+this.width,R=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(N.getEvent())||
(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,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=y-this.width),this.y<this.first.y&&(this.y=R-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)),N.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var va=(new Date).getTime(),ta=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
function(y,N,R,V){qa.apply(this,arguments);R!=this.currentTerminalState?(va=(new Date).getTime(),ta=0):ta=(new Date).getTime()-va;this.currentTerminalState=R};var Ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<ta||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
"outlineConnect","1"))&&Ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(y,N,R){N=null!=y&&0==y;var V=this.state.getVisibleTerminalState(N);y=null!=y&&null!=this.state.absolutePoints&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,V,N):null;R=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(N),y):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
null!=y&&null!=V?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ya=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,N,R,V){V=N==mxEvent.ROTATION_HANDLE?
HoverIcons.prototype.rotationHandle:N==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return ya.apply(this,arguments)};var La=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var N=this.graph.getModel(),R=N.getParent(y[0]),V=this.graph.getCellGeometry(y[0]);if(N.isEdge(R)&&null!=V&&V.relative&&(N=this.graph.view.getState(y[0]),null!=N&&2>N.width&&2>N.height&&null!=N.text&&null!=N.text.boundingBox))return mxRectangle.fromRectangle(N.text.boundingBox)}return La.apply(this,
arguments)};var Aa=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var y=Aa.apply(this,arguments),N=[],R=0;R<y.length;R++)"1"!=mxUtils.getValue(y[R].style,"part","0")&&N.push(y[R]);return N};var Da=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var N=this.graph.getModel(),R=N.getParent(y.cell),V=this.graph.getCellGeometry(y.cell);return N.isEdge(R)&&null!=V&&V.relative&&2>y.width&&2>y.height&&null!=
y.text&&null!=y.text.boundingBox?(N=y.text.unrotatedBoundingBox||y.text.boundingBox,new mxRectangle(Math.round(N.x),Math.round(N.y),Math.round(N.width),Math.round(N.height))):Da.apply(this,arguments)};var pa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,N){var R=this.graph.getModel(),V=R.getParent(this.state.cell),fa=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(N)==mxEvent.ROTATION_HANDLE||!R.isEdge(V)||null==fa||!fa.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&pa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),N=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&N==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,N){Ca.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 za=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(y,N){za.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&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(y,N){try{if(null==y&&(null==N||0==N.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=y||null!=N&&0<N.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var V=R.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y){var fa=document.createElement("div");
fa.style.display="flex";fa.style.alignItems="center";fa.appendChild(this.graph.createLinkForHint(y,null,this.state.cell));this.linkHint.appendChild(fa);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=R.cloneNode(!0);fa.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ua){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ua)}));var oa=V.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener(oa,
"click",mxUtils.bind(this,function(ua){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ua)}))}}if(null!=N)for(fa=0;fa<N.length;fa++)mxUtils.bind(this,function(ua,ra){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=y||0<ra?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(ua.getAttribute("href"),mxUtils.getTextContent(ua),this.state.cell));var Ga=R.cloneNode(!0);xa.appendChild(Ga);var Ka=mxUtils.bind(this,function(Sa){var Pa=
document.createElement("div");Pa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var $a=Pa.getElementsByTagName("a")[ra];if(null!=$a){if(null==Sa||""==Sa){for(Sa=$a.cloneNode(!0).firstChild;null!=Sa;)$a.parentNode.insertBefore(Sa.cloneNode(!0),$a),Sa=Sa.nextSibling;$a.parentNode.removeChild($a)}else $a.setAttribute("href",Sa);this.graph.labelChanged(this.state.cell,Pa.innerHTML)}});mxEvent.addListener(Ga,"click",mxUtils.bind(this,function(Sa){this.graph.showLinkDialog(ua.getAttribute("href")||
"",mxResources.get("ok"),Ka);mxEvent.consume(Sa)}));Ga=V.cloneNode(!0);xa.appendChild(Ga);mxEvent.addListener(Ga,"click",mxUtils.bind(this,function(Sa){Ka();mxEvent.consume(Sa)}));this.linkHint.appendChild(xa)})(N[fa],fa)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ua){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var wa=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var y=wa.apply(this,
arguments);y.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return y};var Za=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Za.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)null!=
this.moveHandles[y]&&(this.moveHandles[y].bounds.x=Math.round(this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-this.moveHandles[y].bounds.width/2),this.moveHandles[y].bounds.y=Math.round(this.moveHandles[y].rowState.y+(this.moveHandles[y].rowState.height-this.moveHandles[y].bounds.height)/2),this.moveHandles[y].redraw());if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var N=this.cornerHandles,R=N[0].bounds.height/2;N[0].bounds.x=this.state.x-N[0].bounds.width/2+y;N[0].bounds.y=
this.state.y-R+y;N[0].redraw();N[1].bounds.x=N[0].bounds.x+this.state.width-2*y;N[1].bounds.y=N[0].bounds.y;N[1].redraw();N[2].bounds.x=N[0].bounds.x;N[2].bounds.y=this.state.y+this.state.height-2*y;N[2].redraw();N[3].bounds.x=N[1].bounds.x;N[3].bounds.y=N[2].bounds.y;N[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),N=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(N,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=R?mxUtils.getBoundingBox(this.state,
this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,N=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=N&&(R=Math.max(R,N.y+N.height)),this.linkHint.style.left=y.x+y.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ta=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ta.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&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 Ua=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ua.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=y.x+y.width/2+"px";this.linkHint.style.top=Math.round(y.y+y.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
function(){Ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Na=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Na.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 b(d,p,z){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=z?z:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function n(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function Q(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function c(){mxShape.call(this)}
function f(){mxShape.call(this)}function k(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1}function t(){mxActor.call(this)}function q(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function H(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function I(){mxActor.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function ha(){mxActor.call(this)}function ca(d,p){this.canvas=d;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function da(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function l(){mxCylinder.call(this)}function B(){mxShape.call(this)}function K(){mxShape.call(this)}function S(){mxEllipse.call(this)}
function P(){mxShape.call(this)}function T(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function la(){mxShape.call(this)}function va(){mxShape.call(this)}function ta(){mxShape.call(this)}function qa(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function ya(){mxCylinder.call(this)}function La(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Da(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function za(){mxActor.call(this)}function wa(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Ta(){mxActor.call(this)}function Ua(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Na(){mxActor.call(this)}function y(){mxActor.call(this)}function N(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function fa(){mxEllipse.call(this)}
function ja(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ua(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Ga(){mxEllipse.call(this)}function Ka(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Pa(){mxActor.call(this)}function $a(){mxActor.call(this)}function Oa(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Ma(){mxConnector.call(this)}function fb(d,p,z,u,x,C,E,ea,M,sa){E+=M;var ma=u.clone();u.x-=x*(2*E+M);u.y-=C*(2*E+M);x*=E+M;C*=E+M;return function(){d.ellipse(ma.x-x-E,ma.y-C-E,2*E,2*E);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var z=this.line[p];null!=z&&(z=new mxRectangle(z.x,z.y,this.strokewidth,this.strokewidth),null==
d?d=z:d.add(z))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,z,u,x){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,z,u){if(null!=p){var x=null;d.begin();for(var C=0;C<p.length;C++){var E=p[C];null!=E&&(null==x?d.moveTo(E.x+z,E.y+u):null!=x&&d.lineTo(E.x+z,E.y+u));x=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var z=null,
u=0;u<this.line.length&&!p;u++){var x=this.line[u];null!=x&&null!=z&&(p=mxUtils.rectangleIntersectsSegment(d,z,x));z=x}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,p,z,u,x){var C=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
!1,E=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Ga.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-z));C||this.outline||!(E&&ea<x||!E&&ea<u)||this.paintForeground(d,p,z,u,x)};e.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.state){var C=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=C;C=E;E=ea}d.rotate(-this.getShapeRotation(),
C,E,p+u/2,z+x/2);s=this.scale;p=this.bounds.x/s;z=this.bounds.y/s;u=this.bounds.width/s;x=this.bounds.height/s;this.paintTableForeground(d,p,z,u,x)}};e.prototype.paintTableForeground=function(d,p,z,u,x){u=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(x=0;x<u.length;x++)b.prototype.paintTableLine(d,u[x],p,z)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,
parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(C,x);d.lineTo(0,x-C);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-C,0),d.lineTo(u,C),
d.lineTo(C,C),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,x),d.lineTo(0,x-C),d.close(),d.fill()),d.begin(),d.moveTo(C,x),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(u,C),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
m);var cb=Math.tan(mxUtils.toRadians(30)),ab=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(v,mxConnector);v.prototype.paintEdgeShape=function(d,p){var z=this.createMarker(d,p,!0),u=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=z&&z();null!=u&&u()};mxCellRenderer.registerShape("wire",v);mxUtils.extend(n,mxCylinder);n.prototype.size=6;n.prototype.paintVertexShape=function(d,p,z,u,x){d.setFillColor(this.stroke);var C=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(u-C),z+.5*(x-C),C,C);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};mxCellRenderer.registerShape("waypoint",
n);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/cb);d.translate((u-p)/2,(x-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*ab);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-ab)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(G,mxCylinder);G.prototype.size=20;G.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(u,x/(.5+cb));C?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-ab)*p),d.lineTo(p,.25*p),d.moveTo(.5*
p,(.5-ab)*p),d.lineTo(.5*p,(1-ab)*p)):(d.translate((u-p)/2,(x-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*ab),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-ab)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(Q,mxCylinder);Q.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,-p);C||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,x-p),d.curveTo(u,x+p/3,0,x+p/3,0,x-p),d.close())};Q.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",Q);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity=
0;F.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(0,x);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),
d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.close(),d.fill()),d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(L,F);mxCellRenderer.registerShape("note2",L);L.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
15;c.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;C=Math.min(u*Math.tan(C),.5*x);d.translate(p,z);d.begin();d.moveTo(.5*u,0);d.lineTo(u,C);d.lineTo(u,x-C);d.lineTo(.5*u,x);d.lineTo(0,x-C);d.lineTo(0,C);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,C);d.lineTo(.5*u,2*C);d.lineTo(u,C);d.moveTo(.5*u,2*C);d.lineTo(.5*u,x);d.stroke()};mxCellRenderer.registerShape("isoCube2",
c);mxUtils.extend(f,mxShape);f.prototype.size=15;f.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*
u,C,0,0,1,0,C),d.stroke())};mxCellRenderer.registerShape("cylinder2",f);mxUtils.extend(k,mxCylinder);k.prototype.size=15;k.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C)):(d.moveTo(0,0),d.arcTo(.5*u,C,0,0,0,.5*u,C),d.arcTo(.5*u,C,
0,0,0,u,0)),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*u,C,0,0,1,0,C),d.stroke()))};mxCellRenderer.registerShape("cylinder3",k);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u/2,.5*x,u,0);d.quadTo(.5*u,x/2,u,x);d.quadTo(u/2,.5*x,0,x);d.quadTo(.5*u,x/2,0,0);d.end()};mxCellRenderer.registerShape("switch",t);mxUtils.extend(q,
mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.isRoundable=function(){return!0};q.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var C=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,
"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(M*=Math.min(u,x));M=Math.min(M,.5*u,.5*(x-z));p=Math.max(p,M);p=Math.min(u-M,p);E||(M=0);d.begin();"left"==C?(d.moveTo(Math.max(M,0),z),d.lineTo(Math.max(M,0),0),d.lineTo(p,0),d.lineTo(p,z)):(d.moveTo(u-p,z),d.lineTo(u-p,0),d.lineTo(u-Math.max(M,0),0),d.lineTo(u-Math.max(M,0),z));E?(d.moveTo(0,M+z),d.arcTo(M,M,0,0,1,M,z),d.lineTo(u-M,z),d.arcTo(M,M,0,0,1,u,M+z),
d.lineTo(u,x-M),d.arcTo(M,M,0,0,1,u-M,x),d.lineTo(M,x),d.arcTo(M,M,0,0,1,0,x-M)):(d.moveTo(0,z),d.lineTo(u,z),d.lineTo(u,x),d.lineTo(0,x));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(u-30,z+20),d.lineTo(u-20,z+10),d.lineTo(u-10,z+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(D,mxCylinder);D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);var C=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
this.arcSize));z=mxUtils.getValue(this.style,"umlStateConnection",null);E||(p*=Math.min(u,x));p=Math.min(p,.5*u,.5*x);C||(p=0);C=0;null!=z&&(C=10);d.begin();d.moveTo(C,p);d.arcTo(p,p,0,0,1,C+p,0);d.lineTo(u-p,0);d.arcTo(p,p,0,0,1,u,p);d.lineTo(u,x-p);d.arcTo(p,p,0,0,1,u-p,x);d.lineTo(C+p,x);d.arcTo(p,p,0,0,1,C,x-p);d.close();d.fillAndStroke();d.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(d.roundrect(u-40,x-20,10,10,3,3),d.stroke(),d.roundrect(u-20,x-20,10,10,
3,3),d.stroke(),d.begin(),d.moveTo(u-30,x-15),d.lineTo(u-20,x-15),d.stroke());"connPointRefEntry"==z?(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke()):"connPointRefExit"==z&&(d.ellipse(0,.5*x-10,20,20),d.fillAndStroke(),d.begin(),d.moveTo(5,.5*x-5),d.lineTo(15,.5*x+5),d.moveTo(15,.5*x-5),d.lineTo(5,.5*x+5),d.stroke())};D.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,
0,0,0):null};mxCellRenderer.registerShape("umlState",D);mxUtils.extend(H,mxActor);H.prototype.size=30;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,p)],this.isRounded,z,!0);d.end()};
mxCellRenderer.registerShape("card",H);mxUtils.extend(O,mxActor);O.prototype.size=.4;O.prototype.redrawPath=function(d,p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,p/2);d.quadTo(u/4,1.4*p,u/2,p/2);d.quadTo(3*u/4,p*(1-1.4),u,p/2);d.lineTo(u,x-p/2);d.quadTo(3*u/4,x-1.4*p,u/2,x-p/2);d.quadTo(u/4,x-p*(1-1.4),0,x-p/2);d.lineTo(0,p/2);d.close();d.end()};O.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=
mxUtils.getValue(this.style,"size",this.size),z=d.width,u=d.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return p*=u,new mxRectangle(d.x,d.y+p,z,u-2*p);p*=z;return new mxRectangle(d.x+p,d.y,z-2*p,u)}return d};mxCellRenderer.registerShape("tape",O);mxUtils.extend(J,mxActor);J.prototype.size=.3;J.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
"size",this.size))*d.height):null};J.prototype.redrawPath=function(d,p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(0,0);d.lineTo(u,0);d.lineTo(u,x-p/2);d.quadTo(3*u/4,x-1.4*p,u/2,x-p/2);d.quadTo(u/4,x-p*(1-1.4),0,x-p/2);d.lineTo(0,p/2);d.close();d.end()};mxCellRenderer.registerShape("document",J);var db=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(d,p,z,u){var x=mxUtils.getValue(this.style,"size");return null!=
x?u*Math.max(0,Math.min(1,x)):db.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};k.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,
"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};D.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};L.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,p,z,u,x){p=
"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("parallelogram",I);mxUtils.extend(Z,mxActor);Z.prototype.size=
.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.5;ia.prototype.redrawPath=function(d,p,z,u,x){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,x/2),new mxPoint(0,x/2),new mxPoint(p,x/2),new mxPoint(p,x),new mxPoint(u,x)],this.isRounded,
z,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ia);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(d,p,z,u,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,x);d.fillAndStroke();d.rect(2*p,0,p,x);d.fillAndStroke();d.rect(4*p,0,p,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ha);ca.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ca.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)};ca.prototype.quadTo=function(d,p,z,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=u};ca.prototype.curveTo=function(d,p,z,u,x,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=C};ca.prototype.arcTo=function(d,p,z,u,x,C,E){this.originalArcTo.apply(this.canvas,arguments);
this.lastX=C;this.lastY=E};ca.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var z=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),x=Math.abs(p-this.lastY),C=Math.sqrt(u*u+x*x);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var E=Math.round(C/10),ea=this.defaultVariation;5>E&&(E=5,ea/=3);var M=z(d-this.lastX)*u/E;z=z(p-this.lastY)*x/E;u/=C;x/=C;for(C=0;C<E;C++){var sa=(Math.random()-
.5)*ea;this.originalLineTo.call(this.canvas,M*C+this.lastX-sa*x,z*C+this.lastY-sa*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ca.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 lb=mxShape.prototype.beforePaint;
mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){kb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ca(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var pb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&pb.apply(this,arguments)};var gb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,z,u,x){if(null==d.handJiggle||
d.handJiggle.constructor!=ca)gb.apply(this,arguments);else{var C=!0;null!=this.style&&(C="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(C||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)C||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?C=Math.min(u/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2)):(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.min(u*C,x*C)),d.moveTo(p+C,z),d.lineTo(p+u-C,z),d.quadTo(p+u,z,p+u,z+C),d.lineTo(p+u,z+x-C),d.quadTo(p+u,z+x,p+u-C,z+x),d.lineTo(p+C,z+x),d.quadTo(p,z+x,p,z+x-C),d.lineTo(p,z+C),d.quadTo(p,z,p+C,z)):(d.moveTo(p,z),d.lineTo(p+u,z),d.lineTo(p+u,z+x),d.lineTo(p,z+x),d.lineTo(p,z)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(na,mxRectangleShape);na.prototype.size=
.1;na.prototype.fixedSize=!1;na.prototype.isHtmlAllowed=function(){return!1};na.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,z=d.height;d=new mxRectangle(d.x,d.y,p,z);var u=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;u=Math.max(u,Math.min(p*x,z*x))}d.x+=Math.round(u);d.width-=Math.round(2*u);return d}return d};na.prototype.paintForeground=function(d,p,z,u,x){var C=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=C?Math.max(0,Math.min(u,E)):u*Math.max(0,Math.min(1,E));this.isRounded&&(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,
Math.min(u*C,x*C)));E=Math.round(E);d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.moveTo(p+u-E,z);d.lineTo(p+u-E,z+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(d,p,z,u,x){d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};X.prototype.paintForeground=function(d,p,z,u,x){};mxCellRenderer.registerShape("transparent",
X);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(d,p,z,u,x){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));var C=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-z),new mxPoint(Math.min(u,C+ea),x-z),new mxPoint(E,x),new mxPoint(Math.max(0,C),x-z),new mxPoint(0,x-z)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",
ba);mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.fixedSize=20;ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,
0),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(0,x),new mxPoint(p,x/2)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("step",ka);mxUtils.extend(da,mxHexagon);da.prototype.size=.25;da.prototype.fixedSize=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*x),new mxPoint(u-p,x),new mxPoint(p,x),new mxPoint(0,.5*x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("hexagon",da);mxUtils.extend(W,mxRectangleShape);W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(d,p,z,u,x){var C=Math.min(u/5,x/5)+1;d.begin();d.moveTo(p+u/2,z+C);d.lineTo(p+u/2,
z+x-C);d.moveTo(p+C,z+x/2);d.lineTo(p+u-C,z+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",W);var ob=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=
function(d,p,z,u,x){ob.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var C=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&(d.setShadow(!1),ob.apply(this,[d,p,z,u,x]))}};mxUtils.extend(U,mxRectangleShape);U.prototype.isHtmlAllowed=function(){return!1};U.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};U.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var C=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);C=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+C]];if(null!=E){var ea=this.style["symbol"+C+"Align"],
M=this.style["symbol"+C+"VerticalAlign"],sa=this.style["symbol"+C+"Width"],ma=this.style["symbol"+C+"Height"],Ya=this.style["symbol"+C+"Spacing"]||0,hb=this.style["symbol"+C+"VSpacing"]||Ya,bb=this.style["symbol"+C+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(u+this.strokewidth,x+this.strokewidth),Ya+=bb,hb+=bb);bb=p;var Ea=z;bb=ea==mxConstants.ALIGN_CENTER?bb+(u-sa)/2:ea==mxConstants.ALIGN_RIGHT?bb+(u-sa-Ya):bb+Ya;Ea=M==mxConstants.ALIGN_MIDDLE?Ea+(x-ma)/2:M==mxConstants.ALIGN_BOTTOM?Ea+(x-ma-hb):
Ea+hb;d.save();ea=new E;ea.style=this.style;E.prototype.paintVertexShape.call(ea,d,bb,Ea,sa,ma);d.restore()}C++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",U);mxUtils.extend(l,mxCylinder);l.prototype.redrawPath=function(d,p,z,u,x,C){C?(d.moveTo(0,0),d.lineTo(u/2,x/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",l);mxUtils.extend(B,mxShape);B.prototype.paintBackground=
function(d,p,z,u,x){d.translate(p,z);d.ellipse(u/4,0,u/2,x/4);d.fillAndStroke();d.begin();d.moveTo(u/2,x/4);d.lineTo(u/2,2*x/3);d.moveTo(u/2,x/3);d.lineTo(0,x/3);d.moveTo(u/2,x/3);d.lineTo(u,x/3);d.moveTo(u/2,2*x/3);d.lineTo(0,x);d.moveTo(u/2,2*x/3);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};K.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();
d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(u/6,x/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(S,mxEllipse);S.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,z+x);d.lineTo(p+7*u/8,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",S);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=
function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(u,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,x/8,u,7*x/8);d.fillAndStroke()};T.prototype.paintForeground=
function(d,p,z,u,x){d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};Y.prototype.paintBackground=function(d,p,z,u,x){var C=Math.max(0,Math.min(x,
parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,z,u,C):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=Y&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,p,z,u,C),d.restore()));C<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,z+C),d.lineTo(p+u/2,z+x),d.end(),d.stroke())};Y.prototype.paintForeground=
function(d,p,z,u,x){var C=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,z,u,Math.min(x,C))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&
0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,p,z,u,x){var C=this.corner,E=Math.min(u,Math.max(C,parseFloat(mxUtils.getValue(this.style,"width",
this.width)))),ea=Math.min(x,Math.max(1.5*C,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(p,z,u,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,z,u,x),d.setGradient(this.fill,this.gradient,p,z,u,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;
d.begin();d.moveTo(p,z);d.lineTo(p+E,z);d.lineTo(p+E,z+Math.max(0,ea-1.5*C));d.lineTo(p+Math.max(0,E-C),z+ea);d.lineTo(p,z+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+E,z);d.lineTo(p+u,z);d.lineTo(p+u,z+x);d.lineTo(p,z+x);d.lineTo(p,z+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,p,z,u){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);
mxPerimeter.LifelinePerimeter=function(d,p,z,u){u=Y.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;z.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,z.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,z,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,z,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return z.x<d.getCenterX()&&(u=-1*(u+1)),new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,z.y)));z.y<d.getCenterY()&&
(u=-1*(u+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,z.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,z,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ba.prototype.size))*p.view.scale))),p.style),p,z,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);
mxPerimeter.ParallelogramPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?I.prototype.fixedSize:I.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=
[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]):(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=
function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,ea+sa),
new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,
C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ka.prototype.fixedSize:ka.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,d),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,
Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,d),new mxPoint(E+M,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(ma,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),
ea=[new mxPoint(E,ea),new mxPoint(ma,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?da.prototype.fixedSize:da.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x),new mxPoint(ma,ea)]):
(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,
"size",this.size));d.translate(p,z);d.ellipse((u-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(u/2,C);d.lineTo(u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.inset=2;va.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.begin();d.moveTo(u/2,C+E);d.lineTo(u/
2,x);d.end();d.stroke();d.begin();d.moveTo((u-C)/2-E,C/2);d.quadTo((u-C)/2-E,C+E,u/2,C+E);d.quadTo((u+C)/2+E,C+E,(u+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",va);mxUtils.extend(ta,mxShape);ta.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ta);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,
p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.ellipse(0,C,u-2*C,x-2*C);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));
p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=Math.min(p,x-p),M=Math.min(ea+2*p,x-p);C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("module",
Ba);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=32;ya.prototype.jettyHeight=12;ya.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=.3*x-p/2,M=.7*x-p/2;C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,
x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("component",ya);mxUtils.extend(La,mxRectangleShape);La.prototype.paintForeground=function(d,p,z,u,x){var C=u/2,E=x/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+C,z),new mxPoint(p+u,z+E),new mxPoint(p+C,z+x),new mxPoint(p,z+E)],this.isRounded,
ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",La);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.min(4,Math.min(u/5,x/5));0<u&&0<x&&(d.ellipse(p+C,z+C,u-2*C,x-2*C),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,z,u,x),d.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Da,Aa);Da.prototype.outerStroke=
!1;mxCellRenderer.registerShape("startState",Da);mxUtils.extend(pa,mxArrowConnector);pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",pa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=
function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(za,mxActor);za.prototype.size=30;za.prototype.isRoundable=function(){return!0};
za.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("manualInput",za);mxUtils.extend(wa,mxRectangleShape);wa.prototype.dx=20;wa.prototype.dy=20;wa.prototype.isHtmlAllowed=function(){return!1};wa.prototype.paintForeground=
function(d,p,z,u,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var C=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;C=Math.max(C,Math.min(u*E,x*E))}E=Math.max(C,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));C=Math.max(C,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,z+C);d.lineTo(p+u,z+C);d.end();d.stroke();d.begin();d.moveTo(p+E,z);d.lineTo(p+
E,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",wa);mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.isRoundable=function(){return!0};Za.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint(p,z),new mxPoint(p,x),new mxPoint(0,x)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(u,0);d.lineTo(u,x);d.end();d.moveTo(0,x/2);d.lineTo(u,x/2);d.end()};mxCellRenderer.registerShape("crossbar",Ra);mxUtils.extend(Ta,mxActor);Ta.prototype.dx=20;Ta.prototype.dy=
20;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint((u+p)/2,z),new mxPoint((u+
p)/2,x),new mxPoint((u-p)/2,x),new mxPoint((u-p)/2,z),new mxPoint(0,z)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("tee",Ta);mxUtils.extend(Ua,mxActor);Ua.prototype.arrowWidth=.3;Ua.prototype.arrowSize=.2;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));
z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(0,C)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Ua);mxUtils.extend(Ha,mxActor);Ha.prototype.isRoundable=function(){return!0};Ha.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowWidth",Ua.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(p,0),new mxPoint(p,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(p,C),new mxPoint(p,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",
Ha);mxUtils.extend(Na,mxActor);Na.prototype.size=.1;Na.prototype.fixedSize=20;Na.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,x/2,u,x);d.lineTo(p,x);d.quadTo(p-2*p,x/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Na);
mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",y);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.quadTo(u/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",N);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,
p,z,u,x){p=Math.min(u/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,.8*p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,
p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-p),new mxPoint(u/2,x),new mxPoint(0,x-p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
d.begin();d.moveTo(p+u/2,z+x);d.lineTo(p+u,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,z);d.lineTo(p+u/2,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=
function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,z+.145*x);d.lineTo(p+.855*u,z+.855*x);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,z+.145*x);d.lineTo(p+.145*u,z+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(ua,mxRhombus);ua.prototype.paintVertexShape=function(d,p,z,u,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+
u,z+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",ua);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,z,u,x){d.begin();d.moveTo(p,z);d.lineTo(p+u,z);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,z+x);d.lineTo(p+u,z+x);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,p,z,u,x){var C=d.state.strokeWidth/2,E=10+2*C,ea=z+
x-E/2;d.begin();d.moveTo(p,z);d.lineTo(p,z+x);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea-E/2);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea+E/2);d.moveTo(p+C,ea);d.lineTo(p+u-C,ea);d.moveTo(p+u,z);d.lineTo(p+u,z+x);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea-E/2);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.drawHidden=!0;Ga.prototype.paintVertexShape=function(d,p,z,u,x){this.outline||d.setStrokeColor(null);if(null!=
this.style){var C=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||ea||sa||ma||M?(d.rect(p,z,u,x),d.fill(),d.pointerEvents=C,d.setStrokeColor(this.stroke),d.setLineCap("square"),
d.begin(),d.moveTo(p,z),this.outline||ea?d.lineTo(p+u,z):d.moveTo(p+u,z),this.outline||sa?d.lineTo(p+u,z+x):d.moveTo(p+u,z+x),this.outline||ma?d.lineTo(p,z+x):d.moveTo(p,z+x),(this.outline||M)&&d.lineTo(p,z),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ga);mxUtils.extend(Ka,mxEllipse);Ka.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==
mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,z),d.lineTo(p+u/2,z+x)):(d.moveTo(p,z+x/2),d.lineTo(p+u,z+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ka);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(Pa,mxActor);Pa.prototype.size=.2;Pa.prototype.redrawPath=function(d,p,
z,u,x){p=Math.min(x,u);var C=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-C)/2;z=p+C;var E=(u-C)/2;C=E+C;d.moveTo(0,p);d.lineTo(E,p);d.lineTo(E,0);d.lineTo(C,0);d.lineTo(C,p);d.lineTo(u,p);d.lineTo(u,z);d.lineTo(C,z);d.lineTo(C,x);d.lineTo(E,x);d.lineTo(E,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("cross",Pa);mxUtils.extend($a,mxActor);$a.prototype.size=.25;$a.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);z=Math.min(u-
p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,x/2);d.lineTo(z,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(z,x);d.close();d.end()};mxCellRenderer.registerShape("display",$a);mxUtils.extend(Oa,mxActor);Oa.prototype.cst={RECT2:"mxgraph.basic.rect"};Oa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",
defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",
dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},
{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Oa.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);this.strictDrawShape(d,0,0,u,x)};Oa.prototype.strictDrawShape=function(d,p,z,u,x,C){var E=C&&C.rectStyle?C.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=C&&C.absoluteCornerSize?C.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",
this.absoluteCornerSize),M=C&&C.size?C.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=C&&C.rectOutline?C.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=C&&C.indent?C.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ya=C&&C.dashed?C.dashed:mxUtils.getValue(this.style,"dashed",!1),hb=C&&C.dashPattern?C.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=C&&C.relIndent?C.relIndent:
Math.max(0,Math.min(50,ma)),Ea=C&&C.top?C.top:mxUtils.getValue(this.style,"top",!0),Ja=C&&C.right?C.right:mxUtils.getValue(this.style,"right",!0),Ia=C&&C.bottom?C.bottom:mxUtils.getValue(this.style,"bottom",!0),Fa=C&&C.left?C.left:mxUtils.getValue(this.style,"left",!0),Qa=C&&C.topLeftStyle?C.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=C&&C.topRightStyle?C.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=C&&C.bottomRightStyle?C.bottomRightStyle:mxUtils.getValue(this.style,
"bottomRightStyle","default"),Xa=C&&C.bottomLeftStyle?C.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=C&&C.fillColor?C.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");C&&C.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=C&&C.strokeWidth?C.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=C&&C.fillColor2?C.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=C&&C.gradientColor2?C.gradientColor2:mxUtils.getValue(this.style,
"gradientColor2","none"),Hb=C&&C.gradientDirection2?C.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=C&&C.opacity?C.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));C=Oa.prototype;d.setDashed(Ya);hb&&""!=hb&&d.setDashPattern(hb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*u,M);ea||(M=Jb*Math.min(u,x)/100);M=Math.min(M,.5*Math.min(u,x));ea||(ma=Math.min(bb*Math.min(u,x)/100));ma=Math.min(ma,.5*Math.min(u,x)-M);(Ea||Ja||Ia||Fa)&&"frame"!=
sa&&(d.begin(),Ea?C.moveNW(d,p,z,u,x,E,Qa,M,Fa):d.moveTo(0,0),Ea&&C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),Ja&&C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),Ia&&C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),Fa&&C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Ya=ea=Ib,"none"==Db&&(ea=0),"none"==Eb&&(Ya=0),d.setGradient(Db,Eb,0,0,u,x,Hb,ea,Ya),d.begin(),Ea?C.moveNWInner(d,
p,z,u,x,E,Qa,M,ma,Ea,Fa):d.moveTo(ma,0),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),Fa&&Ia&&C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),Ia&&Ja&&C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),Ja&&Ea&&C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),Ea&&Fa&&C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),d.fill(),"none"==Fb&&(d.begin(),C.paintFolds(d,p,z,u,x,E,Qa,Va,Wa,Xa,M,Ea,Ja,Ia,Fa),d.stroke()));Ea||Ja||
Ia||!Fa?Ea||Ja||!Ia||Fa?!Ea&&!Ja&&Ia&&Fa?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,
p,z,u,x,E,Qa,M,Ea),C.lineNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),d.close(),d.fillAndStroke()):Ea||!Ja||Ia||Fa?!Ea&&Ja&&!Ia&&Fa?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Qa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa)),d.stroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,
p,z,u,x,E,Wa,M,Ia),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Qa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.lineNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close(),d.fillAndStroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.lineSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),d.close(),d.fillAndStroke()):
!Ea&&Ja&&Ia&&!Fa?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),
C.lineSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),d.close(),d.fillAndStroke()):!Ea&&Ja&&Ia&&Fa?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,
p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.lineNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,
p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),d.close(),d.fillAndStroke()):!Ea||Ja||Ia||Fa?Ea&&!Ja&&!Ia&&Fa?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,
p,z,u,x,E,Xa,M,ma,Ia,Fa)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.lineNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close(),d.fillAndStroke()):Ea&&!Ja&&Ia&&!Fa?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),"double"==sa&&(C.moveNEInner(d,p,z,
u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea)),d.stroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.lineNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),d.close(),d.fillAndStroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,
u,x,E,Xa,M,Fa),C.lineSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),d.close(),d.fillAndStroke()):Ea&&!Ja&&Ia&&Fa?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,
p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.lineNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),C.paintSWInner(d,
p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),d.close(),d.fillAndStroke()):Ea&&Ja&&!Ia&&!Fa?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,
p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.lineSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),d.close(),d.fillAndStroke()):Ea&&Ja&&!Ia&&Fa?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,
Ia),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.lineSEInner(d,p,z,u,x,E,
Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close(),d.fillAndStroke()):Ea&&Ja&&Ia&&!Fa?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),"double"==sa&&(C.moveSWInner(d,
p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.lineSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,
p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),d.close(),d.fillAndStroke()):Ea&&Ja&&Ia&&Fa&&("frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,
M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),d.close(),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close()),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintNW(d,
p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.paintNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.paintSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.paintSW(d,p,z,u,x,E,Xa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),d.close(),C.moveSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintSWInner(d,p,z,u,x,E,Xa,M,ma,Ia),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),C.paintSEInner(d,p,z,u,x,E,Wa,M,ma),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),C.paintNEInner(d,p,z,u,x,E,Va,M,ma),C.paintTopInner(d,
p,z,u,x,E,Qa,M,ma,Fa,Ea),C.paintNWInner(d,p,z,u,x,E,Qa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close(),d.fillAndStroke())):"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Qa,M,Fa),C.paintTop(d,p,z,u,x,E,Va,M,Ja),C.lineNEInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintTopInner(d,p,z,u,x,E,Qa,M,ma,Fa,Ea),d.close(),d.fillAndStroke()):
"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Va,M,Ea),C.paintRight(d,p,z,u,x,E,Wa,M,Ia),C.lineSEInner(d,p,z,u,x,E,Wa,M,ma,Ia),C.paintRightInner(d,p,z,u,x,E,Va,M,ma,Ea,Ja),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),"double"==sa&&(C.moveSWInner(d,
p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Wa,M,Ja),C.paintBottom(d,p,z,u,x,E,Xa,M,Fa),C.lineSWInner(d,p,z,u,x,E,Xa,M,ma,Fa),C.paintBottomInner(d,p,z,u,x,E,Wa,M,ma,Ja,Ia),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Qa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,
Qa,M,Ia),C.paintLeft(d,p,z,u,x,E,Qa,M,Ea),C.lineNWInner(d,p,z,u,x,E,Qa,M,ma,Ea,Fa),C.paintLeftInner(d,p,z,u,x,E,Xa,M,ma,Ia,Fa),d.close(),d.fillAndStroke());d.begin();C.paintFolds(d,p,z,u,x,E,Qa,Va,Wa,Xa,M,Ea,Ja,Ia,Fa);d.stroke()};Oa.prototype.moveNW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,0):d.moveTo(0,ea)};Oa.prototype.moveNE=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,0):d.moveTo(u-ea,0)};Oa.prototype.moveSE=function(d,
p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,x):d.moveTo(u,x-ea)};Oa.prototype.moveSW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,x):d.moveTo(ea,x)};Oa.prototype.paintNW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&
"fold"==C)&&d.lineTo(ea,0);else d.lineTo(0,0)};Oa.prototype.paintTop=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,0):d.lineTo(u-ea,0)};Oa.prototype.paintNE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u,ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u,ea);else d.lineTo(u,
0)};Oa.prototype.paintRight=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,x):d.lineTo(u,x-ea)};Oa.prototype.paintLeft=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,0):d.lineTo(0,ea)};Oa.prototype.paintSE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u-ea,x)}else("snip"==E||"default"==
E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-ea,x);else d.lineTo(u,x)};Oa.prototype.paintBottom=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,x):d.lineTo(ea,x)};Oa.prototype.paintSW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,0,x-ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==
E&&"fold"==C)&&d.lineTo(0,x-ea);else d.lineTo(0,x)};Oa.prototype.paintNWInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,M,.5*M+ea);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,M,M+ea);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(M,.5*M+ea);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,M+ea),d.lineTo(M,M+ea)};Oa.prototype.paintTopInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,
M):sa&&!ma?d.lineTo(M,0):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(ea+.5*M,M):d.lineTo(ea+M,M):d.lineTo(0,M):d.lineTo(0,0)};Oa.prototype.paintNEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-ea-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-ea-M,M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-
ea-.5*M,M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,ea+M),d.lineTo(u-ea-M,M)};Oa.prototype.paintRightInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u-M,0):sa&&!ma?d.lineTo(u,M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):d.lineTo(u-M,ea+M):d.lineTo(u-M,0):d.lineTo(u,0)};Oa.prototype.paintLeftInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,
x):sa&&!ma?d.lineTo(0,x-M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):d.lineTo(M,x-ea-M):d.lineTo(M,x):d.lineTo(0,x)};Oa.prototype.paintSEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-M,x-ea-.5*M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-M,x-ea-M);else if("snip"==E||"default"==E&&"snip"==
C)d.lineTo(u-M,x-ea-.5*M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,x-ea-M),d.lineTo(u-M,x-ea-M)};Oa.prototype.paintBottomInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u,x-M):sa&&!ma?d.lineTo(u-M,x):"square"==E||"default"==E&&"square"==C||!sa?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-ea-.5*M,x-M):d.lineTo(u-ea-M,x-M):d.lineTo(u,x)};Oa.prototype.paintSWInner=function(d,p,z,u,x,C,E,ea,M,sa){if(!sa)d.lineTo(M,
x);else if("square"==E||"default"==E&&"square"==C)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,ea+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,ea+M,x-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(ea+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,x-ea-M),d.lineTo(M+ea,x-M)};Oa.prototype.moveSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(M,
x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,x-ea-M):d.moveTo(0,x-M)};Oa.prototype.lineSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
E&&"fold"==C)&&d.lineTo(M,x-ea-M):d.lineTo(0,x-M)};Oa.prototype.moveSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,x-ea-M):d.moveTo(u-M,x)};Oa.prototype.lineSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,
x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,x-ea-M):d.lineTo(u-M,x)};Oa.prototype.moveNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.moveTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
E&&"fold"==C)&&d.moveTo(u-M,ea+M):d.moveTo(u,M)};Oa.prototype.lineNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,ea+M):d.lineTo(u,M)};Oa.prototype.moveNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.moveTo(M,0):sa&&!ma?d.moveTo(0,M):"square"==
E||"default"==E&&"square"==C?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,ea+M):d.moveTo(0,0)};Oa.prototype.lineNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,0):sa&&!ma?d.lineTo(0,M):"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,
ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,ea+M):d.lineTo(0,0)};Oa.prototype.paintFolds=function(d,p,z,u,x,C,E,ea,M,sa,ma,Ya,hb,bb,Ea){if("fold"==C||"fold"==E||"fold"==ea||"fold"==M||"fold"==sa)("fold"==E||"default"==E&&"fold"==C)&&Ya&&Ea&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==C)&&Ya&&hb&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==M||"default"==M&&"fold"==C)&&bb&&hb&&(d.moveTo(u-
ma,x),d.lineTo(u-ma,x-ma),d.lineTo(u,x-ma)),("fold"==sa||"default"==sa&&"fold"==C)&&bb&&Ea&&(d.moveTo(0,x-ma),d.lineTo(ma,x-ma),d.lineTo(ma,x))};mxCellRenderer.registerShape(Oa.prototype.cst.RECT2,Oa);Oa.prototype.constraints=null;mxUtils.extend(Ma,mxConnector);Ma.prototype.origPaintEdgeShape=Ma.prototype.paintEdgeShape;Ma.prototype.paintEdgeShape=function(d,p,z){for(var u=[],x=0;x<p.length;x++)u.push(mxUtils.clone(p[x]));x=d.state.dashed;var C=d.state.fixDash;Ma.prototype.origPaintEdgeShape.apply(this,
[d,u,z]);3<=d.state.strokeWidth&&(u=mxUtils.getValue(this.style,"fillColor",null),null!=u&&(d.setStrokeColor(u),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,C),Ma.prototype.origPaintEdgeShape.apply(this,[d,p,z])))};mxCellRenderer.registerShape("filledEdge",Ma);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),z=d.apply(this,arguments);"umlFrame"==
p.style.shape&&z.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return z}}();mxMarker.addMarker("dash",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Ya=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Ya/2,u.y-Ya/2+ma/2);d.lineTo(u.x+Ya/2-3*ma/2,u.y-3*Ya/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Ya=C*(E+M+1),hb=u.x+ma/2,bb=u.y+Ya/2;u.x-=ma;u.y-=Ya;return function(){d.begin();d.moveTo(hb-ma/2-
Ya/2,bb-Ya/2+ma/2);d.lineTo(hb-ma/2+Ya/2,bb-Ya/2-ma/2);d.lineTo(hb+Ya/2-3*ma/2,bb-3*Ya/2-ma/2);d.lineTo(hb-Ya/2-3*ma/2,bb-3*Ya/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Ya=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Ya/2,u.y-Ya/2+ma/2);d.lineTo(u.x+Ya/2-3*ma/2,u.y-3*Ya/2-ma/2);d.moveTo(u.x-ma/2+Ya/2,u.y-Ya/2-ma/2);d.lineTo(u.x-Ya/2-3*ma/2,u.y-3*Ya/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",fb);
mxMarker.addMarker("circlePlus",function(d,p,z,u,x,C,E,ea,M,sa){var ma=u.clone(),Ya=fb.apply(this,arguments),hb=x*(E+2*M),bb=C*(E+2*M);return function(){Ya.apply(this,arguments);d.begin();d.moveTo(ma.x-x*M,ma.y-C*M);d.lineTo(ma.x-2*hb+x*M,ma.y-2*bb+C*M);d.moveTo(ma.x-hb-bb+C*M,ma.y-bb+hb-x*M);d.lineTo(ma.x+bb-hb-C*M,ma.y-bb-hb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Ya=C*(E+M+1),hb=u.clone();u.x-=ma;u.y-=Ya;return function(){d.begin();d.moveTo(hb.x-
Ya,hb.y+ma);d.quadTo(u.x-Ya,u.y+ma,u.x,u.y);d.quadTo(u.x+Ya,u.y-ma,hb.x+Ya,hb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,z,u,x,C,E,ea,M,sa){p=x*M*1.118;z=C*M*1.118;x*=E+M;C*=E+M;var ma=u.clone();ma.x-=p;ma.y-=z;u.x+=-x-p;u.y+=-C-z;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-x-C/2,ma.y-C+x/2):d.lineTo(ma.x+C/2-x,ma.y-C-x/2);d.lineTo(ma.x-x,ma.y-C);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,
z,u,x,C,E,ea,M,sa,ma){C*=ea+sa;E*=ea+sa;var Ya=x.clone();return function(){p.begin();p.moveTo(Ya.x,Ya.y);M?p.lineTo(Ya.x-C-E/d,Ya.y-E+C/d):p.lineTo(Ya.x+E/d-C,Ya.y-E-C/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var tb=function(d,p,z){return eb(d,["width"],p,function(u,x,C,E,ea){ea=d.shape.getEdgeWidth()*d.view.scale+z;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));d.style.width=Math.round(2*
u)/d.view.scale-z})},eb=function(d,p,z,u,x){return jb(d,p,function(C){var E=d.absolutePoints;if(null!=E&&0<E.length){var ea=E.length-1;C=d.view.translate;var M=d.view.scale,sa=z?E[0]:E[ea];E=z?E[1]:E[ea-1];ea=E.x-sa.x;var ma=E.y-sa.y,Ya=Math.sqrt(ea*ea+ma*ma);sa=u.call(this,Ya,ea/Ya,ma/Ya,sa,E);return new mxPoint(sa.x/M-C.x,sa.y/M-C.y)}return null},function(C,E,ea){var M=d.absolutePoints,sa=M.length-1;C=d.view.translate;var ma=d.view.scale,Ya=z?M[0]:M[sa];M=z?M[1]:M[sa-1];sa=M.x-Ya.x;var hb=M.y-Ya.y,
bb=Math.sqrt(sa*sa+hb*hb);E.x=(E.x+C.x)*ma;E.y=(E.y+C.y)*ma;x.call(this,bb,sa/bb,hb/bb,Ya,M,E,ea)})},nb=function(d,p){return function(z){return[eb(z,["startWidth"],!0,function(u,x,C,E,ea){ea=mxUtils.getNumber(z.style,"startWidth",d)*z.view.scale+p;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));z.style.startWidth=Math.round(2*u)/z.view.scale-p})]}},mb=function(d){return function(p){return[jb(p,["arrowWidth",
"arrowSize"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ua.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Ua.prototype.arrowSize)));return new mxPoint(z.x+(1-x)*z.width,z.y+(1-u)*z.height/2)},function(z,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(z.y+z.height/2-u.y)/z.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(z.x+z.width-u.x)/z.width))})]}},qb=function(d){return function(p){return[jb(p,
["size"],function(z){var u=Math.max(0,Math.min(.5*z.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(z.x,z.y+u)},function(z,u){this.state.style.size=Math.max(0,u.y-z.y)},!0)]}},ub=function(d,p,z){return function(u){var x=[jb(u,["size"],function(C){var E=Math.max(0,Math.min(C.width,Math.min(C.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(C.x+E,C.y+E)},function(C,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(C.width,
E.x-C.x),Math.min(C.height,E.y-C.y)))/d)},!1)];z&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},zb=function(d,p,z,u,x){z=null!=z?z:.5;return function(C){var E=[jb(C,["size"],function(ea){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,sa*(M?1:ea.width))),ea.getCenterY())},function(ea,M,sa){ea=null!=x&&"0"!=mxUtils.getValue(this.state.style,
"fixedSize","0")?M.x-ea.x:Math.max(0,Math.min(z,(M.x-ea.x)/ea.width));this.state.style.size=ea},!1,u)];p&&mxUtils.getValue(C.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(vb(C));return E}},Cb=function(d,p,z){d=null!=d?d:.5;return function(u){var x=[jb(u,["size"],function(C){var E=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?z:p)));return new mxPoint(C.x+Math.min(.75*C.width*d,ea*(E?.75:.75*C.width)),C.y+C.height/
4)},function(C,E){C=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-C.x:Math.max(0,Math.min(d,(E.x-C.x)/C.width*.75));this.state.style.size=C},!1,!0)];mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},xb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p}},vb=function(d,p){return jb(d,[mxConstants.STYLE_ARCSIZE],function(z){var u=null!=p?p:z.height/8;if("1"==mxUtils.getValue(d.style,
mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(z.x+z.width-Math.min(z.width/2,x),z.y+u)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(z.x+z.width-Math.min(Math.max(z.width/2,z.height/2),Math.min(z.width,z.height)*x),z.y+u)},function(z,u,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?
this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(z.width,2*(z.x+z.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(z.width-u.x+z.x)/Math.min(z.width,z.height))))})},jb=function(d,p,z,u,x,C,E){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);E&&E(sa)};ea.getPosition=z;ea.setPosition=u;ea.ignoreGrid=null!=x?x:!0;if(C){var M=ea.positionChanged;
ea.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},ib={link:function(d){return[tb(d,!0,10),tb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,z=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,
mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||
mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;
ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/
d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=
d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,
x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,ea,M,
sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||
(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return z},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(vb(d,
z/2))}p.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(u){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,x))):new mxPoint(u.x+Math.max(0,Math.min(u.width,x)),u.getCenterY())},function(u,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
Math.min(u.height,x.y-u.y))):Math.round(Math.max(0,Math.min(u.width,x.x-u.x)))},!1,null,function(u){var x=d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){u=x.getSwimlaneDirection(d.style);var C=x.model.getParent(d.cell);C=x.model.getChildCells(C,!0);for(var E=[],ea=0;ea<C.length;ea++)C[ea]!=d.cell&&x.isSwimlane(C[ea])&&x.getSwimlaneDirection(x.getCurrentCellStyle(C[ea]))==u&&E.push(C[ea]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,
d.style[mxConstants.STYLE_STARTSIZE],E)}}));return p},label:xb(),ext:xb(),rectangle:xb(),triangle:xb(),rhombus:xb(),umlLifeline:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(p){var z=Math.max(aa.prototype.corner,
Math.min(p.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),u=Math.max(1.5*aa.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(p.width,z.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(p.height,z.y-p.y)))},!1)]},process:function(d){var p=[jb(d,["size"],function(z){var u=
"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size));return u?new mxPoint(z.x+x,z.y+z.height/4):new mxPoint(z.x+z.width*x,z.y+z.height/4)},function(z,u){z="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*z.width,u.x-z.x)):Math.max(0,Math.min(.5,(u.x-z.x)/z.width));this.state.style.size=z},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},cross:function(d){return[jb(d,
["size"],function(p){var z=Math.min(p.width,p.height);z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Pa.prototype.size)))*z/2;return new mxPoint(p.getCenterX()-z,p.getCenterY()-z)},function(p,z){var u=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-z.y)/u*2,Math.max(0,p.getCenterX()-z.x)/u*2)))})]},note:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,
"size",F.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},note2:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,
p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},manualInput:function(d){var p=[jb(d,["size"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",za.prototype.size)));return new mxPoint(z.x+z.width/4,z.y+3*u/4)},function(z,u){this.state.style.size=Math.round(Math.max(0,Math.min(z.height,4*(u.y-z.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},dataStorage:function(d){return[jb(d,["size"],function(p){var z="0"!=mxUtils.getValue(this.state.style,
"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",z?Na.prototype.fixedSize:Na.prototype.size));return new mxPoint(p.x+p.width-u*(z?1:p.width),p.getCenterY())},function(p,z){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-z.x)):Math.max(0,Math.min(1,(p.x+p.width-z.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[jb(d,["size","position"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,
"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(z.x+x*z.width,z.y+z.height-u)},function(z,u){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(z.height,z.y+z.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),jb(d,["position2"],function(z){var u=
Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(z.x+u*z.width,z.y+z.height)},function(z,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),jb(d,["base"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position))),C=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
"base",ba.prototype.base)));return new mxPoint(z.x+Math.min(z.width,x*z.width+C),z.y+z.height-u)},function(z,u){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(z.width,u.x-z.x-x*z.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},internalStorage:function(d){var p=[jb(d,["dx","dy"],function(z){var u=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
"dx",wa.prototype.dx))),x=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"dy",wa.prototype.dy)));return new mxPoint(z.x+u,z.y+x)},function(z,u){this.state.style.dx=Math.round(Math.max(0,Math.min(z.width,u.x-z.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(z.height,u.y-z.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},module:function(d){return[jb(d,["jettyWidth","jettyHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
"jettyWidth",Ba.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(p.x+z/2,p.y+2*u)},function(p,z){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y))/2)})]},corner:function(d){return[jb(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),
u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Za.prototype.dy)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},tee:function(d){return[jb(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ta.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ta.prototype.dy)));
return new mxPoint(p.x+(p.width+z)/2,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,z.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},singleArrow:mb(1),doubleArrow:mb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[jb(d,["tabWidth","tabHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
"tabWidth",q.prototype.tabWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(z=p.width-z);return new mxPoint(p.x+z,p.y+u)},function(p,z){var u=Math.max(0,Math.min(p.width,z.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=
Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},document:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},tape:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
return new mxPoint(p.getCenterX(),p.y+z*p.height/2)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(z.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(p){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(z),.5*p.height))},function(p,z){this.state.style.isoAngle=Math.max(0,50*(z.y-p.y)/p.height)},!0)]},cylinder2:qb(f.prototype.size),cylinder3:qb(k.prototype.size),
offPageConnector:function(d){return[jb(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(z){var u=Math.max(0,Math.min(z.width/2,z.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));
return new mxPoint(z.x+u,z.y+u)},function(z,u){this.state.style.size=Math.round(100*Math.max(0,Math.min(z.height/2,z.width/2,u.x-z.x)))/100})];d=Graph.createHandle(d,["indent"],function(z){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(z.x+.75*z.width,z.y+u*z.height/200)},function(z,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-z.y)/z.height)))/100});p.push(d);return p},step:zb(ka.prototype.size,!0,null,
!0,ka.prototype.fixedSize),hexagon:zb(da.prototype.size,!0,.5,!0,da.prototype.fixedSize),curlyBracket:zb(ia.prototype.size,!1),display:zb($a.prototype.size,!1),cube:ub(1,m.prototype.size,!1),card:ub(.5,H.prototype.size,!0),loopLimit:ub(.5,R.prototype.size,!0),trapezoid:Cb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Cb(1,I.prototype.size,I.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
function(){var d=Ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=ib[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=ib[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=
function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),wb=new mxPoint(1,0),yb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(yb),Math.sin(yb));var rb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,
p,z,u,x){var C=d.view;u=null!=u&&0<u.length?u[0]:null;var E=d.absolutePoints,ea=E[0];E=E[E.length-1];null!=u&&(u=C.transformControlPoint(d,u));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==E&&null!=z&&(E=new mxPoint(z.getCenterX(),z.getCenterY()));var M=sb.x,sa=sb.y,ma=wb.x,Ya=wb.y,hb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ea){d=function(Ea,Ja,Ia){Ea-=bb.x;var Fa=Ja-bb.y;Ja=(Ya*Ea-ma*Fa)/(M*Ya-sa*ma);Ea=(sa*Ea-M*Fa)/(sa*ma-M*Ya);hb?
(Ia&&(bb=new mxPoint(bb.x+M*Ja,bb.y+sa*Ja),x.push(bb)),bb=new mxPoint(bb.x+ma*Ea,bb.y+Ya*Ea)):(Ia&&(bb=new mxPoint(bb.x+ma*Ea,bb.y+Ya*Ea),x.push(bb)),bb=new mxPoint(bb.x+M*Ja,bb.y+sa*Ja));x.push(bb)};var bb=ea;null==u&&(u=new mxPoint(ea.x+(E.x-ea.x)/2,ea.y+(E.y-ea.y)/2));d(u.x,u.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Bb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var z=
new mxElbowEdgeHandler(d);z.snapToTerminals=!1;return z}return Bb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=function(d,p,z){d=[];var u=Math.tan(mxUtils.toRadians(30)),x=(.5-u)/2;u=Math.min(p,z/(.5+u));p=(p-u)/2;z=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+u*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p+u,z+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+(1-x)*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.75*u));return d};c.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*z);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ba.prototype.getConstraints=function(d,p,z){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-u)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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))];Ga.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=
function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*(z-u)));return d};k.prototype.getConstraints=function(d,p,z){d=[];p=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,
0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};q.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1));return d};wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ka.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;
$a.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(p,z/2),x=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Ba.prototype.getConstraints=function(d,p,z){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ba.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ba.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(z-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(z-.5*d,3.5*d))];z>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));z>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));z>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};R.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;
mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,
.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,
.5),!1)];ya.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)];t.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)];O.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)];ka.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)];la.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)];I.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;J.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;Ta.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Za.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Ra.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)];Ua.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"arrowSize",this.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,z-u));return d};Ha.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ua.prototype.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ua.prototype.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Pa.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(z,p),x=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(z-x)/2;var C=u+x,E=(p-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,E,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z));d.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,C));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(p+x),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,u));return d};Y.prototype.constraints=
null;y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];N.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)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(F){n.escape();F=n.deleteCells(n.getDeletableCells(n.getSelectionCells()),F);null!=F&&n.setSelectionCells(F)}function e(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),L=0;L<F.length;L++)n.cellLabelChanged(F[L],"")}finally{n.getModel().endUpdate()}}}function g(F,L,c,f,k){k.getModel().beginUpdate();try{var t=k.getCellGeometry(F);null!=t&&c&&f&&(c/=f,t=t.clone(),1<c?t.height=t.width/c:t.width=t.height*c,k.getModel().setGeometry(F,
t));k.setCellStyles(mxConstants.STYLE_CLIP_PATH,L,[F]);k.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{k.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,n=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&n.isEnabled()};this.addAction("new...",function(){n.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});var G=new Action("smartFit",function(){n.popupMenuHandler.hideMenu();var F=n.view.scale,
L=n.container.scrollLeft,c=n.container.scrollTop,f=n.view.translate.x,k=n.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-n.view.scale)&&5>Math.abs(L-n.container.scrollLeft)&&5>Math.abs(c-n.container.scrollTop)&&f==n.view.translate.x&&k==n.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter");G.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",G);this.addAction("keyPressEnter",function(){n.isSelectionEmpty()?
m.actions.get("smartFit").funct():n.isEnabled()&&n.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(F,L){try{var c=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));m.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=A;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(m);m.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",
function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(n,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var F=null;
try{F=m.copyXml(),null!=F&&n.removeCells(F,!1)}catch(L){}try{null==F&&mxClipboard.cut(n)}catch(L){m.handleError(L)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(n)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(L){if(null!=L){n.getModel().beginUpdate();
try{m.pasteXml(L,!0)}finally{n.getModel().endUpdate()}}else mxClipboard.paste(n)}),F=!0)}catch(L){}F||mxClipboard.paste(n)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function L(f){if(null!=f){for(var k=!0,t=0;t<f.length&&k;t++)k=k&&n.model.isEdge(f[t]);var q=n.view.translate;t=n.view.scale;var D=q.x,H=q.y;q=null;if(1==f.length&&k){var O=n.getCellGeometry(f[0]);null!=O&&(q=O.getTerminalPoint(!0))}q=null!=q?q:n.getBoundingBoxFromGeometry(f,k);null!=q&&(k=Math.round(n.snap(n.popupMenuHandler.triggerX/
t-D)),t=Math.round(n.snap(n.popupMenuHandler.triggerY/t-H)),n.cellsMoved(f,k-q.x,t-q.y))}}function c(){n.getModel().beginUpdate();try{L(mxClipboard.paste(n))}finally{n.getModel().endUpdate()}}if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){n.getModel().beginUpdate();try{L(m.pasteXml(f,!0))}finally{n.getModel().endUpdate()}}else c()}),F=!0)}catch(f){}F||c()}});this.addAction("swap",function(){var F=
n.getSelectionCells();2==F.length&&n.swapShapes(F[0],F[1])});this.addAction("copySize",function(){var F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.getModel().isVertex(F)&&(F=n.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedSize){n.getModel().beginUpdate();try{for(var F=n.getResizableCells(n.getSelectionCells()),L=0;L<F.length;L++)if(n.getModel().isVertex(F[L])){var c=
n.getCellGeometry(F[L]);null!=c&&(c=c.clone(),c.width=m.copiedSize.width,c.height=m.copiedSize.height,n.getModel().setGeometry(F[L],c))}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=n.getSelectionCell()||n.getModel().getRoot();n.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F)try{n.isHtmlLabel(F)?
m.writeHtmlToClipboard(n.getLabel(F),mxUtils.bind(this,function(L){m.handleError(L)})):m.writeTextToClipboard(n.getLabel(F),mxUtils.bind(this,function(L){m.handleError(L)}))}catch(L){m.handleError(L)}});this.addAction("pasteData",function(F,L){function c(t,q){var D=f.getValue(t);q=t.cloneValue(q);q.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||q.setAttribute("placeholders",D.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||q.setAttribute("label",n.convertValueToString(t));
f.setValue(t,q)}F=null!=L?L:F;var f=n.getModel();if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedValue){f.beginUpdate();try{var k=n.getEditableCells(n.getSelectionCells());if(0==k.length)c(f.getRoot(),m.copiedValue);else for(L=0;L<k.length;L++)c(k[L],m.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,L){F=null!=L?L:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,
null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{n.setSelectionCells(n.duplicateCells()),n.scrollCellToVisible(n.getSelectionCell())}catch(F){m.handleError(F)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",function(){var F=m.getSelectionState();if(null!=F.mergeCell){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",F.rowspan,[F.mergeCell]),
n.setCellStyles("colspan",F.colspan,[F.mergeCell])}finally{n.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var F=m.getSelectionState();if(0<F.cells.length){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",null,F.cells),n.setCellStyles("colspan",null,F.cells)}finally{n.getModel().endUpdate()}}}));G=new Action("turn",function(F,L){F=null!=L?L:F;n.turnShapes(n.getResizableCells(n.getSelectionCells()),null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?
null:Editor.ctrlKey+"+R");G.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",G);this.put("selectConnections",new Action("selectEdges",function(F){F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.addSelectionCells(n.getEdges(F))}));this.addAction("selectVertices",function(){n.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){n.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",
function(){n.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){n.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),L=n.getCurrentCellStyle(n.getSelectionCell()),c=1==mxUtils.getValue(L,mxConstants.STYLE_EDITABLE,1)?0:1;n.setCellStyles(mxConstants.STYLE_MOVABLE,c,F);n.setCellStyles(mxConstants.STYLE_RESIZABLE,c,F);n.setCellStyles(mxConstants.STYLE_ROTATABLE,
c,F);n.setCellStyles(mxConstants.STYLE_DELETABLE,c,F);n.setCellStyles(mxConstants.STYLE_EDITABLE,c,F);n.setCellStyles("locked",1==c?0:1,F);n.setCellStyles("connectable",c,F)}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){var F=n.getSelectionCell();n.model.isEdge(F)&&(F=n.model.getTerminal(F,!0));n.model.isVertex(F)&&Graph.exploreFromCell(m.editor.graph,F)});this.addAction("home",function(){n.home()},null,null,"Shift+Home");this.addAction("exitGroup",
function(){n.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){n.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){n.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){n.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){n.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){n.orderCells(!0)},null,null,Editor.ctrlKey+
"+Shift+B");this.addAction("bringForward",function(F){n.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(F){n.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(n.isEnabled()){var F=mxUtils.sortCells(n.getSelectionCells(),!0);1!=F.length||n.isTable(F[0])||n.isTableRow(F[0])?(F=n.getCellsForGroup(F),1<F.length&&n.setSelectionCell(n.groupCells(null,0,F))):n.setCellStyles("container","1")}},null,
null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(n.isEnabled()){var F=n.getEditableCells(n.getSelectionCells());n.model.beginUpdate();try{var L=n.ungroupCells();if(null!=F)for(var c=0;c<F.length;c++)n.model.contains(F[c])&&(0==n.model.getChildCount(F[c])&&n.model.isVertex(F[c])&&n.setCellStyles("container","0",[F[c]]),L.push(F[c]))}finally{n.model.endUpdate()}0<L.length&&n.setSelectionCells(L)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(n.isEnabled()){var F=
n.getSelectionCells();if(null!=F){for(var L=[],c=0;c<F.length;c++)n.isTableRow(F[c])||n.isTableCell(F[c])||L.push(F[c]);n.removeCellsFromParent(L);0<L.length&&n.scrollCellToVisible(L[0])}}});this.addAction("edit",function(){n.isEnabled()&&n.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=n.getSelectionCell()||n.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&
null!=F&&n.isCellEditable(F)){var L="";if(mxUtils.isNode(F.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=F.value.getAttribute("tooltip"));null!=c&&(L=c)}L=new TextareaDialog(m,mxResources.get("editTooltip")+":",L,function(f){n.setTooltipForCell(F,f)});m.showDialog(L.container,320,200,!0,!0);L.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",
function(){var F=n.getLinkForCell(n.getSelectionCell());null!=F&&n.openLink(F)});this.addAction("editLink...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var L=n.getLinkForCell(F,!0)||"";m.showLinkDialog(L,mxResources.get("ok"),function(c,f,k){n.getModel().beginUpdate();try{n.setLinkForCell(F,0<c.length?c:null),n.setAttributeForCell(F,"linkTarget",k)}finally{n.getModel().endUpdate()}},!0,n.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",
new Action("image...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&(n.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,L,c){F=mxUtils.trim(F);if(0<F.length){var f=null,k=n.getLinkTitle(F);null!=L&&0<L.length&&(f=L[0].iconUrl,k=L[0].name||
L[0].type,k=k.charAt(0).toUpperCase()+k.substring(1),30<k.length&&(k=k.substring(0,30)+"..."));L=new mxCell(k,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));L.vertex=!0;f=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry([L],!0));L.geometry.x=f.x;L.geometry.y=f.y;n.setAttributeForCell(L,"linkTarget",c);n.setLinkForCell(L,F);n.cellSizeUpdated(L,!0);n.getModel().beginUpdate();
try{L=n.addCell(L),n.fireEvent(new mxEventObject("cellsInserted","cells",[L]))}finally{n.getModel().endUpdate()}n.setSelectionCell(L);n.scrollCellToVisible(n.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(n.isEnabled())if(n.cellEditor.isContentEditing()){var F=n.getSelectedElement(),L=n.getParentByName(F,"A",n.cellEditor.textarea),c="";if(null==L&&null!=F&&null!=F.getElementsByTagName)for(var f=F.getElementsByTagName("a"),k=0;k<f.length&&
null==L;k++)f[k].textContent==F.textContent&&(L=f[k]);null!=L&&"A"==L.nodeName&&(c=L.getAttribute("href")||"",n.selectNode(L));var t=n.cellEditor.saveSelection();m.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(q){n.cellEditor.restoreSelection(t);null!=q&&n.insertLink(q)}))}else n.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=n.getSelectionCells();if(null!=F){n.getModel().beginUpdate();try{for(var L=
0;L<F.length;L++){var c=F[L];n.getModel().isVertex(c)&&(0<n.getModel().getChildCount(c)?n.updateGroupBounds([c],0,!0):n.updateCellSize(c))}}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){n.snapCellsToGrid(n.getSelectionCells(),n.gridSize)});this.addAction("formattedText",function(){n.stopEditing();var F=n.getCommonStyle(n.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";n.getModel().beginUpdate();try{for(var L=n.getEditableCells(n.getSelectionCells()),
c=0;c<L.length;c++)if(state=n.getView().getState(L[c]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==F)n.removeTextStyleForCell(state.cell),n.setCellStyles("html",F,[L[c]]);else if("0"==f&&"1"==F){var k=mxUtils.htmlEntities(n.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"<br/>"));n.cellLabelChanged(state.cell,Graph.sanitizeHtml(k));n.setCellStyles("html",F,[L[c]])}}m.fireEvent(new mxEventObject("styleChanged",
"keys",["html"],"values",[null!=F?F:"0"],"cells",L))}finally{n.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=n.getView().getState(n.getSelectionCell()),L="wrap";n.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(L=null);n.setCellStyles(mxConstants.STYLE_WHITE_SPACE,L)});this.addAction("rotation",function(){var F="0",L=n.getView().getState(n.getSelectionCell());null!=L&&(F=L.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),
function(c){null!=c&&0<c.length&&n.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(F.container,375,80,!0,!0);F.init()});this.addAction("resetView",function(){n.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){n.isFastZoomEnabled()?n.lazyZoom(!0,!0,m.buttonZoomDelay):n.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(F){n.isFastZoomEnabled()?
n.lazyZoom(!1,!0,m.buttonZoomDelay):n.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){n.pageVisible&&n.isSelectionEmpty()?n.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(2):this.get("pageView").funct()}),
null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&n.zoomTo(L/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}),
null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(L){L=parseInt(L);!isNaN(L)&&0<L&&(L=new ChangePageSetup(m,null,null,null,L/100),L.ignoreColor=!0,L.ignoreImage=!0,n.model.execute(L))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));G=null;G=this.addAction("grid",function(){n.setGridEnabled(!n.isGridEnabled());
n.defaultGridEnabled=n.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.isGridEnabled()});G.setEnabled(!1);G=this.addAction("guides",function(){n.graphHandler.guidesEnabled=!n.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.graphHandler.guidesEnabled});G.setEnabled(!1);G=this.addAction("animations",
function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.enableAnimations});G=this.addAction("tooltips",function(){n.tooltipHandler.setEnabled(!n.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.tooltipHandler.isEnabled()});G=this.addAction("collapseExpand",function(){var F=
new ChangePageSetup(m);F.ignoreColor=!0;F.ignoreImage=!0;F.foldingEnabled=!n.foldingEnabled;n.model.execute(F)});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.foldingEnabled});G.isEnabled=A;G=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!n.pageVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return n.pageVisible});G=this.addAction("connectionArrows",function(){n.connectionArrowsEnabled=!n.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},
null,null,"Alt+Shift+A");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionArrowsEnabled});G=this.addAction("connectionPoints",function(){n.setConnectable(!n.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isEnabled()});G=this.addAction("copyConnect",function(){n.connectionHandler.setCreateTarget(!n.connectionHandler.isCreateTarget());
m.fireEvent(new mxEventObject("copyConnectChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isCreateTarget()});G.isEnabled=A;G=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});G.setToggleAction(!0);G.setSelectedCallback(function(){return m.editor.autosave});G.isEnabled=A;G.visible=!1;this.addAction("help",function(){var F="";mxResources.isLanguageSupported(mxClient.language)&&(F="_"+mxClient.language);n.openLink(RESOURCES_PATH+
"/help"+F+".html")});var Q=!1;G=new Action("about",function(){Q||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){Q=!1}),Q=!0)});G.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",G);G=mxUtils.bind(this,function(F,L,c,f){return this.addAction(F,function(){if(null!=c&&n.cellEditor.isContentEditing())c();else{n.stopEditing(!1);n.getModel().beginUpdate();try{var k=n.getEditableCells(n.getSelectionCells());n.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
L,k);(L&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?n.updateLabelElements(k,function(q){q.style.fontWeight=null;"B"==q.nodeName&&n.replaceElement(q)}):(L&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?n.updateLabelElements(k,function(q){q.style.fontStyle=null;"I"==q.nodeName&&n.replaceElement(q)}):(L&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.updateLabelElements(k,function(q){q.style.textDecoration=null;"U"==q.nodeName&&n.replaceElement(q)});for(var t=0;t<k.length;t++)0==n.model.getChildCount(k[t])&&
n.autoSizeCell(k[t],!1)}finally{n.getModel().endUpdate()}}},null,null,f)});G("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");G("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");G("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",
"default",n.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",n.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
"backcolor",null,"default",n.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("removeFormat",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&!n.isEditing()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),L=0;L<F.length;L++)n.removeTextStyleForCell(F[L],!0)}finally{n.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,null),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dashed",function(){n.getModel().beginUpdate();
try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dotted",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("sharp",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});
this.addAction("rounded",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!n.isSelectionEmpty()&&n.isEnabled()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),L=n.getCurrentCellStyle(F[0]),
c="1"==mxUtils.getValue(L,mxConstants.STYLE_ROUNDED,"0")?"0":"1";n.setCellStyles(mxConstants.STYLE_ROUNDED,c);n.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}});this.addAction("curved",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,
"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=n.view.getState(n.getSelectionCell()),L="1";null!=F&&null!=n.getFoldingImage(F)&&(L="0");n.setCellStyles("collapsible",L);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[L],"cells",n.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var F=n.getEditableCells(n.getSelectionCells());if(null!=F&&0<F.length){var L=n.getModel();L=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",L.getStyle(F[0])||"",function(c){null!=c&&n.setCellStyle(mxUtils.trim(c),F)},null,null,400,220);this.editorUi.showDialog(L.container,420,300,!0,!0);L.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){n.isEnabled()&&!n.isSelectionEmpty()&&m.setDefaultStyle(n.getSelectionCell())},
null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){n.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=n.getSelectionCell();if(null!=F&&n.getModel().isEdge(F)){var L=v.graph.selectionCellsHandler.getHandler(F);if(L instanceof mxEdgeHandler){var c=n.view.translate,f=n.view.scale,k=c.x;c=c.y;F=n.getModel().getParent(F);for(var t=n.getCellGeometry(F);n.getModel().isVertex(F)&&null!=t;)k+=t.x,c+=t.y,F=
n.getModel().getParent(F),t=n.getCellGeometry(F);k=Math.round(n.snap(n.popupMenuHandler.triggerX/f-k));f=Math.round(n.snap(n.popupMenuHandler.triggerY/f-c));L.addPointAt(L.state,k,f)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var L=0;L<F.length;L++){var c=
F[L];n.getModel().isEdge(c)&&(n.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),n.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{n.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var L=0;L<F.length;L++){var c=F[L];if(n.getModel().isEdge(c)){var f=n.getCellGeometry(c);
null!=f&&(f=f.clone(),f.points=null,f.x=0,f.y=0,f.offset=null,n.getModel().setGeometry(c,f))}}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+R");G=this.addAction("subscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");G=this.addAction("superscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");G=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,F-1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");G=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,
mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",L=n.getView().getState(n.getSelectionCell()),c="",f=null;null!=L&&(c=L.style[mxConstants.STYLE_IMAGE]||c,f=L.style[mxConstants.STYLE_CLIP_PATH]||f);var k=n.cellEditor.saveSelection();
m.showImageDialog(F,c,function(t,q,D,H,O,J){if(n.cellEditor.isContentEditing())n.cellEditor.restoreSelection(k),n.insertImage(t,q,D);else{var I=n.getSelectionCells();if(null!=t&&(0<t.length||0<I.length)){var Z=null;n.getModel().beginUpdate();try{if(0==I.length){I=[n.insertVertex(n.getDefaultParent(),null,"",0,0,q,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ia=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(I,!0));I[0].geometry.x=ia.x;I[0].geometry.y=
ia.y;null!=H&&g(I[0],H,O,J,n);Z=I;n.fireEvent(new mxEventObject("cellsInserted","cells",Z))}n.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,I);var ha=n.getCurrentCellStyle(I[0]);"image"!=ha[mxConstants.STYLE_SHAPE]&&"label"!=ha[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_SHAPE,"image",I):0==t.length&&n.setCellStyles(mxConstants.STYLE_SHAPE,null,I);null==H&&n.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,I);if(null!=q&&null!=D)for(t=0;t<I.length;t++){var ca=I[t];if("0"!=n.getCurrentCellStyle(ca).expand){var na=
n.getModel().getGeometry(ca);null!=na&&(na=na.clone(),na.width=q,na.height=D,n.getModel().setGeometry(ca,na))}null!=H&&g(ca,H,O,J,n)}}finally{n.getModel().endUpdate()}null!=Z&&(n.setSelectionCells(Z),n.scrollCellToVisible(Z[0]))}}},n.cellEditor.isContentEditing(),!n.cellEditor.isContentEditing(),!0,f)}}).isEnabled=A;this.addAction("crop...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F){var L=n.getCurrentCellStyle(F),c=L[mxConstants.STYLE_IMAGE],
f=L[mxConstants.STYLE_SHAPE];c&&"image"==f&&(L=new CropImageDialog(m,c,L[mxConstants.STYLE_CLIP_PATH],function(k,t,q){g(F,k,t,q,n)}),m.showDialog(L.container,300,390,!0,!0))}}).isEnabled=A;G=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",
function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));G=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,
null,Editor.ctrlKey+"+Shift+P");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));G=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),
this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F&&null!=F.geometry){var L=
new ConnectionPointsDialog(m,F);m.showDialog(L.container,350,450,!0,!1,function(){L.destroy()});L.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){var n=b;"..."==n.substring(n.length-3)&&(n=n.substring(0,n.length-3));return this.put(n,new Action(b,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,g,m,v){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=v;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};Action.prototype.createFunction=function(b){return b};
Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};
DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e({message:mxResources.get("busy")});else{var g=!0,m=window.setTimeout(mxUtils.bind(this,function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,e)})})}),this.ui.timeout),v=mxUtils.bind(this,function(A){g&&(window.clearTimeout(m),null!=e&&e(A))}),n=mxUtils.bind(this,function(){return!g});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
function(A){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,A))}),v,n):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),v,n)}};
DrawioFile.prototype.updateFile=function(b,e,g,m,v){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,
m,v):this.reloadFile(b,e))}catch(A){null!=e&&e(A)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,n)],Q=this.ignorePatches(G);if(Q)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",Q),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,
this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(A),G[0]),c=this.ui.getHashValueForPages(L,{}),f=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",n,"patched",L,"patches",G,"changes",F,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(g,G,null,null,"mergeFile",
c,f,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var k=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?F:null,null,v);null==k||mxUtils.isEmptyObject(k)||G.push(k)}this.patch(G,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(D);try{var t=this.getCurrentUser(),q=null!=t?
t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),q,D)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(D){null!=g&&g(D)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var v=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,v,!0);g.appendChild(v)}return mxUtils.getPrettyXml(g)};
DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,g,m,v,n,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var Q=this.getCurrentUser(),F=null!=Q?Q.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(e).length,f=null;if(null!=e&&1E3>c){b=[];for(g=0;g<e.length;g++)b.push(this.ui.anonymizePatch(e[g]));f=JSON.stringify(b);f=null!=f&&1E3>
f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(k){try{var t=null!=f?"report":"error",q=this.ui.getHashValueForPages(k.getShadowPages()),D="unknown",H="unknown",O="unknown";try{var J=null!=k.initialData&&0<k.initialData.length?mxUtils.parseXml(k.initialData).documentElement:null;null!=J&&(null!=J.getAttribute("version")&&(D=J.getAttribute("version")),null!=J.getAttribute("agent")&&(H=J.getAttribute("agent")),null!=J.getAttribute("type")&&(O=J.getAttribute("type")))}catch(I){}EditorUi.logError("Checksum "+
t+" in "+v,null,this.getMode()+"."+L,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=q?"-latest_"+q:"")+"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId())+("-latestVersion_"+D)+("-latestAgent_"+H)+("-latestType_"+O));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:v,label:"user_"+
F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),function(){})}catch(k){}};
DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",Q=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),L=F.lastIndexOf(".");A="xml";0<L&&(A=F.substring(L));var c=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+A+")\nUser="+G+Q+"\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!=e?"\n\n"+e:
"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+v+"\n\nData:\n"+n,m)}catch(f){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,v=m.getSelectionCells(),n=m.getViewState(),A=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(G){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[n],"latestFile",G);null!=G?(this.ui.replaceFileData(G.getData(),
[g]),this.ui.restoreViewState(A,n,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var Q=this.ui.getCurrentFile();null!=Q&&(Q.stats=this.stats,Q.patch([g]),Q.fileChanged());this.ui.restoreViewState(A,n,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};
DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,n=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var Q=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,L=G.mathEnabled,c=G.cellRenderer.redraw;G.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};G.model.beginUpdate();
try{if(g){for(var f=this.ui.pages.slice(),k=this.ui.currentPage,t=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),q=0;q<t.length;q++){var D=mxUtils.indexOf(this.ui.pages,t[q]);0>D?this.ui.insertPage(t[q],Math.min(q,this.ui.pages.length)):this.ui.movePage(D,q)}for(q=0;q<f.length;q++)0>mxUtils.indexOf(t,f[q])&&this.ui.removePage(f[q]);0<=mxUtils.indexOf(this.ui.pages,k)&&this.ui.selectPage(k,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,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);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=c;this.changeListenerEnabled=Q;g||(v.history=n,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?
G.view.revalidate():G.view.validate(),G.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};
DrawioFile.prototype.save=function(b,e,g,m,v,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",v,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(A){if(null!=g)g(A);else throw A;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,e,g){};DrawioFile.prototype.saveFile=function(b,e,g,m){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};
DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,g){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,g){};
DrawioFile.prototype.share=function(){null!=this.ui.drive?this.ui.confirm(mxResources.get("saveItToGoogleDriveToCollaborate",[this.getTitle()]),mxUtils.bind(this,function(){this.ui.pickFolder(App.MODE_GOOGLE,mxUtils.bind(this,function(b){var e=this.ui.editor.graph,g=e.getSelectionCells(),m=e.getViewState(),v=this.ui.currentPage;this.ui.createFile(this.getTitle(),this.ui.getFileData(null,null,null,null,null,null,null,null,this),null,App.MODE_GOOGLE,null,!0,b,null,null,mxUtils.bind(this,function(){this.ui.restoreViewState(v,
m,g);this.ui.actions.get("share").funct()}))}))}),null,mxResources.get("saveToGoogleDrive",null,"Save to Google Drive"),mxResources.get("cancel")):this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};
DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};DrawioFile.prototype.removeExtFonts=function(b){for(var e=0;null!=b&&e<b.length;e++){var g=b[e];null!=g.id&&0==g.id.indexOf("extFont_")&&g.parentNode.removeChild(g)}};
DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();null!=b&&(this.ui.setFileData(b),this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages)));this.installListeners();this.isSyncSupported()&&this.startSync();EditorUi.debug("DrawioFile.open",[this])};DrawioFile.prototype.isPolling=function(){return!1};DrawioFile.prototype.getPollingInterval=function(){return 1E4};DrawioFile.prototype.isSyncSupported=function(){return!1};
DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages&&null!=this.ui.pages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(g){b(g)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,e){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};DrawioFile.prototype.getDescriptor=function(){return null};
DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};DrawioFile.prototype.getDescriptorChecksum=function(b){return null};
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var e=this.isRevisionHistorySupported()&&b!=mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+e+'title="'+b+'">'+b+(this.isLocked()?' <img class="geToolbarButton" data-action="properties" style="margin-left:4px;flex-shrink:0;" src="'+
Editor.lockedImage+'"/>':"")+"</div>")}};
DrawioFile.prototype.saveDraft=function(b){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var e={type:"draft",created:this.created,modified:(new Date).getTime(),data:null!=b?b:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(e));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[e])}catch(g){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
DrawioFile.prototype.addUnsavedStatus=function(b){this.inConflictState||null==this.ui.statusContainer||this.ui.getCurrentFile()!=this||(b instanceof Error&&null!=b.message&&""!=b.message?this.ui.updateStatus(mxUtils.bind(this,function(){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+
")</div>")})):(this.ui.updateStatus(mxUtils.bind(this,function(){var e=this.getErrorMessage(b);if(null==e&&null!=this.lastSaved){var g=this.ui.timeSince(new Date(this.lastSaved));null!=g&&(e=mxResources.get("lastSaved",[g]))}null!=e&&60<e.length&&(e=e.substring(0,60)+"...");e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":"");g='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"';this.ui.editor.setStatus("<div "+
g+' title="'+e+'" class="geStatusAlert">'+e+"</div>")})),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=
null;this.saveDraft()}),EditorUi.draftSaveDelay||0))))};DrawioFile.prototype.addConflictStatus=function(b,e){this.ui.updateStatus(mxUtils.bind(this,function(){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),e)}));this.ui.spinner.stop();this.clearAutosave()};
DrawioFile.prototype.setConflictStatus=function(b,e){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=e?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.drawio.com/doc/faq/synchronize" src="'+Editor.helpImage+'" style="margin-left:2px;cursor:help;"/></div>',e)};
DrawioFile.prototype.showRefreshDialog=function(b,e,g){null==g&&(g=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(g,mxUtils.bind(this,function(){this.showRefreshDialog(b,e)})),this.ui.showError(mxResources.get("warning")+" ("+g+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(mxUtils.bind(this,
function(){null!=b&&b();this.ui.alert(mxResources.get("copyCreated"))}),e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&this.reloadFile(mxUtils.bind(this,function(){this.ui.spinner.stop();null!=b&&b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
DrawioFile.prototype.showCopyDialog=function(b,e,g){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),g,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var g=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),m=mxResources.get("redirectToNewApp");null!=e&&(m+=" ("+e+")");e=mxUtils.bind(this,function(){var v=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==g?window.location.reload():window.location.href=
g});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()});null!=b?this.isModified()?this.ui.confirm(m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(m,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
e)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified(),"remoteFileChanged",null==this.sync?"n/a":this.sync.remoteFileChanged),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")")})):
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var g=this.getErrorMessage(b);null!=g&&60<g.length&&(g=g.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=g?" ("+mxUtils.htmlEntities(g)+")":"")+"</div>")}))))};
DrawioFile.prototype.handleConflictError=function(b,e){var g=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),m=mxUtils.bind(this,function(A){this.handleFileError(A,!0)}),v=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,g,m,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),n=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,g,m,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),m)});"none"==DrawioFile.SYNC?this.showCopyDialog(g,m,v):this.invalidChecksum&&e?this.showRefreshDialog(g,m,this.getErrorMessage(b)):e?this.showConflictDialog(v,n):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(g,m)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT?e=mxResources.get("timeout"):"0"==e&&(e=mxResources.get("noResponse"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.compressionChanged=function(b){var e=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=e)for(var g=0;g<e.length;g++){var m=e[g].node;if(null!=m&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=e[g].getId())){var v=m.getElementsByTagName("mxGraphModel");v=0<v.length?v[0]:null;var n=Graph.decompress(mxUtils.getNodeValue(m));b?0==n.length&&null!=v&&(EditorUi.removeChildNodes(m),mxUtils.setTextContent(m,Graph.compressNode(v)),EditorUi.debug("DrawioFile.compressionChanged",
[this],"Page "+g+" compressed")):0<n.length&&null==v&&(EditorUi.removeChildNodes(m),m.appendChild(mxUtils.parseXml(n).documentElement),EditorUi.debug("DrawioFile.compressionChanged",[this],"Page "+g+" decompressed"))}}};DrawioFile.prototype.fileReplaced=function(b){this.inConflictState=this.invalidChecksum=!1;null!=b&&this.patch(b);null!=this.sync&&this.sync.initRealtime();EditorUi.debug("DrawioFile.fileReplaced",[this],"patches",b)};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"...")})),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),
this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){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(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,g,m,v,n,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(n,e,g,m,v,A)}catch(F){this.invalidChecksum=
this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),Q=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),Q,F)}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};
DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var A=this.isAutosaveRevision();
A&&(this.lastAutosaveRevision=(new Date).getTime());this.save(A,mxUtils.bind(this,function(G){this.autosaveCompleted();null!=g&&g(G)}),mxUtils.bind(this,function(G){null!=m&&m(G)}))}else this.isModified()||this.ui.clearStatus(),null!=g&&g(null)}catch(G){null!=m&&m(G)}}),v);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};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 b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(e){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var g=b.lastIndexOf(".");b=0<g?b.substring(g):"";g=e.lastIndexOf(".");return b===(0<g?e.substring(g):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,v,n,A){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=n;this.editable=A};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,v){this.saveAs(this.title,e,g,m,v)};LocalFile.prototype.saveAs=function(b,e,g,m,v){this.saveFile(b,!1,e,g,null,m,v)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
LocalFile.prototype.saveFile=function(b,e,g,m,v,n,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var Q=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),L=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
!0;var f=mxUtils.bind(this,function(t){this.savingFile=!1;null!=m&&m({error:t})});this.saveDraft(Q);this.fileHandle.createWritable().then(mxUtils.bind(this,function(t){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);A||this.desc.lastModified==q.lastModified?t.write(G?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){t.close().then(mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(D){try{var H=this.desc;this.savingFile=!1;this.desc=D;this.fileSaved(Q,H,F,f);this.removeDraft()}catch(O){f(O)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;f(q)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,G?"image/png":"text/xml",G);else if(c.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){L(c)}),m,this.ui.getCurrentFile()!=this?Q:null,e.scale,e.border)):L(Q)};
LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
Editor.thinUndoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE0LjQgMzcuNXYtMi4yNWgxMy45cTMuNiAwIDYuMjI1LTIuMzc1UTM3LjE1IDMwLjUgMzcuMTUgMjYuOXEwLTMuNTUtMi42MjUtNS45LTIuNjI1LTIuMzUtNi4yMjUtMi4zNUgxMi45NUwxOSAyNC43bC0xLjYgMS42LTguOC04LjggOC44LTguOCAxLjYgMS42LTYuMDUgNi4wNWgxNS4zcTQuNTUgMCA3Ljg1IDMuMDV0My4zIDcuNXEwIDQuNS0zLjMgNy41NXQtNy44NSAzLjA1WiIvPjwvc3ZnPg==";Editor.thinRedoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE5Ljc1IDM3LjVxLTQuNTUgMC03Ljg1LTMuMDVUOC42IDI2LjlxMC00LjQ1IDMuMy03LjV0Ny44NS0zLjA1aDE1LjNMMjkgMTAuM2wxLjYtMS42IDguOCA4LjgtOC44IDguOC0xLjYtMS42IDYuMDUtNi4wNUgxOS43cS0zLjYgMC02LjIyNSAyLjM1LTIuNjI1IDIuMzUtMi42MjUgNS45IDAgMy42IDIuNjI1IDUuOTc1UTE2LjEgMzUuMjUgMTkuNyAzNS4yNWgxMy45djIuMjVaIi8+PC9zdmc+";
Editor.thinDoubleArrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTEzIDM1LjMtMS42LTEuNiA5Ljc1LTkuNzUtOS43NS05LjcgMS42LTEuNiAxMS4zNSAxMS4zWm0xMi4zIDAtMS42LTEuNiA5Ljc1LTkuNzUtOS43NS05LjcgMS42LTEuNiAxMS4zIDExLjNaIi8+PC9zdmc+";Editor.thinNoteImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgOTYgOTYwIDk2MCIgd2lkdGg9IjQ4Ij48cGF0aCBkPSJNMjM3LjY5NCA5NTUuOTk5cS0yMy41MjkgMC00MC42MTEtMTcuMDgyLTE3LjA4Mi0xNy4wODItMTcuMDgyLTQwLjYxMVYyNTMuNjk0cTAtMjMuNTI5IDE3LjA4Mi00MC42MTEgMTcuMDgyLTE3LjA4MiA0MC42MTEtMTcuMDgyaDM0Ny41MzdsMTk0Ljc2OCAxOTQuNzY4djUwNy41MzdxMCAyMy41MjktMTcuMDgyIDQwLjYxMS0xNy4wODIgMTcuMDgyLTQwLjYxMSAxNy4wODJIMjM3LjY5NFpNNTYyLjUzOSA0MTEuMjNWMjQxLjM4NUgyMzcuNjk0cS00LjYxNiAwLTguNDYzIDMuODQ2LTMuODQ2IDMuODQ3LTMuODQ2IDguNDYzdjY0NC42MTJxMCA0LjYxNiAzLjg0NiA4LjQ2MyAzLjg0NyAzLjg0NiA4LjQ2MyAzLjg0Nmg0ODQuNjEycTQuNjE2IDAgOC40NjMtMy44NDYgMy44NDYtMy44NDcgMy44NDYtOC40NjNWNDExLjIzSDU2Mi41MzlaTTIyNS4zODUgMjQxLjM4NVY0MTEuMjMgMjQxLjM4NXY2NjkuMjNWMjQxLjM4NVoiLz48L3N2Zz4=";
Editor.thinTableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTcgNDFWN2gzNHYzNFptMi4yNS0yMy42aDI5LjVWOS4yNUg5LjI1Wm0xMC42IDEwLjdoOC4zdi04LjRoLTguM1ptMCAxMC42NWg4LjN2LTguNGgtOC4zWk05LjI1IDI4LjFoOC4zNXYtOC40SDkuMjVabTIxLjE1IDBoOC4zNXYtOC40SDMwLjRaTTkuMjUgMzguNzVoOC4zNXYtOC40SDkuMjVabTIxLjE1IDBoOC4zNXYtOC40SDMwLjRaIi8+PC9zdmc+";Editor.thinAddCircleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTIzIDMzLjVoMi4yNXYtOC4yaDguMjVWMjNoLTguMjV2LTguNUgyM1YyM2gtOC41djIuM0gyM1ptMSA5LjVxLTMuOTUgMC03LjQtMS41dC02LjAyNS00LjA3NVE4IDM0Ljg1IDYuNSAzMS40VDUgMjRxMC0zLjk1IDEuNS03LjQyNVE4IDEzLjEgMTAuNTc1IDEwLjU1IDEzLjE1IDggMTYuNiA2LjVUMjQgNXEzLjk1IDAgNy40MjUgMS41UTM0LjkgOCAzNy40NSAxMC41NSA0MCAxMy4xIDQxLjUgMTYuNTc1IDQzIDIwLjA1IDQzIDI0cTAgMy45NS0xLjUgNy40dC00LjA1IDYuMDI1UTM0LjkgNDAgMzEuNDI1IDQxLjUgMjcuOTUgNDMgMjQgNDNabS4wNS0yLjI1cTYuOTUgMCAxMS44MjUtNC45IDQuODc1LTQuOSA0Ljg3NS0xMS45IDAtNi45NS00Ljg3NS0xMS44MjVRMzEgNy4yNSAyNCA3LjI1cS02Ljk1IDAtMTEuODUgNC44NzVRNy4yNSAxNyA3LjI1IDI0cTAgNi45NSA0LjkgMTEuODUgNC45IDQuOSAxMS45IDQuOVpNMjQgMjRaIi8+PC9zdmc+";
Editor.thinArrowLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4LjA1IDM1LjMgMTYuNyAyMy45NSAyOC4wNSAxMi42bDEuNiAxLjY1LTkuNyA5LjcgOS43IDkuNzVaIi8+PC9zdmc+";Editor.thinArrowRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE4Ljc1IDM1LjMtMS42LTEuNiA5LjctOS43NS05LjctOS43IDEuNi0xLjY1TDMwLjEgMjMuOTVaIi8+PC9zdmc+";Editor.thinVerticalDotsImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI0LjA1IDQxLjdxLTEuMjUgMC0yLjEyNS0uODc1dC0uODc1LTIuMDc1cTAtMS4yLjg3NS0yLjEuODc1LS45IDIuMDc1LS45IDEuMjUgMCAyLjEuOS44NS45Ljg1IDIuMSAwIDEuMi0uODUgMi4wNzUtLjg1Ljg3NS0yLjA1Ljg3NVptMC0xNC43NXEtMS4yNSAwLTIuMTI1LS44NzVUMjEuMDUgMjRxMC0xLjI1Ljg3NS0yLjEuODc1LS44NSAyLjA3NS0uODUgMS4yNSAwIDIuMS44NS44NS44NS44NSAyLjA1IDAgMS4yNS0uODUgMi4xMjV0LTIuMDUuODc1Wm0wLTE0LjdxLTEuMjUgMC0yLjEyNS0uODc1VDIxLjA1IDkuMjVxMC0xLjI1Ljg3NS0yLjEyNVQyNCA2LjI1cTEuMjUgMCAyLjEuODc1Ljg1Ljg3NS44NSAyLjEyNXQtLjg1IDIuMTI1cS0uODUuODc1LTIuMDUuODc1WiIvPjwvc3ZnPg==";
Editor.thinDeleteImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEzLjkgNDFxLTEuMTUgMC0yLS44NS0uODUtLjg1LS44NS0yLjA1VjEwLjlIOVY4LjY1aDguNTV2LTEuNGgxMi45djEuNEgzOXYyLjI1aC0yLjA1djI3LjJxMCAxLjItLjg1IDIuMDUtLjg1Ljg1LTIgLjg1Wm0yMC44LTMwLjFIMTMuM3YyNy4ycTAgLjMuMTc1LjQ3NXQuNDI1LjE3NWgyMC4ycS4yIDAgLjQtLjJ0LjItLjQ1Wk0xOS4wNSAzNC41aDIuM1YxNS4xaC0yLjNabTcuNiAwaDIuM1YxNS4xaC0yLjNaTTEzLjMgMTAuOXYyNy44NVYzOC4xWiIvPjwvc3ZnPg==";Editor.thinLightImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI0IDMwLjc1cTIuOCAwIDQuNzc1LTEuOTc1UTMwLjc1IDI2LjggMzAuNzUgMjRxMC0yLjgtMS45NzUtNC43NzVRMjYuOCAxNy4yNSAyNCAxNy4yNXEtMi44IDAtNC43NzUgMS45NzVRMTcuMjUgMjEuMiAxNy4yNSAyNHEwIDIuOCAxLjk3NSA0Ljc3NVEyMS4yIDMwLjc1IDI0IDMwLjc1Wk0yNCAzM3EtMy43NSAwLTYuMzc1LTIuNjI1VDE1IDI0cTAtMy43NSAyLjYyNS02LjM3NVQyNCAxNXEzLjc1IDAgNi4zNzUgMi42MjVUMzMgMjRxMCAzLjc1LTIuNjI1IDYuMzc1VDI0IDMzWk0zLjY1IDI1LjE1cS0uNSAwLS44MjUtLjMyNVEyLjUgMjQuNSAyLjUgMjRxMC0uNS4zMjUtLjgyNS4zMjUtLjMyNS44MjUtLjMyNWg1LjJxLjUgMCAuODI1LjMyNVExMCAyMy41IDEwIDI0cTAgLjUtLjMyNS44MjUtLjMyNS4zMjUtLjgyNS4zMjVabTM1LjUgMHEtLjUgMC0uODI1LS4zMjVRMzggMjQuNSAzOCAyNHEwLS41LjMyNS0uODI1LjMyNS0uMzI1LjgyNS0uMzI1aDUuMnEuNSAwIC44MjUuMzI1LjMyNS4zMjUuMzI1LjgyNSAwIC41LS4zMjUuODI1LS4zMjUuMzI1LS44MjUuMzI1Wk0yNCAxMHEtLjUgMC0uODI1LS4zMjUtLjMyNS0uMzI1LS4zMjUtLjgyNXYtNS4ycTAtLjUuMzI1LS44MjVRMjMuNSAyLjUgMjQgMi41cS41IDAgLjgyNS4zMjUuMzI1LjMyNS4zMjUuODI1djUuMnEwIC41LS4zMjUuODI1UTI0LjUgMTAgMjQgMTBabTAgMzUuNXEtLjUgMC0uODI1LS4zMjUtLjMyNS0uMzI1LS4zMjUtLjgyNXYtNS4ycTAtLjUuMzI1LS44MjVRMjMuNSAzOCAyNCAzOHEuNSAwIC44MjUuMzI1LjMyNS4zMjUuMzI1LjgyNXY1LjJxMCAuNS0uMzI1LjgyNS0uMzI1LjMyNS0uODI1LjMyNVpNMTIuNSAxNC4xbC0zLTIuOTVxLS4zNS0uMzUtLjMyNS0uODI1UTkuMiA5Ljg1IDkuNSA5LjVxLjM1LS4zNS44LS4zNS40NSAwIC44NS4zNWwyLjk1IDNxLjMuMzUuMy44IDAgLjQ1LS4zLjgtLjMuMy0uNzc1LjMtLjQ3NSAwLS44MjUtLjNabTI0LjM1IDI0LjQtMi45NS0zcS0uMy0uMzUtLjMtLjggMC0uNDUuMzUtLjguMjUtLjM1LjcyNS0uMzV0LjgyNS4zNWwzIDIuOTVxLjM1LjM1LjMyNS44MjUtLjAyNS40NzUtLjMyNS44MjUtLjM1LjM1LS44LjM1LS40NSAwLS44NS0uMzVaTTMzLjkgMTQuMXEtLjM1LS4zNS0uMzUtLjggMC0uNDUuMzUtLjhsMi45NS0zcS4zNS0uMzUuODI1LS4zMjUuNDc1LjAyNS44MjUuMzI1LjM1LjM1LjM1LjggMCAuNDUtLjM1Ljg1bC0zIDIuOTVxLS4zLjMtLjc3NS4zLS40NzUgMC0uODI1LS4zWk05LjUgMzguNXEtLjM1LS4zNS0uMzUtLjggMC0uNDUuMzUtLjg1bDMtMi45NXEuMzUtLjM1LjgtLjM1LjQ1IDAgLjguMzUuMzUuMy4zMjUuNzc1LS4wMjUuNDc1LS4zMjUuODI1bC0yLjk1IDNxLS40LjM1LS44NS4zNS0uNDUgMC0uOC0uMzVaTTI0IDI0WiIvPjwvc3ZnPg==";
Editor.thinDarkImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI0LjA1IDQxcS03LjEgMC0xMi4wNS00Ljk1UTcuMDUgMzEuMSA3LjA1IDI0cTAtNi44IDQuNi0xMS42NSA0LjYtNC44NSAxMS4zLTUuMjUuMiAwIC40NS4wMjV0LjcuMDI1UTIyLjc1IDguNyAyMiAxMC43MjVxLS43NSAyLjAyNS0uNzUgNC4yNzUgMCA0LjkgMy40NSA4LjM1IDMuNDUgMy40NSA4LjM1IDMuNDUgMi4yIDAgNC4yNzUtLjY3NVQ0MC45IDI0LjJxMCAuMzUuMDI1LjU1LjAyNS4yLjAyNS4zNS0uNCA2LjctNS4yNSAxMS4zUTMwLjg1IDQxIDI0LjA1IDQxWm0wLTIuMjVxNS4xNSAwIDkuMDc1LTMuMTI1UTM3LjA1IDMyLjUgMzguMiAyOC4xcS0xLjIuNS0yLjUuNzI1LTEuMy4yMjUtMi42NS4yMjUtNS44NSAwLTkuOTUtNC4xVDE5IDE1cTAtMS4xNS4yMjUtMi40MjVUMjAgOS43NXEtNC42NSAxLjQtNy42NSA1LjM3NVQ5LjM1IDI0cTAgNi4xNSA0LjI3NSAxMC40NSA0LjI3NSA0LjMgMTAuNDI1IDQuM1ptLS4yNS0xNC41WiIvPjwvc3ZnPg==";
Editor.thinCommentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEyLjUgMjcuNWgyM3YtMi4yNWgtMjNabTAtNi4zNWgyM3YtMi4zaC0yM1ptMC02LjRoMjNWMTIuNWgtMjNaTTQzIDQyLjEgMzUuOSAzNWgtMjhxLTEuMTUgMC0yLjAyNS0uODc1VDUgMzIuMVY3LjlxMC0xLjE1Ljg3NS0yLjAyNVQ3LjkgNWgzMi4ycTEuMiAwIDIuMDUuODc1UTQzIDYuNzUgNDMgNy45Wk03LjI1IDcuOXYyNC44NUgzNi45bDMuODUgMy44NVY3LjlxMC0uMy0uMTc1LS40NzVUNDAuMSA3LjI1SDcuOXEtLjMgMC0uNDc1LjE3NVQ3LjI1IDcuOVptMCAwdjI4LjdWNy4yNSA3LjlaIi8+PC9zdmc+";
Editor.thinMenuImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEzLjUgMjYuMTVxLjkgMCAxLjUyNS0uNjI1LjYyNS0uNjI1LjYyNS0xLjUyNSAwLS45LS42MjUtMS41MjUtLjYyNS0uNjI1LTEuNTI1LS42MjUtLjkgMC0xLjUyNS42MjUtLjYyNS42MjUtLjYyNSAxLjUyNSAwIC45LjYyNSAxLjUyNS42MjUuNjI1IDEuNTI1LjYyNVptMTAuNSAwcS45IDAgMS41MjUtLjYyNS42MjUtLjYyNS42MjUtMS41MjUgMC0uOS0uNjI1LTEuNTI1UTI0LjkgMjEuODUgMjQgMjEuODVxLS45IDAtMS41MjUuNjI1LS42MjUuNjI1LS42MjUgMS41MjUgMCAuOS42MjUgMS41MjUuNjI1LjYyNSAxLjUyNS42MjVabTEwLjUgMHEuODUgMCAxLjQ3NS0uNjI1UTM2LjYgMjQuOSAzNi42IDI0cTAtLjktLjYyNS0xLjUyNS0uNjI1LS42MjUtMS41MjUtLjYyNS0uODUgMC0xLjQ3NS42MjUtLjYyNS42MjUtLjYyNSAxLjUyNSAwIC45LjYyNSAxLjUyNS42MjUuNjI1IDEuNTI1LjYyNVpNMjQgNDNxLTMuOTUgMC03LjQtMS41dC02LjAyNS00LjA3NVE4IDM0Ljg1IDYuNSAzMS40VDUgMjRxMC0zLjk1IDEuNS03LjQyNVE4IDEzLjEgMTAuNTc1IDEwLjU1IDEzLjE1IDggMTYuNiA2LjVUMjQgNXEzLjk1IDAgNy40MjUgMS41UTM0LjkgOCAzNy40NSAxMC41NSA0MCAxMy4xIDQxLjUgMTYuNTc1IDQzIDIwLjA1IDQzIDI0cTAgMy45NS0xLjUgNy40dC00LjA1IDYuMDI1UTM0LjkgNDAgMzEuNDI1IDQxLjUgMjcuOTUgNDMgMjQgNDNabTAtMi4yNXE3IDAgMTEuODc1LTQuOVQ0MC43NSAyNHEwLTctNC44NzUtMTEuODc1VDI0IDcuMjVxLTYuOTUgMC0xMS44NSA0Ljg3NVE3LjI1IDE3IDcuMjUgMjRxMCA2Ljk1IDQuOSAxMS44NSA0LjkgNC45IDExLjg1IDQuOVpNMjQgMjRaIi8+PC9zdmc+";
Editor.thinViewImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTUgMzlWOWgzOHYzMFptMjguNTUtMjAuNmg3LjJ2LTcuMTVoLTcuMlptMCA4Ljk1aDcuMnYtNi43aC03LjJabS0yNi4zIDkuNEgzMS4zdi0yNS41SDcuMjVabTI2LjMgMGg3LjJWMjkuNmgtNy4yWiIvPjwvc3ZnPg==";Editor.thinUserAddImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTM2LjYgMjcuNXYtNi4zNWgtNi4zNXYtMi4zaDYuMzVWMTIuNWgyLjN2Ni4zNWg2LjM1djIuM0gzOC45djYuMzVaTTE4IDIzLjM1cS0yLjkgMC00Ljc3NS0xLjg3NVExMS4zNSAxOS42IDExLjM1IDE2LjdxMC0yLjkgMS44NzUtNC43NVQxOCAxMC4xcTIuOSAwIDQuNzc1IDEuODUgMS44NzUgMS44NSAxLjg3NSA0Ljc1dC0xLjg3NSA0Ljc3NVEyMC45IDIzLjM1IDE4IDIzLjM1Wk0zIDM4LjZ2LTMuOHEwLTEuNS44LTIuNzV0Mi4yNS0xLjlxMy40NS0xLjUgNi4yNzUtMi4xNSAyLjgyNS0uNjUgNS42NzUtLjY1IDIuODUgMCA1LjY1LjY1IDIuOC42NSA2LjI1IDIuMTUgMS40NS43IDIuMjc1IDEuOTI1VDMzIDM0Ljh2My44Wm0yLjI1LTIuMjVoMjUuNVYzNC44cTAtLjc1LS41LTEuNDc1LS41LS43MjUtMS4zLTEuMTI1LTMuMi0xLjUtNS42NzUtMi4wNVEyMC44IDI5LjYgMTggMjkuNnEtMi44IDAtNS4zLjU1VDcgMzIuMnEtLjguNC0xLjI3NSAxLjEyNS0uNDc1LjcyNS0uNDc1IDEuNDc1Wk0xOCAyMS4xcTEuODUgMCAzLjEtMS4yNXQxLjI1LTMuMTVxMC0xLjg1LTEuMjUtMy4xVDE4IDEyLjM1cS0xLjg1IDAtMy4xIDEuMjV0LTEuMjUgMy4xcTAgMS45IDEuMjUgMy4xNVQxOCAyMS4xWm0wLTQuNFptMCAxOS42NVoiLz48L3N2Zz4=";
Editor.thinUserFlashImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTkgMzguNnYtMy44cTAtMS42Ljg1LTIuOC44NS0xLjIgMi4yLTEuODUgMy4yLTEuNCA2LjEyNS0yLjEgMi45MjUtLjcgNS44MjUtLjcgMS40NSAwIDIuOS4xNzV0Mi45LjUyNXYyLjJxLTEuNDUtLjM1LTIuODc1LS41UTI1LjUgMjkuNiAyNCAyOS42cS0yLjc1IDAtNS40LjYtMi42NS42LTUuNiAyLS43NS40LTEuMjUgMS4xMjV0LS41IDEuNDc1djEuNTVIMjkuOHYyLjI1Wm0yLjI1LTIuMjVIMjkuOFptMTIuNzUtMTNxLTIuOSAwLTQuNzc1LTEuODc1UTE3LjM1IDE5LjYgMTcuMzUgMTYuN3EwLTIuOSAxLjg3NS00Ljc1VDI0IDEwLjFxMi45IDAgNC43NzUgMS44NSAxLjg3NSAxLjg1IDEuODc1IDQuNzV0LTEuODc1IDQuNzc1UTI2LjkgMjMuMzUgMjQgMjMuMzVabTAtMi4yNXExLjg1IDAgMy4xLTEuMjV0MS4yNS0zLjE1cTAtMS44NS0xLjI1LTMuMVQyNCAxMi4zNXEtMS44NSAwLTMuMSAxLjI1dC0xLjI1IDMuMXEwIDEuOSAxLjI1IDMuMTVUMjQgMjEuMVptMC00LjRabTEyLjg1IDI4LjA1di03LjhoLTMuNHYtMTAuMWg5LjE1bC0zLjggNy42NWgzLjdaIi8+PC9zdmc+";
Editor.thinShareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTExLjkgNDVxLTEuMiAwLTIuMDUtLjg1UTkgNDMuMyA5IDQyLjFWMTguOHEwLTEuMTUuODUtMiAuODUtLjg1IDIuMDUtLjg1aDYuOXYyLjI1aC02LjlxLS4yNSAwLS40NS4ydC0uMi40djIzLjNxMCAuMjUuMi40NXQuNDUuMmgyNC4ycS4yNSAwIC40NS0uMnQuMi0uNDVWMTguOHEwLS4yLS4yLS40dC0uNDUtLjJoLTYuOTV2LTIuMjVoNi45NXExLjIgMCAyLjA1Ljg1Ljg1Ljg1Ljg1IDJ2MjMuM3EwIDEuMi0uODUgMi4wNS0uODUuODUtMi4wNS44NVptMTAuOTUtMTQuNVY4LjFsLTQuNiA0LjU1LTEuNjUtMS42IDcuMzUtNy4zNSA3LjM1IDcuMzUtMS42IDEuNi00LjYtNC41NXYyMi40WiIvPjwvc3ZnPg==";
Editor.thinTextImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTMuNCA0NC42di05LjI1aDMuNTV2LTIyLjdIMy40VjMuNGg5LjI1djMuNTVoMjIuN1YzLjRoOS4yNXY5LjI1aC0zLjU1djIyLjdoMy41NXY5LjI1aC05LjI1di0zLjU1aC0yMi43djMuNTVabTkuMjUtNS44NWgyMi43di0zLjRoMy40di0yMi43aC0zLjR2LTMuNGgtMjIuN3YzLjRoLTMuNHYyMi43aDMuNFptMy4xNS02LjI1IDcuMzUtMTkuMTVoMS42NWw3LjQ1IDE5LjE1aC0yLjFMMjggMjdoLTcuODVsLTIuMSA1LjVabTQuOTUtNy4zNWg2LjVMMjQuMSAxNi44aC0uM1ptLTE1LjEtMTQuOGg0Ljd2LTQuN2gtNC43Wm0zMiAwaDQuN3YtNC43aC00LjdabTAgMzJoNC43di00LjdoLTQuN1ptLTMyIDBoNC43di00LjdoLTQuN1ptMzItMzJabTAgMjcuM1ptLTI3LjMgMFptMC0yNy4zWiIvPjwvc3ZnPg==";
Editor.thinRectangleImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTUgMzlWOWgzOHYzMFptMi4yNS0yLjI1aDMzLjV2LTI1LjVINy4yNVptMCAwdi0yNS41IDI1LjVaIi8+PC9zdmc+";Editor.thinDataImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4Ljg1IDM5LjF2LTIuMjVIMzRxMS4yIDAgMi4wMjUtLjgyNVQzNi44NSAzNHYtNC45cTAtMS43NSAxLjA3NS0zLjEyNXQyLjcyNS0xLjgyNXYtLjNxLTEuNjUtLjQ1LTIuNzI1LTEuODI1UTM2Ljg1IDIwLjY1IDM2Ljg1IDE4LjlWMTRxMC0xLjItLjgyNS0yLjAyNVQzNCAxMS4xNWgtNS4xNVY4LjlIMzRxMi4xNSAwIDMuNjI1IDEuNVQzOS4xIDE0djQuOXEwIDEuMjUuODUgMi4wNzUuODUuODI1IDIuMS44MjVoLjg1djQuNGgtLjg1cS0xLjI1IDAtMi4xLjgyNS0uODUuODI1LS44NSAyLjA3NVYzNHEwIDIuMS0xLjUgMy42VDM0IDM5LjFaTTE0IDM5LjFxLTIuMTUgMC0zLjYyNS0xLjVUOC45IDM0di00LjlxMC0xLjI1LS44NS0yLjA3NS0uODUtLjgyNS0yLjEtLjgyNUg1LjF2LTQuNGguODVxMS4yNSAwIDIuMS0uODI1Ljg1LS44MjUuODUtMi4wNzVWMTRxMC0yLjEgMS41LTMuNlQxNCA4LjloNS4xNXYyLjI1SDE0cS0xLjIgMC0yLjAyNS44MjVUMTEuMTUgMTR2NC45cTAgMS43NS0xLjA3NSAzLjEyNVQ3LjM1IDIzLjg1di4zcTEuNjUuNDUgMi43MjUgMS44MjVRMTEuMTUgMjcuMzUgMTEuMTUgMjkuMVYzNHEwIDEuMi44MjUgMi4wMjVUMTQgMzYuODVoNS4xNXYyLjI1WiIvPjwvc3ZnPg==";
Editor.thinExpandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI0IDMwLjEgMTIuNyAxOC43NWwxLjYtMS42IDkuNyA5LjcgOS43LTkuNyAxLjYgMS42NVoiLz48L3N2Zz4=";Editor.thinGridImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iNDgiPjxwYXRoIGQ9Ik0yMjMuMjkxLTE1NC41cS0yOS4xMTcgMC00OC45NTQtMTkuODM3VDE1NC41LTIyMy4yOTFxMC0yOS4xMTggMTkuODM3LTQ4LjkxM1ExOTQuMTc0LTI5MiAyMjMuMjkxLTI5MnEyOS4xMTggMCA0OC45MTMgMTkuNzk2UTI5Mi0yNTIuNDA5IDI5Mi0yMjMuMjkxcTAgMjkuMTE3LTE5Ljc5NiA0OC45NTQtMTkuNzk1IDE5LjgzNy00OC45MTMgMTkuODM3Wm0yNTYuOCAwcS0yOS4wNDggMC00OC44ODUtMTkuODM3LTE5LjgzNi0xOS44MzctMTkuODM2LTQ4Ljk1NCAwLTI5LjExOCAxOS43NDUtNDguOTEzUTQ1MC44NjEtMjkyIDQ3OS45MDktMjkydDQ4Ljg4NSAxOS43OTZxMTkuODM2IDE5Ljc5NSAxOS44MzYgNDguOTEzIDAgMjkuMTE3LTE5Ljc0NSA0OC45NTQtMTkuNzQ2IDE5LjgzNy00OC43OTQgMTkuODM3Wm0yNTYuNjE4IDBxLTI5LjExOCAwLTQ4LjkxMy0xOS44MzdRNjY4LTE5NC4xNzQgNjY4LTIyMy4yOTFxMC0yOS4xMTggMTkuNzk2LTQ4LjkxM1E3MDcuNTkxLTI5MiA3MzYuNzA5LTI5MnEyOS4xMTcgMCA0OC45NTQgMTkuNzk2IDE5LjgzNyAxOS43OTUgMTkuODM3IDQ4LjkxMyAwIDI5LjExNy0xOS44MzcgNDguOTU0VDczNi43MDktMTU0LjVaTTIyMy4yOTEtNDExLjM3cS0yOS4xMTcgMC00OC45NTQtMTkuNzQ1LTE5LjgzNy0xOS43NDYtMTkuODM3LTQ4Ljc5NHQxOS44MzctNDguODg1cTE5LjgzNy0xOS44MzYgNDguOTU0LTE5LjgzNiAyOS4xMTggMCA0OC45MTMgMTkuNzQ1UTI5Mi01MDkuMTM5IDI5Mi00ODAuMDkxdC0xOS43OTYgNDguODg1cS0xOS43OTUgMTkuODM2LTQ4LjkxMyAxOS44MzZabTI1Ni44IDBxLTI5LjA0OCAwLTQ4Ljg4NS0xOS43NDUtMTkuODM2LTE5Ljc0Ni0xOS44MzYtNDguNzk0dDE5Ljc0NS00OC44ODVxMTkuNzQ2LTE5LjgzNiA0OC43OTQtMTkuODM2dDQ4Ljg4NSAxOS43NDVxMTkuODM2IDE5Ljc0NiAxOS44MzYgNDguNzk0dC0xOS43NDUgNDguODg1cS0xOS43NDYgMTkuODM2LTQ4Ljc5NCAxOS44MzZabTI1Ni42MTggMHEtMjkuMTE4IDAtNDguOTEzLTE5Ljc0NVE2NjgtNDUwLjg2MSA2NjgtNDc5LjkwOXQxOS43OTYtNDguODg1cTE5Ljc5NS0xOS44MzYgNDguOTEzLTE5LjgzNiAyOS4xMTcgMCA0OC45NTQgMTkuNzQ1IDE5LjgzNyAxOS43NDYgMTkuODM3IDQ4Ljc5NHQtMTkuODM3IDQ4Ljg4NXEtMTkuODM3IDE5LjgzNi00OC45NTQgMTkuODM2Wk0yMjMuMjkxLTY2OHEtMjkuMTE3IDAtNDguOTU0LTE5Ljc5Ni0xOS44MzctMTkuNzk1LTE5LjgzNy00OC45MTMgMC0yOS4xMTcgMTkuODM3LTQ4Ljk1NHQ0OC45NTQtMTkuODM3cTI5LjExOCAwIDQ4LjkxMyAxOS44MzdRMjkyLTc2NS44MjYgMjkyLTczNi43MDlxMCAyOS4xMTgtMTkuNzk2IDQ4LjkxM1EyNTIuNDA5LTY2OCAyMjMuMjkxLTY2OFptMjU2LjggMHEtMjkuMDQ4IDAtNDguODg1LTE5Ljc5Ni0xOS44MzYtMTkuNzk1LTE5LjgzNi00OC45MTMgMC0yOS4xMTcgMTkuNzQ1LTQ4Ljk1NCAxOS43NDYtMTkuODM3IDQ4Ljc5NC0xOS44Mzd0NDguODg1IDE5LjgzN3ExOS44MzYgMTkuODM3IDE5LjgzNiA0OC45NTQgMCAyOS4xMTgtMTkuNzQ1IDQ4LjkxM1E1MDkuMTM5LTY2OCA0ODAuMDkxLTY2OFptMjU2LjYxOCAwcS0yOS4xMTggMC00OC45MTMtMTkuNzk2UTY2OC03MDcuNTkxIDY2OC03MzYuNzA5cTAtMjkuMTE3IDE5Ljc5Ni00OC45NTQgMTkuNzk1LTE5LjgzNyA0OC45MTMtMTkuODM3IDI5LjExNyAwIDQ4Ljk1NCAxOS44Mzd0MTkuODM3IDQ4Ljk1NHEwIDI5LjExOC0xOS44MzcgNDguOTEzUTc2NS44MjYtNjY4IDczNi43MDktNjY4WiIvPjwvc3ZnPg==";
Editor.thinOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik0yNDAtODBxLTMzIDAtNTYuNS0yMy41VDE2MC0xNjB2LTY0MHEwLTMzIDIzLjUtNTYuNVQyNDAtODgwaDMyMGwyNDAgMjQwdjI0MGgtODB2LTIwMEg1MjB2LTIwMEgyNDB2NjQwaDM2MHY4MEgyNDBabTYzOCAxNUw3NjAtMTgzdjg5aC04MHYtMjI2aDIyNnY4MGgtOTBsMTE4IDExOC01NiA1N1ptLTYzOC05NXYtNjQwIDY0MFoiLz48L3N2Zz4=";Editor.selectImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTggMCAxNSAxLjV0MTQgNC41bC03NCA3NEgyMDB2NTYwaDU2MHYtMjY2bDgwLTgwdjM0NnEwIDMzLTIzLjUgNTYuNVQ3NjAtMTIwSDIwMFptMjYxLTE2MEwyMzUtNTA2bDU2LTU2IDE3MCAxNzAgMzY3LTM2NyA1NyA1NS00MjQgNDI0WiIvPjwvc3ZnPg==";
Editor.styles=[{},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},
commonStyle:{fontColor:"#1A1A1A"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",
fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",
fillColor:"#21C0A5"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",
gridColor:"#13B4C2"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMjQwLTQwMGg0ODB2LTgwSDI0MHY4MFptMC0xMjBoNDgwdi04MEgyNDB2ODBabTAtMTIwaDQ4MHYtODBIMjQwdjgwWk04ODAtODAgNzIwLTI0MEgxNjBxLTMzIDAtNTYuNS0yMy41VDgwLTMyMHYtNDgwcTAtMzMgMjMuNS01Ni41VDE2MC04ODBoNjQwcTMzIDAgNTYuNSAyMy41VDg4MC04MDB2NzIwWk0xNjAtMzIwaDU5NGw0NiA0NXYtNTI1SDE2MHY0ODBabTAgMHYtNDgwIDQ4MFoiLz48L3N2Zz4=";
Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";Editor.groupImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDAtMTYwdi0xMTJxMC0zNCAxNy41LTYyLjVUMTA0LTM3OHE2Mi0zMSAxMjYtNDYuNVQzNjAtNDQwcTY2IDAgMTMwIDE1LjVUNjE2LTM3OHEyOSAxNSA0Ni41IDQzLjVUNjgwLTI3MnYxMTJINDBabTcyMCAwdi0xMjBxMC00NC0yNC41LTg0LjVUNjY2LTQzNHE1MSA2IDk2IDIwLjV0ODQgMzUuNXEzNiAyMCA1NSA0NC41dDE5IDUzLjV2MTIwSDc2MFpNMzYwLTQ4MHEtNjYgMC0xMTMtNDd0LTQ3LTExM3EwLTY2IDQ3LTExM3QxMTMtNDdxNjYgMCAxMTMgNDd0NDcgMTEzcTAgNjYtNDcgMTEzdC0xMTMgNDdabTQwMC0xNjBxMCA2Ni00NyAxMTN0LTExMyA0N3EtMTEgMC0yOC0yLjV0LTI4LTUuNXEyNy0zMiA0MS41LTcxdDE0LjUtODFxMC00Mi0xNC41LTgxVDU0NC03OTJxMTQtNSAyOC02LjV0MjgtMS41cTY2IDAgMTEzIDQ3dDQ3IDExM1pNMTIwLTI0MGg0ODB2LTMycTAtMTEtNS41LTIwVDU4MC0zMDZxLTU0LTI3LTEwOS00MC41VDM2MC0zNjBxLTU2IDAtMTExIDEzLjVUMTQwLTMwNnEtOSA1LTE0LjUgMTR0LTUuNSAyMHYzMlptMjQwLTMyMHEzMyAwIDU2LjUtMjMuNVQ0NDAtNjQwcTAtMzMtMjMuNS01Ni41VDM2MC03MjBxLTMzIDAtNTYuNSAyMy41VDI4MC02NDBxMCAzMyAyMy41IDU2LjVUMzYwLTU2MFptMCAzMjBabTAtNDAwWiIvPjwvc3ZnPg==";
Editor.syncImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgNFYxTDggNWw0IDRWNmMzLjMxIDAgNiAyLjY5IDYgNiAwIDEuMDEtLjI1IDEuOTctLjcgMi44bDEuNDYgMS40NkMxOS41NCAxNS4wMyAyMCAxMy41NyAyMCAxMmMwLTQuNDItMy41OC04LTgtOHptMCAxNGMtMy4zMSAwLTYtMi42OS02LTYgMC0xLjAxLjI1LTEuOTcuNy0yLjhMNS4yNCA3Ljc0QzQuNDYgOC45NyA0IDEwLjQzIDQgMTJjMCA0LjQyIDMuNTggOCA4IDh2M2w0LTQtNC00djN6Ii8+PC9zdmc+";Editor.cloudImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDZjMi42MiAwIDQuODggMS44NiA1LjM5IDQuNDNsLjMgMS41IDEuNTMuMTFjMS41Ni4xIDIuNzggMS40MSAyLjc4IDIuOTYgMCAxLjY1LTEuMzUgMy0zIDNINmMtMi4yMSAwLTQtMS43OS00LTQgMC0yLjA1IDEuNTMtMy43NiAzLjU2LTMuOTdsMS4wNy0uMTEuNS0uOTVDOC4wOCA3LjE0IDkuOTQgNiAxMiA2bTAtMkM5LjExIDQgNi42IDUuNjQgNS4zNSA4LjA0IDIuMzQgOC4zNiAwIDEwLjkxIDAgMTRjMCAzLjMxIDIuNjkgNiA2IDZoMTNjMi43NiAwIDUtMi4yNCA1LTUgMC0yLjY0LTIuMDUtNC43OC00LjY1LTQuOTZDMTguNjcgNi41OSAxNS42NCA0IDEyIDR6Ii8+PC9zdmc+";
Editor.cloudOffImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTI0IDE1YzAtMi42NC0yLjA1LTQuNzgtNC42NS00Ljk2QzE4LjY3IDYuNTkgMTUuNjQgNCAxMiA0Yy0xLjMzIDAtMi41Ny4zNi0zLjY1Ljk3bDEuNDkgMS40OUMxMC41MSA2LjE3IDExLjIzIDYgMTIgNmMzLjA0IDAgNS41IDIuNDYgNS41IDUuNXYuNUgxOWMxLjY2IDAgMyAxLjM0IDMgMyAwIC45OS0uNDggMS44NS0xLjIxIDIuNGwxLjQxIDEuNDFjMS4wOS0uOTIgMS44LTIuMjcgMS44LTMuODF6TTQuNDEgMy44NkwzIDUuMjdsMi43NyAyLjc3aC0uNDJDMi4zNCA4LjM2IDAgMTAuOTEgMCAxNGMwIDMuMzEgMi42OSA2IDYgNmgxMS43M2wyIDIgMS40MS0xLjQxTDQuNDEgMy44NnpNNiAxOGMtMi4yMSAwLTQtMS43OS00LTRzMS43OS00IDQtNGgxLjczbDggOEg2eiIvPjwvc3ZnPg==";
Editor.calendarImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48cGF0aCBkPSJNMjAsNEg0QzIuOSw0LDIsNC45LDIsNnYxMmMwLDEuMSwwLjksMiwyLDJoMTZjMS4xLDAsMi0wLjksMi0yVjZDMjIsNC45LDIxLjEsNCwyMCw0eiBNOCwxMUg0VjZoNFYxMXogTTE0LDExaC00VjZoNFYxMXogTTIwLDExaC00VjZoNFYxMXogTTgsMThINHYtNWg0VjE4eiBNMTQsMThoLTR2LTVoNFYxOHogTTIwLDE4aC00di01aDRWMTh6Ii8+PC9nPjwvc3ZnPg==";
Editor.syncProblemImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyAxMmMwIDIuMjEuOTEgNC4yIDIuMzYgNS42NEwzIDIwaDZ2LTZsLTIuMjQgMi4yNEM1LjY4IDE1LjE1IDUgMTMuNjYgNSAxMmMwLTIuNjEgMS42Ny00LjgzIDQtNS42NVY0LjI2QzUuNTUgNS4xNSAzIDguMjcgMyAxMnptOCA1aDJ2LTJoLTJ2MnpNMjEgNGgtNnY2bDIuMjQtMi4yNEMxOC4zMiA4Ljg1IDE5IDEwLjM0IDE5IDEyYzAgMi42MS0xLjY3IDQuODMtNCA1LjY1djIuMDljMy40NS0uODkgNi00LjAxIDYtNy43NCAwLTIuMjEtLjkxLTQuMi0yLjM2LTUuNjRMMjEgNHptLTEwIDloMlY3aC0ydjZ6Ii8+PC9zdmc+";
Editor.tailSpin="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9Ii0yIC0yIDQ0IDQ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGRlZnM+CiAgICAgICAgPGxpbmVhckdyYWRpZW50IHgxPSI4LjA0MiUiIHkxPSIwJSIgeDI9IjY1LjY4MiUiIHkyPSIyMy44NjUlIiBpZD0iYSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MDgwODAiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIwJSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBzdG9wLW9wYWNpdHk9Ii42MzEiIG9mZnNldD0iNjMuMTQ2JSIvPgogICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjODA4MDgwIiBvZmZzZXQ9IjEwMCUiLz4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEpIj4KICAgICAgICAgICAgPHBhdGggZD0iTTM2IDE4YzAtOS45NC04LjA2LTE4LTE4LTE4IiBzdHJva2U9InVybCgjYSkiIHN0cm9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=";
Editor.mailImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIyIDZjMC0xLjEtLjktMi0yLTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2em0tMiAwbC04IDQuOTlMNCA2aDE2em0wIDEySDRWOGw4IDUgOC01djEweiIvPjwvc3ZnPg==";Editor.cameraImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0LjEyIDRsMS44MyAySDIwdjEySDRWNmg0LjA1bDEuODMtMmg0LjI0TTE1IDJIOUw3LjE3IDRINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNmMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yaC0zLjE3TDE1IDJ6bS0zIDdjMS42NSAwIDMgMS4zNSAzIDNzLTEuMzUgMy0zIDMtMy0xLjM1LTMtMyAxLjM1LTMgMy0zbTAtMmMtMi43NiAwLTUgMi4yNC01IDVzMi4yNCA1IDUgNSA1LTIuMjQgNS01LTIuMjQtNS01LTV6Ii8+PC9zdmc+";
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNODU2LTM5MCA1NzAtMTA0cS0xMiAxMi0yNyAxOHQtMzAgNnEtMTUgMC0zMC02dC0yNy0xOEwxMDMtNDU3cS0xMS0xMS0xNy0yNS41VDgwLTUxM3YtMjg3cTAtMzMgMjMuNS01Ni41VDE2MC04ODBoMjg3cTE2IDAgMzEgNi41dDI2IDE3LjVsMzUyIDM1M3ExMiAxMiAxNy41IDI3dDUuNSAzMHEwIDE1LTUuNSAyOS41VDg1Ni0zOTBaTTUxMy0xNjBsMjg2LTI4Ni0zNTMtMzU0SDE2MHYyODZsMzUzIDM1NFpNMjYwLTY0MHEyNSAwIDQyLjUtMTcuNVQzMjAtNzAwcTAtMjUtMTcuNS00Mi41VDI2MC03NjBxLTI1IDAtNDIuNSAxNy41VDIwMC03MDBxMCAyNSAxNy41IDQyLjVUMjYwLTY0MFptMjIwIDE2MFoiLz48L3N2Zz4=";
Editor.contrastImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTgwcS04MyAwLTE1Ni0zMS41VDE5Ny0xOTdxLTU0LTU0LTg1LjUtMTI3VDgwLTQ4MHEwLTgzIDMxLjUtMTU2VDE5Ny03NjNxNTQtNTQgMTI3LTg1LjVUNDgwLTg4MHE4MyAwIDE1NiAzMS41VDc2My03NjNxNTQgNTQgODUuNSAxMjdUODgwLTQ4MHEwIDgzLTMxLjUgMTU2VDc2My0xOTdxLTU0IDU0LTEyNyA4NS41VDQ4MC04MFptNDAtODNxMTE5LTE1IDE5OS41LTEwNC41VDgwMC00ODBxMC0xMjMtODAuNS0yMTIuNVQ1MjAtNzk3djYzNFoiLz48L3N2Zz4=";
Editor.chevronUpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTUyOCAyOTYtMzQ0bC01Ni01NiAyNDAtMjQwIDI0MCAyNDAtNTYgNTYtMTg0LTE4NFoiLz48L3N2Zz4=";Editor.chevronDownImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTM0NCAyNDAtNTg0bDU2LTU2IDE4NCAxODQgMTg0LTE4NCA1NiA1Ni0yNDAgMjQwWiIvPjwvc3ZnPg==";
Editor.chevronLeftImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNTYwLTI0MCAzMjAtNDgwbDI0MC0yNDAgNTYgNTYtMTg0IDE4NCAxODQgMTg0LTU2IDU2WiIvPjwvc3ZnPg==";Editor.chevronRightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNTA0LTQ4MCAzMjAtNjY0bDU2LTU2IDI0MCAyNDAtMjQwIDI0MC01Ni01NiAxODQtMTg0WiIvPjwvc3ZnPg==";
Editor.rightPanelOpenImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDYwLTMyMHYtMzIwTDMwMC00ODBsMTYwIDE2MFpNMjAwLTEyMHEtMzMgMC01Ni41LTIzLjVUMTIwLTIwMHYtNTYwcTAtMzMgMjMuNS01Ni41VDIwMC04NDBoNTYwcTMzIDAgNTYuNSAyMy41VDg0MC03NjB2NTYwcTAgMzMtMjMuNSA1Ni41VDc2MC0xMjBIMjAwWm00NDAtODBoMTIwdi01NjBINjQwdjU2MFptLTgwIDB2LTU2MEgyMDB2NTYwaDM2MFptODAgMGgxMjAtMTIwWiIvPjwvc3ZnPg==";
Editor.rightPanelCloseImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNMzAwLTY0MHYzMjBsMTYwLTE2MC0xNjAtMTYwWk0yMDAtMTIwcS0zMyAwLTU2LjUtMjMuNVQxMjAtMjAwdi01NjBxMC0zMyAyMy41LTU2LjVUMjAwLTg0MGg1NjBxMzMgMCA1Ni41IDIzLjVUODQwLTc2MHY1NjBxMCAzMy0yMy41IDU2LjVUNzYwLTEyMEgyMDBabTQ0MC04MGgxMjB2LTU2MEg2NDB2NTYwWm0tODAgMHYtNTYwSDIwMHY1NjBoMzYwWm04MCAwaDEyMC0xMjBaIi8+PC9zdmc+";
Editor.spinImage="data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==";
Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(l){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.pasteAtMousePointer=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||
/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=
!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.createInheritProperty=function(l,B){return{name:B,dispName:l,type:"bool",defVal:!1,isVisible:function(K,S){return 1==K.vertices.length?(S=S.editorUi.editor.graph.model,K=S.getParent(K.vertices[0]),S.isEdge(K)||S.isVertex(K)):!1},getValue:function(K,S){return"inherit"==mxUtils.getValue(K.style,B)},valueChanged:function(K,S,P,T){S=T.editorUi.editor.graph;
"1"==K?S.setCellStyles(B,"inherit",P.vertices):S.setCellStyles(B,null,P.vertices)}}};Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(l){l.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(l,B){return"1"!=mxUtils.getValue(l.style,"sketch","0")}},{name:"jiggle",
dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"comic","0")||"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch",
"1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(l,
B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")&&0<l.vertices.length}},
{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,
"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,
mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},
isVisible:function(l,B){return"1"==mxUtils.getValue(l.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(l.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},
{val:"round",dispName:"Round"}]}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",
dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(l){return"orthogonalEdgeStyle"==mxUtils.getValue(l.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(l){return"entityRelationEdgeStyle"==mxUtils.getValue(l.style,
mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",
type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(l){return"1"==mxUtils.getValue(l.style,"flowAnimation",null)}},{name:"flowAnimationDirection",dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",
dispName:"Alternate-Reverse"}],isVisible:function(l){return"1"==mxUtils.getValue(l.style,"flowAnimation",null)}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&
0==l.edges.length&&B.isTableCell(l.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTableCell(l.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLastRow","0")},
isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(l,B){l=B.editorUi.editor.graph.getCellStyle(1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null);return"1"==mxUtils.getValue(l,"resizeLast","0")},isVisible:function(l,B){B=B.editorUi.editor.graph;return 1==l.vertices.length&&0==l.edges.length&&B.isTable(l.vertices[0])}},{name:"fillOpacity",
dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(l,B){return B.editorUi.editor.graph.isCellConnectable(0<l.vertices.length&&0==l.edges.length?l.vertices[0]:null)},isVisible:function(l,B){return 0<l.vertices.length&&0==l.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(l,B){l=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=l&&B.isSwimlane(l)},isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(l,B){l=
1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=l&&(B.isSwimlane(l)||0<B.model.getChildCount(l))},isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(l,B){var K=1==l.vertices.length&&0==l.edges.length?l.vertices[0]:null;B=B.editorUi.editor.graph;return null!=K&&(B.isContainer(K)&&"0"!=l.style.collapsible||!B.isContainer(K)&&"1"==l.style.collapsible)},
isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(l,B){return 1==l.vertices.length&&0==l.edges.length&&!B.editorUi.editor.graph.isSwimlane(l.vertices[0])&&null==mxUtils.getValue(l.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(l,B){B=B.editorUi.editor.graph.model;return 0<l.vertices.length?
B.isVertex(B.getParent(l.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(l,B){l=0<l.vertices.length?B.editorUi.editor.graph.getCellGeometry(l.vertices[0]):null;return null!=l&&!l.relative}},
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(l,B){return 0<l.vertices.length&&B.editorUi.editor.graph.isAutoSizeCell(l.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{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(l,
B){var K=mxUtils.getValue(l.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||B.editorUi.editor.graph.isSwimlane(l.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(l.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(l.style,mxConstants.STYLE_OPACITY,100)||null!=l.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(l,B){return 0<l.vertices.length&&B.editorUi.editor.graph.isContainer(l.vertices[0])}},
Editor.createInheritProperty("Inherit Font Family",mxConstants.STYLE_FONTFAMILY),Editor.createInheritProperty("Inherit Font Size",mxConstants.STYLE_FONTSIZE),Editor.createInheritProperty("Inherit Font Color",mxConstants.STYLE_FONTCOLOR),Editor.createInheritProperty("Inherit Fill Color",mxConstants.STYLE_FILLCOLOR),Editor.createInheritProperty("Inherit Stroke Color",mxConstants.STYLE_STROKECOLOR)].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\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, width 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## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\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, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
Editor.createRoughCanvas=function(l){var B=rough.canvas({getContext:function(){return l}});B.draw=function(K){var S=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<S.length;P++){var T=S[P];switch(T.type){case "path":null!=K.stroke&&this._drawToContext(l,T,K);break;case "fillPath":this._drawToContext(l,T,K);break;case "fillSketch":this.fillSketch(l,T,K)}}};B.fillSketch=function(K,S,P){var T=l.state.strokeColor,Y=l.state.strokeWidth,aa=l.state.strokeAlpha,la=l.state.dashed,va=P.fillWeight;
0>va&&(va=P.strokeWidth/2);l.setStrokeAlpha(l.state.fillAlpha);l.setStrokeColor(P.fill||"");l.setStrokeWidth(va);l.setDashed(!1);this._drawToContext(K,S,P);l.setDashed(la);l.setStrokeWidth(Y);l.setStrokeColor(T);l.setStrokeAlpha(aa)};B._drawToContext=function(K,S,P){K.begin();for(var T=0;T<S.ops.length;T++){var Y=S.ops[T],aa=Y.data;switch(Y.op){case "move":K.moveTo(aa[0],aa[1]);break;case "bcurveTo":K.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":K.lineTo(aa[0],aa[1])}}K.end();
"fillPath"===S.type&&P.filled?K.fill():K.stroke()};return B};(function(){function l(T,Y,aa){this.canvas=T;this.rc=Y;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,l.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,l.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,l.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,l.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,l.prototype.ellipse);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.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);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,l.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,l.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
l.prototype.fillAndStroke);this.path=[];this.passThrough=!1}l.prototype.moveOp="M";l.prototype.lineOp="L";l.prototype.quadOp="Q";l.prototype.curveOp="C";l.prototype.closeOp="Z";l.prototype.getStyle=function(T,Y){var aa=1;if(null!=this.shape.state){var la=this.shape.state.cell.id;if(null!=la)for(var va=0;va<la.length;va++)aa=(aa<<5)-aa+la.charCodeAt(va)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};la=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===
mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=Y)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",la.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",la.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",la.curveFitting);
aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",la.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",la.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",la.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",la.disableMultiStrokeFill);Y=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==Y?-1:Y;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
Y);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Y);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Y);Y=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==Y?-1:Y;Y=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Y&&(Y="auto");"auto"==Y&&(Y=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Y.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Y.push(mxUtils.hex2rgb(Editor.darkColor)),Y=
null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(Y,mxUtils.hex2rgb(aa.fill)))?"solid":la.fillStyle);aa.fillStyle=Y;return aa};l.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};l.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};l.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],
this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};l.prototype.lineTo=function(T,Y){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,Y),this.lastX=T,this.lastY=Y)};l.prototype.moveTo=function(T,Y){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,Y),this.lastX=T,this.lastY=Y,this.firstX=T,this.firstY=Y)};l.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
arguments):this.addOp(this.closeOp)};l.prototype.quadTo=function(T,Y,aa,la){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,Y,aa,la),this.lastX=aa,this.lastY=la)};l.prototype.curveTo=function(T,Y,aa,la,va,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,Y,aa,la,va,ta),this.lastX=va,this.lastY=ta)};l.prototype.arcTo=function(T,Y,aa,la,va,ta,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY,T,Y,aa,la,va,ta,qa);if(null!=Ba)for(var ya=0;ya<Ba.length;ya+=6)this.curveTo(Ba[ya],Ba[ya+1],Ba[ya+2],Ba[ya+3],Ba[ya+4],Ba[ya+5]);this.lastX=ta;this.lastY=qa}};l.prototype.rect=function(T,Y,aa,la){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,Y,aa,la,this.getStyle(!0,!0)))};l.prototype.ellipse=function(T,Y,aa,la){this.passThrough?this.originalEllipse.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,Y+la/2,aa,la,this.getStyle(!0,!0)))};l.prototype.roundrect=function(T,Y,aa,la,va,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+va,Y),this.lineTo(T+aa-va,Y),this.quadTo(T+aa,Y,T+aa,Y+ta),this.lineTo(T+aa,Y+la-ta),this.quadTo(T+aa,Y+la,T+aa-va,Y+la),this.lineTo(T+va,Y+la),this.quadTo(T,Y+la,T,Y+la-ta),this.lineTo(T,Y+ta),this.quadTo(T,Y,T+va,Y))};l.prototype.drawPath=function(T){if(0<
this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Y in T)this.nextShape.options[Y]=T[Y];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};l.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!1))};l.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};l.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};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;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new l(T,Editor.createRoughCanvas(T),this)};var B=mxShape.prototype.createHandJiggle;
mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,Y,aa,la,va){null!=T.handJiggle&&T.handJiggle.passThrough||K.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=
function(T){var Y=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==l&&!this.outline){T.save();var la=this.fill,va=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var Ba=T.setFillColor;T.setFillColor=function(){};aa||null==la||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;S.apply(this,
arguments);T.handJiggle.passThrough=!1;T.setFillColor=Ba;T.setStrokeColor=qa;this.configurePointerEvents=ta;this.stroke=va;this.fill=la;T.restore();aa&&null!=la&&(T.addTolerance=function(){})}S.apply(this,arguments);T.addTolerance=Y};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,Y,aa,la,va,ta){null!=T.handJiggle&&T.handJiggle.constructor==l?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
function(l){return null==l||0==l.length||"undefined"===typeof pako?l:Graph.arrayBufferToString(pako.deflateRaw(l))};Editor.fastDecompress=function(l){return null==l||0==l.length||"undefined"===typeof pako?l:pako.inflateRaw(Graph.stringToArrayBuffer(atob(l)),{to:"string"})};Editor.extractGraphModel=function(l,B,K){if(null!=l&&"undefined"!==typeof pako){var S=l.ownerDocument.getElementsByTagName("div"),P=[];if(null!=S&&0<S.length)for(var T=0;T<S.length;T++)if("mxgraph"==S[T].getAttribute("class")){P.push(S[T]);
break}0<P.length&&(S=P[0].getAttribute("data-mxgraph"),null!=S?(P=JSON.parse(S),null!=P&&null!=P.xml&&(l=mxUtils.parseXml(P.xml),l=l.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(S=mxUtils.getTextContent(P[0]),S=Graph.decompress(S,null,K),0<S.length&&(l=mxUtils.parseXml(S),l=l.documentElement))))}if(null!=l&&"svg"==l.nodeName)if(S=l.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&
(S=decodeURIComponent(S)),null!=S&&0<S.length)l=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==l||B||(P=null,"diagram"==l.nodeName?P=l:"mxfile"==l.nodeName&&(S=l.getElementsByTagName("diagram"),0<S.length&&(P=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=P&&(l=Editor.parseDiagramNode(P,K)));null==l||"mxGraphModel"==l.nodeName||B&&"mxfile"==l.nodeName||(l=null);return l};Editor.parseDiagramNode=function(l,B,K){Editor.validateDiagramNode(l);
var S=mxUtils.trim(mxUtils.getTextContent(l)),P=null;0<S.length?(B=Graph.decompress(S,null,B),null!=B&&0<B.length&&(P=mxUtils.parseXml(B).documentElement)):(l=mxUtils.getChildNodes(l),0<l.length&&(P=l[0],K&&(P=Editor.parseDiagramNode(P,B,!1)),B=mxUtils.createXmlDocument(),B.appendChild(B.importNode(P,!0)),P=B.documentElement));return P};Editor.getDiagramNodeXml=function(l){Editor.validateDiagramNode(l);var B=mxUtils.getNodeValue(l),K=null;0<B.length?K=Graph.decompress(B):(l=l.getElementsByTagName("mxGraphModel"),
null!=l&&0<l.length&&(K=mxUtils.getXml(l[0])));return K};Editor.validateDiagramNode=function(l){if(0==mxUtils.trim(mxUtils.getTextContent(l)).length&&0==mxUtils.getChildNodes(l).length){var B=new mxCodec,K=new mxGraphModel;l.appendChild(B.encode(K))}return l};Editor.extractGraphModelFromPdf=function(l){var B=null;l=l.substring(l.indexOf(",")+1);l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0);if("%PDF-1.7"==l.substring(0,8)){var K=l.indexOf("EmbeddedFile");if(-1<K){var S=l.indexOf("stream",
K)+9;if(0<l.substring(K,S).indexOf("application#2Fvnd.jgraph.mxfile")){var P=l.indexOf("endstream",S-1);return pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(S,P)),{to:"string"})}}for(K=l.indexOf("/ObjStm");0<K;){S=l.indexOf("stream",K)+9;P=l.indexOf("endstream",S-1);S=pako.inflateRaw(Graph.stringToArrayBuffer(l.substring(S,P)),{to:"string"});P=S.indexOf("/Subject <");if(0<P){K=S.substring(P+14,S.indexOf(">",P));if(null!=K){B=K;K=[];for(S=0;S<B.length;S+=2)P=B.substr(S,2),"00"!=P&&K.push(String.fromCharCode(parseInt(P,
16)));B=K.join("")}break}K=l.indexOf("/ObjStm",K+1)}}if(null==B&&"%PDF-1.4"==l.substring(0,8)){K="";P=S=0;for(var T=[],Y=null;P<l.length;){var aa=l.charCodeAt(P);P+=1;10!=aa&&(K+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=0;if(19==S){var la=l.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(la>P){B=l.substring(P,la);break}}10==aa&&("endobj"==K?Y=null:"obj"==K.substring(K.length-3,K.length)||"xref"==K||"trailer"==K?(Y=[],T[K.split(" ")[0]]=Y):null!=Y&&Y.push(K),K="")}}null==B&&null!=
T&&(B=Editor.extractGraphModelFromXref(T));null!=B&&(B=decodeURIComponent(B.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return B};Editor.extractGraphModelFromXref=function(l){var B=l.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=l[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(l=l[B[1]],null!=l&&(l=l.join("\n"),K=l.substring(1,l.length-1))))));return K};Editor.extractParserError=function(l,B){var K=null;l=
null!=l?l.getElementsByTagName("parsererror"):null;null!=l&&0<l.length&&(K=B||mxResources.get("invalidChars"),B=l[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(l,B){null!=l&&(l=null!=l.error?l.error:l,null==l.retry&&(l.retry=B))};Editor.mermaidToDrawio=function(l,B,K){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(l,B,K)};Editor.configure=function(l){if(null!=l){Editor.config=l;Editor.configVersion=
l.version;l.debug&&(urlParams.test="1");if(null!=l.customCss){var B=document.createElement("style");B.type="text/css";B.appendChild(document.createTextNode(l.customCss));document.head.appendChild(B)}null!=l.defaultFonts&&(Menus.prototype.defaultFonts=l.defaultFonts);null!=l.presetColors&&(ColorDialog.prototype.presetColors=l.presetColors);null!=l.defaultColors&&(ColorDialog.prototype.defaultColors=l.defaultColors);null!=l.colorNames&&(ColorDialog.prototype.colorNames=l.colorNames);null!=l.defaultColorSchemes&&
(StyleFormatPanel.prototype.defaultColorSchemes=l.defaultColorSchemes);null!=l.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=l.defaultEdgeLength);null!=l.selectParentLayer&&(Graph.selectParentLayer=l.selectParentLayer);null!=l.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=l.autosaveDelay);null!=l.templateFile&&(EditorUi.templateFile=l.templateFile);null!=l.styles&&(Array.isArray(l.styles)?Editor.styles=l.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=l.globalVars&&
(Editor.globalVars=l.globalVars);null!=l.compressXml&&(Editor.defaultCompressed=l.compressXml,Editor.compressXml=l.compressXml);null!=l.includeDiagram&&(Editor.defaultIncludeDiagram=l.includeDiagram);null!=l.simpleLabels&&(Editor.simpleLabels=l.simpleLabels);null!=l.pasteAtMousePointer&&(Editor.pasteAtMousePointer=l.pasteAtMousePointer);null!=l.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=l.oneDriveInlinePicker);null!=l.defaultAdaptiveColors?Graph.defaultAdaptiveColors=l.defaultAdaptiveColors:
0==l.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=l.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=l.enableLightDarkColors);null!=l.darkColor&&(Editor.darkColor=l.darkColor);null!=l.darkColorVar&&(Editor.darkColorVar=l.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=l.settingsName&&(Editor.configurationKey=
"."+l.settingsName+"-configuration",Editor.settingsKey="."+l.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=l.customFonts&&(Menus.prototype.defaultFonts=l.customFonts.concat(Menus.prototype.defaultFonts));null!=l.customPresetColors&&(ColorDialog.prototype.presetColors=l.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=l.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=l.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));
if(null!=l.css){B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(l.css));var K=document.getElementsByTagName("script")[0];K.parentNode.insertBefore(B,K)}null!=l.expandLibraries&&(Sidebar.prototype.expandLibraries=l.expandLibraries);null!=l.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=l.appendCustomLibraries);null!=l.libraries&&(Sidebar.prototype.customEntries=l.libraries);null!=l.enabledLibraries&&(Array.isArray(l.enabledLibraries)?
Sidebar.prototype.enabledLibraries=l.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=l.defaultLibraries&&(Sidebar.prototype.defaultEntries=l.defaultLibraries);null!=l.defaultCustomLibraries&&(Editor.defaultCustomLibraries=l.defaultCustomLibraries);null!=l.enableCustomLibraries&&(Editor.enableCustomLibraries=l.enableCustomLibraries);null!=l.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=l.defaultVertexStyle);null!=l.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=
l.defaultEdgeStyle);null!=l.defaultPageVisible&&(Graph.prototype.defaultPageVisible=l.defaultPageVisible);null!=l.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=l.defaultGridEnabled);null!=l.zoomWheel&&(Graph.zoomWheel=l.zoomWheel);null!=l.zoomFactor&&(B=parseFloat(l.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=l.defaultGridSize&&(B=parseInt(l.defaultGridSize),!isNaN(B)&&0<B?mxGraph.prototype.gridSize=
B:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=l.gridSteps&&(B=parseInt(l.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=l.pageFormat&&(B=parseInt(l.pageFormat.width),K=parseInt(l.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(K)&&0<K?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,K),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));
null!=l.thumbWidth&&(Sidebar.prototype.thumbWidth=l.thumbWidth);null!=l.thumbHeight&&(Sidebar.prototype.thumbHeight=l.thumbHeight);null!=l.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=l.emptyLibraryXml);null!=l.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=l.emptyDiagramXml);null!=l.sidebarWidth&&(EditorUi.prototype.hsplitPosition=l.sidebarWidth);null!=l.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=l.updateDefaultStyle);null!=l.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
l.sidebarTitles);null!=l.sidebarTitleSize&&(B=parseInt(l.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=l.fontCss&&("string"===typeof l.fontCss?Editor.configureFontCss(l.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=l.autosaveDelay&&(B=parseInt(l.autosaveDelay),!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
null!=l.maxImageBytes&&(EditorUi.prototype.maxImageBytes=l.maxImageBytes);null!=l.maxImageSize&&(EditorUi.prototype.maxImageSize=l.maxImageSize);null!=l.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=l.shareCursorPosition);null!=l.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=l.showRemoteCursors);null!=l.restrictExport&&(DrawioFile.RESTRICT_EXPORT=l.restrictExport);null!=l.replaceSvgDataUris&&(Editor.replaceSvgDataUris=l.replaceSvgDataUris);null!=l.foreignObjectImages&&(Editor.foreignObjectImages=
l.foreignObjectImages);null!=l.shadowColor&&(mxConstants.SHADOW_COLOR=l.shadowColor);null!=l.shadowOpacity&&(mxConstants.SHADOW_OPACITY=l.shadowOpacity);null!=l.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=l.shadowOffsetX);null!=l.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=l.shadowOffsetY);null!=l.shadowBlur&&(mxConstants.SHADOW_BLUR=l.shadowBlur);null!=l.enableAnimations&&(Editor.enableAnimations=l.enableAnimations);null!=l.enableChatGpt&&(Editor.enableChatGpt=l.enableChatGpt);null!=l.gptApiKey&&
(Editor.gptApiKey=l.gptApiKey);null!=l.gptModel&&(Editor.gptModel=l.gptModel);null!=l.gptUrl&&(Editor.gptUrl=l.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(l){if(null!=l){Editor.prototype.fontCss=l;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(l));
B.parentNode.insertBefore(K,B);l=l.split("url(");for(K=1;K<l.length;K++){var S=l[K].indexOf(")");S=Editor.trimCssUrl(l[K].substring(0,S));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",S);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(l){return l.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(l){l=null!=l?l:Editor.GUID_LENGTH;for(var B=[],K=0;K<l;K++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",
extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=
25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(l){l=null!=l&&"mxlibrary"!=l.nodeName?this.extractGraphModel(l):null;if(null!=l){var B=Editor.extractParserError(l,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[l],"cause",[B]),Error(mxResources.get("notADiagramFile")+
" ("+B+")");if("mxGraphModel"==l.nodeName){B=l.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=K&&(S=new mxCodec(K.ownerDocument),S.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var S=new mxCodec(K.ownerDocument);
S.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==l.getAttribute("math");this.graph.setAdaptiveColors(l.getAttribute("adaptiveColors"));B=l.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
l.getAttribute("shadow"),!1);if(B=l.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<B.length;K++)this.graph.addExtFont(B[K].name,B[K].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;
Editor.prototype.getGraphXml=function(l,B){l=null!=l?l:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=S&&K.setAttribute("backgroundImage",JSON.stringify(S));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?K.setAttribute("adaptiveColors",
this.graph.adaptiveColors):K.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),K.setAttribute("extFonts",S.join("|")));return K};Editor.prototype.isDataSvg=function(l){try{var B=mxUtils.parseXml(l).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 K=mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(l,B,K){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(l,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var K=function(){S=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());
else Editor.onMathJaxDone()};l=null!=l?l:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var S=null;Editor.doMathJaxRender=function(Y){try{null==S?(MathJax.typesetClear([Y]),MathJax.typeset([Y]),K()):S!=Y&&Editor.mathJaxQueue.push(Y)}catch(aa){MathJax.typesetClear([Y]),null!=aa.retry?(S=Y,aa.retry.then(function(){MathJax.typesetPromise([Y]).then(K)["catch"](function(la){console.log("Error in MathJax.typesetPromise: "+la.toString());K()})})["catch"](function(la){console.log("Error in MathJax.retry: "+
la.toString());K()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=B?B:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var Y=0;Y<Editor.mathJaxQueue.length;Y++)Editor.doMathJaxRender(Editor.mathJaxQueue[Y])}}};Editor.MathJaxRender=function(Y){"undefined"!==typeof MathJax&&
"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Y):Editor.mathJaxQueue.push(Y)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var Y=mxUtils.bind(this,function(aa,la){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Y);this.graph.addListener(mxEvent.REFRESH,Y)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var T=
document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",l);B[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(l){if(0<l.length){var B="",K=[""],S=0,P=!0,T;l=$jscomp.makeIterator(l);for(T=l.next();!T.done;T=l.next())T=T.value,'"'===T?(P&&T===B&&(K[S]+=T),P=!P):","===T&&P?T=K[++S]="":K[S]+=T,B=T;return K}return[]};Editor.prototype.getProxiedUrl=function(l){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
!this.isCorsEnabledForUrl(l)){var B=EditorUi.isVisioFilename(l);B=/\.png$/i.test(l)||/\.pdf$/i.test(l)||B;var K="t="+(new Date).getTime();l=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+K+(B?"&base64=1":"")}return l};Editor.prototype.isCorsEnabledForUrl=function(l){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||l.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(l)||"https://raw.githubusercontent.com/"===l.substring(0,34)||"https://fonts.googleapis.com/"===l.substring(0,29)||"https://fonts.gstatic.com/"===l.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var l=new mxUrlConverter;l.updateBaseUrl();var B=l.convert,K=this;l.convert=function(S){null!=S&&navigator.onLine&&("http://"!=S.substring(0,7)&&"https://"!=S.substring(0,8)||S.substring(0,l.baseUrl.length)==l.baseUrl||K.crossOriginImages&&
K.isCorsEnabledForUrl(S)?"chrome-extension://"!=S.substring(0,19)&&(S=B.apply(this,arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S));return S};return l};Editor.createSvgDataUri=function(l){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(l)))};Editor.prototype.convertImageToDataUri=function(l,B,K,S,P){try{var T=!0,Y=window.setTimeout(mxUtils.bind(this,function(){T=!1;B(l)}),this.timeout),aa=mxUtils.bind(this,function(){null!=S?this.convertImageToDataUri(l,B,K,S,!0):B(l)});
if(/(\.svg)$/i.test(l)&&!P)mxUtils.get(l,mxUtils.bind(this,function(va){window.clearTimeout(Y);T&&(200>va.getStatus()||299<va.getStatus()?aa():B(Editor.createSvgDataUri(va.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Y);T&&aa()}));else{var la=new Image;this.crossOriginImages&&(la.crossOrigin="anonymous");la.onload=function(){window.clearTimeout(Y);if(T)try{S=null!=S&&P?S:1;var va=document.createElement("canvas"),ta=va.getContext("2d");ta.scale(S,S);va.height=la.height*S;va.width=
la.width*S;ta.drawImage(la,0,0);B(va.toDataURL())}catch(qa){B(l)}};la.onerror=function(){window.clearTimeout(Y);T&&(null!=K?K():B(l))};la.src=l}}catch(va){null!=K?K():B(l)}};Editor.prototype.convertImages=function(l,B,K,S){function P(){0<T.length?T.shift()():B(l)}null==S&&(S=this.createImageUrlConverter());var T=[],Y=K||{};K=mxUtils.bind(this,function(aa,la){aa=l.getElementsByTagName(aa);for(var va=0;va<aa.length;va++)mxUtils.bind(this,function(ta){T.push(mxUtils.bind(this,function(){try{if(null!=
ta){var qa=S.convert(ta.getAttribute(la));if(null!=qa&&"data:"!=qa.substring(0,5)){var Ba=Y[qa];null==Ba?this.convertImageToDataUri(qa,function(ya){null!=ya&&(Y[qa]=ya,ta.setAttribute(la,ya));P()},null,Editor.svgRasterScale):(ta.setAttribute(la,Ba),P())}else null!=qa&&ta.setAttribute(la,qa),P()}}catch(ya){P()}}))})(aa[va])});K("image","xlink:href");K("img","src");P()};Editor.base64Encode=function(l){for(var B="",K=0,S=l.length,P,T,Y;K<S;){P=l.charCodeAt(K++)&255;if(K==S){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);B+="==";break}T=l.charCodeAt(K++);if(K==S){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);B+="=";break}Y=l.charCodeAt(K++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(Y&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Y&63)}return B};Editor.prototype.loadUrl=function(l,B,K,S,P,T,Y,aa){try{var la=!Y&&(S||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));P=null!=P?P:!0;var va=mxUtils.bind(this,
function(){mxUtils.get(l,mxUtils.bind(this,function(ta){200<=ta.getStatus()&&299>=ta.getStatus()?null!=B&&(ta=ta.getText(),la&&(T=null!=T?T:"data:image/png;base64,",ta=T+Editor.base64Encode(ta)),B(ta)):null!=K&&(0==ta.getStatus()?K({message:mxResources.get("accessDenied")},ta):404==ta.getStatus()?K({message:mxResources.get("fileNotFound"),code:ta.getStatus()},ta):K({message:this.getErrorMessage(ta)},ta))}),function(ta){null!=K&&K({message:mxResources.get("error")+" "+ta.getStatus()})},la,this.timeout,
function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:va})},aa)});va()}catch(ta){null!=K&&K(ta)}};Editor.prototype.getErrorMessage=function(l){var B=mxResources.get("error")+" "+l.getStatus();try{var K=l.getText(),S=JSON.parse(K);null!=S&&null!=S.error&&null!=S.error.message&&(B=S.error.message+" ("+B+")")}catch(P){}return B};Editor.prototype.absoluteCssFonts=function(l){var B=null;if(null!=l){var K=l.split("url(");if(0<K.length){B=[K[0]];l=window.location.pathname;var S=null!=l?l.lastIndexOf("/"):
-1;0<=S&&(l=l.substring(0,S+1));S=document.getElementsByTagName("base");var P=null;null!=S&&0<S.length&&(P=S[0].getAttribute("href"));for(var T=1;T<K.length;T++)if(S=K[T].indexOf(")"),0<S){var Y=Editor.trimCssUrl(K[T].substring(0,S));this.graph.isRelativeUrl(Y)&&(Y=null!=P?P+Y:window.location.protocol+"//"+window.location.hostname+("/"==Y.charAt(0)?"":l)+Y);B.push('url("'+Y+'"'+K[T].substring(S))}else B.push(K[T])}else B=[l]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(l,B,
K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));K(l,B)};Editor.prototype.embedCssFonts=function(l,B){var K=l.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==S){for(var la=[K[0]],va=1;va<K.length;va++){var ta=K[va].indexOf(")");la.push('url("');la.push(this.cachedFonts[Editor.trimCssUrl(K[va].substring(0,ta))]);la.push('"'+K[va].substring(ta))}B(la.join(""))}});if(0<K.length){for(l=1;l<K.length;l++){var T=
K[l].indexOf(")"),Y=null,aa=K[l].indexOf("format(",T);0<aa&&(Y=Editor.trimCssUrl(K[l].substring(aa+7,K[l].indexOf(")",aa))));mxUtils.bind(this,function(la){if(null==this.cachedFonts[la]){this.cachedFonts[la]=la;S++;var va="application/x-font-ttf";if("svg"==Y||/(\.svg)($|\?)/i.test(la))va="image/svg+xml";else if("otf"==Y||"embedded-opentype"==Y||/(\.otf)($|\?)/i.test(la))va="application/x-font-opentype";else if("woff"==Y||/(\.woff)($|\?)/i.test(la))va="application/font-woff";else if("woff2"==Y||/(\.woff2)($|\?)/i.test(la))va=
"application/font-woff2";else if("eot"==Y||/(\.eot)($|\?)/i.test(la))va="application/vnd.ms-fontobject";else if("sfnt"==Y||/(\.sfnt)($|\?)/i.test(la))va="application/font-sfnt";this.mapFontUrl(va,la,mxUtils.bind(this,function(ta,qa){this.loadUrl(qa,mxUtils.bind(this,function(Ba){this.cachedFonts[la]=Ba;S--;P()}),mxUtils.bind(this,function(Ba){S--;P()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[l].substring(0,T)),Y)}P()}else B(l)};Editor.prototype.loadFonts=function(l){null!=
this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=l&&l()})):null!=l&&l()};Editor.prototype.createGoogleFontCache=function(){var l={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(l[B]=Graph.fontMapping[B]);return l};Editor.prototype.embedExtFonts=function(l){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=
mxUtils.bind(this,function(){0==S&&this.embedCssFonts(K.join(""),l)}),T=0;T<B.length;T++)mxUtils.bind(this,function(Y,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(S++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(la){this.cachedGoogleFonts[aa]=la;K.push(la+"\n");S--;P()}),mxUtils.bind(this,function(la){S--;K.push("@import url("+aa+");\n");P()}))):K.push(this.cachedGoogleFonts[aa]+"\n"):K.push('@font-face {font-family: "'+Y+'";src: url("'+aa+'")}\n')})(B[T].name,
B[T].url);P()}else l()};Editor.prototype.addMathCss=function(l){l=l.getElementsByTagName("defs");if(null!=l&&0<l.length)for(var B=document.getElementsByTagName("style"),K=0;K<B.length;K++){var S=mxUtils.getTextContent(B[K]);0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&l[0].appendChild(B[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(l,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=mxUtils.getSvgDefs(l),S=B.split("\n");B=[];for(var P=[],T=0;T<S.length;T++)"@import"==
S[T].substring(0,7)?B.push(S[T]):P.push(S[T]);l=l.ownerDocument;l=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");l.setAttribute("type","text/css");0<B.length&&(mxUtils.setTextContent(l,B.join("\n")),K.appendChild(l));0<P.length&&(l=l.cloneNode(!1),mxUtils.setTextContent(l,P.join("\n")),K.appendChild(l))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,
B,K){var S=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(S/l,S/B))};Editor.prototype.exportToCanvas=function(l,B,K,S,P,T,Y,aa,la,va,ta,qa,Ba,ya,La,Aa,Da,pa){try{T=null!=T?T:!0;Y=null!=Y?Y:!0;qa=null!=qa?qa:this.graph;Ba=null!=Ba?Ba:0;var Ca=la?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=S);null==Ca&&0==la&&(Ca="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,Ba,ya,null,Y,null,null,null,va,null,Aa,Da,pa),mxUtils.bind(this,function(za){try{var wa=
new Image;wa.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Na.drawImage(wa,0,0);l(Ta,za)},0):(Na.drawImage(wa,0,0),l(Ta,za))},Ta=document.createElement("canvas"),Ua=parseInt(za.getAttribute("width")),Ha=parseInt(za.getAttribute("height"));aa=null!=aa?aa:1;null!=B&&(aa=T?Math.min(1,Math.min(3*B/(4*Ha),B/Ua)):B/Ua);aa=this.getMaxCanvasScale(Ua,Ha,aa);Ua=Math.ceil(aa*Ua);Ha=Math.ceil(aa*Ha);Ta.setAttribute("width",Ua);Ta.setAttribute("height",Ha);
var Na=Ta.getContext("2d");if(null!=Ca){var y=mxUtils.getLightDarkColor(Ca);Na.beginPath();Na.rect(0,0,Ua,Ha);Na.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?y.dark:y.light;Na.fill()}1!=aa&&Na.scale(aa,aa);if(La){var N=qa.view,R=N.scale;N.scale=1;var V=btoa(unescape(encodeURIComponent(N.createSvgGrid(N.gridColor))));N.scale=R;V="data:image/svg+xml;base64,"+V;var fa=qa.gridSize*N.gridSteps*aa,ja=qa.getGraphBounds(),oa=N.translate.x*R,ua=N.translate.y*R,ra=oa+(ja.x-oa)/R-Ba,xa=ua+(ja.y-ua)/
R-Ba,Ga=new Image;Ga.onload=function(){try{for(var Ka=-Math.round(fa-mxUtils.mod((oa-ra)*aa,fa)),Sa=-Math.round(fa-mxUtils.mod((ua-xa)*aa,fa));Ka<Ua;Ka+=fa)for(var Pa=Sa;Pa<Ha;Pa+=fa)Na.drawImage(Ga,Ka/aa,Pa/aa);Ra()}catch($a){null!=P&&P($a)}};Ga.onerror=function(Ka){null!=P&&P(Ka)};Ga.src=V}else Ra()}catch(Ka){null!=P&&P(Ka)}});wa.onerror=function(Ra){null!=P&&P(Ra)};va&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
this.addFontCss(za,this.resolvedFontCss),wa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(za,Ra),this.loadFonts(Za)}catch(Ta){null!=P&&P(Ta)}}))}catch(Ra){null!=P&&P(Ra)}}),K,ta)}catch(za){null!=P&&P(za)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var n=v,A=0;8>A;A++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[v]=n;Editor.updateCRC=function(l,B,K,S){for(var P=0;P<S;P++)l=Editor.crcTable[(l^
B.charCodeAt(K+P))&255]^l>>>8;return l};Editor.crc32=function(l){for(var B=-1,K=0;K<l.length;K++)B=B>>>8^Editor.crcTable[(B^l.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(l,B,K,S,P){function T(ta,qa){var Ba=la;la+=qa;return ta.substring(Ba,la)}function Y(ta){ta=T(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function aa(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}l=l.substring(l.indexOf(",")+
1);l=window.atob?atob(l):Base64.decode(l,!0);var la=0;if(T(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(l,4),"IHDR"!=T(l,4))null!=P&&P();else{T(l,17);P=l.substring(0,la);do{var va=Y(l);if("IDAT"==T(l,4)){P=l.substring(0,la-8);"pHYs"==B&&"dpi"==K?(K=Math.round(S/.0254),K=aa(K)+aa(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,B,0,4);S=Editor.updateCRC(S,K,0,K.length);P+=
aa(K.length)+B+K+aa(S^4294967295);P+=l.substring(la-8,l.length);break}P+=l.substring(la-8,la-4+va);T(l,va);T(l,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,B){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var Q=ColorDialog.resetRecentColors;
ColorDialog.resetRecentColors=function(){Q.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(l,B){var K=null;null!=l.editor.graph.getModel().getParent(B)?K=B.getId():null!=l.currentPage&&(K=l.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.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.isMathOptionVisible=function(l){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(l){l=c.apply(this,arguments);var B=this.editorUi,
K=B.editor.graph;if(K.isEnabled()){var S=B.getCurrentFile();null!=S&&S.isAutosaveOptional()&&l.appendChild(this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(T){B.editor.setAutosave(T);B.editor.autosave&&S.isModified()&&S.fileChanged()},{install:function(T){this.listener=function(){T(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&K.isEnabled()&&
"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(T){B.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=function(){T(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});l.appendChild(P);(!B.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&P.appendChild(B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return l};
mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",
dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=
[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(l){return"0"==mxUtils.getValue(l.style,
"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(l){return"0"==mxUtils.getValue(l.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
min:0,defVal:25,isVisible:function(l){return"1"==mxUtils.getValue(l.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=
[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=l.style.shape&&!l.containsLabel&&0<l.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
f.apply(this,arguments);null!=l.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),l.customProperties,l))};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(l){var B=this.editorUi.getSelectionState();1==B.cells.length?this.addActions(l,["copyStyle","pasteStyle"]):1<=B.cells.length&&this.addActions(l,["pasteStyle","pasteData"]);k.apply(this,arguments);return l};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
function(l,B,K,S){function P(Na,y,N,R,V){if(null!=N.valueChanged)N.valueChanged(y,V,K,qa);else{Ba.getModel().beginUpdate();try{V=[];var fa=[];if(null!=N.index){for(var ja=[],oa=N.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Na;)ja.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;N.index<ja.length?null!=R?ja.splice(R,1):ja[N.index]=y:ja.push(y);null!=N.size&&ja.length>N.size&&(ja=ja.slice(0,N.size));y=ja.join(",");null!=N.countProperty&&(Ba.setCellStyles(N.countProperty,ja.length,
Ba.getSelectionCells()),V.push(N.countProperty),fa.push(ja.length))}Ba.setCellStyles(Na,y,Ba.getSelectionCells());V.push(Na);fa.push(y);if(null!=N.dependentProps)for(Na=0;Na<N.dependentProps.length;Na++){var ua=N.dependentPropsDefVal[Na],ra=N.dependentPropsVals[Na];if(ra.length>y)ra=ra.slice(0,y);else for(var xa=ra.length;xa<y;xa++)ra.push(ua);ra=ra.join(",");Ba.setCellStyles(N.dependentProps[Na],ra,Ba.getSelectionCells());V.push(N.dependentProps[Na]);fa.push(ra)}if("function"==typeof N.onChange)N.onChange(Ba,
y);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}}function T(Na,y,N){var R=mxUtils.getOffset(l,!0),V=mxUtils.getOffset(Na,!0);y.style.position="absolute";y.style.left=V.x-R.x+"px";y.style.top=V.y-R.y+"px";y.style.width=Na.offsetWidth+"px";y.style.height=Na.offsetHeight-(N?4:0)+"px";y.style.zIndex=5}function Y(Na,y,N){function R(fa){if(null==fa||fa==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+
"')";else if("default"==fa)V.style.background="";else{var ja=mxUtils.getLightDarkColor(fa);mxUtils.isLightDarkColor(fa)&&ja.light!=ja.dark?V.style.background="linear-gradient(to right bottom, "+ja.cssText+" 50%, "+mxUtils.invertLightDarkColor(ja).cssText+" 50.3%)":V.style.background=fa}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";R(y);btn=mxUtils.button("",mxUtils.bind(qa,function(fa){this.editorUi.pickColor(y,
function(ja){P(Na,ja,N);R(ja)});mxEvent.consume(fa)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Na,y,N,R,V,fa,ja){null!=y&&(y=y.split(","),ya.push({name:Na,values:y,type:N,defVal:R,countProperty:V,parentRow:fa,isDeletable:!0,flipBkg:ja}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var ua=fa,ra=0;null!=ua.nextSibling;)if(ua.nextSibling.getAttribute("data-pName")==
Na)ua=ua.nextSibling,ra++;else break;var xa={type:N,parentRow:fa,index:ra,isDeletable:!0,defVal:R,countProperty:V};ra=ta(Na,"",xa,0==ra%2,ja);P(Na,R,xa);ua.parentNode.insertBefore(ra,ua.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function la(Na,y,N,R,V,fa,ja){if(0<V){var oa=Array(V);y=null!=y?y.split(","):[];for(var ua=0;ua<V;ua++)oa[ua]=null!=y[ua]?y[ua]:null!=R?R:"";ya.push({name:Na,values:oa,type:N,defVal:R,parentRow:fa,
flipBkg:ja,size:V})}return document.createElement("div")}function va(Na,y,N){var R=document.createElement("input");R.type="checkbox";R.checked="1"==y;mxEvent.addListener(R,"change",function(){P(Na,R.checked?"1":"0",N,null,R)});return R}function ta(Na,y,N,R,V){var fa=N.dispName,ja=N.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(R?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Na);oa.setAttribute("data-pValue",y);R=!1;null!=N.index&&(oa.setAttribute("data-index",
N.index),fa=(null!=fa?fa:"")+"["+N.index+"]",R=!0);var ua=document.createElement("td");ua.className="gePropRowCell";fa=mxResources.get(fa,null,fa);mxUtils.write(ua,fa);ua.setAttribute("title",fa);R&&(ua.style.textAlign="right");oa.appendChild(ua);ua=document.createElement("td");ua.className="gePropRowCell";ua.setAttribute("title",null!=y?y:mxResources.get("none"));if("color"==ja)ua.appendChild(Y(Na,y,N));else if("bool"==ja||"boolean"==ja)ua.appendChild(va(Na,y,N));else if("enum"==ja){var ra=N.enumList;
ua.innerHTML="";var xa=document.createElement("div");ua.appendChild(xa);for(V=0;V<ra.length;V++)if(fa=ra[V],fa.val==y){mxUtils.write(xa,mxResources.get(fa.dispName,null,fa.dispName));break}mxEvent.addListener(ua,"click",mxUtils.bind(qa,function(){xa.innerHTML="";var Ka=document.createElement("select"),Sa=null;T(ua,Ka);for(var Pa=0;Pa<ra.length;Pa++){var $a=ra[Pa],Oa=document.createElement("option");Oa.value=mxUtils.htmlEntities($a.val);mxUtils.write(Oa,mxResources.get($a.dispName,null,$a.dispName));
Ka.appendChild(Oa);null==$a.val&&(Oa.value="null",Sa=Oa)}Ka.value=null==y&&null!=Sa?"null":y;xa.appendChild(Ka);mxEvent.addListener(Ka,"change",function(){var Ma=mxUtils.htmlEntities(Ka.value);if(Ka[Ka.selectedIndex]==Sa||"null"==Ma.value)Ma=null;P(Na,Ma,N)});Ka.focus();mxEvent.addListener(Ka,"blur",function(){xa.innerHTML="";for(var Ma=0;Ma<ra.length;Ma++){var fb=ra[Ma];if(fb.val==Ka.value){mxUtils.write(xa,mxResources.get(fb.dispName,null,fb.dispName));break}}})}))}else if("dynamicArr"==ja)ua.appendChild(aa(Na,
y,N.subType,N.subDefVal,N.countProperty,oa,V));else if("staticArr"==ja)ua.appendChild(la(Na,y,N.subType,N.subDefVal,N.size,oa,V));else if("readOnly"==ja)V=document.createElement("input"),V.setAttribute("readonly",""),V.value=y,V.style.borderWidth="0px","id"==Na?(oa.firstChild.innerHTML="",oa.firstChild.setAttribute("colspan","2"),V.style.flexGrow="1",V.style.marginLeft="4px",V.style.textAlign="center",V.setAttribute("title",y),fa=document.createElement("div"),mxUtils.write(fa,mxResources.get("id")),
fa.style.display="inline-flex",fa.style.alignItems="center",fa.style.width="100%",fa.appendChild(V),oa.firstChild.appendChild(fa)):(V.style.width="96px",ua.appendChild(V));else{ua.innerHTML="";var Ga=document.createElement("div");ua.appendChild(Ga);Ga.innerHTML=mxUtils.htmlEntities(decodeURIComponent(y));mxEvent.addListener(Ga,"click",mxUtils.bind(qa,function(){function Ka(){var Pa=Sa.value;Pa=0==Pa.length&&"string"!=ja&&"numbers"!=ja?0:Pa;N.allowAuto&&(null!=Pa.trim&&"auto"==Pa.trim().toLowerCase()?
(Pa="auto",ja="string"):(Pa=parseFloat(Pa),Pa=isNaN(Pa)?0:Pa));null!=N.min&&Pa<N.min?Pa=N.min:null!=N.max&&Pa>N.max&&(Pa=N.max);var $a=null;try{$a="numbers"==ja?Pa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ja?parseInt(Pa):Pa)+"")}catch(Oa){}P(Na,$a,N,null,Sa)}Ga.innerHTML="";var Sa=document.createElement("input");T(Ga,Sa,!0);Sa.value=decodeURIComponent(y);Sa.className="gePropEditor";"int"!=ja&&"float"!=ja||N.allowAuto||(Sa.type="number",Sa.step="int"==ja?"1":"any",null!=N.min&&
(Sa.min=parseFloat(N.min)),null!=N.max&&(Sa.max=parseFloat(N.max)));Ga.appendChild(Sa);mxEvent.addListener(Sa,"keypress",function(Pa){13==Pa.keyCode&&Ka()});Sa.focus();mxEvent.addListener(Sa,"blur",function(){Ka()})}))}N.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(Ka){P(Na,"",N,N.index);mxEvent.consume(Ka)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",ua.appendChild(V));oa.appendChild(ua);return oa}var qa=this,Ba=this.editorUi.editor.graph,
ya=[],La=document.createElement("table");La.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Da=document.createElement("th");Da.className="gePropHeaderCell";Da.style.paddingLeft="16px";Da.style.backgroundRepeat="no-repeat";Da.style.backgroundPosition="-2px 50%";Da.style.backgroundSize="20px";mxUtils.write(Da,mxResources.get("property"));Aa.style.cursor="pointer";var pa=function(){var Na=La.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Da.style.backgroundImage=
"url('"+Editor.arrowRightImage+"')";var y="none";for(var N=l.childNodes.length-1;0<=N;N--)try{var R=l.childNodes[N],V=R.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||l.removeChild(R)}catch(fa){}}else Da.style.backgroundImage="url('"+Editor.arrowDownImage+"')",y="";for(N=0;N<Na.length;N++)Na[N].style.display=y};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;pa()});Aa.appendChild(Da);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";
Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Aa.appendChild(Ca);La.appendChild(Aa);var za=Ca=!1;Aa=null;1==K.vertices.length&&0==K.edges.length?Aa=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(Aa=K.edges[0].id);null==Aa||S||La.appendChild(ta("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var wa in B)if(S=B[wa],!S.primary&&("function"!=typeof S.isVisible||S.isVisible(K,this))){var Za=null!=S.getValue?S.getValue(K,this):null!=K.style[wa]?
mxUtils.htmlEntities(K.style[wa]+""):null!=S.getDefaultValue?S.getDefaultValue(K,this):S.defVal;if("separator"==S.type)za=!za;else{if("staticArr"==S.type)S.size=parseInt(K.style[S.sizeProperty]||B[S.sizeProperty].defVal)||0;else if(null!=S.dependentProps){var Ra=S.dependentProps,Ta=[],Ua=[];for(Aa=0;Aa<Ra.length;Aa++){var Ha=K.style[Ra[Aa]];Ua.push(B[Ra[Aa]].subDefVal);Ta.push(null!=Ha?Ha.split(","):[])}S.dependentPropsDefVal=Ua;S.dependentPropsVals=Ta}La.appendChild(ta(wa,Za,S,Ca,za));Ca=!Ca}}for(Aa=
0;Aa<ya.length;Aa++)for(S=ya[Aa],B=S.parentRow,wa=0;wa<S.values.length;wa++)Ca=ta(S.name,S.values[wa],{type:S.type,parentRow:S.parentRow,isDeletable:S.isDeletable,index:wa,defVal:S.defVal,countProperty:S.countProperty,size:S.size},0==wa%2,S.flipBkg),B.parentNode.insertBefore(Ca,B.nextSibling),B=Ca;l.appendChild(La);pa();return l};StyleFormatPanel.prototype.addStyles=function(l){if(null!=this.defaultColorSchemes){var B=this.editorUi,K=B.editor.graph,S=document.createElement("div");S.style.padding=
"6px 20px 0 24px";l.appendChild(S);var P=document.createElement("div");P.className="geSwitcher";P.style.padding="4px 18px 6px 0px";for(var T=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=document.createElement("div");aa.className="geSwitcherDot";mxUtils.bind(this,function(Ba){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){la(Ba)}))})(Y);T.push(aa);P.appendChild(aa)}var la=mxUtils.bind(this,function(Ba){null!=T[Ba]&&(null!=this.format.currentScheme&&null!=T[this.format.currentScheme]&&
(T[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,va(this.defaultColorSchemes[this.format.currentScheme]),T[this.format.currentScheme].style.background="#84d7ff")}),va=mxUtils.bind(this,function(Ba){var ya=mxUtils.clone(K.defaultVertexStyle);ya[mxConstants.STYLE_STROKECOLOR]=null!=ya[mxConstants.STYLE_STROKECOLOR]?ya[mxConstants.STYLE_STROKECOLOR]:"default";ya[mxConstants.STYLE_FILLCOLOR]=null!=ya[mxConstants.STYLE_FILLCOLOR]?ya[mxConstants.STYLE_FILLCOLOR]:
"default";ya[mxConstants.STYLE_FONTCOLOR]=null!=ya[mxConstants.STYLE_FONTCOLOR]?ya[mxConstants.STYLE_FONTCOLOR]:"default";K.replaceDefaultColors(new mxCell,ya);var La=mxUtils.bind(this,function(Da){var pa=mxUtils.button("",mxUtils.bind(this,function(wa){K.getModel().beginUpdate();try{for(var Za=B.getSelectionState().cells,Ra=0;Ra<Za.length;Ra++){var Ta=K.getModel().getStyle(Za[Ra]);null!=Da?(mxEvent.isShiftDown(wa)||(Ta=""==Da.fill||null==Da.fill?mxUtils.setStyle(Ta,mxConstants.STYLE_FILLCOLOR,null):
mxUtils.setStyle(Ta,mxConstants.STYLE_FILLCOLOR,Da.fill),Ta=""==Da.gradient||null==Da.gradient?mxUtils.setStyle(Ta,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ta,mxConstants.STYLE_GRADIENTCOLOR,Da.gradient),mxEvent.isControlDown(wa)||mxClient.IS_MAC&&mxEvent.isMetaDown(wa)||!K.getModel().isVertex(Za[Ra])||(Ta=""==Da.font||null==Da.font?mxUtils.setStyle(Ta,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ta,mxConstants.STYLE_FONTCOLOR,Da.font))),mxEvent.isAltDown(wa)||(Ta=""==Da.stroke||
null==Da.fill?mxUtils.setStyle(Ta,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ta,mxConstants.STYLE_STROKECOLOR,Da.stroke))):(Ta=mxUtils.setStyle(Ta,mxConstants.STYLE_FILLCOLOR,null),Ta=mxUtils.setStyle(Ta,mxConstants.STYLE_STROKECOLOR,null),Ta=mxUtils.setStyle(Ta,mxConstants.STYLE_GRADIENTCOLOR,null),K.getModel().isVertex(Za[Ra])&&(Ta=mxUtils.setStyle(Ta,mxConstants.STYLE_FONTCOLOR,null)));K.getModel().setStyle(Za[Ra],Ta)}}finally{K.getModel().endUpdate()}}));pa.className="geStyleButton";
pa.style.width="36px";pa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";pa.style.margin="0px 6px 6px 0px";if(null!=Da){var Ca="1px solid";null!=Da.border&&(Ca=Da.border);if(null!=Da.gradient)pa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Da.gradient).cssText+" 100%)";else if(Da.fill==mxConstants.NONE)pa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Da.fill||""==Da.fill)pa.style.backgroundColor=
mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var za=mxUtils.getLightDarkColor(Da.fill);pa.style.backgroundImage="linear-gradient(to right bottom, "+za.cssText+" 50%, "+za.light+" 50.3%)"}null==Da.stroke||Da.stroke==mxConstants.NONE?pa.style.border=Ca+" transparent":""==Da.stroke?pa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(za=mxUtils.getLightDarkColor(Da.stroke),pa.style.border=
Ca+" "+za.cssText,pa.style.borderRightColor=za.light,pa.style.borderBottomColor=pa.style.borderRightColor);null!=Da.title&&pa.setAttribute("title",Da.title)}else Ca=mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff"),za=mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000"),pa.style.backgroundColor=Ca,pa.style.border="1px solid "+za;pa.style.borderRadius="0";S.appendChild(pa);null!=Da&&null!=Da.gradient&&(Ca=pa.cloneNode(!1),Ca.style.backgroundImage="linear-gradient(light-dark(transparent, "+
mxUtils.getLightDarkColor(Da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Da.gradient).light+") 100%)",Ca.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ca.style.backgroundColor="transparent",S.appendChild(Ca),Ca.style.marginLeft="-42px",mxEvent.addListener(Ca,"click",function(){pa.click()}))});S.innerText="";if(null!=Ba)for(var Aa=0;Aa<Ba.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(S),La(Ba[Aa])});null==this.format.currentScheme?la(Math.min(T.length-1,Editor.isDarkMode()?
1:"1"==urlParams.sketch?5:0)):la(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?43:23;var ta=document.createElement("div");ta.className="geButton";ta.style.cssText="position:absolute;left:0px;bottom:"+Y+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){la(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText=
"position:absolute;left:186px;bottom:"+Y+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(l.appendChild(ta),l.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){la(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));va(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&l.appendChild(P)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+
":wght@400;500");return l};Graph.createFontElement=function(l,B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(l=document.createElement("link"),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),l.setAttribute("charset","UTF-8"),l.setAttribute("href",Graph.rewriteGoogleFontUrl(B))):(null==K&&(K='@font-face {\nfont-family: "'+l+'";\nsrc: url("'+B+'");\n}'),l=document.createElement("style"),mxUtils.write(l,K));return l};Graph.addRecentCustomFont=function(l,B){};Graph.addFont=
function(l,B,K,S){if(null!=l&&0<l.length&&null!=B&&0<B.length){S=null!=S?S:Graph.customFontElements;var P=l.toLowerCase();if("helvetica"!=P&&"arial"!=l&&"sans-serif"!=P){var T=S[P];null!=T&&T.url!=B&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=B,"http:"==B.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(B)),T={name:l,url:B,elt:Graph.createFontElement(l,T)},S[P]=T,B=S==Graph.customFontElements?document.getElementsByTagName("head")[0]:null,null!=K&&("link"==T.elt.nodeName.toLowerCase()?
(T.elt.onload=K,T.elt.onerror=K):K()),null!=B&&B.appendChild(T.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();return l};Graph.getFontUrl=function(l,B){l=Graph.customFontElements[l.toLowerCase()];null!=l&&(B=l.url);return B};Graph.processFontAttributes=function(l){l=l.getElementsByTagName("*");for(var B=0;B<l.length;B++){var K=l[B].getAttribute("data-font-src");if(null!=K){var S="FONT"==l[B].nodeName?l[B].getAttribute("face"):l[B].style.fontFamily;null!=S&&Graph.addFont(S,K)}}};Graph.processFontStyle=
function(l){if(null!=l){var B=mxUtils.getValue(l,"fontSource",null);if(null!=B){var K=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);if(null!=K)try{Graph.addFont(K,decodeURIComponent(B))}catch(S){}}}return l};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="drawio-drop-shadow";Graph.prototype.svgShadowColor=
"#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var t=Graph.prototype.init;Graph.prototype.init=function(){function l(P){B=P}t.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,
"mouseleave",function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var Y=new mxStackLayout(this.graph,!1);Y.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:
20;Y.marginLeft=T.marginLeft||0;Y.marginRight=T.marginRight||0;Y.marginTop=T.marginTop||0;Y.marginBottom=T.marginBottom||0;Y.allowGaps=T.allowGaps||0;Y.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");Y.resizeParent=!1;Y.fill=!0;return Y}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,B){return Graph.processFontStyle(q.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;
mxSvgCanvas2D.prototype.updateTextNodes=function(l,B,K,S,P,T,Y,aa,la,va,ta,qa){D.apply(this,arguments);Graph.processFontAttributes(qa)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,B,K,S){function P(){for(var Aa=aa.getSelectionCells(),Da=[],pa=0;pa<Aa.length;pa++)aa.isCellVisible(Aa[pa])&&Da.push(Aa[pa]);aa.setSelectionCells(Da)}
function T(Aa){aa.setHiddenTags(Aa?[]:la.slice());P();aa.refresh()}function Y(Aa,Da){ta.innerText="";if(0<Aa.length){var pa=document.createElement("table");pa.setAttribute("cellpadding","2");pa.style.boxSizing="border-box";pa.style.tableLayout="fixed";pa.style.width="100%";var Ca=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var za=0;za<Aa.length;za++)(function(wa){function Za(){var y=aa.getCellsForTags([wa],null,null,!0);aa.isEnabled()?aa.setSelectionCells(y):aa.highlightCells(y,null,
null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,wa),Ta=document.createElement("tr"),Ua=document.createElement("td");Ua.style.align="center";Ua.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[wa]));mxUtils.setOpacity(Ha,Ra?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter=
"invert(100%)";Ua.appendChild(Ha);mxEvent.addListener(Ha,"click",function(y){mxEvent.isShiftDown(y)?T(0<=mxUtils.indexOf(aa.hiddenTags,wa)):(aa.toggleHiddenTag(wa),P(),aa.refresh());mxEvent.consume(y)});Ta.appendChild(Ua);Ua=document.createElement("td");Ua.style.align="center";Ua.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.selectImage);Ha.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ha,Ra?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign=
"middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){T(!0);Za();mxEvent.consume(y)});Ua.appendChild(Ha);Ta.appendChild(Ua);Ua=document.createElement("td");Ua.style.overflow="hidden";Ua.style.whiteSpace="nowrap";Ua.style.textOverflow="ellipsis";Ua.style.verticalAlign="middle";Ua.style.cursor="pointer";Ua.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow=
"ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);Ua.appendChild(a);mxEvent.addListener(Ua,"click",function(y){if(mxEvent.isShiftDown(y))T(!0),Za();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var N=la.slice(),R=mxUtils.indexOf(N,wa);N.splice(R,1);aa.setHiddenTags(N);P();aa.refresh()}mxEvent.consume(y)});Ta.appendChild(Ua);if(aa.isEnabled()){Ua=document.createElement("td");Ua.style.verticalAlign="middle";Ua.style.textAlign="center";Ua.style.width="18px";if(null==Da){Ua.style.align=
"center";Ua.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.trashImage);Ha.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(Ha,Ra?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){var N=mxUtils.indexOf(la,wa);0<=N&&la.splice(N,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),
[wa]);aa.refresh();mxEvent.consume(y)});Ua.appendChild(Ha)}else{var Na=document.createElement("input");Na.setAttribute("type","checkbox");Na.style.margin="0px";Na.defaultChecked=null!=Da&&0<=mxUtils.indexOf(Da,wa);Na.checked=Na.defaultChecked;Na.style.background="transparent";Na.setAttribute("title",mxResources.get(Na.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(Na,"change",function(y){Na.checked?aa.addTagsForCells(aa.getSelectionCells(),[wa]):aa.removeTagsForCells(aa.getSelectionCells(),
[wa]);mxEvent.consume(y)});Ua.appendChild(Na)}Ta.appendChild(Ua)}Ca.appendChild(Ta)})(Aa[za]);pa.appendChild(Ca);ta.appendChild(pa)}}var aa=this,la=aa.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var ta=document.createElement("div");ta.style.position="absolute";ta.style.boxSizing="border-box";ta.style.userSelect="none";ta.style.overflow="auto";ta.style.padding="3px";ta.style.left="0px";ta.style.right=
"0px";ta.style.top="0px";ta.style.bottom="0px";va.appendChild(ta);aa.addListener(mxEvent.ROOT,function(){la=aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Da){if(l()){Aa=aa.getAllTags();for(Da=0;Da<Aa.length;Da++)0>mxUtils.indexOf(la,Aa[Da])&&la.push(Aa[Da]);la.sort();aa.isSelectionEmpty()?Y(la):Y(la,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var Ba=document.createElement("div");
Ba.className="geToolbarContainer geDialogToolbar";Ba.style.position="absolute";Ba.style.display="flex";Ba.style.bottom="0px";Ba.style.left="0px";Ba.style.right="0px";Ba.style.height="32px";Ba.style.overflow="hidden";Ba.style.padding="3px 4px 4px 4px";Ba.style.borderWidth="1px 0px 0px 0px";Ba.style.borderStyle="solid";Ba.style.whiteSpace="nowrap";if(aa.isEnabled()){ta.style.bottom="32px";var ya=document.createElement("a");ya.className="geButton";var La=ya.cloneNode(!1);La.style.backgroundImage="url("+
Editor.visibleImage+")";La.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(La,"click",function(Aa){aa.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(la=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Aa)});Ba.appendChild(La);null!=K&&(ya=ya.cloneNode(!1),ya.style.backgroundImage="url("+Editor.plusImage+")",ya.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ya,"click",function(Aa){K(la,function(Da){la=Da;qa()});mxEvent.consume(Aa)}),Ba.appendChild(ya));va.appendChild(Ba)}null!=
S&&Ba.appendChild(S);return{div:va,refresh:qa}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var B in Graph.customFontElements){var K=Graph.customFontElements[B];l.push({name:K.name,url:K.url})}return l};Graph.prototype.setFont=function(l,B){Graph.addFont(l,B);var K=Editor.guid();document.execCommand("fontname",!1,K);for(var S=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<S.length;T++)S[T].getAttribute("face")==K&&(P=!0,S[T].setAttribute("face",
l),null!=B?S[T].setAttribute("data-font-src",B):S[T].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,l)};var O=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return O.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 l=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=l)for(var B in l)this.globalVars[B]=l[B]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(l){var B=J.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[l]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var l=
this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(l.ownerDocument)).decode(l)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var I=Graph.prototype.getSvg;Graph.prototype.getSvg=function(l,B,K,S,P,T,Y,aa,la,va,ta,qa,Ba,ya,La,Aa){var Da=I.apply(this,arguments);if(null!=qa){var pa=Da.getAttribute("style");null==pa&&(pa="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Da.setAttribute("style",
pa+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(ta&&0<Ca.length){var za=Da.ownerDocument;pa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):za.createElement("style");null!=za.setAttributeNS?pa.setAttributeNS("type","text/css"):pa.setAttribute("type","text/css");for(var wa="",Za="",Ra=0;Ra<Ca.length;Ra++){var Ta=Ca[Ra].name,Ua=Ca[Ra].url;Graph.isCssFontUrl(Ua)?wa+="@import url("+Graph.rewriteGoogleFontUrl(Ua)+");\n":Za+='@font-face {\nfont-family: "'+Ta+'";\nsrc: url("'+
Ua+'");\n}\n'}pa.appendChild(za.createTextNode(wa+Za));Da.getElementsByTagName("defs")[0].appendChild(pa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Da);this.mathEnabled&&(document.body.appendChild(Da),Editor.MathJaxRender(Da),Da.parentNode.removeChild(Da),pa=Da.ownerDocument.getElementById("MJX-SVG-styles"),null!=pa&&Da.getElementsByTagName("defs")[0].appendChild(pa.cloneNode(!0)));return Da};var Z=mxCellRenderer.prototype.destroy;
mxCellRenderer.prototype.destroy=function(l){Z.apply(this,arguments);null!=l.secondLabel&&(l.secondLabel.destroy(),l.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(l){return[l.shape,l.text,l.secondLabel,l.control]};var ia=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ia.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(l){null!=l.shape&&
this.redrawEnumerationState(l);return ha.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(l){l=decodeURIComponent(mxUtils.getValue(l.style,"enumerateValue",""));""==l&&(l=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(l)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(l){var B="1"==mxUtils.getValue(l.style,"enumerate",0);B&&null==l.secondLabel?(l.secondLabel=new mxText("",
new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):B||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);B=l.secondLabel;if(null!=B){var K=l.view.scale,S=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*K,l.y+4*K,0,0):mxRectangle.fromPoint(l.view.getPoint(l));B.bounds.equals(l)&&
B.value==S&&B.scale==K||(B.bounds=l,B.value=S,B.scale=K,B.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var na=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){na.apply(this,arguments);this.currentStyle=
"default-style2"};Graph.prototype.handleCustomLink=function(l,B){"data:action/json,"==l.substring(0,17)&&(l=JSON.parse(l.substring(17)),null!=l.actions&&this.executeCustomActions(l.actions,null,B))};Graph.prototype.executeCustomActions=function(l,B,K){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));
else{this.executingCustomActions=!0;var S=!1,P=0,T=0,Y=mxUtils.bind(this,function(){S||(S=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){S&&(S=!1,this.model.endUpdate())}),la=mxUtils.bind(this,function(){0<P&&P--;0==P&&va()}),va=mxUtils.bind(this,function(){if(T<l.length){var ta=this.stoppingCustomActions,qa=l[T++],Ba=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,K))return}else this.openLink(qa.open);null==qa.wait||ta||(this.pendingExecuteNextAction=
mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;la()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,la,ta?0:qa.fadeIn.delay));null!=qa.fadeOut&&
(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,la,ta?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(Y(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){Y();var ya=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ya),
1);this.setCellsVisible(ya,!0)}null!=qa.hide&&(Y(),ya=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ya),0),this.setCellsVisible(ya,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(Y(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(Y(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));
ya=[];null!=qa.select&&this.isEnabled()&&(ya=this.getCellsForAction(qa.select),this.setSelectionCells(ya));null!=qa.highlight&&(ya=this.getCellsForAction(qa.highlight),this.highlightCells(ya,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(ya=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<ya.length&&this.scrollCellToVisible(ya[0]);null!=K&&null!=qa.explore&&Graph.exploreFromCell(this,K,qa.explore);if(null!=qa.tags){if(null!=
qa.tags.toggle){var La=qa.tags.toggle;0==La.length&&(La=this.getAllTags());for(ya=0;ya<La.length;ya++)this.toggleHiddenTag(La[ya])}La=null;null!=qa.tags.hidden&&(null==La&&(La=[]),La=La.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==La&&(La=[]);var Aa=this.getAllTags();for(ya=0;ya<Aa.length;ya++)0>mxUtils.indexOf(qa.tags.visible,Aa[ya])&&0>mxUtils.indexOf(La,Aa[ya])&&La.push(Aa[ya])}null!=La&&this.setHiddenTags(La);this.refresh()}0<Ba.length&&(P++,this.executeAnimations(Ba,la,ta?1:qa.steps,
ta?0:qa.delay));0==P?va():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=B&&B()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(l,B){var K=this.getLinkForCell(B);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(l,K));if(this.isHtmlLabel(B)){var S=document.createElement("div");S.innerHTML=Graph.sanitizeHtml(this.getLabel(B));for(var P=S.getElementsByTagName("a"),T=!1,Y=0;Y<P.length;Y++)K=P[Y].getAttribute("href"),
null!=K&&"data:action/json,"==K.substring(0,17)&&(P[Y].setAttribute("href",this.updateCustomLink(l,K)),T=!0);T&&this.labelChanged(B,S.innerHTML)}};Graph.prototype.updateCustomLink=function(l,B){if("data:action/json,"==B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(l,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(S){}return B};Graph.prototype.updateCustomLinkActions=function(l,B){for(var K=0;K<B.length;K++){var S=B[K],P;for(P in S)this.updateCustomLinkAction(l,
S[P],"cells"),this.updateCustomLinkAction(l,S[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(l,B,K){if(null!=B&&null!=B[K]){for(var S=[],P=0;P<B[K].length;P++)if("*"==B[K][P])S.push(B[K][P]);else{var T=l[B[K][P]];null!=T?""!=T&&S.push(T):S.push(B[K][P])}B[K]=S}};Graph.prototype.getCellsForAction=function(l,B){B=this.getCellsById(l.cells).concat(this.getCellsForTags(l.tags,null,B));if(null!=l.excludeCells){for(var K=[],S=0;S<B.length;S++)0>l.excludeCells.indexOf(B[S].id)&&K.push(B[S]);
B=K}return B};Graph.prototype.getCellsById=function(l){var B=[];if(null!=l)for(var K=0;K<l.length;K++)if("*"==l[K]){var S=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(T){return T!=S},S))}else{var P=this.model.getCell(l[K]);null!=P&&B.push(P)}return B};var X=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(l){return X.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(l))};Graph.prototype.setHiddenTags=function(l){this.hiddenTags=l;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
Graph.prototype.toggleHiddenTag=function(l){var B=mxUtils.indexOf(this.hiddenTags,l);0>B?this.hiddenTags.push(l):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(l){if(null==l||0==l.length||0==this.hiddenTags.length)return!1;l=l.split(" ");if(l.length>this.hiddenTags.length)return!1;for(var B=0;B<l.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,l[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(l,B,K,
S){var P=[];if(null!=l){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var T=0,Y={},aa=0;aa<l.length;aa++)0<l[aa].length&&(Y[l[aa]]=!0,T++);for(aa=0;aa<B.length;aa++)if(K&&this.model.getParent(B[aa])==this.model.root||this.model.isVertex(B[aa])||this.model.isEdge(B[aa])){var la=this.getTagsForCell(B[aa]),va=!1;if(0<la.length&&(la=la.split(" "),la.length>=l.length)){for(var ta=va=0;ta<la.length&&va<T;ta++)null!=Y[la[ta]]&&va++;va=va==T}va&&(1!=S||this.isCellVisible(B[aa]))&&P.push(B[aa])}}return P};
Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(l){for(var B=null,K=[],S=0;S<l.length;S++){var P=this.getTagsForCell(l[S]);K=[];if(0<P.length){P=P.split(" ");for(var T={},Y=0;Y<P.length;Y++)if(null==B||null!=B[P[Y]])T[P[Y]]=!0,K.push(P[Y]);B=T}else return[]}return K};Graph.prototype.getTagsForCells=function(l){for(var B=[],K={},S=0;S<l.length;S++){var P=this.getTagsForCell(l[S]);if(0<
P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==K[P[T]]&&(K[P[T]]=!0,B.push(P[T]))}}return B};Graph.prototype.getTagsForCell=function(l){return this.getAttributeForCell(l,"tags","")};Graph.prototype.addTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<l.length;K++){for(var S=this.getTagsForCell(l[K]),P=S.split(" "),T=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.trim(B[Y]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(S=0<S.length?S+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(l[K],
"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(l,B){if(0<l.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<l.length;K++){var S=this.getTagsForCell(l[K]);if(0<S.length){for(var P=S.split(" "),T=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.indexOf(P,B[Y]);0<=aa&&(P.splice(aa,1),T=!0)}T&&this.setAttributeForCell(l[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(l){this.model.beginUpdate();try{for(var B=
0;B<l.length;B++)this.model.setVisible(l[B],!this.model.isVisible(l[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(l,B){this.model.beginUpdate();try{for(var K=0;K<l.length;K++)this.model.setVisible(l[K],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(l,B,K,S){for(var P=0;P<l.length;P++)this.highlightCell(l[P],B,K,S)};Graph.prototype.highlightCell=function(l,B,K,S,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;l=this.view.getState(l);
var T=null;null!=l&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,B,P,!1),null!=S&&(T.opacity=S),T.highlight(l),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},1200)},K));return T};Graph.prototype.addSvgShadow=function(l,B,K,S){K=null!=K?K:!1;S=null!=S?S:!0;var P=l.ownerDocument,
T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");Y.setAttribute("in","SourceAlpha");Y.setAttribute("stdDeviation",this.svgShadowBlur);Y.setAttribute("result","blur");T.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");Y.setAttribute("in",
"blur");Y.setAttribute("dx",this.svgShadowSize);Y.setAttribute("dy",this.svgShadowSize);Y.setAttribute("result","offsetBlur");T.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");Y.setAttribute("flood-color",this.svgShadowColor);Y.setAttribute("flood-opacity",this.svgShadowOpacity);Y.setAttribute("result","offsetColor");T.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");
Y.setAttribute("in","offsetColor");Y.setAttribute("in2","offsetBlur");Y.setAttribute("operator","in");Y.setAttribute("result","offsetBlur");T.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");Y.setAttribute("in","SourceGraphic");Y.setAttribute("in2","offsetBlur");T.appendChild(Y);Y=l.getElementsByTagName("defs");0==Y.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=l.firstChild?
l.insertBefore(P,l.firstChild):l.appendChild(P)):P=Y[0];P.appendChild(T);K||(B=null!=B?B:l.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(l.getAttribute("width")))&&S&&(l.setAttribute("width",parseInt(l.getAttribute("width"))+6),l.setAttribute("height",parseInt(l.getAttribute("height"))+6),B=l.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,l.setAttribute("viewBox",B[0]+" "+
B[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(l,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=l)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};
Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var l=this.model.getChildCount(this.model.root),B=0;do var K=this.model.getChildAt(this.model.root,B);while(B++<l&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",
STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=
[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",
STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"];
mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"];mxStencilRegistry.libraries["electrical/electro-mechanical"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+
"/electrical/electro-mechanical.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"];mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"];
mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+
"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];
mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(l){var B=null;null!=l&&0<l.length&&("ER"==l.substring(0,2)?B="mxgraph.er":"sysML"==l.substring(0,5)&&(B="mxgraph.sysml"));return B};var ba=mxMarker.createMarker;mxMarker.createMarker=function(l,B,K,S,P,T,
Y,aa,la,va){if(null!=K&&null==mxMarker.markers[K]){var ta=this.getPackageForType(K);null!=ta&&mxStencilRegistry.getStencil(ta)}return ba.apply(this,arguments)};var ka=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(l,B,K,S,P,T){"1"==mxUtils.getValue(B.style,"lineShape",null)&&l.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ka.apply(this,arguments)};PrintDialog.prototype.create=function(l,B,K,S){function P(){La.value=Math.max(1,Math.min(ta,
Math.max(parseInt(La.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(ta,Math.min(parseInt(La.value),parseInt(ya.value))))}function T(Ga){l.lastPrintPagesRadioChecked=Ba.checked;l.lastPrintSelectionOnlyChecked=Da.checked;l.lastPrintCropRadioChecked=Ca.checked;l.lastPrintFitRadioChecked=za.checked;Ba.checked&&ya.value<La.value?(l.lastPrintPagesFromInput=ya.value,l.lastPrintPagesToInput=La.value):(l.lastPrintPagesFromInput=null,l.lastPrintPagesToInput=null);fa.value=Math.max(1,Math.min(1600,
parseInt(fa.value)))+"%";l.lastPrintZoom=fa.value;l.lastPrintBorder=V.value;l.lastPrintGrid=ja.checked;l.lastPrintTransparent=oa.checked;l.lastPrintInclude=ua.checked;l.lastPrintSheetsAcross=N.value;l.lastPrintSheetsDown=R.value;var Ka={};Ka.border=parseInt(V.value);Ka.scale=parseInt(fa.value)/100;Ka.grid=ja.checked;Ka.transparent=oa.checked;Ka.includeCopy=ua.checked;Ka.sheetsAcross=parseInt(N.value);Ka.sheetsDown=parseInt(R.value);Ka.pagesFrom=parseInt(ya.value);Ka.pagesTo=parseInt(La.value);Ka.allPages=
qa.checked;Ka.selection=Da.checked;Ka.pageView=pa.checked;Ka.crop=Ca.checked;Ka.fit=za.checked;return null!=K?K(!Ga,Ka):l.print(!Ga,Ka)}var Y=l.editor.graph,aa=document.createElement("div"),la=document.createElement("h3");la.style.width="100%";la.style.textAlign="center";la.style.marginTop="0px";mxUtils.write(la,B||mxResources.get("print"));aa.appendChild(la);var va=1,ta=1;la=document.createElement("div");la.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";
qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");la.appendChild(qa);B=document.createElement("span");mxUtils.write(B,mxResources.get("allPages"));mxEvent.addListener(B,"click",function(){qa.checked=!0});la.appendChild(B);mxUtils.br(la);var Ba=qa.cloneNode(!0);la.appendChild(Ba);B=document.createElement("span");mxUtils.write(B,mxResources.get("pages")+":");la.appendChild(B);mxEvent.addListener(B,"click",function(){Ba.checked=!0});var ya=document.createElement("input");
ya.style.margin="0 4px";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="40px";la.appendChild(ya);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));la.appendChild(B);var La=ya.cloneNode(!0);la.appendChild(La);mxEvent.addListener(ya,"focus",function(){Ba.checked=!0});mxEvent.addListener(La,"focus",function(){Ba.checked=!0});mxEvent.addListener(ya,"change",P);mxEvent.addListener(La,"change",P);if(null!=l.pages&&(ta=l.pages.length,
null!=l.currentPage))for(var Aa=0;Aa<ta;Aa++)if(l.currentPage==l.pages[Aa]){va=Aa+1;break}null!=l.lastPrintPagesFromInput&&null!=l.lastPrintPagesToInput?(ya.value=Math.min(ta,Math.max(1,l.lastPrintPagesFromInput)),La.value=Math.min(ta,Math.max(1,l.lastPrintPagesToInput))):(ya.value=va,La.value=va);ya.setAttribute("max",ta);La.setAttribute("max",ta);Aa=mxUtils.button(mxResources.get("currentPage"),function(Ga){ya.value=va;La.value=va;Ba.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));
Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";la.appendChild(Aa);1<ta&&aa.appendChild(la);la=document.createElement("div");la.style.borderBottom="1px solid lightGray";la.style.paddingBottom="12px";la.style.marginBottom="12px";la.style.whiteSpace="nowrap";var Da=document.createElement("input");Da.setAttribute("name","pages-printdialog");Da.setAttribute("type",1==ta?"checkbox":"radio");Da.style.marginRight=
"8px";Y.isSelectionEmpty()&&Da.setAttribute("disabled","disabled");Y.isEnabled()&&(la.appendChild(Da),B=document.createElement("span"),mxUtils.write(B,mxResources.get("selectionOnly")),la.appendChild(B));(Y.isEnabled()||1<ta)&&aa.appendChild(la);!l.isPagesEnabled()||l.lastPrintPagesRadioChecked?Ba.checked=!0:!Y.isSelectionEmpty()&&l.lastPrintSelectionOnlyChecked?Da.checked=!0:qa.checked=!0;Y.isSelectionEmpty()||mxEvent.addListener(B,"click",function(){Da.checked=!Da.checked});Y=document.createElement("div");
Y.style.whiteSpace="nowrap";var pa=document.createElement("input");pa.style.marginBottom="8px";pa.style.marginRight="8px";pa.setAttribute("type","radio");pa.setAttribute("name","printSize");Y.appendChild(pa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageView"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){pa.checked=!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";
Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");Y.appendChild(Ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("crop"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){Ca.checked=!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var za=document.createElement("input");za.style.marginBottom="8px";za.style.marginRight="8px";za.setAttribute("type","radio");za.setAttribute("name","printSize");
B=document.createElement("div");B.style.display="inline-block";B.style.verticalAlign="top";B.style.paddingTop="2px";B.appendChild(za);Y.appendChild(B);la=document.createElement("table");la.style.display="inline-block";la.style.borderSpacing="0";Aa=document.createElement("tbody");var wa=document.createElement("tr"),Za=wa.cloneNode(!0),Ra=document.createElement("td"),Ta=Ra.cloneNode(!0),Ua=Ra.cloneNode(!0),Ha=Ra.cloneNode(!0),Na=Ra.cloneNode(!0),y=Ra.cloneNode(!0);Ra.style.textAlign="right";Ha.style.textAlign=
"right";mxUtils.write(Ra,mxResources.get("fitTo"));mxEvent.addListener(Y,"click",function(Ga){mxEvent.getSource(Ga)!=za&&(za.checked=!za.checked)});var N=document.createElement("input");N.style.margin="0 2px";N.style.boxSizing="border-box";N.setAttribute("value",l.lastPrintSheetsAcross||"1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";Ta.appendChild(N);B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Ua.appendChild(B);mxUtils.write(Ha,
mxResources.get("fitToBy"));var R=N.cloneNode(!0);R.setAttribute("value",l.lastPrintSheetsDown||"1");Na.appendChild(R);mxEvent.addListener(N,"click",function(Ga){za.checked=!0;mxEvent.consume(Ga)});mxEvent.addListener(R,"click",function(Ga){za.checked=!0;mxEvent.consume(Ga)});l.lastPrintCropRadioChecked?Ca.checked=!0:l.lastPrintFitRadioChecked?za.checked=!0:pa.checked=!0;B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsDown"));y.appendChild(B);wa.appendChild(Ra);wa.appendChild(Ta);
wa.appendChild(Ua);Za.appendChild(Ha);Za.appendChild(Na);Za.appendChild(y);Aa.appendChild(wa);Aa.appendChild(Za);la.appendChild(Aa);Y.appendChild(la);aa.appendChild(Y);Y=document.createElement("div");Y.style.borderTop="1px solid lightGray";Y.style.whiteSpace="nowrap";Y.style.paddingTop="12px";Y.style.marginTop="12px";Y.style.paddingLeft="8px";mxUtils.write(Y,mxResources.get("borderWidth")+":");var V=document.createElement("input");V.setAttribute("type","number");V.setAttribute("min","0");V.style.width=
"40px";V.style.marginLeft="4px";V.value=null!=l.lastPrintBorder?l.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Y.appendChild(V);B=document.createElement("span");B.style.marginLeft="8px";mxUtils.write(B,mxResources.get("zoom")+":");Y.appendChild(B);var fa=document.createElement("input");fa.style.width="60px";fa.style.marginLeft="4px";fa.value=null!=l.lastPrintZoom?l.lastPrintZoom:"100%";Y.appendChild(fa);mxUtils.br(Y);var ja=document.createElement("input");ja.setAttribute("type","checkbox");
ja.style.marginTop="12px";ja.checked=null!=l.lastPrintGrid?l.lastPrintGrid:!1;Y.appendChild(ja);B=document.createElement("span");B.style.marginLeft="4px";B.style.marginRight="8px";mxUtils.write(B,mxResources.get("grid"));Y.appendChild(B);mxEvent.addListener(B,"click",function(Ga){ja.checked=!0;mxEvent.consume(Ga)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=l.lastPrintTransparent?l.lastPrintTransparent:!1;null!=K&&(Y.appendChild(oa),
B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("transparentBackground")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Ga){oa.checked=!0;mxEvent.consume(Ga)}));var ua=document.createElement("input");ua.setAttribute("type","checkbox");ua.style.marginTop="10px";ua.checked=null!=l.lastPrintInclude?l.lastPrintInclude:Editor.defaultIncludeDiagram;null==K||mxClient.IS_CHROMEAPP||"draw.io"!=l.getServiceName()||(mxUtils.br(Y),Y.appendChild(ua),B=document.createElement("span"),
B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Ga){ua.checked=!0;mxEvent.consume(Ga)}));aa.appendChild(Y);B=document.createElement("div");B.style.marginTop="40px";B.style.textAlign="right";B.style.whiteSpace="nowrap";l.isOffline()||null!=K||B.appendChild(l.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));Y=mxUtils.button(mxResources.get("cancel"),function(){l.hideDialog()});Y.className="geBtn";
l.editor.cancelFirst&&B.appendChild(Y);PrintDialog.previewEnabled&&null==K&&(la=mxUtils.button(mxResources.get("preview"),function(){try{l.hideDialog(),T(!1)}catch(Ga){l.handleError(Ga)}}),la.className="geBtn",B.appendChild(la));S=null!=S?S:null!=K?"export":PrintDialog.previewEnabled?"print":"ok";S=mxUtils.button(mxResources.get(S),function(){try{l.hideDialog(),T(!0)}catch(Ga){l.handleError(Ga)}});S.className="geBtn gePrimaryBtn";B.appendChild(S);l.editor.cancelFirst||B.appendChild(Y);aa.appendChild(B);
if(l.editor.isChromelessView()){var ra=function(){Editor.isDarkMode()?(aa.classList.add("geDarkMode"),aa.style.colorScheme="dark"):(aa.classList.remove("geDarkMode"),aa.style.colorScheme="light")};l.addListener("darkModeChanged",ra);ra();var xa=function(Ga,Ka){Ga=Ka.getProperty("dialog");aa.parentNode==Ga.container&&(l.editor.removeListener(xa),l.removeListener(ra))};l.editor.addListener("hideDialog",xa)}this.container=aa};var da=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var l=this.image;null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});this.page.viewState.backgroundImage=l}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&
(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else da.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(l=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=
null!=l?l:"default"),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 W=document.createElement("canvas"),U=new Image;U.onload=function(){try{W.getContext("2d").drawImage(U,0,0);var l=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=l&&6<l.length}catch(B){}};U.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){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=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.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
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(c,f,k,t,q,D,H){if(null!=c){q=null!=q?q:Error(c);q.stack=null!=q.stack?q.stack:"";D=null!=D?D:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>q.stack.indexOf("extension:")&&0>q.stack.indexOf("<anonymous>:")&&
0>q.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+D+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=q.stack?"&stack="+encodeURIComponent(q.stack):""))}catch(O){}try{H||null==window.console||console.error(D,c,f,k,t,q)}catch(O){}}};EditorUi.logEvent=
function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,c.length>f&&(c=c.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email",
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(k){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var f=[],k=0;k<c.length;k++)f.push(c[k]);for(k=0;k<f.length;k++)EditorUi.replaceSvgImage(f[k])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(f);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",c.getAttribute("x"));k.setAttribute("y",c.getAttribute("y"));k.setAttribute("width",c.getAttribute("width"));k.setAttribute("height",c.getAttribute("height"));k.style.fontFamily=
"initial";var t=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(k);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(q){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var k="svg-image-"+Editor.guid();c.setAttribute("id",k);for(var t=document.implementation.createHTMLDocument(""),
q=document.createElement("style"),D=0;D<f.length;D++){q.textContent=f[D].textContent;t.body.appendChild(q);for(var H="",O=0;O<q.sheet.cssRules.length;O++){var J=q.sheet.cssRules[O];if(null!=J.selectorText){for(var I=J.selectorText.split(","),Z=0;Z<I.length;Z++)I[Z]="#"+k+" "+I[Z];J.selectorText=I.join(",")}H+=J.cssText+"\n"}f[D].textContent=H}}f=c.getElementsByTagName("*");for(k=0;k<f.length;k++)f[k].removeAttribute("data-cell-id")}return c};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.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),
k=new Image;k.onload=function(){try{f.getContext("2d").drawImage(k,0,0);var q=f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(D){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{f=
document.createElement("canvas");f.width=f.height=1;var t=f.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==t.match("image/jpeg");t=f.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==t.match("image/webp")}catch(q){}})();EditorUi.prototype.createButtonContainer=function(){var c=document.createElement("div");c.className="geButtonContainer";return c};EditorUi.prototype.openLink=function(c,f,k){return this.editor.graph.openLink(c,f,k)};EditorUi.prototype.showSplash=function(c){};
EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,f,k){localStorage.setItem(c,f);null!=k&&k()};EditorUi.prototype.isLocked=function(){var c=this.getCurrentFile();return null!=c&&c.isLocked()};EditorUi.prototype.removeLocalData=function(c,f){localStorage.removeItem(c);f()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=
function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=
c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};
EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,k){var t=null==c||null==f;k=null!=k?k:24;var q=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
hwaccel:!1,zIndex:2E9}),D=this.timeout,H=q.spin,O=null,J=null,I=mxUtils.bind(this,function(ha){null!=ha&&ha()}),Z=this;q.spin=function(ha,ca,na,X){X=null!=X?X:D;var ba=!1;if(!this.active){var ka=Date.now();null!=na&&(O=window.setTimeout(function(){q.stop();O=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:J})},X));t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ha==document.body&&"1"==urlParams.embedInline&&
(ha=Z.diagramContainer,c=ha.scrollLeft+ha.clientWidth/2,f=ha.scrollTop+ha.clientHeight/2);H.call(this,ha);"1"==urlParams.embedInline&&null!=q.el&&(q.el.style.marginTop=ha.scrollTop+"px",q.el.style.marginLeft=ha.scrollLeft+"px");this.active=!0;null!=ca&&(ba=document.createElement("div"),ba.className="geSpinnerStatus",ba.setAttribute("title",ca),ha==document.body?(ba.style.left=Math.max(0,c)+"px",ba.style.top=Math.max(0,f+66)+"px"):(ba.style.left="50%",ba.style.top="50%",ba.style.marginTop="70px"),
"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ba.innerText=ca,ha.appendChild(ba),q.status=ba);this.pause=mxUtils.bind(this,function(){var da=I;this.active&&(X=Math.max(0,X-(Date.now()-ka)),da=mxUtils.bind(this,function(W){this.spin(ha,ca,na,X);if(null!=W)try{W(),J=mxUtils.bind(this,function(){this.spin(ha,ca,na,X);try{W()}catch(U){null!=na&&na(U)}})}catch(U){null!=na&&na(U)}}));this.stop();return da});ba=!0}return ba};var ia=q.stop;q.stop=function(){ia.call(this);
this.active&&(this.active=!1,null!=O&&(window.clearTimeout(O),O=null),null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status),q.status=null)};q.pause=function(){return I};return q};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),k=this.editor.extractGraphModel(f.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||
/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&
(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=f.getFunction,t=this.editor.graph,q=this;
f.getFunction=function(D){if(t.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var H=q.getSelectedPageIndex();if(mxEvent.isShiftDown(D)){if(37==D.keyCode)return function(){0<H&&q.movePage(H,H-1)};if(38==D.keyCode)return function(){0<H&&q.movePage(H,0)};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,H+1)};if(40==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,q.pages.length-1)}}else if(mxEvent.isControlDown(D)||mxClient.IS_MAC&&mxEvent.isMetaDown(D)){if(37==D.keyCode)return function(){0<
H&&q.selectNextPage(!1)};if(38==D.keyCode)return function(){0<H&&q.selectPage(q.pages[0])};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.selectNextPage(!0)};if(40==D.keyCode)return function(){H<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return!(65<=D.keyCode&&90>=D.keyCode)||t.isSelectionEmpty()||mxEvent.isAltDown(D)||mxEvent.isShiftDown(D)||mxEvent.isControlDown(D)||mxClient.IS_MAC&&mxEvent.isMetaDown(D)?k.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;
EditorUi.prototype.extractGraphModelFromHtml=function(c){var f=e.apply(this,arguments);if(null==f)try{var k=c.indexOf("&lt;mxfile ");if(0<=k){var t=c.lastIndexOf("&lt;/mxfile&gt;");t>k&&(f=c.substring(k,t+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(c),D=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=D?mxUtils.getXml(D):""}}catch(H){}return f};EditorUi.prototype.validateFileData=
function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var k=null!=c?this.editor.extractGraphModel(c,!0):null;null!=k&&(c=k);if(null!=c){k=this.editor.graph;k.model.beginUpdate();
try{var t=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if(1<q.length||1==q.length&&q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var D=q.length-1;0<=D;D--){var H=this.updatePageRoot(new DiagramPage(q[D]));null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[D+1]));k.model.execute(new ChangePage(this,H,0==D?H:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=
new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(D=0;D<t.length;D++)k.model.execute(new ChangePage(this,t[D],null));var O=this.getCurrentFile();null!=O&&O.fileReplaced(f)}finally{k.model.endUpdate()}}};
EditorUi.prototype.createFileData=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;J=null!=J?J:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var ca=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var na="_blank";else ca=na=t;if(null==c)return"";var X=c;if("mxfile"!=X.nodeName.toLowerCase()){if(Z){var ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());
ba.appendChild(c)}else{ba=Graph.zapGremlins(mxUtils.getXml(c));X=Graph.compress(ba);if(Graph.decompress(X)!=ba)return ba;ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());mxUtils.setTextContent(ba,X)}X=c.ownerDocument.createElement("mxfile");X.appendChild(ba)}I?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),
X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):(X.removeAttribute("userAgent"),X.removeAttribute("modified"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),X.removeAttribute("etag"),mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:
navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),1<X.getElementsByTagName("diagram").length&&null!=this.pages&&X.setAttribute("pages",this.pages.length));null!=ia&&(X=X.cloneNode(!0),X.setAttribute("scale",ia));null!=ha&&(X=X.cloneNode(!0),X.setAttribute("border",ha));c=Z?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!D&&!q&&(H||null!=k&&/(\.html)$/i.test(k.getTitle())))c=this.getHtml2(mxUtils.getXml(X),f,null!=k?k.getTitle():null,na,ca);else if(D||!q&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==
k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(t=null),k=this.getSvgFileProperties(X),c=this.getEmbeddedSvg(c,f,t,null,O,J,ca,null,null,k.scale,k.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,k,t){c=null!=c?c:!0;f=null!=f?f:!1;k=null!=k?k:!Editor.defaultCompressed;var q=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(J){var I=J.getElementsByTagName("mxGraphModel"),Z=0<I.length?I[0]:null;I=J;
null==Z&&k?(Z=mxUtils.getNodeValue(J),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(I=J.cloneNode(!1),I.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||k?I=J.cloneNode(!0):(I=J.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(Z)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(q),q=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var D=this.pages[f],H=D.node;if(D!=this.currentPage)if(D.needsUpdate){var O=
new mxCodec(mxUtils.createXmlDocument());O=O.encode(new mxGraphModel(D.root));this.editor.graph.saveViewState(D.viewState,O,null,t);EditorUi.removeChildNodes(H);H.appendChild(O);delete D.needsUpdate}else t&&(this.updatePageRoot(D),null!=D.viewState.backgroundImage&&(null!=D.viewState.backgroundImage.originalSrc?D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.originalSrc,D):Graph.isPageLink(D.viewState.backgroundImage.src)&&(D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.src,
D))),null!=D.viewState.backgroundImage&&null!=D.viewState.backgroundImage.originalSrc&&(O=new mxCodec(mxUtils.createXmlDocument()),O=O.encode(new mxGraphModel(D.root)),this.editor.graph.saveViewState(D.viewState,O,null,t),H=H.cloneNode(!1),H.appendChild(O)));c(H)}return q};EditorUi.prototype.anonymizeString=function(c,f){for(var k=[],t=0;t<c.length;t++){var q=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?k.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?k.push(String.fromCharCode(65+Math.round(25*
Math.random()))):q.toUpperCase()!=q?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?k.push(" "):k.push("?"):k.push(f?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var k=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));
c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(k)}catch(D){c[EditorUi.DIFF_INSERT][f].data=D.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var q=c[EditorUi.DIFF_UPDATE][t];null!=q.name&&(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(D){var H=q.cells[D];if(null!=H){for(var O in H)null!=H[O].value&&(H[O].value="["+H[O].value.length+"]"),null!=H[O].xmlValue&&(H[O].xmlValue="["+H[O].xmlValue.length+"]"),null!=H[O].style&&(H[O].style=
"["+H[O].style.length+"]"),mxUtils.isEmptyObject(H[O])&&delete H[O];mxUtils.isEmptyObject(H)&&delete q.cells[D]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var k=0;k<c.attributes.length;k++)"as"!=c.attributes[k].name&&
c.setAttribute(c.attributes[k].name,this.anonymizeString(c.attributes[k].value,f));if(null!=c.childNodes)for(k=0;k<c.childNodes.length;k++)this.anonymizeAttributes(c.childNodes[k],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var k=0;k<f.length;k++)null!=f[k].getAttribute("value")&&f[k].setAttribute("value","["+f[k].getAttribute("value").length+"]"),null!=f[k].getAttribute("xmlValue")&&f[k].setAttribute("xmlValue","["+f[k].getAttribute("xmlValue").length+
"]"),null!=f[k].getAttribute("style")&&f[k].setAttribute("style","["+f[k].getAttribute("style").length+"]"),null!=f[k].parentNode&&"root"!=f[k].parentNode.nodeName&&null!=f[k].parentNode.parentNode&&(f[k].setAttribute("id",f[k].parentNode.getAttribute("id")),f[k].parentNode.parentNode.replaceChild(f[k],f[k].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?
f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();f.handleFileError(k,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){f.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=
function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){q=null!=q?q:!0;D=null!=D?D:!1;I=null!=I?I:!Editor.defaultCompressed;var ca=this.editor.graph;if((f||!c&&null!=J&&/(\.svg)$/i.test(J.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var na=ca.getGlobalVariable;ca=this.createTemporaryGraph(ca.getStylesheet());ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var X=null!=this.pages?this.pages[0]:null;null==X||this.currentPage==X?ca.setBackgroundImage(this.editor.graph.backgroundImage):
null!=X.viewState&&null!=X.viewState&&ca.setBackgroundImage(X.viewState.backgroundImage);ca.getGlobalVariable=function(ba){return"page"==ba&&null!=X?X.getName():"pagenumber"==ba?1:na.apply(this,arguments)};document.body.appendChild(ca.container);null!=X&&ca.model.setRoot(X.root)}H=null!=H?H:this.getXmlFileData(q,D,I,Z);J=null!=J?J:this.getCurrentFile();c=this.createFileData(H,ca,J,window.location.href,c,f,k,t,q,O,I,ia,ha);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return c};
EditorUi.prototype.getHtml=function(c,f,k,t,q,D){D=null!=D?D:!0;var H=null,O=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=D?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var J=f.view.scale;D=Math.floor(H.x/J-f.view.translate.x);J=Math.floor(H.y/J-f.view.translate.y);H=f.background;null==q&&(f=this.getBasenames().join(";"),0<f.length&&(O=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",D);c.setAttribute("y0",J)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom",
"1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=q&&(q=q.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+
(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+O+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,f,k,t,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\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(c))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:
null,k=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),k={},0<c.length)){var t=this.getHashObject(),q=null;this.fileNode=f;this.pages=[];for(var D=0;D<c.length;D++){null==c[D].getAttribute("id")&&
c[D].setAttribute("id",D);f=new DiagramPage(c[D]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[D+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=t.pageId&&f.getId()==t.pageId)q=f;if(null==k[f.getId()])k[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=q?q:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=
f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(D=0;D<H.length;D++)f[H[D]]=
!0;var O=this.editor.graph.getModel(),J=O.getChildren(O.root);for(D=0;D<J.length;D++){var I=J[D];O.setVisible(I,f[I.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&
null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename(!q),ka=ba+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var da=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,q,null,null,null,f);this.saveData(ka,c,da,"text/xml")}else if("html"==
c)da=this.getHtml2(this.getFileData(!0),this.editor.graph,ba),this.saveData(ka,c,da,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?ka=ba+".png":"jpeg"==c&&(ka=ba+".jpg"),this.saveRequest(ka,c,mxUtils.bind(this,function(K,S){try{return this.createDownloadRequest(K,c,t,S,H,q,O,J,I,Z,ia,void 0,void 0,!D,ha,ca,na,X)}catch(P){this.handleError(P)}}));else{var W=null,U=mxUtils.bind(this,function(K){K.length<=MAX_REQUEST_SIZE?this.saveData(ka,
"svg",K,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==c){var l=this.editor.graph.background;if(H||l==mxConstants.NONE)l=null;var B=this.editor.graph.getSvg(l,null,null,null,null,t);k&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(K){this.spinner.stop();U(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(K))})))}else ka=
ba+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(K){this.spinner.stop();U(K)}),t)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X,ba,ka){c=this.downloadRequestBuilder(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X,ba,ka);f="";for(var da in c)k=c[da],null!=k&&(f+=da+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X,ba,
ka){var da=this.editor.graph,W=da.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==D?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var U=null,l=null,B=null;if(!EditorUi.isElectronApp&&(W.width*W.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=Z?(U=Z.from,l=Z.to):0==D&&(B="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(D=0;D<this.pages.length;D++)if(this.pages[D]==
this.currentPage){U=D;break}D=da.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=D&&D!=mxConstants.NONE||(D="#ffffff"):D=mxConstants.NONE;q={globalVars:da.getExportVariables()};J&&(q.grid={size:da.gridSize,steps:da.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:da.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return{format:f,from:U,to:l,allPages:B,bg:null!=D?D:mxConstants.NONE,base64:t,embedXml:I,xml:k,filename:null!=
c?c:"",extras:JSON.stringify(q),scale:H,border:O,pageMargin:na,w:ia&&isFinite(ia)?ia:null,h:ha&&isFinite(ha)?ha:null,crop:null!=ca&&ca?"1":"0",fit:null!=X&&X?"1":"0",sheetsAcross:ba,sheetsDown:ka}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,
f={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==
f)f="#";var k=f.lastIndexOf("#");0<k&&(f=f.substring(0,k));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<k&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,k){var t=window.location.hash,q=mxUtils.bind(this,function(H){var O=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<O.length&&(O+="\n"),O+=H);H=new LocalFile(this,"csv"!=c.format&&0<O.length?O:this.emptyDiagramXml,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return t};this.fileLoaded(H);"csv"==c.format&&this.importCsv(O,mxUtils.bind(this,function(ha){this.editor.undoManager.clear();this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var J=null!=c.interval?parseInt(c.interval):6E4,I=null,Z=mxUtils.bind(this,function(){var ha=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ha===
this.currentPage&&(200<=ca.getStatus()&&300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ia()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ia=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(Z,J)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ia();Z()}));ia();Z()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var D=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(D,
mxUtils.bind(this,function(H){q(H)}),mxUtils.bind(this,function(H){null!=k&&k(H)}))}else q("")};EditorUi.prototype.updateDiagram=function(c){function f(W){var U=new mxCellOverlay(W.image||q.warningImage,W.tooltip,W.align,W.valign,W.offset);U.addListener(mxEvent.CLICK,function(l,B){t.alert(W.tooltip)});return U}var k=null,t=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var q=this.editor.graph,D=q.getModel();D.beginUpdate();var H=
null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var O=D.getCell(c.getAttribute("id"));if(null!=O){try{var J=c.getAttribute("value");if(null!=J){var I=mxUtils.parseXml(J).documentElement;if(null!=I)if("1"==I.getAttribute("replace-value"))D.setValue(O,I);else for(var Z=I.attributes,ia=0;ia<Z.length;ia++)q.setAttributeForCell(O,Z[ia].nodeName,0<Z[ia].nodeValue.length?Z[ia].nodeValue:null)}}catch(W){null!=window.console&&console.log("Error in value for "+O.id+": "+W)}try{var ha=c.getAttribute("style");
null!=ha&&q.model.setStyle(O,ha)}catch(W){null!=window.console&&console.log("Error in style for "+O.id+": "+W)}try{var ca=c.getAttribute("icon");if(null!=ca){var na=0<ca.length?JSON.parse(ca):null;null!=na&&na.append||q.removeCellOverlays(O);null!=na&&q.addCellOverlay(O,f(na))}}catch(W){null!=window.console&&console.log("Error in icon for "+O.id+": "+W)}try{var X=c.getAttribute("geometry");if(null!=X){X=JSON.parse(X);var ba=q.getCellGeometry(O);if(null!=ba){ba=ba.clone();for(key in X){var ka=parseFloat(X[key]);
"dx"==key?ba.x+=ka:"dy"==key?ba.y+=ka:"dw"==key?ba.width+=ka:"dh"==key?ba.height+=ka:ba[key]=parseFloat(X[key])}q.model.setGeometry(O,ba)}}}catch(W){null!=window.console&&console.log("Error in icon for "+O.id+": "+W)}}}else if("model"==c.nodeName){for(var da=c.firstChild;null!=da&&da.nodeType!=mxConstants.NODETYPE_ELEMENT;)da=da.nextSibling;null!=da&&(new mxCodec(c.firstChild)).decode(da,D)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(q.view.scale=parseFloat(c.getAttribute("scale"))),
c.hasAttribute("dx")||c.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{D.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return k};EditorUi.prototype.getCopyFilename=function(c,f){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=k.lastIndexOf(".");0<=
t&&(c=k.substring(t),k=k.substring(0,t));if(f){f=k;var q=new Date;k=q.getFullYear();t=q.getMonth()+1;var D=q.getDate(),H=q.getHours(),O=q.getMinutes();q=q.getSeconds();k=f+(" "+(k+"-"+t+"-"+D+"-"+H+"-"+O+"-"+q))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(k){}};EditorUi.prototype.fileLoaded=function(c,f,k){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);
var q=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var D=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&
(this.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+
"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!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();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||"min"==H)H+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),
label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+H})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(O){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(O){}}catch(O){this.fileLoadedError=O;if(null!=c)try{c.close()}catch(J){}c=
mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||D():D()});f?c():(null!=O.fallbackFileData&&(O.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var J=new LocalFile(this,O.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(J)})}),this.handleError(O,mxResources.get("errorLoadingFile"),c,!0,null,null,
!0))}else D();return q};EditorUi.prototype.getHashValueForPages=function(c,f){var k=0,t=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var D=0;D<c.length;D++){this.updatePageRoot(c[D]);var H=c[D].node.cloneNode(!1);H.removeAttribute("name");t.root=c[D].root;var O=q.encode(t);this.editor.graph.saveViewState(c[D].viewState,O,!0);O.removeAttribute("pageWidth");O.removeAttribute("pageHeight");H.appendChild(O);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,
f.nodeCount+=H.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(H,function(J,I,Z,ia){return!ia||"mxGeometry"!=J.nodeName&&"mxPoint"!=J.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?ia&&"mxCell"==J.nodeName&&"previous"==I?null:Z:Math.round(Z)},f)<<0}return k};EditorUi.prototype.hashValue=function(c,f,k){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,
f,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var q=0;q<c.attributes.length;q++){var D=c.attributes[q].name,H=null!=f?f(c,D,c.attributes[q].value,!0):c.attributes[q].value;null!=H&&(t^=this.hashValue(D,f,k)+this.hashValue(H,f,k))}}if(null!=c.childNodes)for(q=0;q<c.childNodes.length;q++)t=(t<<5)-t+this.hashValue(c.childNodes[q],f,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=k&&(k.byteCount+=c.length);for(q=0;q<c.length;q++)f=(f<<5)-f+c.charCodeAt(q)<<
0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,k,t,q,D,H){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var k=f.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(c,null,2));f.appendChild(k);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var k=0;k<f.length;k++)f[k].parentNode.removeChild(f[k]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],
null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:k.firstChild.nextSibling.nextSibling;f=k.lastChild;var t=f.previousSibling;k.insertBefore(f,c);k.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var k=mxUtils.parseXml(c.getData());if("mxlibrary"==k.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(c,t,k.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};
};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.showSearchWindow=function(c,f){var k=c?"findReplace":"find",t=k+"Window";if(null==this[t]){var q="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,D=c?q?330:300:240;this[t]=new FindWindow(this,document.body.offsetWidth-(D+20),100,D,c?q?304:288:
170,c);this[t].window.addListener("show",function(){this.fireEvent(new mxEventObject(k))});this[t].window.addListener("hide",function(){this.fireEvent(new mxEventObject(k))});this[t].window.setVisible(!0)}else null==f&&this[t].window.setVisible(!this[t].window.isVisible());null!=f&&(this[t].doSearch(f),this[t].window.setVisible(!0))};EditorUi.prototype.libraryLoaded=function(c,f,k,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var q=null;if(c.constructor!=
StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var D=0;D<this.openLibraries.length;D++)if(this.openLibraries[D].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[D],this.openLibraries);break}q={file:c,images:f,title:k,expand:t};this.openLibraries.push(q)}else this.scratchpad=c;D=this.sidebar.palettes[c.getHash()];D=null!=D?D[D.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var H=null,O=mxUtils.bind(this,function(ka,da){0==
ka.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),da.appendChild(H)):this.addLibraryEntries(ka,da)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==k&&(k=c.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var J=this.sidebar.addPalette(c.getHash(),k,null!=t?t:!0,mxUtils.bind(this,function(ka){O(f,ka)}));null!=q&&(q.div=J);this.repositionLibrary(D,"L.scratchpad"!=
c.getHash());t=J.parentNode.previousSibling;k=t.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ia=null;if(".scratchpad"!=c.title||this.closableScratchpad)I.appendChild(Z),
mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var da=mxUtils.bind(this,function(){null!=q&&mxUtils.remove(q,this.openLibraries);this.closeLibrary(c)});null!=ia?this.confirm(mxResources.get("allChangesLost"),null,da,mxResources.get("cancel"),mxResources.get("discardChanges")):da();mxEvent.consume(ka)}}));if(c.isEditable()){var ha=this.editor.graph,ca=null;k=mxUtils.bind(this,function(ka){this.showLibraryDialog(c.getTitle(),J,f,c,c.getMode());mxEvent.consume(ka)});
var na=mxUtils.bind(this,function(ka){c.setModified(!0);c.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=Z.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",I.insertBefore(ca,I.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca)})):null==ia&&(ia=Z.cloneNode(!1),
ia.setAttribute("src",Editor.saveImage),ia.setAttribute("title",mxResources.get("save")),I.insertBefore(ia,I.firstChild),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(da){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ia||c.isModified()||(ia.parentNode.removeChild(ia),ia=null)});mxEvent.consume(da)})))}),X=mxUtils.bind(this,function(ka,da,W,U){ka=ha.cloneCells(mxUtils.sortCells(ha.model.getTopmostCells(ka)));for(var l=0;l<ka.length;l++){var B=
ha.getCellGeometry(ka[l]);null!=B&&B.translate(-da.x,-da.y)}J.appendChild(this.sidebar.createVertexTemplateFromCells(ka,da.width,da.height,U||"",!0,null,!1));ka=mxUtils.getXml(this.editor.graph.encodeCells(ka));Editor.defaultCompressed&&(ka=Graph.compress(ka));da={xml:ka,w:da.width,h:da.height};null!=U&&(da.title=U);f.push(da);na(W);null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)}),ba=mxUtils.bind(this,function(ka){if(ha.isSelectionEmpty())ha.getRubberband().isActive()?
(ha.getRubberband().execute(ka),ha.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var da=ha.getSelectionCells(),W=ha.view.getBounds(da);if(null!=W&&0<W.width&&0<W.height){var U=ha.view.scale;W.x/=U;W.y/=U;W.width/=U;W.height/=U;W.x-=ha.view.translate.x;W.y-=ha.view.translate.y;X(da,W)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ka)});mxEvent.addGestureListeners(J,
function(){},mxUtils.bind(this,function(ka){ha.isMouseDown&&null!=ha.panningManager&&null!=ha.graphHandler.first&&(ha.graphHandler.suspend(),null!=ha.graphHandler.hint&&(ha.graphHandler.hint.style.visibility="hidden"),J.style.backgroundColor="light-dark(#fefefe, #000000)",J.style.cursor="copy",ha.panningManager.stop(),ha.autoScroll=!1,mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ha.isMouseDown&&null!=ha.panningManager&&null!=ha.graphHandler&&(J.style.backgroundColor="",J.style.cursor="default",
this.sidebar.showTooltips=!0,ha.panningManager.stop(),ha.graphHandler.reset(),ha.isMouseDown=!1,ha.autoScroll=!0,ba(ka),mxEvent.consume(ka))}));mxEvent.addListener(J,"mouseleave",mxUtils.bind(this,function(ka){ha.isMouseDown&&null!=ha.graphHandler.first&&(ha.graphHandler.resume(),null!=ha.graphHandler.hint&&(ha.graphHandler.hint.style.visibility="visible"),J.style.backgroundColor="",J.style.cursor="",ha.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(ka){J.style.backgroundColor=
"light-dark(#fefefe, #000000)";ka.dataTransfer.dropEffect="copy";J.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(J,"drop",mxUtils.bind(this,function(ka){J.style.cursor="";J.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(da,W,U,l,B,K,S,P,T){if(null!=da&&"image/"==W.substring(0,6))da="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(da),da=[new mxCell("",new mxGeometry(0,0,B,K),da)],da[0].vertex=!0,X(da,new mxRectangle(0,0,B,K),ka,mxEvent.isAltDown(ka)?null:S.substring(0,S.lastIndexOf(".")).replace(/_/g," ")),null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null);else{var Y=!1,aa=mxUtils.bind(this,function(la,va){null!=la&&"application/pdf"==va&&(va=Editor.extractGraphModelFromPdf(la),null!=va&&0<va.length&&(la=va));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ta=
JSON.parse(mxUtils.getTextContent(la.documentElement));O(ta,J);f=f.concat(ta);na(ka);this.spinner.stop();Y=!0}catch(La){}else if("mxfile"==la.documentElement.nodeName)try{var qa=la.documentElement.getElementsByTagName("diagram");for(ta=0;ta<qa.length;ta++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(qa[ta])),ya=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=ya&&X(Ba,new mxRectangle(0,0,ya.width,ya.height),ka)}Y=!0}catch(La){null!=window.console&&console.log("error in drop handler:",
La)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)});null!=T&&null!=S&&EditorUi.isVisioFilename(S)?this.importVisio(T,function(la){aa(la,"text/xml")},null,S):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(da,S)&&null!=T?this.isExternalDataComms()?this.parseFile(T,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?aa(la.responseText,
"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):aa(da,W)}}));ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(J,"dragleave",function(ka){J.style.cursor="";J.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",
mxResources.get("edit"));I.insertBefore(Z,I.firstChild);mxEvent.addListener(Z,"click",k);k=Z.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));I.insertBefore(k,I.firstChild);mxEvent.addListener(k,"click",ba);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ba);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",I.insertBefore(k,I.firstChild))}t.appendChild(I);
this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var k=0;k<c.length;k++)try{var t=c[k],q=t.data;if(null!=q){q="data:"==q.substring(0,5)?this.convertDataUri(q):q;var D="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(D+="aspect=fixed;");D=D+"image="+q+";";null!=t.style&&(D+=t.style);f.appendChild(this.sidebar.createVertexTemplate(D,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var H=
this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),O=0==H.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(H,t.w,t.h,O,!0,null,!0))}}catch(J){O=null!=J.message?mxResources.get("error")+": "+J.message:String(J),D=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,O,!0,null,!0),f.appendChild(D)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&
(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,k,t,q,D,H){c=new ImageDialog(this,c,f,k,t,q,D,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,
f,k,t,q,D){var H=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(O){if(null!=O)try{if(null!=D&&D(O),O==H)this.hideDialog();else{if(0<O.length){var J=JSON.parse(O);localStorage.setItem(f,JSON.stringify(J))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),null,mxResources.get("close"),null,null,null,!0,null,null,q,k,t);this.showDialog(c.container,
660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,k,t){c=null!=c?c:mxUtils.bind(this,function(q,D,H,O){D||(q=new ChangePageSetup(this,t?H:null,q),q.ignoreColor=!t,null!=O&&t&&(q.shadowVisible=O),this.editor.graph.model.execute(q))});c=new BackgroundImageDialog(this,c,f,k,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,k,t,q){c=new LibraryDialog(this,c,f,k,t,q);this.showDialog(c.container,640,440,!0,!1,
mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,k,t,q,D,H){var O=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
J=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(ha){}if(null!=J||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var I=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=J){null!=
J.retry&&(I=mxResources.get("cancel"),Z=function(){O();J.retry()});if(404==J.code||404==J.status||403==J.code){H=403==J.code?null!=J.message?mxUtils.htmlEntities(J.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ia=null!=q?null:null!=D?D:window.location.hash;if(null!=ia&&("#G"==ia.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
ia.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==J.code||404==J.status)){ia="#U"==ia.substring(0,2)?ia.substring(45,ia.lastIndexOf("%26ex")):ia.substring(2);this.showError(f,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ia);null!=t&&t()}),Z,
mxResources.get("changeUser"),mxUtils.bind(this,function(){function ha(){ba.innerText="";for(var ka=0;ka<ca.length;ka++){var da=document.createElement("option");mxUtils.write(da,ca[ka].displayName);da.value=ka;ba.appendChild(da);da=document.createElement("option");da.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(da,"<"+ca[ka].email+">");da.setAttribute("disabled","disabled");ba.appendChild(da)}da=document.createElement("option");mxUtils.write(da,mxResources.get("addAccount"));da.value=ca.length;ba.appendChild(da)}
var ca=this.drive.getUsersList(),na=document.createElement("div"),X=document.createElement("div");X.style.marginBottom="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");na.appendChild(X);var ba=document.createElement("select");ba.style.width="100%";ha();mxEvent.addListener(ba,"change",mxUtils.bind(this,function(){var ka=ba.value,da=ca.length!=ka;da&&this.drive.setUser(ca[ka]);this.drive.authorize(da,mxUtils.bind(this,function(){da||(ca=this.drive.getUsersList(),ha())}),mxUtils.bind(this,function(W){this.handleError(W)}),
!0)}));na.appendChild(ba);na=new CustomDialog(this,na,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=J.message?H=""==J.message&&null!=J.name?mxUtils.htmlEntities(J.name,!1):mxUtils.htmlEntities(J.message,!1):null!=J.response&&null!=J.response.error?H=mxUtils.htmlEntities(J.response.error,!1):"undefined"!==typeof window.App&&
(J.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),!1):J.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof J&&0<J.length&&(H=mxUtils.htmlEntities(J,!1)))}q=c=null;null!=J&&null!=J.helpLink?(c=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(J.helpLink)})):null!=J&&null!=J.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+J.ownerEmail+")",!1),q=mxUtils.bind(this,
function(){return this.openLink("mailto:"+mxUtils.htmlEntities(J.ownerEmail))})):null!=J&&null!=J.alternateAction&&(c=J.alternateAction.label,q=J.alternateAction.funct);this.showError(f,H,I,k,Z,null,null,c,q,null,null,null,t?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,f,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,k,t,q,D){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},O=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=f&&f()},function(){H();null!=k&&k()},t,q,null,null,null,null,O);this.showDialog(c.container,340,46+O,!0,D);c.init()};EditorUi.prototype.showBanner=function(c,f,k,t,q,D,H,O,J){D=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";O=null!=O?O:"translate(-50%,0%)";
var I=document.createElement("div");I.className="geBtn gePrimaryBtn geBanner"+(q?" geSmallBanner":"");I.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(I.style,"transform",H);mxUtils.setPrefixedStyle(I.style,"transition","all 1000ms ease");null!=J&&mxUtils.setPrefixedStyle(I.style,"transform-origin",J);J=J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));J.setAttribute("border","0");q||(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;",I.appendChild(D),J.style.cssText=(q?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;",I.appendChild(J));mxUtils.write(I,f);document.body.appendChild(I);this.bannerShowing=!0;q&&(J.className="geLibraryButton",I.appendChild(J));f=
document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var Z=document.createElement("input");Z.setAttribute("type","checkbox");Z.setAttribute("id","geDoNotShowAgainCheckbox");Z.style.marginRight="6px";if(!t){f.appendChild(Z);var ia=document.createElement("label");ia.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ia,mxResources.get("doNotShowAgain"));f.appendChild(ia);
I.style.paddingBottom=q?"16px":"30px";I.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=I.parentNode&&(I.parentNode.removeChild(I),this.bannerShowing=!1,Z.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=J&&mxEvent.addListener(J,"click",mxUtils.bind(this,function(na){mxEvent.consume(na);ha()}));var ca=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(I.style,"transform",H);window.setTimeout(mxUtils.bind(this,
function(){ha()}),1E3)});mxEvent.addListener(I,"click",mxUtils.bind(this,function(na){var X=mxEvent.getSource(na);X!=Z&&X!=ia?(null!=k&&k(),ha(),mxEvent.consume(na)):ca()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(I.style,"transform",O)}),500);window.setTimeout(ca,q?5E3:3E4);D=!0}return D};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,k,t){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,k,t,q){var D="jpeg"==k?"jpg":k;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+D;c=this.createImageDataUri(c,
f,k,q);this.saveData(t,D,c.substring(c.lastIndexOf(",")+1),"image/"+k,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,k,t,q,D){"text/xml"!=k||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=D?D:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,k):new Blob([c],{type:k}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(c,!0):(k.document.write(c),
k.document.close(),k.document.execCommand("SaveAs",!0,f),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,k,t);else{var H=document.createElement("a");D=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var O=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);D=65==(O?parseInt(O[2],10):
!1)?!1:D}if(D||this.isOffline()){H.href=URL.createObjectURL(t?this.base64ToBlob(c,k):new Blob([c],{type:k}));D?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(J){}}else this.createEchoRequest(c,f,k,t,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,k,t,q,D){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
k?"&mime="+k:"")+(null!=q?"&format="+q:"")+(null!=D?"&base64="+D:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,k,t,q,D,H,O){D=null!=D?D:!1;H=null!=H?H:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);var J=mxUtils.bind(this,function(Z,ia,ha,ca){try{if("_blank"==ia)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,t);else if(null!=k&&"text/html"==k.substring(0,9)){var na=new EmbedDialog(this,c);this.showDialog(na.container,
450,240,!0,!0);na.init()}else{var X=window.open("about:blank");null==X?mxUtils.popup(c,!0):(X.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),X.document.close())}else if(ia==App.MODE_DEVICE||"download"==ia)this.doSaveLocalFile(c,Z,k,t,null,O);else if(null!=Z&&0<Z.length){var ba=mxUtils.bind(this,function(ka){try{this.exportFile(c,Z,k,t,ia,ka)}catch(da){this.handleError(da)}});null!=ca?ba(ca):this.pickFolder(ia,ba)}}catch(ka){this.handleError(ka)}});q=[];D||q.push(App.MODE_BROWSER);H||
q.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(Z,ia,ha){J(Z.value,ia,Z,ha);this.hideDialog(null,null,I.container)}),q,c,k,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,k){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var q="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var D=mxUtils.parseXml(c).documentElement.style.backgroundColor;
""!=D&&(q="background: "+D+";")}q='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+q+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||k?(D=k?c:btoa(unescape(encodeURIComponent(c))),t.document.write(q+'<img style="max-width:100%;" src="data:'+f+";base64,"+D+'"/></body></html>')):t.document.write(q+c+"</body></html>"):t.document.write(q+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,this.tagsComponent.div.style.backgroundColor=
"#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";
this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();
f.style.display=0<t.length?"":"none"}))}m.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&
(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&
this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=c(mxUtils.bind(this,function(t){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var D=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;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,80);this.exportDialog.style.left=D.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";D=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=D.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",q);this.editor.exportToCanvas(mxUtils.bind(this,function(O){H.stop();this.exportDialog.style.width=
"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var J=this.createImageDataUri(O,null,"png");O=document.createElement("img");O.style.maxWidth="140px";O.style.maxHeight="140px";O.style.cursor="pointer";O.style.backgroundColor="white";O.setAttribute("title",mxResources.get("openInNewWindow"));O.setAttribute("border","0");O.setAttribute("src",J);this.exportDialog.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.openInNewWindow(J.substring(J.indexOf(",")+
1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(O){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(O)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,k,t,q){this.isLocalFileSave()?this.saveLocalFile(k,
c,t,q,f):this.saveRequest(c,f,mxUtils.bind(this,function(D,H){return this.createEchoRequest(k,D,t,q,f,H)}),k,q,t)};EditorUi.prototype.saveRequest=function(c,f,k,t,q,D,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var O=mxUtils.bind(this,function(I,Z,ia,ha){if("_blank"==Z||null!=I&&0<I.length){var ca=k("_blank"==Z?null:I,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ca&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ca.simulate(document,"_blank"):(ia=mxUtils.bind(this,
function(na){D=null!=D?D:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(X){this.spinner.stop();this.handleError(X)}))}),
null!=ha?ia(ha):this.pickFolder(Z,ia)))}});q=[App.MODE_BROWSER];H||q.push("_blank");var J=new SaveDialog(this,c,mxUtils.bind(this,function(I,Z,ia){O(I.value,Z,I,ia);this.hideDialog(null,null,J.container)}),q,null,"application/pdf");this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,
f,k,t,q,D){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,k){f(null)};EditorUi.prototype.exportSvg=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(la){Editor.addRetryToError(la,mxUtils.bind(this,function(){this.exportSvg(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca)}));this.handleError(la)})))try{var na=
this.editor.graph.isSelectionEmpty();k=null!=k?k:na;var X=f?null:this.editor.graph.background;X==mxConstants.NONE&&(X=null);null==X&&0==f&&(X=this.editor.graph.shapeBackgroundColor);var ba=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ka=mxUtils.lightDarkColorSupported,da=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var W=Graph.addFont,U={};
Graph.addFont=function(la,va,ta,qa){W.call(this,la,va,ta,U)};var l=this.editor.graph.createSvgImageExport(q),B=l.drawCellState;l.drawCellState=function(la,va){null!=la&&Graph.processFontStyle(la.style);B.apply(this,arguments)};var K=this.editor.graph.getSvg(X,c,H,O,null,k,null,l,"blank"==I?"_blank":"self"==I?"_top":null,null,!ha,Z,ia);mxUtils.lightDarkColorSupported=ka;mxUtils.preferDarkColor=da;this.editor.graph.addForeignObjectWarning=ba;t&&this.editor.graph.addSvgShadow(K);var S=this.getBaseFilename()+
(q?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(la){this.isLocalFileSave()||la.length<=MAX_REQUEST_SIZE?this.saveData(S,"svg",la,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});var P=mxUtils.bind(this,function(la){this.spinner.stop();q&&la.setAttribute("content",this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,c,H));ca(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+
"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(la))});this.editor.graph.mathEnabled&&this.editor.addMathCss(K);var T=mxUtils.bind(this,function(la){Editor.replaceSvgDataUris&&D&&EditorUi.embedSvgImages(la);Editor.foreignObjectImages&&ha?this.replaceAlternateContent(la,Z,P):P(la)}),Y=Graph.customFontElements;Graph.customFontElements=U;var aa=mxUtils.bind(this,function(la){Graph.customFontElements=Y;Graph.addFont=W;D&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache=
{}),this.editor.convertImages(la,T,this.thumbImageCache)):T(la)});ha?this.embedFonts(K,aa):(this.editor.addFontCss(K),aa(K))}catch(la){this.handleError(la)}};EditorUi.prototype.replaceAlternateContent=function(c,f,k){function t(ia,ha,ca,na,X){var ba=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ba.setAttribute("x",ha);ba.setAttribute("y",ca+.5);ba.setAttribute("width",na.width);ba.setAttribute("height",na.height);null==ba.setAttributeNS?ba.setAttribute("xlink:href",X):ba.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",X);ia.replaceChild(ba,ia.lastChild);O()}function q(){if(H<Z.length)Z[H++](q)}var D="";f=c.getElementsByTagName("style");for(var H=0;H<f.length;H++)D+=f[H].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var O=mxUtils.bind(this,function(){counter--;0==counter&&k(c)}),J={},I={},Z=[];for(H=0;H<f.length;H++)mxUtils.bind(this,function(ia){var ha=ia.getElementsByTagName("div");if(0<ha.length)try{var ca=ha[0].cloneNode(!0),na=parseInt(ca.style.marginLeft),X=parseInt(ca.style.paddingTop),
ba=ca.getElementsByTagName("div")[1],ka=ha=!1,da=ca.style.alignItems,W=ca.style.justifyContent;if(null!=ca.style.writingMode){var U=ca.style.writingMode;ka="vertical-"==U.substring(0,9);ha="-rl"==U.substring(U.length-3)}var l=!ka&&"1px"==ca.style.width||ka&&"1px"==ca.style.height;if(!ka&&"1px"==ca.style.height||ka&&"1px"==ca.style.width)ca.style.alignItems=ka&&ha?"unsafe flex-end":"unsafe flex-start";l&&(ca.style.justifyContent="unsafe flex-start");ca.style.paddingTop="";ca.style.marginLeft="";var B=
ca.outerHTML,K=J[B];null==K&&(ca.style.position="absolute",ca.style.visibility="hidden",document.body.appendChild(ca),U=1,U="1px"==ca.style.width?ba.offsetWidth:parseInt(ca.style.width),l=1,l="1px"==ca.style.height?ba.offsetHeight:parseInt(ca.style.height),document.body.removeChild(ca),K=new mxRectangle(na,X,U,l),J[B]=K);"1px"==ca.style.height&&("unsafe center"==da?X-=K.height/2:"unsafe flex-end"==da&&(X-=K.height));if("1px"==ca.style.width)if(!ka&&"unsafe center"==W||ka&&"unsafe center"==da)na-=
K.width/2;else if(!ka&&"unsafe flex-end"==W||ka&&(!ha&&"unsafe flex-end"==da||ha&&"unsafe flex-start"==da))na-=K.width;K=new mxRectangle(na,X,K.width,K.height+parseInt(ba.style.fontSize)/4);Z.push(mxUtils.bind(this,function(S){var P=I[B];null==P?Graph.htmlToPng(B,K.width,K.height,mxUtils.bind(this,function(T){t(ia,na,X,K,T);I[B]=T;S()}),D):(t(ia,na,X,K,P),S())}))}catch(S){O()}else O()})(f[H]);0==counter&&k(c);H=0;q()};EditorUi.prototype.addRadiobox=function(c,f,k,t,q,D,H){return this.addCheckbox(c,
k,t,q,D,H,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,k,t,q,D,H,O){D=null!=D?D:!0;var J=document.createElement("input");J.style.marginRight="8px";J.style.marginTop="16px";J.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();J.id=H;null!=O&&J.setAttribute("name",O);k&&(J.setAttribute("checked","checked"),J.defaultChecked=!0);t&&J.setAttribute("disabled","disabled");D&&(c.appendChild(J),k=document.createElement("label"),mxUtils.write(k,f),k.setAttribute("for",H),c.appendChild(k),
q||mxUtils.br(c));return J};EditorUi.prototype.addEditButton=function(c,f){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var t=this.getCurrentFile(),q="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var D=document.createElement("select");D.style.maxWidth="200px";D.style.width="auto";D.style.marginLeft="8px";D.style.marginRight="10px";D.className="geBtn";t=document.createElement("option");t.setAttribute("value",
"blank");mxUtils.write(t,mxResources.get("makeCopy"));D.appendChild(t);var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");D.appendChild(H);c.appendChild(D);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){if("custom"==D.value){var O=new FilenameDialog(this,q,mxResources.get("ok"),function(J){null!=J?(q=J,H.setAttribute("title",J)):(D.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,
function(){D.value="blank"});this.showDialog(O.container,300,80,!0,!1);O.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==f||f.checked)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===D.value?"_blank":q:null},getEditInput:function(){return k},getEditSelect:function(){return D}}};EditorUi.prototype.addLinkSection=function(c,f){function k(){var O=document.createElement("div");
O.style.width="100%";O.style.height="100%";O.style.boxSizing="border-box";null!=D&&D!=mxConstants.NONE?(O.style.border="1px solid black",O.style.backgroundColor=D):(O.style.backgroundPosition="center center",O.style.backgroundRepeat="no-repeat",O.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(O)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight=
"10px";t.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));t.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),
mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var D="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(O){this.pickColor(D||"none",function(J){D=J;k()});mxEvent.consume(O)}));k();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||
mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);mxUtils.br(c);return{getColor:function(){return D},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,k,t,q,D){D=null!=D?D:[];k&&(D.push("lightbox=1"),"auto"!=c&&D.push("target="+c),null!=f&&f!=mxConstants.NONE&&D.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&D.push("edit="+encodeURIComponent(t)),q&&D.push("layers=1"),this.editor.graph.foldingEnabled&&
D.push("nav=1"));return D};EditorUi.prototype.createLink=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){var ca=this.getCurrentFile();J=this.createUrlParameters(c,f,t,q,D,J);c=!0;null!=H?k="#U"+encodeURIComponent(H):O||null==ca||""==ca.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+ca.getHash(),c=!1);c&&null!=ca&&null!=ca.getTitle()&&ca.getTitle()!=this.defaultFilename&&J.push("title="+encodeURIComponent(ca.getTitle()));
I&&1<k.length&&(J.push("open="+k.substring(1)),k="");Z&&null!=this.currentPage&&J.push("page-id="+this.currentPage.getId());ia&&J.push("transparent=1");null!=ha&&J.push("dark="+ha);return(t&&(null!=H||null!=ca&&ca.getMode()!=App.MODE_GITHUB&&ca.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<J.length?"?"+J.join("&"):"")+k};EditorUi.prototype.createHtml=
function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){this.getBasenames();var ca={};""!=q&&q!=mxConstants.NONE&&(ca.highlight=q);"auto"!==t&&(ca.target=t);I||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(ca.zoom=k/100);k=[];H&&(k.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(k.push("zoom"),ca.resize=!0);O&&k.push("layers");J&&k.push("tags");null!=ha&&(ca["dark-mode"]=ha);0<k.length&&(I&&
k.push("lightbox"),ca.toolbar=k.join(" "));null!=Z&&0<Z.length&&(ca.edit=Z);null!=c?ca.url=c:ca.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(D?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ca))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ia(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+
c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,k,t){var q=document.createElement("div");q.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("html"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(D);var H=document.createElement("div");
H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var O=document.createElement("input");O.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";O.setAttribute("value","url");O.setAttribute("type","radio");O.setAttribute("name","type-embedhtmldialog");D=O.cloneNode(!0);D.setAttribute("value","copy");H.appendChild(D);var J=document.createElement("span");mxUtils.write(J,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(J);mxUtils.br(H);H.appendChild(O);
J=document.createElement("span");mxUtils.write(J,mxResources.get("publicDiagramUrl"));H.appendChild(J);var I=this.getCurrentFile();null==k&&null!=I&&I.constructor==window.DriveFile&&(J=document.createElement("a"),J.style.paddingLeft="12px",J.style.color="gray",J.style.cursor="pointer",mxUtils.write(J,mxResources.get("share")),H.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));D.setAttribute("checked","checked");
null==k&&O.setAttribute("disabled","disabled");q.appendChild(H);H=380;var Z=this.addLinkSection(q),ia=document.createElement("select");ia.style.maxWidth="260px";ia.style.marginLeft="8px";ia.style.marginTop="16px";J=document.createElement("option");J.setAttribute("value","light");mxUtils.write(J,mxResources.get("light"));ia.appendChild(J);J=document.createElement("option");J.setAttribute("value","dark");mxUtils.write(J,mxResources.get("dark"));ia.appendChild(J);J=document.createElement("option");J.setAttribute("value",
"auto");mxUtils.write(J,mxResources.get("automatic"));J.setAttribute("selected","selected");ia.appendChild(J);J.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("appearance")+":");q.appendChild(ia);mxUtils.br(q);H+=26;var ha=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=
"100%";q.appendChild(ca);var na=this.addCheckbox(q,mxResources.get("fit"),!0);J=null!=this.pages&&1<this.pages.length;var X=X=this.addCheckbox(q,mxResources.get("allPages"),J,!J),ba=this.addCheckbox(q,mxResources.get("layers"),!0),ka=this.addCheckbox(q,mxResources.get("tags"),!0),da=this.addCheckbox(q,mxResources.get("lightbox"),!0),W=null;if(EditorUi.enableHtmlEditOption){W=this.addEditButton(q,da);var U=W.getEditInput();U.style.marginBottom="16px";H+=50;mxEvent.addListener(da,"change",function(){da.checked?
U.removeAttribute("disabled"):U.setAttribute("disabled","disabled");U.checked&&da.checked?W.getEditSelect().removeAttribute("disabled"):W.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,q,mxUtils.bind(this,function(){t(O.checked?k:null,ha.checked,ca.value,Z.getTarget(),Z.getColor(),na.checked,X.checked,ba.checked,ka.checked,da.checked,null!=W?W.getLink():null,null!=ia?ia.value:null)}),null,c,f);this.showDialog(c.container,340,H,!0,!0);D.focus()};EditorUi.prototype.showPublishLinkDialog=
function(c,f,k,t,q,D,H,O,J,I,Z){var ia=document.createElement("div");ia.style.whiteSpace="nowrap";var ha=document.createElement("h3");mxUtils.write(ha,c||mxResources.get("publish"));ha.style.width="100%";ha.style.textAlign="center";ha.style.marginTop="2px";ha.style.marginBottom="20px";ia.appendChild(ha);var ca=document.createElement("select");c=30;ca.className="geBtn";ca.style.marginBottom="8px";ca.style.marginLeft="0px";ca.style.width="100%";ca.style.boxSizing="border-box";if(null==O||""==O.getHash())q=
null!=q?q:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ha=document.createElement("option"),mxUtils.write(ha,mxResources.get("makeCopy")),ha.setAttribute("value","copy"),ca.appendChild(ha);ha=document.createElement("option");mxUtils.write(ha,mxResources.get("authorizationRequired"));ha.setAttribute("value","auth");ca.appendChild(ha);null!=O&&""!=O.getHash()||ha.setAttribute("disabled","disabled");O=document.createElement("option");O.setAttribute("value","public");ca.appendChild(O);null!=
H?(mxUtils.write(O,mxResources.get("publicDiagramUrl")),O.setAttribute("title",H),ca.value="public"):(mxUtils.write(O,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),O.setAttribute("disabled","disabled"));ia.appendChild(ca);mxUtils.br(ia);ca.focus();var na=null,X=null;if(null!=f||null!=k)c+=30,mxUtils.write(ia,mxResources.get("width")+":"),na=document.createElement("input"),na.setAttribute("type","text"),na.style.marginRight="16px",na.style.width="50px",na.style.marginLeft=
"6px",na.style.marginRight="16px",na.style.marginBottom="10px",na.value="100%",ia.appendChild(na),mxUtils.write(ia,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=k+"px",ia.appendChild(X),mxUtils.br(ia);var ba=this.addLinkSection(ia,t),ka=I?this.addCheckbox(ia,mxResources.get("transparentBackground"),!1):null;null!=ka&&(c+=20);var da=null;null!=this.pages&&null!=this.currentPage&&
0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),da=this.addCheckbox(ia,mxResources.get("selectedPage")+": "+f));var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";W.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");
mxUtils.write(f,mxResources.get("dark"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");W.appendChild(f);Z&&(mxUtils.write(ia,mxResources.get("appearance")+":"),ia.appendChild(W),mxUtils.br(ia),c+=30);var U=this.addCheckbox(ia,mxResources.get("lightbox"),!0,null,null,!t),l=this.addEditButton(ia,U),B=l.getEditInput();t&&(B.style.marginLeft=U.style.marginLeft,U.style.display="none",
c-=20);var K=this.addCheckbox(ia,mxResources.get("layers"),!0);K.style.marginLeft=B.style.marginLeft;K.style.marginTop="8px";var S=this.addCheckbox(ia,mxResources.get("tags"),!0);S.style.marginLeft=B.style.marginLeft;S.style.marginBottom="16px";S.style.marginTop="16px";mxEvent.addListener(U,"change",function(){U.checked?(K.removeAttribute("disabled"),B.removeAttribute("disabled"),S.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),S.setAttribute("disabled",
"disabled"));B.checked&&U.checked?l.getEditSelect().removeAttribute("disabled"):l.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,ia,mxUtils.bind(this,function(){J(ba.getTarget(),ba.getColor(),null==da?!1:da.checked,U.checked,l.getLink(),K.checked,null!=na?na.value:null,null!=X?X.value:null,S.checked,ca.value,null!=ka?ka.checked:!1,W.value)}),null,mxResources.get("create"),q,D);this.showDialog(t.container,340,296+c,!0,!0);null!=na?(na.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?na.select():document.execCommand("selectAll",!1,null)):null==ca.parentNode;ba.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,k,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";D.appendChild(H);if(q){mxUtils.write(D,mxResources.get("zoom")+":");var O=document.createElement("input");
O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";D.appendChild(O);mxUtils.write(D,mxResources.get("borderWidth")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.value=this.lastExportBorder||"0";D.appendChild(J);mxUtils.br(D)}var I=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,
this.editor.graph.isSelectionEmpty()),Z=t?null:this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ia=t?null:this.addCheckbox(D,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ia&&(ia.style.marginBottom="16px");c=new CustomDialog(this,D,mxUtils.bind(this,function(){var ha=parseInt(O.value)/100||1,ca=parseInt(J.value)||0;k(!I.checked,null!=Z?Z.checked:!1,null!=ia?ia.checked:!1,ha,ca)}),
null,c,f);this.showDialog(c.container,300,(q?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,k,t,q,D,H,O,J){H=null!=H?H:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var Z=this.editor.graph,ia="jpeg"==O||"webp"==O?220:320,ha=document.createElement("h3");mxUtils.write(ha,c);ha.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(ha);mxUtils.write(I,mxResources.get("zoom")+":");var ca=document.createElement("input");
ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";I.appendChild(ca);mxUtils.write(I,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type","text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";I.appendChild(na);mxUtils.br(I);var X=this.addCheckbox(I,mxResources.get("selectionOnly"),
!1,Z.isSelectionEmpty()),ba=document.createElement("input");ba.style.marginTop="16px";ba.style.marginRight="8px";ba.style.marginLeft="24px";ba.setAttribute("disabled","disabled");ba.setAttribute("type","checkbox");var ka=document.createElement("select");ka.style.marginTop="16px";ka.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ha=0;ha<c.length;ha++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[ha]){var da=document.createElement("option");mxUtils.write(da,mxResources.get(c[ha]));da.setAttribute("value",
c[ha]);ka.appendChild(da)}J?(mxUtils.write(I,mxResources.get("size")+":"),I.appendChild(ka),mxUtils.br(I),ia+=26,mxEvent.addListener(ka,"change",function(){"selectionOnly"==ka.value&&(X.checked=!0)})):D&&(I.appendChild(ba),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),ia+=30,mxEvent.addListener(X,"change",function(){X.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?J&&(X.style.display="none",X.nextSibling.style.display="none",X.nextSibling.nextSibling.style.display=
"none",ia-=30):(ka.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(X,"change",function(){ka.value=X.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(I,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=O&&"webp"!=O),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));
U.appendChild(D);J=document.createElement("option");J.setAttribute("value","dark");mxUtils.write(J,mxResources.get("dark"));U.appendChild(J);"svg"==O&&mxUtils.lightDarkColorSupported?(D=document.createElement("option"),D.setAttribute("value","auto"),mxUtils.write(D,mxResources.get("automatic")),D.setAttribute("selected","selected"),U.appendChild(D)):Editor.isDarkMode()?J.setAttribute("selected","selected"):D.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(U);
mxUtils.br(I);ia+=26;var l=this.addCheckbox(I,mxResources.get("shadow"),Z.shadowVisible),B=null;if("png"==O||"jpeg"==O||"webp"==O)B=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ia+=30;Z=null!=this.pages?this.pages.length:1;var K=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),H,null,null,"jpeg"!=O&&"webp"!=O),S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="28px";"png"==O||"svg"==O?(H=function(){K.checked?
S.removeAttribute("disabled"):S.setAttribute("disabled","disabled")},D=document.createElement("option"),D.setAttribute("value","allPages"),mxUtils.write(D,mxResources.get("allPages")),S.appendChild(D),D=document.createElement("option"),D.setAttribute("value","currentPage"),mxUtils.write(D,mxResources.get("currentPage")),S.appendChild(D),1<Z&&(K.style.marginBottom="12px",S.style.marginBottom="16px",I.appendChild(S),mxUtils.br(I),ia+=20),null!=this.lastEmbedInclude&&(S.value=this.lastEmbedInclude),
mxEvent.addListener(K,"change",H),H()):K.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");f&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(P),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:
!0,I.appendChild(T),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),ia+=50);var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));Y.appendChild(D);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));Y.appendChild(H);H=document.createElement("option");H.setAttribute("value",
"self");mxUtils.write(H,mxResources.get("openInThisWindow"));Y.appendChild(H);H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==O&&(mxUtils.write(I,mxResources.get("links")+":"),I.appendChild(Y),I.appendChild(H),mxUtils.br(I),mxUtils.br(I),ia+=50);k=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=ca.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=T.checked;
this.lastEmbedInclude=S.value;q(ca.value,W.checked,!X.checked,l.checked,K.checked,P.checked&&f,na.value,ba.checked,("png"==O||"svg"==O)&&"currentPage"==S.value,Y.value,null!=B?B.checked:null,null!=U?U.value:null,ka.value,T.checked)}),null,k,t);this.showDialog(k.container,340,ia,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,k,t,q){var D=document.createElement("div");
D.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var O=document.createElement("h3");mxUtils.write(O,f);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(O)}var J=this.addCheckbox(D,mxResources.get("fit"),!0),I=this.addCheckbox(D,mxResources.get("shadow"),H.shadowVisible&&t,!t),Z=this.addCheckbox(D,k),ia=this.addCheckbox(D,mxResources.get("lightbox"),!0),ha=this.addEditButton(D,ia),ca=ha.getEditInput(),na=1<H.model.getChildCount(H.model.getRoot()),
X=this.addCheckbox(D,mxResources.get("layers"),na,!na);X.style.marginLeft=ca.style.marginLeft;X.style.marginBottom="12px";X.style.marginTop="8px";mxEvent.addListener(ia,"change",function(){ia.checked?(na&&X.removeAttribute("disabled"),ca.removeAttribute("disabled")):(X.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ia.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,
function(){c(J.checked,I.checked,Z.checked,ia.checked,ha.getLink(),X.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,k,t,q,D,H,O){function J(ca){var na=" ",X="";t&&(na=" 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.lightboxHost+"/?client=1"+(null!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",X+="cursor:pointer;");c&&(X+="max-width:100%;");var ba="";k&&(ba=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');H('<img src="'+ca+'"'+ba+(""!=X?' style="'+X+'"':"")+na+"/>")}var I=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var na=t?this.getFileData(!0):
null;ca=this.createImageDataUri(ca,na,"png");J(ca)}),null,null,null,mxUtils.bind(this,function(ca){O({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ia="";k&&(ia="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var ha=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ia+"&xml="+encodeURIComponent(f));ha.send(mxUtils.bind(this,function(){200<=
ha.getStatus()&&299>=ha.getStatus()?J("data:image/png;base64,"+ha.getText()):O({message:mxResources.get("unknownError")})}))}else O({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,k,t,q,D,H){var O=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),J=O.getElementsByTagName("a");if(null!=J)for(var I=0;I<J.length;I++){var Z=J[I].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==J[I].getAttribute("target")&&J[I].removeAttribute("target")}t&&
O.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(O);if(k){var ia=" ",ha="";t&&(ia="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.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(D?"&layers=1":
"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");this.editor.convertImages(O,mxUtils.bind(this,function(ca){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ha?' style="'+ha+'"':"")+ia+"/>")}))}else ha="",t&&(f=this.getSelectedPageIndex(),O.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.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}}})(this);"),ha+="cursor:pointer;"),c&&(c=parseInt(O.getAttribute("width")),q=parseInt(O.getAttribute("height")),O.setAttribute("viewBox","-0.5 -0.5 "+c+" "+q),ha+="max-width:100%;max-height:"+q+"px;",O.removeAttribute("height")),""!=ha&&O.setAttribute("style",ha),this.editor.addFontCss(O),this.editor.graph.mathEnabled&&this.editor.addMathCss(O),H(mxUtils.getXml(O))};EditorUi.prototype.timeSince=
function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var k=null;if("diagram"==
c.nodeName)k=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){k=t[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(D){return"page"==D?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==D?1:q.apply(this,arguments)}}}null!=k&&(c=Editor.parseDiagramNode(k))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(D){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var f=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(k=t))}return{scale:f,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,f,k,t,q){try{var D=this.editor.graph,H=null;if(null!=k&&0<k.length)D=this.createTemporaryGraph(D.getStylesheet()),document.body.appendChild(D.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
!0),D),H=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){D=this.createTemporaryGraph(D.getStylesheet());var O=D.getGlobalVariable;D.setBackgroundImage=this.editor.graph.setBackgroundImage;var J=this.pages[0];this.currentPage==J?D.setBackgroundImage(this.editor.graph.backgroundImage):null!=J.viewState&&null!=J.viewState&&D.setBackgroundImage(J.viewState.backgroundImage);D.getGlobalVariable=function(I){return"page"==I?J.getName():"pagenumber"==I?1:O.apply(this,arguments)};document.body.appendChild(D.container);
D.model.setRoot(J.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=I.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(H));c(Z.substring(Z.lastIndexOf(",")+1));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container)}catch(ia){null!=f&&f(ia)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,D.shadowVisible,null,D,q,
null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){O=null!=O?O:!0;Z=null!=Z?Z:0;H=null!=J?J:f.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==f.getAdaptiveColors()&&(H="#ffffff");J=this.editor.graph.createSvgImageExport(null!=c);D=f.getSvg(H,I,Z,null,null,D,null,J,null,f.shadowVisible||ia,null,ha,"diagram");(f.shadowVisible||ia)&&f.addSvgShadow(D,null,null,0==Z);null!=c&&D.setAttribute("content",c);null!=k&&D.setAttribute("resource",
k);var ca=mxUtils.bind(this,function(na){na=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=q&&q(na);return na});f.mathEnabled&&this.editor.addMathCss(D);if(null!=q)this.embedFonts(D,mxUtils.bind(this,function(na){O?this.editor.convertImages(na,mxUtils.bind(this,function(X){ca(X)})):ca(na)}));else return ca(D)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),f(c)}catch(t){f(c)}}))}catch(k){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){J=null!=J?J:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,f,k,t,q,D,H,O,J,I,Z,ia,ha)}));this.handleError(na)}))){var ca=
this.editor.graph.isSelectionEmpty();k=null!=k?k:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,q?this.getFileData(!0,null,null,null,k,O,null,null,null,null,null,c,D):null,J,null==this.pages||0==this.pages.length,Z)}catch(X){this.handleError(X)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,k,c||1,f,t,null,null,D,H,I,ia,
ha)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,k,t,q,D,H){f=null!=f?f:0;k=null!=k?k:0;var O=[];try{var J=this.editor.graph;if(null!=c&&0<c.length){J.model.beginUpdate();try{var I=
mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ia=Z.getElementsByTagName("diagram");if(1==ia.length&&!D){if(Z=Editor.parseDiagramNode(ia[0]),null!=this.currentPage&&(c[ia[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ha=ia[0].getAttribute("name");null!=ha&&""!=ha&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ha))}}else if(0<ia.length){D=[];var ca=
0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ia[0].getAttribute("id")]=this.pages[0].getId(),ha=ia[0].getAttribute("name"),null!=ha&&""!=ha&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ha)),Z=Editor.parseDiagramNode(ia[0]),t=!1,ca=1);for(;ca<ia.length;ca++){var na=ia[ca].getAttribute("id");ia[ca].removeAttribute("id");var X=this.updatePageRoot(new DiagramPage(ia[ca]));c[na]=ia[ca].getAttribute("id");var ba=this.pages.length;null==X.getName()&&X.setName(mxResources.get("pageWithNumber",
[ba+1]));J.model.execute(new ChangePage(this,X,X,ba,!0));D.push(X)}this.updatePageLinks(c,D)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){O=J.importGraphModel(Z,f,k,t);if(null!=O)for(this.addLocalPagesToMapping(c),ca=0;ca<O.length;ca++)this.updatePageLinksForCell(c,O[ca]);var ka=J.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ka&&null!=ka.originalSrc){this.updateBackgroundPageLink(c,ka);var da=new ChangePageSetup(this,null,ka);da.ignoreColor=!0;J.model.execute(da)}}H&&J.pasteCellStyles(J.includeDescendants(O),
J.defaultVertexStyle,J.defaultEdgeStyle)}finally{J.model.endUpdate()}}}catch(W){if(q)throw W;this.handleError(W)}return O};EditorUi.prototype.updatePageLinks=function(c,f){for(var k=0;k<f.length;k++)this.updatePageLinksForCell(c,f[k].root),null!=f[k].viewState&&this.updateBackgroundPageLink(c,f[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var k=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=
k&&(f.originalSrc="data:page/id,"+k)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var k=document.createElement("div"),t=this.editor.graph,q=t.getLinkForCell(f);null!=q&&t.setLinkForCell(f,this.updatePageLink(c,q));if(t.isHtmlLabel(f)){k.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var D=k.getElementsByTagName("a"),H=!1,O=0;O<D.length;O++)q=D[O].getAttribute("href"),null!=q&&(D[O].setAttribute("href",this.updatePageLink(c,q)),H=!0);H&&t.labelChanged(f,k.innerHTML)}for(O=
0;O<t.model.getChildCount(f);O++)this.updatePageLinksForCell(c,t.model.getChildAt(f,O))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var k=c[f.substring(f.indexOf(",")+1)];f=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var q=0;q<t.actions.length;q++){var D=t.actions[q];if(null!=D.open&&Graph.isPageLink(D.open)){var H=D.open.substring(D.open.indexOf(",")+1);k=c[H];null!=k?D.open=
"data:page/id,"+k:null==this.getPageById(H)&&delete D.open}}f="data:action/json,"+JSON.stringify(t)}}catch(O){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,k,t,q){var D=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=k?k(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){t=null!=t?t:c.name;var O=mxUtils.bind(this,function(I){H.clear()&&
D(I)}),J=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var Z=t.lastIndexOf(".");if(0<=Z&&Z<t.length)t.substring(Z+1).toUpperCase();else{var ia=t.lastIndexOf("/");0<=ia&&ia<t.length&&(t=t.substring(ia+1))}}catch(ca){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())O({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",c,t);var ha=
new XMLHttpRequest;ha.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ha.responseType="blob";this.addRemoteServiceSecurityCheck(ha);null!=q&&ha.setRequestHeader("x-convert-custom",q);ha.onreadystatechange=mxUtils.bind(this,function(){if(4==ha.readyState&&H.clear())if(200<=ha.status&&299>=ha.status)try{var ca=ha.response;if("text/xml"==ca.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(X){try{f(X.target.result)}catch(ba){O({message:mxResources.get("errorLoadingFile")})}});
na.readAsText(ca)}else this.doImportVisio(ca,f,O,t)}catch(X){O(X)}else try{""==ha.responseType||"text"==ha.responseType?O({message:ha.responseText}):(na=new FileReader,na.onload=function(){try{O({message:JSON.parse(na.result).Message})}catch(X){O(X)}},na.readAsText(ha.response))}catch(X){O({})}});ha.send(I)}else if(H.clear())try{this.doImportVisio(c,f,O,t)}catch(ca){O(ca)}}else O({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
J():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",J,null,null,null,O))}),D)};EditorUi.prototype.importGraphML=function(c,f,k){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=k?k(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(O){q.clear()&&t(O)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(O){D(O)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var t=mxUtils.bind(this,function(D){k.clear()&&f(D)}),
q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(D){t(D)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,
t))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,f,k){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=k?k(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(O){q.clear()&&t(O)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if("undefined"!==typeof window.LucidImporter)try{var O=JSON.parse(c);f(LucidImporter.importState(O));try{if(null!=
window.console&&"1"==urlParams.test){var J=[(new Date).toISOString(),"convertLucidChart",O];null!=O.state&&J.push(JSON.parse(O.state));if(null!=O.svgThumbs)for(var I=0;I<O.svgThumbs.length;I++)J.push(Editor.createSvgDataUri(O.svgThumbs[I]));null!=O.thumb&&J.push(O.thumb);console.log.apply(console,J)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),D(Z)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?
window.setTimeout(H,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",H,null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),
t)};EditorUi.prototype.createMermaidXml=function(c,f,k,t,q,D){var H=new Graph(document.createElement("div"));k=H.insertVertex(null,null,null,0,0,t,q,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");H.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=D&&H.setAttributeForCell(k,"templatePrompt",D);c=(new mxCodec).encode(H.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,k){var t=0,q=function(){for(var H=
document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),O=0;O<H.length;O++)null!=H[O].parentNode&&H[O].parentNode.removeChild(H[O])},D=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var O=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),J=mxUtils.bind(this,function(I){H.clear()&&(q(),k(I))});O.send(mxUtils.bind(this,function(I){if(H.isAlive())if(200<=I.getStatus()&&299>=I.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ia=mxUtils.trim(I.getText());
this.generateMermaidImage(ia,null,mxUtils.bind(this,function(ha,ca,na){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ia]),q(),f(ia,ha,ca,na))}),J)}),J,mxUtils.bind(this,function(ha){3>t++?H.clear()&&D():J(ha)}))}),J);else{var Z={message:mxResources.get("error")+" "+I.getStatus()};try{Z=JSON.parse(I.getText()),Z=Z.error}catch(ia){}J(Z)}}),J)}),k)});D()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=
mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var k=1<f.length?f[1]:null;if(null!=k){var t=k.indexOf("-");0<t&&(k=k.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");
k=f[0].split(" ")[0].replace(/:$/,"");t=k.indexOf("-");0<t&&(k=k.substring(0,t));try{"mindmap"==k&&2<f.length&&(c=extractMermaidMindmap(f))}catch(q){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,k,t,q){var D=mxUtils.bind(this,function(O){this.loadingMermaid=!1;null!=t?t(O):this.handleError(O)}),H=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel=
"strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var O=mxUtils.bind(this,function(J){try{if(mxClient.IS_IE||mxClient.IS_IE11)J=J.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');J=J.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var I=mxUtils.parseXml(J).getElementsByTagName("svg");
if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var Z=parseFloat(I[0].getAttribute("width")),ia=parseFloat(I[0].getAttribute("height"));if(isNaN(Z)||isNaN(ia))try{var ha=I[0].getAttribute("viewBox").split(/\s+/);Z=parseFloat(ha[2]);ia=parseFloat(ha[3])}catch(ca){Z=Z||100,ia=ia||100}k(this.convertDataUri(Editor.createSvgDataUri(J)),Z,ia)}else null!=q?q():t({message:mxResources.get("invalidInput")})}catch(ca){t(ca)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+
(new Date).getTime(),c).then(function(J){O(J.svg)}).catch(function(J){null!=q?q(J):t(J)})}catch(J){t(J)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(H,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(O){this.importXml(O,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",H,null,null,null,D)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",
H,null,null,null,D))};EditorUi.prototype.generatePlantUmlImage=function(c,f,k,t){function q(O,J,I){c1=O>>2;c2=(O&3)<<4|J>>4;c3=(J&15)<<2|I>>6;c4=I&63;r="";r+=D(c1&63);r+=D(c2&63);r+=D(c3&63);return r+=D(c4&63)}function D(O){if(10>O)return String.fromCharCode(48+O);O-=10;if(26>O)return String.fromCharCode(65+O);O-=26;if(26>O)return String.fromCharCode(97+O);O-=26;return 0==O?"-":1==O?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+
function(O){r="";for(i=0;i<O.length;i+=3)r=i+2==O.length?r+q(O.charCodeAt(i),O.charCodeAt(i+1),0):i+1==O.length?r+q(O.charCodeAt(i),0,0):r+q(O.charCodeAt(i),O.charCodeAt(i+1),O.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(O){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var J=new FileReader;J.readAsDataURL(this.response);J.onloadend=function(I){var Z=new Image;Z.onload=function(){try{var ia=
Z.width,ha=Z.height;if(0==ia&&0==ha){var ca=J.result,na=ca.indexOf(","),X=decodeURIComponent(escape(atob(ca.substring(na+1)))),ba=mxUtils.parseXml(X).getElementsByTagName("svg");0<ba.length&&(ia=parseFloat(ba[0].getAttribute("width")),ha=parseFloat(ba[0].getAttribute("height")))}k(J.result,ia,ha)}catch(ka){t(ka)}};Z.src=J.result};J.onerror=function(I){t(I)}}else t(O)};H.onerror=function(O){t(O)};H.send()};EditorUi.prototype.insertAsPreText=function(c,f,k){var t=this.editor.graph,q=null;t.getModel().beginUpdate();
try{q=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,k,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(q,!0)}finally{t.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(c,f,k,t,q,D,H,O){D=null!=D?D:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ha){4==
ha.readyState&&200<=ha.status&&299>=ha.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ha.responseText,f,k,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var J=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=I&&0<I.length)return this.importXml(I,f,k,D,!0,O)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,
f,k,D,!0,O);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(I,f,k,D,!0,O);if(0<Z.length)return Z}catch(ha){}this.loadImage(c,mxUtils.bind(this,function(ha){if("data:"==c.substring(0,5))this.resizeImage(ha,c,mxUtils.bind(this,function(X,ba,ka){J.setSelectionCell(J.insertVertex(null,
null,"",J.snap(f),J.snap(k),ba,ka,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(X)+";"))}),H,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ha.width,this.maxImageSize/ha.height)),na=Math.round(ha.width*ca);ha=Math.round(ha.height*ca);J.setSelectionCell(J.insertVertex(null,null,"",J.snap(f),J.snap(k),na,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
c+";"))}}),mxUtils.bind(this,function(){var ha=null;J.getModel().beginUpdate();try{ha=J.insertVertex(J.getDefaultParent(),null,c,J.snap(f),J.snap(k),1,1,"text;"+(t?"html=1;":"")),J.updateCellSize(ha),J.fireEvent(new mxEventObject("textInserted","cells",[ha]))}finally{J.getModel().endUpdate()}J.setSelectionCell(ha)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,k,D,null,O);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
function(ha){this.editor.graph.setSelectionCells(this.importXml(ha,f,k,D,null,O))}),mxUtils.bind(this,function(ha){this.handleError(ha)}));else{J=this.editor.graph;q=null;J.getModel().beginUpdate();try{q=J.insertVertex(J.getDefaultParent(),null,"",J.snap(f),J.snap(k),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));J.fireEvent(new mxEventObject("textInserted","cells",[q]));t&&(c=J.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");q.value=c;J.updateCellSize(q);if(0<
this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ia=J.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ia.width;q.geometry.height=ia.height}Graph.isLink(q.value)&&J.setLinkForCell(q,q.value);q.geometry.width+=J.gridSize;q.geometry.height+=J.gridSize}finally{J.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,O){StorageFile.listFiles(this,"F",H,O)});window.openBrowserFile=
mxUtils.bind(this,function(H,O,J){StorageFile.getFileContent(this,H,O,J)});window.deleteBrowserFile=mxUtils.bind(this,function(H,O,J){StorageFile.deleteFile(this,H,O,J)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,O){null!=O&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(O)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,
mxUtils.bind(this,function(J){this.importXml(J,0,0,!0)}),null,O)):this.editor.graph.setSelectionCells(this.importXml(H,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,D=q.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=t;D.apply(q,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
function(c,f,k){var t=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(D){if(mxUtils.isEmptyObject(D.files))k();else{var H=0,O,J=!1;D.forEach(function(I,Z){I=Z.name.toLowerCase();"diagram/diagram.xml"==I?(J=!0,Z.async("string").then(function(ia){0==ia.indexOf("<mxfile ")?f(ia):k()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>H&&(H=I,O=Z))});0<H?O.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,
c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):t.parseFileData(I,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):k())}),c.name):k()}):J||k()}},function(D){k(D)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,k))};EditorUi.prototype.importFile=function(c,f,k,t,q,D,H,
O,J,I,Z,ia){I=null!=I?I:!0;var ha=!1,ca=null,na=mxUtils.bind(this,function(X){var ba=null;null!=X&&"<mxlibrary"==X.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,X,H)),this.showSidebar()):ba=this.importXml(X,k,t,I,null,null!=ia?mxEvent.isControlDown(ia):null);null!=O&&O(ba)});"image"==f.substring(0,5)?(J=!1,"image/png"==f.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(ca=this.importXml(Z,k,t,I,null,null!=ia?mxEvent.isControlDown(ia):null),J=!0)),J||(J=this.editor.graph,
Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),I&&J.isGridEnabled()&&(k=J.snap(k),t=J.snap(t)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Z+="editableCssRules=.*;"),ca=[J.insertVertex(null,null,"",k,t,q,D,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ha=!0,this.importGraphML(c,na)):null!=J&&null!=H&&EditorUi.isVisioFilename(H)?(ha=!0,this.importVisio(J,na)):(new XMLHttpRequest).upload&&
this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ha=!0,f=mxUtils.bind(this,function(X){4==X.readyState&&(200<=X.status&&299>=X.status?na(X.responseText):null!=O&&(O(null),this.showError(mxResources.get("error"),413==X.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,H):this.parseFile(J,f,H)):0==c.indexOf("PK")&&null!=J?(ha=!0,this.importZipFile(J,na,mxUtils.bind(this,
function(){ca=this.insertTextAt(this.validateFileData(c),k,t,!0,null,I);O(ca)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(ca=this.insertTextAt(this.validateFileData(c),k,t,!0,null,I,null,null!=ia?mxEvent.isControlDown(ia):null));ha||null==O||O(ca);return ca};EditorUi.prototype.importFiles=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var ca=null!=f&&null!=k,na=!0;f=null!=f?f:0;k=null!=k?k:0;var X=!1;if(!mxClient.IS_CHROMEAPP&&
null!=c)for(var ba=Z||this.resampleThreshold,ka=0;ka<c.length;ka++)if("image/svg"!==c[ka].type.substring(0,9)&&"image/"===c[ka].type.substring(0,6)&&c[ka].size>ba){X=!0;break}var da=mxUtils.bind(this,function(){var W=this.editor.graph,U=W.gridSize;q=null!=q?q:mxUtils.bind(this,function(T,Y,aa,la,va,ta,qa,Ba,ya){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,qa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==c.length&&null!=
ha&&"drop"==ha.type&&this.isBlankFile()&&!this.canUndo()&&(ca=!1,la=aa=0);return this.importFile(T,Y,aa,la,va,ta,qa,Ba,ya,ca,ia,ha)}catch(La){return this.handleError(La),null}});D=null!=D?D:mxUtils.bind(this,function(T){W.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=c.length,B=l,K=[],S=mxUtils.bind(this,function(T,Y){K[T]=Y;if(0==--B){this.spinner.stop();if(null!=O)O(K);else{var aa=[];W.getModel().beginUpdate();try{for(T=0;T<K.length;T++){var la=
K[T]();null!=la&&(aa=aa.concat(la))}}finally{W.getModel().endUpdate()}}D(aa)}}),P=0;P<l;P++)mxUtils.bind(this,function(T){var Y=c[T];if(null!=Y){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(la){if(null==H||H(Y))try{if("image/"==Y.type.substring(0,6))if("image/svg"==Y.type.substring(0,9)){var va=Graph.clipSvgDataUri(la.target.result),ta=va.indexOf(","),qa=decodeURIComponent(escape(atob(va.substring(ta+1)))),Ba=mxUtils.parseXml(qa),ya=Ba.getElementsByTagName("svg");if(0<ya.length){var La=
ya[0],Aa=ia?null:La.getAttribute("content");null!=Aa&&"<"!=Aa.charAt(0)&&"%"!=Aa.charAt(0)&&(Aa=unescape(window.atob?atob(Aa):Base64.decode(Aa,!0)));null!=Aa&&"%"==Aa.charAt(0)&&(Aa=decodeURIComponent(Aa));null==Aa||"<mxfile "!==Aa.substring(0,8)&&"<mxGraphModel "!==Aa.substring(0,14)?S(T,mxUtils.bind(this,function(){try{if(null!=Ba){var Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var za=Ca[0],wa=za.getAttribute("width"),Za=za.getAttribute("height");wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?
parseFloat(wa):NaN;Za=null!=Za&&"%"!=Za.charAt(Za.length-1)?parseFloat(Za):NaN;var Ra=za.getAttribute("viewBox");if(null==Ra||0==Ra.length)za.setAttribute("viewBox","0 0 "+wa+" "+Za);else if(isNaN(wa)||isNaN(Za)){var Ta=Ra.split(" ");3<Ta.length&&(wa=parseFloat(Ta[2]),Za=parseFloat(Ta[3]))}va=Editor.createSvgDataUri(mxUtils.getXml(za));var Ua=Math.min(1,Math.min(t/Math.max(1,wa)),t/Math.max(1,Za)),Ha=q(va,Y.type,f+T*U,k+T*U,Math.max(1,Math.round(wa*Ua)),Math.max(1,Math.round(Za*Ua)),Y.name);if(null!=
Ha&&(isNaN(wa)||isNaN(Za))){var Na=new Image;Na.onload=mxUtils.bind(this,function(){wa=Math.max(1,Na.width);Za=Math.max(1,Na.height);Ha[0].geometry.width=wa;Ha[0].geometry.height=Za;za.setAttribute("viewBox","0 0 "+wa+" "+Za);va=Editor.createSvgDataUri(mxUtils.getXml(za));var y=va.indexOf(";");0<y&&(va=va.substring(0,y)+va.substring(va.indexOf(",",y+1)));W.setCellStyles("image",va,[Ha[0]])});Na.src=Editor.createSvgDataUri(mxUtils.getXml(za))}return Ha}}}catch(y){}return null})):S(T,mxUtils.bind(this,
function(){return q(Aa,"text/xml",f+T*U,k+T*U,0,0,Y.name)}))}else S(T,mxUtils.bind(this,function(){return null}))}else{ta=!1;if("image/png"==Y.type){var Da=ia?null:this.extractGraphModelFromPng(la.target.result);if(null!=Da&&0<Da.length){var pa=new Image;pa.src=la.target.result;S(T,mxUtils.bind(this,function(){return q(Da,"text/xml",f+T*U,k+T*U,pa.width,pa.height,Y.name)}));ta=!0}}ta||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(za,wa,Za){S(T,mxUtils.bind(this,function(){if(null!=za&&za.length<I){var Ra=na&&this.isResampleImageSize(Y.size,Z)?Math.min(1,Math.min(t/wa,t/Za)):1;return q(za,Y.type,f+T*U,k+T*U,Math.round(wa*Ra),Math.round(Za*Ra),Y.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),na,t,Z,Y.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else va=la.target.result,q(va,Y.type,f+T*U,k+T*U,240,160,Y.name,function(Ca){S(T,function(){return Ca})},Y)}catch(Ca){S(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,Y)}else S(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(Y.name)?q(null,Y.type,f+T*U,k+T*U,240,160,Y.name,function(la){S(T,function(){return la})},
Y):"image"==Y.type.substring(0,5)||"application/pdf"==Y.type?aa.readAsDataURL(Y):aa.readAsText(Y)}})(P)});if(X){X=[];for(ka=0;ka<c.length;ka++)X.push(c[ka]);c=X;this.confirmImageResize(function(W){na=W;da()},J)}else da()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var k=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(D,H){if(D||f)mxSettings.setResizeImages(D?H:null),mxSettings.save();k();c(H)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(D){q(D,!0)},function(D){q(D,!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?226:200,!0,!0):q(!1,t)};EditorUi.prototype.parseFile=function(c,f,k){k=null!=k?k:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,k)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,k){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+
encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,k,t,q,D,H){q=null!=q?q:this.maxImageSize;var O=Math.max(1,c.width),J=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=H?H:f.length,D))try{var Z=Math.max(O/q,J/q);if(1<Z){var ia=Math.round(O/Z),ha=Math.round(J/
Z),ca=document.createElement("canvas");ca.width=ia;ca.height=ha;ca.getContext("2d").drawImage(c,0,0,ia,ha);var na=ca.toDataURL();if(na.length<f.length){var X=document.createElement("canvas");X.width=ia;X.height=ha;var ba=X.toDataURL();na!==ba&&(f=na,O=ia,J=ha)}}}catch(ka){}t&&I!=f&&q>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,k,t,q/1.5,D,H):k(f,O,J)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=
function(c,f,k){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=k&&(t.onerror=k);t.src=c}catch(q){if(null!=k)k(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,k=f.isEnabled;f.isEnabled=function(){return k.apply(this,
arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(U){var l=U.getEvent();return null==U.getState()&&!mxEvent.isMouseEvent(l)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(l)&&(null==U.getState()||mxEvent.isControlDown(l)||mxEvent.isShiftDown(l))});f.cellEditor.editPlantUmlData=function(U,l,B){var K=JSON.parse(B);l=new TextareaDialog(c,mxResources.get("plantUml")+":",K.data,function(S){null!=S&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(S,
K.format,function(P,T,Y){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==K.format)f.labelChanged(U,"<pre>"+P+"</pre>"),f.updateCellSize(U,!0);else{f.setCellStyles("image",c.convertDataUri(P),[U]);var aa=f.model.getGeometry(U);null!=aa&&(aa=aa.clone(),aa.width=T,aa.height=Y,f.cellsResized([U],[aa],!1))}f.setAttributeForCell(U,"plantUmlData",JSON.stringify({data:S,format:K.format}))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(l.container,
420,300,!0,!0);l.init()};f.cellEditor.editMermaidData=function(U,l,B){var K=JSON.parse(B);l=new TextareaDialog(c,mxResources.get("mermaid")+":",K.data,function(S){null!=S&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(S,K.config,function(P,T,Y){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[U]);var aa=f.model.getGeometry(U);null!=aa&&(aa=aa.clone(),aa.width=Math.max(aa.width,T),aa.height=Math.max(aa.height,Y),f.cellsResized([U],[aa],
!1));f.setAttributeForCell(U,"mermaidData",JSON.stringify({data:S,config:K.config},null,2))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(l.container,420,300,!0,!0);l.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(U,l){try{var B=this.graph.getAttributeForCell(U,"plantUmlData");if(null!=B)this.editPlantUmlData(U,l,B);else if(B=this.graph.getAttributeForCell(U,"mermaidData"),null!=B&&window.isMermaidEnabled)this.editMermaidData(U,
l,B);else{var K=f.getCellStyle(U);"1"==mxUtils.getValue(K,"metaEdit","0")?c.showDataDialog(U):t.apply(this,arguments)}}catch(S){c.handleError(S)}};f.getLinkTitle=function(U){return c.getLinkTitle(U)};f.customLinkClicked=function(U,l){var B=!1;try{var K=this.getGraphBounds();c.handleCustomLink(U,l);B=!0;c.chromelessResize&&!K.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(l))}catch(S){c.handleError(S)}return B};var q=f.parseBackgroundImage;f.parseBackgroundImage=function(U){var l=
q.apply(this,arguments);null!=l&&null!=l.src&&Graph.isPageLink(l.src)&&(l={originalSrc:l.src});return l};var D=f.setBackgroundImage;f.setBackgroundImage=function(U){null!=U&&null!=U.originalSrc&&(U=c.createImageForPageLink(U.originalSrc,c.currentPage,this));D.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
mxUtils.bind(this,function(U,l){U=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=U){var B=U.indexOf(",");if(0<B)for(U=U.substring(B+1),l=l.getProperty("patches"),B=0;B<l.length;B++)if(null!=l[B][EditorUi.DIFF_UPDATE]&&null!=l[B][EditorUi.DIFF_UPDATE][U]||null!=l[B][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(l[B][EditorUi.DIFF_REMOVE],U)){f.refreshBackgroundImage();break}}}));var H=f.getBackgroundImageObject;f.getBackgroundImageObject=function(U,l){var B=H.apply(this,arguments);
null!=B&&null!=B.originalSrc&&(B=l?c.createImageForPageLink(B.originalSrc,null,null,!0):{src:B.originalSrc});return B};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var O=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=
function(U){U=null!=U?U:"";"1"==urlParams.dev&&(U+=(0<U.length?"&":"?")+"dev=1");return O.apply(this,arguments)};var J=f.addClickHandler;f.addClickHandler=function(U,l,B){var K=l;l=function(S,P,T){if(null==P){var Y=mxEvent.getSource(S);"a"==Y.nodeName.toLowerCase()&&(P=Y.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(S)||!mxEvent.isPopupTrigger(S))&&f.customLinkClicked(P,T)&&mxEvent.consume(S);null!=K&&K(S,P,T)};J.call(this,U,l,B)};n.apply(this,arguments);mxClient.IS_SVG&&
this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(U,l,B){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(U,["zoomIn","zoomOut","-"],null,B);I.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(U,["-","addToScratchpad"],null,B);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(U,["-","exitGroup","home"],
null,B)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(U,l,B){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(U,["copyAsImage"],null,B);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(U,l,B):this.addPopupMenuArrangeItems(U,l,B),this.addMenuItems(U,"- cut copy copyAsImage duplicate -".split(" "),null,B),this.isShowCellEditItems()||this.addPopupDeleteItem(U,l,B),this.addMenuItems(U,["lockUnlock","-"],null,B),!this.isShowStyleItems()){if(1==
f.getSelectionCount()&&!f.isCellLocked(l)&&f.isCellEditable(l)&&(this.addSubmenu("editCell",U,null,mxResources.get("edit")),U.addSeparator(),f.getModel().isEdge(l))){this.addSubmenu("line",U);var K=f.getModel().getGeometry(l);null!=K&&null!=K.points&&0<K.points.length&&this.addMenuItems(U,["clearWaypoints"],null,B)}1==f.getSelectionCount()&&this.addMenuItems(U,["enterGroup"],null,B);K=c.getSelectionState();null!=K.mergeCell?this.addMenuItem(U,"mergeCells"):(1<K.style.colspan||1<K.style.rowspan)&&
this.addMenuItem(U,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));
var ia=f.getExportVariables;f.getExportVariables=function(){var U=ia.apply(this,arguments),l=c.getCurrentFile();null!=l&&(U.filename=l.getTitle());U.pagecount=null!=c.pages?c.pages.length:1;U.page=null!=c.currentPage?c.currentPage.getName():"";U.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return U};var ha=f.getGlobalVariable;f.getGlobalVariable=function(U){var l=c.getCurrentFile();return"filename"==U&&null!=l?l.getTitle():"page"==U&&null!=c.currentPage?
c.currentPage.getName():"pagenumber"==U?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==U?null!=c.pages?c.pages.length:1:ha.apply(this,arguments)};var ca=null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var U=this.getCurrentFile(),l=null!=U&&null!=U.getTitle()?U.getTitle():this.defaultFilename;ca!=l&&U==na&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());ca=l;na=U}));var X=f.labelLinkClicked;
f.labelLinkClicked=function(U,l,B){var K=l.getAttribute("href");if(null==K||!f.isCustomLink(K)||!mxEvent.isTouchEvent(B)&&mxEvent.isPopupTrigger(B))X.apply(this,arguments);else{if(!f.isEnabled()||null!=U&&f.isCellLocked(U.cell))f.customLinkClicked(K),f.getRubberband().reset();mxEvent.consume(B)}};this.editor.getOrCreateFilename=function(){var U=c.defaultFilename,l=c.getCurrentFile();null!=l&&(U=null!=l.getTitle()?l.getTitle():U);return U};var ba=this.actions.get("print");ba.setEnabled(!mxClient.IS_IOS||
!navigator.standalone);ba.visible=ba.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,
!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(U,l){null!=l&&f.isEnabled()&&!f.isEditing()&&null!=
l.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(U){var l=f.cellEditor.text2,B=null;null!=l&&(mxEvent.addListener(l,"dragleave",function(K){null!=B&&(B.parentNode.removeChild(B),B=null);K.stopPropagation();K.preventDefault()}),mxEvent.addListener(l,"dragover",mxUtils.bind(this,
function(K){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(l));K.stopPropagation();K.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(K){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<K.dataTransfer.files.length)this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,function(P,T,Y,aa,la,va){f.insertImage(P,la,va)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var T=0;T<P.length;T++)P[T]()},mxEvent.isControlDown(K));
else if(0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")){var S=K.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)?this.loadImage(decodeURIComponent(S),mxUtils.bind(this,function(P){var T=Math.max(1,P.width);P=Math.max(1,P.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,T)),Y/Math.max(1,P));f.insertImage(decodeURIComponent(S),T*Y,P*Y)})):document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(K.dataTransfer.types,
"text/html")?document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"));K.stopPropagation();K.preventDefault()})))}));if(Editor.isSettingsEnabled()){ba=this.editor.graph.view;var ka=mxSettings.getUnit();ba.setUnit(ka);Editor.pageSizeUnit=ka==mxConstants.METERS?mxConstants.MILLIMETERS:ka;ba.addListener("unitChanged",function(U,l){U=l.getProperty("unit");mxSettings.setUnit(U);
mxSettings.save();Editor.pageSizeUnit=U==mxConstants.METERS?mxConstants.MILLIMETERS:U});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ba.unit);this.refresh()}if("1"==urlParams.styledev){ba=document.getElementById("geFooter");null!=ba&&(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)})),ba.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,l){0<this.editor.graph.getSelectionCount()?
(U=this.editor.graph.getSelectionCell(),U=this.editor.graph.getModel().getStyle(U),this.styleInput.value=U||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var da=this.isSelectionAllowed;this.isSelectionAllowed=function(U){return mxEvent.getSource(U)==this.styleInput?!0:da.apply(this,arguments)}}ba=document.getElementById("geInfo");null!=ba&&ba.parentNode.removeChild(ba);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var W=null;
mxEvent.addListener(f.container,"dragleave",function(U){f.isEnabled()&&(null!=W&&(W.parentNode.removeChild(W),W=null),U.stopPropagation(),U.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(U){null==W&&(!mxClient.IS_IE||10<document.documentMode)&&(W=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();U.stopPropagation();U.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(U){null!=W&&(W.parentNode.removeChild(W),
W=null);if(f.isEnabled()){var l=mxUtils.convertPoint(f.container,mxEvent.getClientX(U),mxEvent.getClientY(U)),B=U.dataTransfer.files,K=f.view.translate,S=f.view.scale,P=l.x/S-K.x,T=l.y/S-K.y;if(0<B.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(U)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(B,!0)):(mxEvent.isAltDown(U)&&(T=P=null),this.importFiles(B,P,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(U),null,null,mxEvent.isShiftDown(U),
U));else{mxEvent.isAltDown(U)&&(T=P=0);var Y=0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")?U.dataTransfer.getData("text/uri-list"):null;l=this.extractGraphModelFromEvent(U,null!=this.pages);if(null!=l)f.setSelectionCells(this.importXml(l,P,T,!0));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")){var aa=U.dataTransfer.getData("text/html");l=document.createElement("div");l.innerHTML=Graph.sanitizeHtml(aa);var la=null;B=l.getElementsByTagName("img");null!=B&&1==B.length?(aa=B[0].getAttribute("src"),
null==aa&&(aa=B[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)||(la=!0)):(B=l.getElementsByTagName("a"),null!=B&&1==B.length?aa=B[0].getAttribute("href"):(l=l.getElementsByTagName("pre"),null!=l&&1==l.length&&(aa=mxUtils.getTextContent(l[0]))));var va=!0,ta=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(aa,P,T,!0,la,null,va,mxEvent.isControlDown(U)))});la&&null!=aa&&aa.length>this.resampleThreshold?this.confirmImageResize(function(qa){va=qa;ta()},mxEvent.isControlDown(U)):
ta()}else null!=Y&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)?this.loadImage(decodeURIComponent(Y),mxUtils.bind(this,function(qa){var Ba=Math.max(1,qa.width);qa=Math.max(1,qa.height);var ya=this.maxImageSize;ya=Math.min(1,Math.min(ya/Math.max(1,Ba)),ya/Math.max(1,qa));f.setSelectionCell(f.insertVertex(null,null,"",P,T,Ba*ya,qa*ya,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+Y+";"))}),mxUtils.bind(this,function(qa){f.setSelectionCells(this.insertTextAt(Y,
P,T,!0))})):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(U.dataTransfer.getData("text/plain"),P,T,!0))}}U.stopPropagation();U.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,
function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var U=parseInt(this.div.offsetLeft),l=parseInt(this.div.offsetWidth),B=c.embedViewport.x+c.embedViewport.width,K=parseInt(this.div.offsetTop),
S=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(U,B-l))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(K,P-S))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ba=Editor.currentTheme,"simple"==ba||"sketch"==ba)this.doSetCurrentTheme(ba,
!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ba=!1;if(null!=urlParams.dark)ba=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ba="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ba&&"auto"!=mxSettings.settings.darkMode||(ba=mxSettings.settings.darkMode);
"auto"==ba&&this.isAutoDarkModeSupported()&&(ba=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ba?"1"==ba:ba);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(U){this.isAutoDarkMode()&&this.setDarkMode(U.matches)}))}catch(U){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&
null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(U,l){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));
f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=
f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,t=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==
this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var D=null,H=null,O=null,J=null;
mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){J=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){O=parseInt(this.diagramContainer.style.width);D=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,
null,mxUtils.bind(this,function(I){var Z=!1;null!=D&&(this.diagramContainer.style.width=Math.max(20,O+mxEvent.getClientX(I)-D)+"px",Z=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,J+mxEvent.getClientY(I)-H)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==D&&null==H||mxEvent.consume(I);H=D=null});
document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width=
"10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var k=
f.clipboardData||f.originalEvent.clipboardData,t=!1,q=0;q<k.types.length;q++)if("text/"===k.types[q].substring(0,5)){t=!0;break}if(!t){var D=k.items;for(index in D){var H=D[index];if("file"===H.kind){if(c.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(J,I,Z,ia,ha,ca){c.insertImage(J,ha,ca)},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var I=0;I<J.length;I++)J[I]()});else{var O=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],
O.x,O.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(J){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily=
"monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(D){var H=mxEvent.getSource(D);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=D.keyCode&&(mxClient.IS_MAC||17!=D.keyCode)&&(!mxClient.IS_MAC||91!=D.keyCode&&93!=D.keyCode)||t||(k.style.left=f.container.scrollLeft+10+"px",k.style.top=f.container.scrollTop+10+"px",D=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(k),
t=!0,k.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=D,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(D){var H=D.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=H&&17!=H&&91!=H&&93!=H||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),
this.copyCells(k),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(k,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(D){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(k.innerHTML="&nbsp;",k.focus(),null!=D.clipboardData&&(Graph.removePasteFormatting(k.firstChild),this.pasteCells(D,k,!0,!0)),!mxEvent.isConsumed(D)){var H=f.container.scrollLeft,
O=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=H,f.container.scrollTop=O,Graph.removePasteFormatting(k.firstChild),this.pasteCells(D,k,!1,!0)}catch(J){this.handleError(J)}}),0)}}catch(J){this.handleError(J)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==k?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};
EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(k||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return k};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,t=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,t-=this.embedViewport.y):(k+=this.embedViewport.x,t+=this.embedViewport.y));f={x:k,y:t,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};
EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=c.boundingRect){var t=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-t.x;c.y-=c.boundingRect.y-t.y}this.diagramContainer.scrollLeft=c.x+(k.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(k.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");
if(!f&&null!=t){t=t.getAttribute("title");var q=this.getCurrentFile();q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?
(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=
function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=
this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=
this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||
null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=
function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+
": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=
"");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,k,t){k=null!=k?k:"geButton";var q=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),q.funct,null,t);t.className=k;t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(q,t,k);null!=f&&(t.style.backgroundImage="url("+
f+")",t.innerText="");return t};EditorUi.prototype.addButton=function(c,f,k,t){c=this.createToolbarButton(c,f,k);t=null!=t?t:this.container;t.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,k){var t=document.createElement("a");t.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(t.style.backgroundImage="url("+c+")");null!=f&&t.setAttribute("title",f);null!=k&&mxEvent.addListener(t,"click",function(q){"disabled"!=t.getAttribute("disabled")&&k(q);mxEvent.consume(q)});
mxEvent.preventDefault(t);return t};EditorUi.prototype.createMenuItem=function(c,f,k){var t=this.actions.get(c),q=null!=t?t.funct:null,D=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),q);null==t||k||(c=function(){t.isEnabled()?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return D};EditorUi.prototype.createFormatWindow=function(){if(null==
this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,
t=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(q){mxEvent.getSource(q)==
this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>q||690>D)&&this.formatWindow.window.toggleMinimized()}),
0)):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var k=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=q;this.refresh();
this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),q=c?f:0,D=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(0)":"translateX(-100%)");0!=q&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+D+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==q&&t()}),1E3*D)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var Q=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=
this.formatWindow;return null!=c?c.window.isVisible():Q.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(H,O){var J=this.menus.get(H);H=this.createMenuElement(O,mxUtils.bind(this,function(){J.funct.apply(this,arguments)}));H.setAttribute("title",O);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&
("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,
mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var k=f("newLibrary","");k.style.left="0px";k.style.right="50%";var t=document.createElement("span");k.appendChild(t);var q=f("openLibraryFrom","");q.style.borderLeftWidth="1px";q.style.left="50%";q.style.right="0px";var D=document.createElement("span");q.appendChild(D);this.dependsOnLanguage(mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,mxResources.get("newLibrary"));
k.setAttribute("title",mxResources.get("newLibrary"));D.innerHTML="";mxUtils.write(D,mxResources.get("openLibraryFrom"));q.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),k="simple"==Editor.currentTheme||
"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};
EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",
!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};
EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};
EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&k)&&!c?f.setAttribute("media",k?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=
this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=
function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),
c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=
c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,
k=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",k.style.left="10px",k.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left=
"0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");var q=t.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=q[0];this.diagramContainer.style.left=q[1];var D=parseInt(q[2]);q=parseInt(q[3]);D=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,
D):D,t.width-80);q=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,q):q,t.height-80);this.diagramContainer.style.width=D+"px";this.diagramContainer.style.height=q+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-
4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-
this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=
function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-
4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize=
"8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&
null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,
c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=
function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var k=c.indexOf(",");0<k&&(f=this.getPageById(c.substring(k+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var k=JSON.parse(c.substring(17));null!=k&&null!=k.title&&(f=k.title)}catch(t){}return f};
EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,k){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,k){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,k){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=
mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,k){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,q){try{this.spinner.stop();var D=this.createImageDataUri(t,f,"png"),H=parseInt(q.getAttribute("width")),O=parseInt(q.getAttribute("height"));this.writeImageToClipboard(D,H,O,mxUtils.bind(this,function(J){this.handleError(J)}))}catch(J){this.handleError(J)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==
mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),q=mxUtils.getXml(k.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(q));f?(k.removeCells(t,!1),k.lastPasteXml=null):(k.lastPasteXml=q,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};
EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,k,t,q){q=null!=q?q:!0;var D=this.editor.graph,H=Editor.pasteAtMousePointer&&D.isMouseInsertPoint()?D.getInsertPoint():null,O=null;D.lastPasteXml==c?null==H&&D.pasteCounter++:
(D.lastPasteXml=c,D.pasteCounter=0);var J=D.pasteCounter*D.gridSize;if(k||this.isCompatibleString(c)){D.model.beginUpdate();try{if(O=this.importXml(c,J,J),null!=H){var I=D.getBoundingBoxFromGeometry(O,!0);if(null!=I){var Z=Math.round(D.snap(H.x)),ia=Math.round(D.snap(H.y));D.cellsMoved(O,Z-I.x,ia-I.y)}}}finally{D.model.endUpdate()}D.setSelectionCells(O)}else if(f&&1==D.getSelectionCount()){q=D.getStartEditingCell(D.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==D.getCurrentCellStyle(q)[mxConstants.STYLE_SHAPE])D.setCellStyles(mxConstants.STYLE_IMAGE,
c,[q]);else{D.model.beginUpdate();try{D.labelChanged(q,c),Graph.isLink(c)&&D.setLinkForCell(q,c)}finally{D.model.endUpdate()}}D.setSelectionCell(q)}else O=D.getInsertPoint(),D.isMouseInsertPoint()&&(J=0,D.lastPasteXml==c&&0<D.pasteCounter&&D.pasteCounter--),O=this.insertTextAt(c,O.x+J,O.y+J,q),D.setSelectionCells(O);D.isSelectionEmpty()||(D.scrollCellToVisible(D.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(D.view.getState(D.getSelectionCell())));return O};EditorUi.prototype.pasteCells=
function(c,f,k,t){if(!mxEvent.isConsumed(c)){var q=f,D=!1;if(k&&null!=c.clipboardData&&c.clipboardData.getData){var H=c.clipboardData.getData("text/plain"),O=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var J=decodeURIComponent(H);this.isCompatibleString(J)&&(O=!0,H=J)}catch(na){}O=O?null:c.clipboardData.getData("text/html");null!=O&&0<O.length?(q=this.parseHtmlData(O),D="text/plain"!=q.getAttribute("data-type")):null!=H&&0<H.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
O))}H=q.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))k=H[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(na){var X=this.editor.graph;X.lastPasteXml==na?X.pasteCounter++:(X.lastPasteXml=na,X.pasteCounter=0);var ba=X.pasteCounter*X.gridSize;X.setSelectionCells(this.importXml(na,ba,ba));X.scrollCellToVisible(X.getSelectionCell())}),mxUtils.bind(this,function(na){this.handleError(na)})),
mxEvent.consume(c));else{var I=!1,Z="";Z=D?null!=q.textContent&&"<mxfile"==q.textContent.substring(0,7)&&"</mxfile>"==q.textContent.substring(q.textContent.length-9)||"<mxGraphModel"==q.textContent.substring(0,13)&&"</mxGraphModel>"==q.textContent.substring(q.textContent.length-15)?q.textContent.replace(/\u00a0/g," "):q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var ia=Z.lastIndexOf("%3E");0<=ia&&ia<Z.length-3&&(Z=Z.substring(0,ia+3))}catch(na){}try{H=q.getElementsByTagName("span"),
(J=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(Z))&&(this.isCompatibleString(J)||0==J.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,Z=J)}catch(na){}try{if(null!=Z&&0<Z.length){if(0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ha=mxUtils.bind(this,function(){try{Z=(new MiroImporter).importMiroJson(JSON.parse(Z)),this.pasteXml(Z,t,I,c)}catch(na){console.log("Miro import error:",na)}});"undefined"===typeof MiroImporter?
mxscript("js/diagramly/miro/MiroImporter.js",ha):ha()}else this.pasteXml(Z,t,I,c,D);try{mxEvent.consume(c)}catch(na){}}else if(!k){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(na){this.handleError(na)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f,k){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||
(t+=20);this.showDialog((new PrintDialog(this,c,f,k)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var k=this.editor,t=k.graph,q=this.getPageIndex(this.currentPage),D=null!=q?q+1:1,H=mxUtils.bind(this,function(ba,ka,da,W){var U=ba.useCssTransforms,l=ba.currentTranslate,B=ba.currentScale,K=ba.view.translate,S=ba.view.scale;ba.useCssTransforms&&(ba.useCssTransforms=!1,ba.currentTranslate=new mxPoint(0,0),ba.currentScale=1,ba.view.translate=new mxPoint(0,0),ba.view.scale=1);var P=ba.getGraphBounds(),
T=0,Y=0,aa=mxRectangle.fromRectangle(ba.pageFormat),la=f.fit||f.crop||!ba.pageVisible,va=f.scale;aa.width=Math.ceil(aa.width*ba.pageScale);aa.height=Math.ceil(aa.height*ba.pageScale);var ta=1;if(f.fit){ta=f.sheetsAcross;var qa=f.sheetsDown;isNaN(va)||(aa.width=Math.ceil(aa.width*va),aa.height=Math.ceil(aa.height*va));ta=Math.min(aa.height*qa/(P.height/ba.view.scale),aa.width*ta/(P.width/ba.view.scale))}else ta=isNaN(va)?1:va;ta*=1;!la&&ba.pageVisible?(va=ba.getPageLayout(),T-=va.x*aa.width,Y-=va.y*
aa.height):la=!0;f.crop&&(f.selection&&(P=t.getBoundingBox(t.getSelectionCells())),aa.width=(P.width+1)*ta/ba.view.scale,aa.height=(P.height+1)*ta/ba.view.scale);aa.width=Math.ceil(1*aa.width);aa.height=Math.ceil(1*aa.height);W=null!=W?"page/id,"+W:null;if(null==ka){ka=PrintDialog.createPrintPreview(ba,ta,null,0,T,Y,la);ka.title=this.getBaseFilename(!0);ka.pageSelector=!1;ka.mathEnabled=!1;T=f.border;isNaN(T)||(ka.pageMargin=T);f.selection&&(ka.isCellVisible=function(Aa){return ba.isCellSelected(Aa)});
var Ba=ka.writeHead;ka.writeHead=function(Aa){Ba.apply(this,arguments);mxClient.IS_GC&&(Aa.writeln('<style type="text/css">'),Aa.writeln("@media print {"),Aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Aa.writeln("}"),Aa.writeln("</style>"));null!=k.fontCss&&(Aa.writeln('<style type="text/css">'),Aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,!1)),Aa.writeln("</style>"));for(var Da=ba.getCustomFonts(),pa=0;pa<Da.length;pa++){var Ca=Da[pa].name,za=Da[pa].url;Graph.isCssFontUrl(za)?Aa.writeln('<link rel="stylesheet" href="'+
mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(za))+'" charset="UTF-8" type="text/css">'):(Aa.writeln('<style type="text/css">'),Aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ca)+'";\nsrc: url("'+mxUtils.htmlEntities(za)+'");\n}'),Aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ya=ka.drawBackgroundImage;ka.drawBackgroundImage=function(Aa){ya.apply(this,arguments);null!=Aa.node&&(EditorUi.embedSvgImages(Aa.node),t.disableSvgLinks(Aa.node,function(Da){Da.setAttribute("href",
"javascript:void(0)")}))}}var La=ka.addGraphFragment;ka.addGraphFragment=function(Aa,Da,pa,Ca,za,wa){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:za.classList.add("geDisableMathJax")};f.grid&&(ka.gridSize=ba.gridSize,ka.gridSteps=ba.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ka.open(null,null,da,!0,W,aa,f.selection?ba.getSelectionCells():null)}else{P=ba.background;if(null==P||""==P||P==mxConstants.NONE)P=
"#ffffff";ka.backgroundColor=P;ka.autoOrigin=la;f.grid&&(ka.gridSize=ba.gridSize,ka.gridSteps=ba.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ka.appendGraph(ba,ta,T,Y,da,!0,W,aa,f.selection?ba.getSelectionCells():null);da=ba.getCustomFonts();if(null!=ka.wnd)for(aa=0;aa<da.length;aa++)T=da[aa].name,Y=da[aa].url,Graph.isCssFontUrl(Y)?ka.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Y)+'" charset="UTF-8" type="text/css">'):
(ka.wnd.document.writeln('<style type="text/css">'),ka.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(T)+'";\nsrc: url("'+mxUtils.htmlEntities(Y)+'");\n}'),ka.wnd.document.writeln("</style>"))}U&&(ba.useCssTransforms=U,ba.currentTranslate=l,ba.currentScale=B,ba.view.translate=K,ba.view.scale=S);return ka}),O=f.pagesFrom,J=f.pagesTo,I=!f.allPages;q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||O==D&&J==D);if(!I&&null!=this.pages&&
this.pages.length){I=0;D=this.pages.length-1;f.allPages||(I=parseInt(O)-1,D=parseInt(J)-1);for(var Z=I;Z<=D;Z++){var ia=this.pages[Z];O=ia==this.currentPage?t:null;if(null==O){O=this.createTemporaryGraph(t.stylesheet);O.shapeForegroundColor=t.shapeForegroundColor;O.shapeBackgroundColor=t.shapeBackgroundColor;J=!0;I=!1;var ha=null,ca=null;null==ia.viewState&&null==ia.root&&this.updatePageRoot(ia);null!=ia.viewState&&(J=ia.viewState.pageVisible,I=ia.viewState.mathEnabled,ha=ia.viewState.background,
ca=ia.viewState.backgroundImage,O.pageFormat=ia.viewState.pageFormat,O.gridSize=ia.viewState.gridSize);null!=ca&&null!=ca.originalSrc&&(ca=this.createImageForPageLink(ca.originalSrc,ia));O.background=ha;O.backgroundImage=null!=ca?new mxImage(ca.src,ca.width,ca.height,ca.x,ca.y):null;O.pageVisible=J;O.mathEnabled=I;var na=O.getGraphBounds;O.getGraphBounds=function(){var ba=na.apply(this,arguments),ka=this.backgroundImage;if(null!=ka&&null!=ka.width&&null!=ka.height){var da=this.view.translate,W=this.view.scale;
ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((da.x+ka.x)*W,(da.y+ka.y)*W,ka.width*W,ka.height*W))}return ba};var X=O.getGlobalVariable;O.getGlobalVariable=function(ba){return"page"==ba?ia.getName():"pagenumber"==ba?Z+1:"pagecount"==ba?null!=this.pages?this.pages.length:1:X.apply(this,arguments)};document.body.appendChild(O.container);this.updatePageRoot(ia);O.model.setRoot(ia.root)}q=H(O,q,Z!=D,ia.getId());O!=t&&O.container.parentNode.removeChild(O.container)}}else q=H(t);null==q||null==
q.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(H=q.wnd.document,c||(q.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),q.closeDocument(),Graph.rewritePageLinks(q.wnd.document,!0),q.mathEnabled||c||PrintDialog.printPreview(q));return q}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,k=0;k<c.length;k++)mxEvent.addListener(c[k],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),
f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[k],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[k],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),
"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(t);if(null==q){var D=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=D&&(10==document.documentMode||11==document.documentMode?q=D.getData("Text"):(q=null,q=0<=mxUtils.indexOf(D.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(D.types,
"text/html")?D.getData("text/html"):null,null!=q&&0<q.length?(D=document.createElement("div"),D.innerHTML=Graph.sanitizeHtml(q),D=D.getElementsByTagName("img"),0<D.length&&(q=D[0].getAttribute("src"))):0<=mxUtils.indexOf(D.types,"text/plain")&&(q=D.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+
"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,k=0;if(null==c){var t=document.body;var q=document.documentElement;var D=(t.clientWidth||q.clientWidth)-3;t=Math.max(t.clientHeight||0,q.clientHeight)-3}else f=c.offsetTop,k=c.offsetLeft,D=c.clientWidth,t=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border=
"3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=k+"px";q.style.width=Math.max(0,D-3)+"px";q.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var k=new mxCodec(f.ownerDocument),
t=new mxGraphModel;k.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(k=0;k<t.getChildCount(f);k++)c.push(t.getChildAt(f,k))}return c};EditorUi.prototype.openFileHandle=function(c,f,k,t,q,D){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var H=mxUtils.bind(this,function(J){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==J.substring(0,10)){null==
this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,J,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(J,f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(k,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}));else if(Graph.fileSupport&&
(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(J){4==J.readyState&&(this.spinner.stop(),200<=J.status&&299>=J.status?H(J.responseText):this.handleError({message:mxResources.get(413==J.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,
f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(J){this.spinner.stop();this.openLocalFile(J,f,t)}),mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,k.name)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else if(0==
c.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==k.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==k.type){var O=Editor.extractGraphModelFromPdf(c);null!=O&&(q=null,t=!0,c=O)}this.spinner.stop();this.openLocalFile(c,f,t,q,null!=q?k:null,D)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=
0;k<c.length;k++)mxUtils.bind(this,function(t){var q=new FileReader;q.onload=mxUtils.bind(this,function(D){try{this.openFileHandle(D.target.result,t.name,t,f)}catch(H){this.handleError(H)}});q.onerror=mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?q.readAsText(t):q.readAsDataURL(t)})(c[k])};EditorUi.prototype.openLocalFile=function(c,f,k,t,q,D){var H=this.getCurrentFile(),
O=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var J=mxUtils.parseXml(c);null!=J&&(this.editor.setGraphXml(J.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,k,t,q,D))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?O():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,O,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,O,mxResources.get("cancel"),mxResources.get("discardChanges")):O()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var k in c)f.push(k);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function k(H){if(null!=H){var O=H.lastIndexOf(".");0<O&&(H=H.substring(O+1,H.length));null==f[H]&&(f[H]=!0)}}var t=this.editor.graph,q=t.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&
(k(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=t.model.getChildCount(c);for(var D=0;D<q;D++)this.addBasenamesForCell(t.model.getChildAt(c,D),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,k,t,q){c||(c=!0,this.spinner.stop(),
this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var D=this.editor.graph;D.setGridEnabled(!1);D.pageVisible=!1;var H=D.model.cells,O;for(O in H){var J=H[O];null!=J&&null!=J.style&&(J.style+=";sketch=1;"+(-1==J.style.indexOf("fontFamily=")||-1<J.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!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(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();f(k)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
exit:null!=c?!c:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(q){c||this.handleError(q)}};
EditorUi.prototype.installMessageHandler=function(c){var f=null,k=!1,t=!1,q=null,D=mxUtils.bind(this,function(J,I){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,D);mxEvent.addListener(window,"message",mxUtils.bind(this,function(J){if(J.source==(window.opener||window.parent)){var I=
J.data,Z=null,ia=mxUtils.bind(this,function(pa){if(null!=pa&&"function"===typeof pa.charAt&&"<"!=pa.charAt(0))try{Editor.isPngDataUrl(pa)?pa=Editor.extractGraphModelFromPng(pa):"data:image/svg+xml;base64,"==pa.substring(0,26)?pa=atob(pa.substring(26)):"data:image/svg+xml;utf8,"==pa.substring(0,24)&&(pa=pa.substring(24)),null!=pa&&(""==pa.trim()?pa=null:"%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Ca){}return pa});if("json"==urlParams.proto){var ha=
!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[J],"data",[I])}catch(pa){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=I.titleKey?mxResources.get(I.titleKey):I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));
return}if("prompt"==I.action){this.spinner.stop();var ca=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(pa){null!=pa?H.postMessage(JSON.stringify({event:"prompt",value:pa,message:I}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(ca.container,300,80,!0,
!1);ca.init();return}if("draft"==I.action){var na=ia(I.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):
null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&this.actions.get("exit").funct()}));try{ca.init()}catch(pa){H.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var X=1==I.enableRecent,ba=1==I.enableSearch,ka=1==I.enableCustomTemp;ca=new NewDialog(this,
!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(pa,Ca,za,wa){pa=pa||this.emptyDiagramXml;null!=I.callback?H.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Ca,tempUrl:za,libs:wa,builtIn:!0,message:I}),"*"):(c(pa,J,pa!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,X?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):
null,ba?mxUtils.bind(this,function(pa,Ca){this.remoteInvoke("searchDiagrams",[pa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Ca,za){H.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Ca,name:za}),"*")}),null,null,ka?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==I.withoutType,null,I.templatesOnly);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(pa){null!=
this.sidebar&&this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==I.action){var da=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:da,message:I}),"*");return}if("status"==I.action){this.updateStatus(mxUtils.bind(this,function(){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message))}));null!=I.modified&&
(this.editor.modified=I.modified);return}if("spinner"==I.action){var W=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();return}if("viewport"==I.action){if(null!=I.viewport){var U=this.editor.graph,l=U.view.translate.x,B=U.view.translate.y;this.embedViewport=I.viewport;U.refresh();this.diagramContainer.scrollTop-=(B-U.view.translate.y)*U.view.scale;this.diagramContainer.scrollLeft-=
(l-U.view.translate.x)*U.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==I.action){ca=null;try{var K=this.diagramContainer.getAttribute("data-scrollState");null!=K&&(this.diagramContainer.removeAttribute("data-scrollState"),ca=JSON.parse(K))}catch(pa){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ca&&this.restoreScrollState(ca);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);return}if("export"==
I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var S=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);U=this.editor.graph;var P=mxUtils.bind(this,function(pa,Ca){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(S,this.editor.graph,null,!0,function(wa){P(pa,wa)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,"auto");else{this.editor.graph.setEnabled(!0);
this.spinner.stop();var za=this.createLoadMessage("export");za.format=I.format;za.message=I;za.data=pa;za.svg=Ca;za.xml=S;H.postMessage(JSON.stringify(za),"*")}}),T=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==I.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(S)));U!=this.editor.graph&&U.container.parentNode.removeChild(U.container);P(pa)}),Y=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=
mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=Y){var pa=U.getGlobalVariable;U=this.createTemporaryGraph(U.getStylesheet());for(var Ca,za=0;za<this.pages.length;za++)if(this.pages[za].getId()==Y){Ca=this.updatePageRoot(this.pages[za]);break}null==Ca&&(Ca=this.currentPage);U.getGlobalVariable=function(Ta){return"page"==Ta?Ca.getName():"pagenumber"==Ta?1:pa.apply(this,arguments)};document.body.appendChild(U.container);U.model.setRoot(Ca.root)}if(null!=I.layerIds){var wa=
U.model,Za=wa.getChildCells(wa.getRoot()),Ra={};for(za=0;za<I.layerIds.length;za++)Ra[I.layerIds[za]]=!0;for(za=0;za<Za.length;za++)wa.setVisible(Za[za],Ra[Za[za].id]||!1)}za=null;I.keepTheme&&(za=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ta){T(Ta.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){T(null)}),null,null,I.scale,I.transparent,I.shadow,null,U,I.border,null,I.grid,za)});null!=I.xml&&0<I.xml.length&&(k=!0,this.setFileData(S),
k=!1);aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=Y?"&pageId="+Y:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(S))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?P("data:image/png;base64,"+pa.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(aa=mxUtils.bind(this,
function(){var pa=this.createLoadMessage("export");pa.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();pa.xml=mxUtils.getXml(Ca);pa.data=this.getFileData(null,null,!0,null,null,null,Ca);pa.format=I.format}else if("html"==I.format)Ca=this.editor.getGraphXml(),pa.data=this.getHtml(Ca,this.editor.graph),pa.xml=mxUtils.getXml(Ca),pa.format=I.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=I.background?
I.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);pa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var za=mxUtils.bind(this,function(Za){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=I.asText?Za:Editor.createSvgDataUri(Za);H.postMessage(JSON.stringify(pa),"*")}),wa="auto";I.keepTheme&&(wa=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(wa=I.theme);if("xmlsvg"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,
null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){wa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())wa="auto";null!=I.theme&&(wa=I.theme);this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,za,null,null,I.embedImages,Ca,I.scale,I.border,I.shadow,wa)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
I.shadow,null,wa),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Za){I.embedImages||null==I.embedImages?this.editor.convertImages(Za,mxUtils.bind(this,function(Ra){za(mxUtils.getXml(Ra))})):za(mxUtils.getXml(Za))}));return}H.postMessage(JSON.stringify(pa),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);aa()}}k=!0;
this.setFileData(I.xml);k=!1;this.editor.graph.mathEnabled||aa()}else aa();return}if("load"==I.action){ha=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),
"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);if(null!=I.rough){var va=Editor.sketchMode;this.doSetSketchMode(I.rough);va!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=
I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var ta=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var qa=
I.maxFitScale,Ba=I.rect.width+2*ta,ya=I.rect.height+2*ta;Z=mxUtils.bind(this,function(){var pa=mxUtils.getDocumentSize();Ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ba):Ba,pa.width-80);pa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ya):ya,pa.height-80);this.diagramContainer.style.width=Ba+"px";this.diagramContainer.style.height=pa+"px";var Ca=this.editor.graph;pa=Ca.maxFitScale;Ca.maxFitScale=qa;Ca.fit(2*ta,null,null,null,null,null,ya);this.setPageVisible(!1);
if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var za=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=za}Ca.maxFitScale=pa;Ca.container.scrollTop-=ta;Ca.container.scrollLeft-=ta;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);
var wa=Ca.getGraphBounds();Ca.container.clientWidth>wa.width+2*ta&&(Ca.container.scrollLeft=wa.x+(wa.width+ta-Ca.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&this.setEmbedTitle(I.title);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(pa){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var La=this.getCurrentFile();
null!=La&&(na=ia(I.xml),null!=na&&""!=na&&La.mergeFile(new LocalFile(this,na),function(){H.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(pa){H.postMessage(JSON.stringify({event:"merge",message:I,error:pa}),"*")}))}else"remoteInvokeReady"==I.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,J.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),
"*");return}}catch(pa){this.handleError(pa)}}var Aa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Da=mxUtils.bind(this,function(pa,Ca){k=!0;try{c(pa,Ca,null,ha)}catch(za){this.handleError(za)}k=!1;null!=urlParams.modified&&this.clearStatus();q=Aa();t&&null==f&&(f=mxUtils.bind(this,function(za,wa){za=Aa();za==q||k||(wa=this.createLoadMessage("autosave"),wa.xml=za,(window.opener||window.parent).postMessage(JSON.stringify(wa),
"*"));q=za}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Ca=this.createLoadMessage("load"),Ca.xml=pa,H.postMessage(JSON.stringify(Ca),"*");null!=Z&&Z()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==I.substring(0,34)?(ia="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(pa){Da(pa,J)},mxUtils.bind(this,function(pa){this.handleError(pa)}),ia)):null!=
I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(I,mxUtils.bind(this,function(pa){4==pa.readyState&&(200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)?Da(pa.responseText,J):this.handleError({message:413==pa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&
this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(pa){Da(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==I||"object"!==typeof I||null==I.format||null==I.data&&null==I.url?(I=ia(I),Da(I,J)):this.loadDescriptor(I,mxUtils.bind(this,function(pa){Da(Aa(),J)}),mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;D="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||
"ready";H.postMessage(D,"*");if("json"==urlParams.proto){var O=this.editor.graph.openLink;this.editor.graph.openLink=function(J,I,Z){O.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:J,target:I,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,k,t){var q=document.createElement("button");q.className="geEmbedBtn geBtn";q.setAttribute("title",c+(null!=k?" ("+k+")":""));mxUtils.write(q,c);t&&q.classList.add("gePrimaryBtn");mxEvent.addListener(q,"click",
f);return q};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==
this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),
mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};
EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=
function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(k){if(0<k.length)try{var t=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(q){this.handleError(q)}}),null,null,null,null,mxUtils.bind(this,function(k,t){var q=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var D=t.value;t.value=JSON.stringify(JSON.parse(D));
t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=D}catch(H){this.handleError(H)}}));q.setAttribute("title","copy");q.className="geBtn";k.appendChild(q)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,
mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(q){this.loadingOrgChart=!1;f.clear()&&this.handleError(q)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var k=c.split("\n"),t=[],q=[],D=[],H={};if(0<k.length){var O=
{},J=this.editor.graph,I=null,Z=null,ia=null,ha=null,ca=null,na=null,X=null,ba="whiteSpace=wrap;html=1;",ka=null,da=null,W="",U="auto",l="auto",B=!1,K=null,S=null,P=40,T=40,Y=100,aa=0,la=mxUtils.bind(this,function(){null!=f?f(ra):(J.setSelectionCells(ra),J.scrollCellToVisible(J.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),va=J.getFreeInsertPoint(),ta=va.x,qa=va.y;va=qa;var Ba=null,ya="auto";da=null;for(var La=[],
Aa=null,Da=null,pa=0;pa<k.length&&"#"==k[pa].charAt(0);){c=k[pa].replace(/\r$/,"");for(pa++;pa<k.length&&"\\"==c.charAt(c.length-1)&&"#"==k[pa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(k[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var za=mxUtils.trim(c.substring(1,Ca)),wa=mxUtils.trim(c.substring(Ca+1));"label"==za?Ba=Graph.sanitizeHtml(wa):"labelname"==za&&0<wa.length&&"-"!=wa?ca=wa:"labels"==za&&0<wa.length&&"-"!=wa?X=JSON.parse(wa):"style"==za?Z=wa:"parentstyle"==
za?ba=wa:"unknownStyle"==za&&"-"!=wa?na=wa:"stylename"==za&&0<wa.length&&"-"!=wa?ha=wa:"styles"==za&&0<wa.length&&"-"!=wa?ia=JSON.parse(wa):"vars"==za&&0<wa.length&&"-"!=wa?I=JSON.parse(wa):"identity"==za&&0<wa.length&&"-"!=wa?ka=wa:"parent"==za&&0<wa.length&&"-"!=wa?da=wa:"namespace"==za&&0<wa.length&&"-"!=wa?W=wa:"width"==za?U=wa:"height"==za?l=wa:"collapsed"==za&&"-"!=wa?B="true"==wa:"left"==za&&0<wa.length?K=wa:"top"==za&&0<wa.length?S=wa:"ignore"==za?Da=wa.split(","):"connect"==za?La.push(JSON.parse(wa)):
"link"==za?Aa=wa:"padding"==za?aa=parseFloat(wa):"edgespacing"==za?P=parseFloat(wa):"nodespacing"==za?T=parseFloat(wa):"levelspacing"==za?Y=parseFloat(wa):"layout"==za&&(ya=wa)}}}if(null==k[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Za=this.editor.csvToArray(k[pa].replace(/\r$/,""));Ca=c=null;za=[];for(wa=0;wa<Za.length;wa++)ka==Za[wa]&&(c=wa),da==Za[wa]&&(Ca=wa),za.push(mxUtils.trim(Za[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+za[0]+
"%");if(null!=La)for(var Ra=0;Ra<La.length;Ra++)null==O[La[Ra].to]&&(O[La[Ra].to]={});ka=[];for(wa=pa+1;wa<k.length;wa++){var Ta=this.editor.csvToArray(k[wa].replace(/\r$/,""));if(null==Ta){var Ua=40<k[wa].length?k[wa].substring(0,40)+"...":k[wa];throw Error(Ua+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ka.push(Ta)}J.model.beginUpdate();try{for(wa=0;wa<ka.length;wa++){Ta=ka[wa];var Ha=null,Na=null!=c?W+Ta[c]:null;k=!1;null!=Na&&(Ha=J.model.getCell(Na),k=null==Ha||0<=
mxUtils.indexOf(t,Ha));var y=new mxCell(Ba,new mxGeometry(ta,va,0,0),Z||"whiteSpace=wrap;html=1;");y.collapsed=B;y.vertex=!0;y.id=Na;null==Ha||k||J.model.setCollapsed(Ha,B);for(var N=0;N<Ta.length;N++)J.setAttributeForCell(y,za[N],Ta[N]),null==Ha||k||J.setAttributeForCell(Ha,za[N],Ta[N]);if(null!=ca&&null!=X){var R=X[y.getAttribute(ca)];null!=R&&(J.labelChanged(y,R),null==Ha||k||J.cellLabelChanged(Ha,R))}if(null!=ha&&null!=ia){var V=ia[y.getAttribute(ha)];null!=V&&(y.style=V)}J.setAttributeForCell(y,
"placeholders","1");y.style=J.replacePlaceholders(y,y.style,I);null==Ha||k?J.fireEvent(new mxEventObject("cellsInserted","cells",[y])):(J.model.setStyle(Ha,y.style),0>mxUtils.indexOf(D,Ha)&&D.push(Ha),J.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));k=null!=Ha;Ha=y;if(!k)for(Ra=0;Ra<La.length;Ra++)O[La[Ra].to][Ha.getAttribute(La[Ra].to)]=Ha;null!=Aa&&"link"!=Aa&&(J.setLinkForCell(Ha,Ha.getAttribute(Aa)),J.setAttributeForCell(Ha,Aa,null));var fa=this.editor.graph.getPreferredSizeForCell(Ha);
da=null!=Ca?J.model.getCell(W+Ta[Ca]):null;if(Ha.vertex){Ua=null!=da?0:ta;pa=null!=da?0:qa;null!=K&&null!=Ha.getAttribute(K)&&(Ha.geometry.x=Ua+parseFloat(Ha.getAttribute(K)));null!=S&&null!=Ha.getAttribute(S)&&(Ha.geometry.y=pa+parseFloat(Ha.getAttribute(S)));var ja="@"==U.charAt(0)?Ha.getAttribute(U.substring(1)):null;Ha.geometry.width=null!=ja&&"auto"!=ja?parseFloat(Ha.getAttribute(U.substring(1))):"auto"==U||"auto"==ja?fa.width+aa:parseFloat(U);var oa="@"==l.charAt(0)?Ha.getAttribute(l.substring(1)):
null;Ha.geometry.height=null!=oa&&"auto"!=oa&&"width"!=l?parseFloat(oa):"auto"==l||"auto"==oa?fa.height+aa:"width"==l?Ha.geometry.width:parseFloat(l);va+=Ha.geometry.height+T}k?(null==H[Na]&&(H[Na]=[]),H[Na].push(Ha)):(t.push(Ha),null!=da?(da.style=J.replacePlaceholders(da,ba,I),J.addCell(Ha,da),q.push(da)):D.push(J.addCell(Ha)))}for(wa=0;wa<q.length;wa++)ja="@"==U.charAt(0)?q[wa].getAttribute(U.substring(1)):null,oa="@"==l.charAt(0)?q[wa].getAttribute(l.substring(1)):null,"auto"!=U&&"auto"!=ja||
"auto"!=l&&"auto"!=oa||J.updateGroupBounds([q[wa]],aa,!0);var ua=D.slice(),ra=D.slice();for(Ra=0;Ra<La.length;Ra++){var xa=La[Ra];for(wa=0;wa<t.length;wa++){Ha=t[wa];var Ga=mxUtils.bind(this,function(kb,pb,gb){var ob=pb.getAttribute(gb.from);if(null!=ob&&""!=ob){ob=ob.split(",");for(var tb=0;tb<ob.length;tb++){var eb=O[gb.to][ob[tb]];if(null==eb&&null!=na){eb=new mxCell(ob[tb],new mxGeometry(ta,qa,0,0),na);eb.style=J.replacePlaceholders(pb,eb.style,I);var nb=this.editor.graph.getPreferredSizeForCell(eb);
eb.geometry.width=nb.width+aa;eb.geometry.height=nb.height+aa;O[gb.to][ob[tb]]=eb;eb.vertex=!0;eb.id=ob[tb];D.push(J.addCell(eb))}if(null!=eb){nb=gb.label;null!=gb.fromlabel&&(nb=(pb.getAttribute(gb.fromlabel)||"")+(nb||""));null!=gb.sourcelabel&&(nb=J.replacePlaceholders(pb,gb.sourcelabel,I)+(nb||""));null!=gb.tolabel&&(nb=(nb||"")+(eb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(nb=(nb||"")+J.replacePlaceholders(eb,gb.targetlabel,I));var mb="target"==gb.placeholders==!gb.invert?eb:kb;mb=
null!=gb.style?J.replacePlaceholders(mb,gb.style,I):J.createCurrentEdgeStyle();nb=J.insertEdge(null,null,nb||"",gb.invert?eb:kb,gb.invert?kb:eb,mb);if(null!=gb.labels)for(mb=0;mb<gb.labels.length;mb++){var qb=gb.labels[mb],ub=new mxCell(qb.label||mb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=J.replacePlaceholders("target"==qb.placeholders==!gb.invert?eb:kb,ub.value,I));if(null!=
qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);nb.insert(ub)}if(null!=gb.data)for(var zb in gb.data)J.setAttributeForCell(nb,zb,gb.data[zb]);ra.push(nb);mxUtils.remove(gb.invert?kb:eb,ua)}}}});Ga(Ha,Ha,xa);if(null!=H[Ha.id])for(N=0;N<H[Ha.id].length;N++)Ga(Ha,H[Ha.id][N],xa)}}if(null!=Da)for(wa=0;wa<t.length;wa++)for(Ha=t[wa],N=0;N<Da.length;N++)J.setAttributeForCell(Ha,mxUtils.trim(Da[N]),null);if(0<D.length){var Ka=new mxParallelEdgeLayout(J);Ka.spacing=
P;Ka.checkOverlap=!0;var Sa=function(){0<Ka.spacing&&Ka.execute(J.getDefaultParent());for(var kb=0;kb<D.length;kb++){var pb=J.getCellGeometry(D[kb]);pb.x=Math.round(J.snap(pb.x));pb.y=Math.round(J.snap(pb.y));"auto"==U&&(pb.width=Math.round(J.snap(pb.width)));"auto"==l&&(pb.height=Math.round(J.snap(pb.height)))}};if("["==ya.charAt(0)){var Pa=la;J.view.validate();this.executeLayouts(J.createLayouts(JSON.parse(ya)),function(){Sa();Pa()});la=null}else if("circle"==ya){var $a=new mxCircleLayout(J);$a.disableEdgeStyle=
!1;$a.resetEdges=!1;var Oa=$a.isVertexIgnored;$a.isVertexIgnored=function(kb){return Oa.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){$a.execute(J.getDefaultParent());Sa()},!0,la);la=null}else if("horizontaltree"==ya||"verticaltree"==ya||"auto"==ya&&ra.length==2*D.length-1&&1==ua.length){J.view.validate();var Ma=new mxCompactTreeLayout(J,"horizontaltree"==ya);Ma.levelDistance=T;Ma.edgeRouting=!1;Ma.resetEdges=!1;Ma.sortEdges=!0;this.executeLayout(function(){Ma.execute(J.getDefaultParent(),
0<ua.length?ua[0]:null)},!0,la);la=null}else if("horizontalflow"==ya||"verticalflow"==ya||"auto"==ya&&1==ua.length){J.view.validate();var fb=new mxHierarchicalLayout(J,"horizontalflow"==ya?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);fb.intraCellSpacing=T;fb.parallelEdgeSpacing=P;fb.interRankCellSpacing=Y;fb.disableEdgeStyle=!1;this.executeLayout(function(){fb.execute(J.getDefaultParent(),ra);J.moveCells(ra,ta,qa)},!0,la);la=null}else if("orgchart"==ya){J.view.validate();var cb=new mxOrgChartLayout(J,
2,Y,T),ab=cb.isVertexIgnored;cb.isVertexIgnored=function(kb){return ab.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){cb.execute(J.getDefaultParent());Sa()},!0,la);la=null}else if("organic"==ya||"auto"==ya&&ra.length>D.length){J.view.validate();var db=new mxFastOrganicLayout(J);db.forceConstant=3*T;db.disableEdgeStyle=!1;db.resetEdges=!1;var lb=db.isVertexIgnored;db.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){db.execute(J.getDefaultParent());
Sa()},!0,la);la=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var k="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=k+t+"="+urlParams[t],k="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?
1:0;if("1"==urlParams.offline)c+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(k,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,k,t,q){c=new LinkDialog(this,c,f,k,!0,t,q);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&
"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);
this.menus.get("viewZoom").setEnabled(f);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));
c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);
this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=
0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var F=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),k=this.getSelectionState(),t=this.isDiagramActive(),q="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&q);this.actions.get("redo").setEnabled(this.canRedo()&&
q);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("explore").setEnabled(t&&(1==k.edges.length||1==k.vertices.length));this.actions.get("editConnectionPoints").setEnabled(t&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(t&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(t&&k.image&&0<k.cells.length);
this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("addToScratchpad").setEnabled(0<k.cells.length);this.actions.get("createShape").setEnabled(t);
this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=
this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?
"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var L=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);L.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,k,t,
q,D,H,O){var J=c.editor.graph;if("xml"==k)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==k)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(J.getSvg(t,q,D)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),Z=J.getGraphBounds(),ia=Math.floor(Z.width*q/J.view.scale),ha=Math.floor(Z.height*q/J.view.scale);if(I.length<=MAX_REQUEST_SIZE&&ia*ha<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.isExportToCanvas()){var ca=
{globalVars:J.getExportVariables()};O&&(ca.grid={size:J.gridSize,steps:J.view.gridSteps,color:J.view.gridColor});c.saveRequest(f,k,function(na,X){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(X||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<H?"&dpi="+H:"")+"&bg="+(null!=t?t:"none")+"&w="+ia+"&h="+ha+"&border="+D+"&xml="+encodeURIComponent(I))})}else"png"==k?c.exportImage(q,null==t||"none"==t,!0,!1,!1,D,!0,!1,null,O,H):c.exportImage(q,
!1,!0,!1,!1,D,!0,!1,"jpeg",O);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var t=c;this.currentPage!=this.pages[k]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),t.model.setRoot(this.pages[k].root));f+=this.pages[k].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();
this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},k=document.createElement("div");k.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(t);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
IMAGE_PATH+'/spin.gif"></div>';var D={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var O=H[c];if("R"==O.substring(0,1)){var J=JSON.parse(decodeURIComponent(O.substring(1)));D[J[0]]={id:J[0],title:J[1],downloadUrl:J[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){q.innerText="";if(0==I.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<
I.length;Z++){var ia=I[Z];D[ia.id]&&(f[ia.id]=ia);var ha=this.addCheckbox(q,ia.title,D[ia.id]);(function(ca,na){mxEvent.addListener(na,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ia,ha)}},mxUtils.bind(this,function(I){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));q.appendChild(Z)}));k.appendChild(q);
k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,Z;for(Z in f)null==D[Z]&&(I++,mxUtils.bind(this,function(ia){this.remoteInvoke("getFileContent",[ia.downloadUrl],null,mxUtils.bind(this,function(ha){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ha,ia)),this.showSidebar()}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;0==I&&this.spinner.stop();
this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));for(Z in D)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,D[Z]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!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(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,k=this.remoteInvokeCallbacks[f.callbackId];if(null==k)throw Error("No callback for "+
(null!=f?f.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,k,t,q){var D=!0,H=window.setTimeout(mxUtils.bind(this,function(){D=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),O=mxUtils.bind(this,function(){window.clearTimeout(H);D&&t.apply(this,arguments)}),J=mxUtils.bind(this,function(){window.clearTimeout(H);D&&q.apply(this,
arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:O,error:J});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var k=mxUtils.bind(this,function(I,Z){var ia={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ia.error={errResp:Z}:null!=I&&(ia.resp=I);this.remoteWin.postMessage(JSON.stringify(ia),
"*")});try{var t=c.funtionName,q=this.remoteInvokableFns[t];if(null!=q&&"function"===typeof this[t]){if(q.allowedDomains){for(var D=!1,H=0;H<q.allowedDomains.length;H++)if(f=="https://"+q.allowedDomains[H]){D=!0;break}if(!D){k(null,"Invalid Call: "+t+" is not allowed.");return}}var O=c.functionArgs;Array.isArray(O)||(O=[]);if(q.isAsync)O.push(function(){k(Array.prototype.slice.apply(arguments))}),O.push(function(I){k(null,I||"Unkown Error")}),this[t].apply(this,O);else{var J=this[t].apply(this,O);
k([J])}}else k(null,"Invalid Call: "+t+" is not found.")}catch(I){k(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var t=k.open("database",2);t.onupgradeneeded=function(q){try{var D=t.result;1>q.oldVersion&&D.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(D.createObjectStore("files",{keyPath:"title"}),D.createObjectStore("filesInfo",
{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};t.onsuccess=mxUtils.bind(this,function(q){try{var D=t.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(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var O=document.createElement("iframe");
O.style.display="none";O.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(O);var J=!0,I=!1,Z,ia=0,ha=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ia++;na()}),na=mxUtils.bind(this,function(){try{if(ia>=Z.length)ha();else{var ba=Z[ia];StorageFile.getFileContent(this,
ba,mxUtils.bind(this,function(ka){null==ka||".scratchpad"==ba&&ka==this.emptyLibraryXml?O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):ca()}),ca)}}catch(ka){console.log(ka)}}),X=mxUtils.bind(this,function(ba){try{this.setDatabaseItem(null,[{title:ba.title,size:ba.data.length,lastModified:Date.now(),type:ba.isLib?"L":"F"},{title:ba.title,data:ba.data}],ca,ca,["filesInfo","files"])}catch(ka){console.log(ka)}});H=mxUtils.bind(this,
function(ba){try{if(ba.source==O.contentWindow){var ka={};try{ka=JSON.parse(ba.data)}catch(da){}"init"==ka.event?(O.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),O.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ka.event||I||(J?null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?(Z=ka.resp[0],J=!1,na()):ha():null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?X(ka.resp[0]):ca())}}catch(da){console.log(da)}});
window.addEventListener("message",H)}})));c(D);D.onversionchange=function(){D.close()}}catch(H){null!=f?f(H):null!=window.console&&console.warn(H)}});t.onerror=f;t.onblocked=function(){}}catch(q){null!=f?f(q):null!=window.console&&console.error(q)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,k,t,q){this.openDatabase(mxUtils.bind(this,function(D){try{q=q||"objects";Array.isArray(q)||(q=[q],c=[c],f=[f]);var H=D.transaction(q,
"readwrite");H.oncomplete=k;H.onerror=t;for(D=0;D<q.length;D++)H.objectStore(q[D]).put(null!=c&&null!=c[D]?{key:c[D],data:f[D]}:f[D])}catch(O){null!=t&&t(O)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,k,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var D=q.transaction(t,"readwrite");D.oncomplete=f;D.onerror=k;for(q=0;q<t.length;q++)D.objectStore(t[q]).delete(c[q])}catch(H){null!=k&&k(H)}}),k)};EditorUi.prototype.getDatabaseItem=
function(c,f,k,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";var D=q.transaction([t],"readonly").objectStore(t).get(c);D.onsuccess=function(){f(D.result)};D.onerror=k}catch(H){null!=k&&k(H)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(t){try{k=k||"objects";var q=t.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),D=[];q.onsuccess=function(H){null==H.target.result?c(D):(D.push(H.target.result.value),
H.target.result.continue())};q.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,k){this.openDatabase(mxUtils.bind(this,function(t){try{k=k||"objects";var q=t.transaction([k],"readonly").objectStore(k).getAllKeys();q.onsuccess=function(){c(q.result)};q.onerror=f}catch(D){null!=f&&f(D)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,f){var k=this.getCurrentFile();null!=k?k.getComments(c,f):c([])};EditorUi.prototype.addComment=function(c,f,k){var t=this.getCurrentFile();null!=t?t.addComment(c,f,k):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var k=this.getCurrentFile();return null!=k?k.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var k=this.getCurrentFile();null!=
k&&k.getRevisions?k.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",
"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,k,t,q,D,H,O){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,k,t,q,D,H,O)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,k,t,q,D,H,O,J,I,Z,ia,ha,ca,na,X)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,k,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,k,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=
function(c,f,k,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,k,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,k,t,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,k,t,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var k=localStorage.key(f),t=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<t.length){var q="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(q||t)&&c.push(k)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,e,g,m,v,n){function A(){for(var X=O.getElementsByTagName("div"),ba=0,ka=0;ka<X.length;ka++)"none"!=X[ka].style.display&&X[ka].parentNode==O&&ba++;J.style.display=0==ba?"block":"none"}function G(X,ba,ka,da){function W(){ba.removeChild(B);ba.removeChild(K);l.style.display="block";U.style.display="block"}q={div:ba,comment:X,saveCallback:ka,deleteOnCancel:da};var U=ba.querySelector(".geCommentTxt"),l=ba.querySelector(".geCommentActionsList"),B=document.createElement("textarea");
B.className="geCommentEditTxtArea";B.style.minHeight=U.offsetHeight+"px";B.value=X.content;ba.insertBefore(B,U);var K=document.createElement("div");K.className="geCommentEditBtns";var S=mxUtils.button(mxResources.get("cancel"),function(){da?(ba.parentNode.removeChild(ba),A()):W();q=null});S.className="geCommentEditBtn";K.appendChild(S);var P=mxUtils.button(mxResources.get("save"),function(){U.innerText="";X.content=B.value;mxUtils.write(U,X.content);W();ka(X);q=null});mxEvent.addListener(B,"keydown",
mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(S.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";K.appendChild(P);ba.insertBefore(K,U);l.style.display="none";U.style.display="none";B.focus()}function Q(X,ba){ba.innerText="";X=new Date(X.modifiedDate);var ka=b.timeSince(X);null==ka&&(ka=mxResources.get("lessThanAMinute"));mxUtils.write(ba,
mxResources.get("timeAgo",[ka],"{1} ago"));ba.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function F(X){var ba=document.createElement("img");ba.className="geCommentBusyImg";ba.src=IMAGE_PATH+"/spin.gif";X.appendChild(ba);X.busyImg=ba}function L(X){X.style.border="1px solid red";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function c(X){X.style.border="";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function f(X,ba,ka,da,W){function U(aa,la,va){var ta=document.createElement("li");
ta.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);ta.appendChild(qa);mxEvent.addListener(qa,"click",function(Ba){la(Ba,X);Ba.preventDefault();mxEvent.consume(Ba)});Y.appendChild(ta);va&&(ta.style.display="none")}function l(){function aa(ta){la.push(va);if(null!=ta.replies)for(var qa=0;qa<ta.replies.length;qa++)va=va.nextSibling,aa(ta.replies[qa])}var la=[],va=K;aa(X);return{pdiv:va,replies:la}}function B(aa,la,va,ta,qa){function Ba(){F(Da);
X.addReply(Aa,function(pa){Aa.id=pa;X.replies.push(Aa);c(Da);va&&va()},function(pa){ya();L(Da);b.handleError(pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ta,qa)}function ya(){G(Aa,Da,function(pa){Ba()},!0)}var La=l().pdiv,Aa=b.newComment(aa,b.getCurrentUser());Aa.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Da=f(Aa,X.replies,La,da+1);la?ya():Ba()}if(W||!X.isResolved){J.style.display="none";var K=document.createElement("div");K.className="geCommentContainer";K.setAttribute("data-commentId",
X.id);K.style.marginLeft=20*da+5+"px";X.isResolved&&(D.style.opacity="0.7");var S=document.createElement("div");S.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=X.user&&null!=X.user.pictureUrl?X.user.pictureUrl:Editor.userImage;S.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";S.appendChild(P);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=X.user?X.user.displayName:
mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",X.id);Q(X,T);P.appendChild(T);K.appendChild(S);S=document.createElement("div");S.className="geCommentTxt";mxUtils.write(S,X.content||"");K.appendChild(S);X.isLocked&&(K.style.opacity="0.5");S=document.createElement("div");S.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";S.appendChild(Y);k||X.isLocked||0!=da&&
!t||U(mxResources.get("reply"),function(){B("",!0)},X.isResolved);P=b.getCurrentUser();null==P||null==X.user||P.id!=X.user.id||k||X.isLocked||(U(mxResources.get("edit"),function(){function aa(){G(X,K,function(){F(K);X.editComment(X.content,function(){c(K)},function(la){L(K);aa();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},X.isResolved),U(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(K);X.deleteComment(function(aa){if(!0===
aa){aa=K.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var la=K.querySelectorAll(".geCommentAction");for(aa=0;aa<la.length;aa++)la[aa].parentNode.removeChild(la[aa]);c(K);K.style.opacity="0.5"}else{la=l(X).replies;for(aa=0;aa<la.length;aa++)O.removeChild(la[aa]);for(aa=0;aa<ba.length;aa++)if(ba[aa]==X){ba.splice(aa,1);break}J.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(aa){L(K);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
X.isResolved));k||X.isLocked||0!=da||U(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function la(){var va=aa.target;va.innerText="";X.isResolved=!X.isResolved;mxUtils.write(va,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ta=X.isResolved?"none":"",qa=l(X).replies,Ba="light-dark("+(X.isResolved?"ghostWhite":"white")+", transparent)",ya=0;ya<qa.length;ya++){qa[ya].style.backgroundColor=Ba;for(var La=qa[ya].querySelectorAll(".geCommentAction"),
Aa=0;Aa<La.length;Aa++)La[Aa]!=va.parentNode&&(La[Aa].style.display=ta);ha||(qa[ya].style.display="none")}A()}X.isResolved?B(mxResources.get("reOpened")+": ",!0,la,!1,!0):B(mxResources.get("markedAsResolved"),!1,la,!0)});K.appendChild(S);null!=ka?O.insertBefore(K,ka.nextSibling):O.appendChild(K);for(ka=0;null!=X.replies&&ka<X.replies.length;ka++)S=X.replies[ka],S.isResolved=X.isResolved,f(S,X.replies,null,da+1,W);null!=q&&(q.comment.id==X.id?(W=X.content,X.content=q.comment.content,G(X,K,q.saveCallback,
q.deleteOnCancel),X.content=W):null==q.comment.id&&q.comment.pCommentId==X.id&&(O.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return K}}var k=!b.canComment(),t=b.canReplyToReplies(),q=null,D=document.createElement("div");D.className="geCommentsWin";var H=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.bottom=parseInt(H)+7+"px";D.appendChild(O);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(J,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=H;I.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!k){var Z=H.cloneNode();Z.style.backgroundImage="url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(X){function ba(){G(ka,da,function(W){F(da);b.addComment(W,function(U){W.id=U;ca.push(W);
c(da)},function(U){L(da);ba();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ka=b.newComment("",b.getCurrentUser()),da=f(ka,ca,null,0);ba();X.preventDefault();mxEvent.consume(X)});I.appendChild(Z)}var ia=H.cloneNode();ia.style.backgroundImage="url("+Editor.checkImage+")";ia.setAttribute("title",mxResources.get("showResolved"));var ha=!1;mxEvent.addListener(ia,"click",function(X){(ha=!ha)?ia.classList.add("geActiveItem"):ia.classList.remove("geActiveItem");
na();X.preventDefault();mxEvent.consume(X)});I.appendChild(ia);b.commentsRefreshNeeded()&&(Z=H.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(X){na();X.preventDefault();mxEvent.consume(X)}),I.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className=
"geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(X){n();X.preventDefault();mxEvent.consume(X)}),I.appendChild(H));D.appendChild(I);var ca=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var X=q.div.querySelector(".geCommentEditTxtArea"),ba=q.div.querySelector(".geCommentEditBtns");q.comment.content=X.value;X.parentNode.removeChild(X);ba.parentNode.removeChild(ba)}catch(ka){b.handleError(ka)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ka){function da(W){if(null!=W){W.sort(function(l,B){return new Date(l.modifiedDate)-new Date(B.modifiedDate)});for(var U=0;U<W.length;U++)da(W[U].replies)}}ka.sort(function(W,U){return new Date(W.modifiedDate)-new Date(U.modifiedDate)});O.innerText="";O.appendChild(J);J.style.display="block";ca=ka;for(ka=0;ka<ca.length;ka++)da(ca[ka].replies),
f(ca[ka],ca,null,0,ha);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(O.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(ka){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ka&&ka.message?": "+ka.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;I=mxUtils.bind(this,function(){function X(U){var l=ka[U.id];if(null!=l)for(Q(U,l),l=0;null!=U.replies&&l<U.replies.length;l++)X(U.replies[l])}
if(this.window.isVisible()){for(var ba=O.querySelectorAll(".geCommentDate"),ka={},da=0;da<ba.length;da++){var W=ba[da];ka[W.getAttribute("data-commentId")]=W}for(da=0;da<ca.length;da++)X(ca[da])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=new mxWindow(mxResources.get("comments"),D,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,n,A,G,Q,F,L){var c=document.createElement("div");c.style.textAlign="center";L=null!=L?L:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=L+"px";f.style.lineHeight="1.2em";mxUtils.write(f,e);c.appendChild(f);null!=F&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",e=document.createElement("img"),
e.setAttribute("src",F),f.appendChild(e),c.appendChild(f));F=document.createElement("div");F.style.textAlign="center";F.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(k.checked)});n.className="geBtn";null!=G&&(n.innerHTML=G+"<br>"+n.innerHTML,n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");
b.editor.cancelFirst&&F.appendChild(n);var t=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(k.checked)});F.appendChild(t);null!=A?(t.innerHTML=A+"<br>"+t.innerHTML+"<br>",t.style.display="inline-block",t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.className="geBtn",t.style.width="40%"):t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||F.appendChild(n);c.appendChild(F);Q?(F.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop=
"20px",f.style.marginBottom="0px",f.appendChild(k),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),f.appendChild(v),c.appendChild(f),mxEvent.addListener(v,"click",function(q){k.checked=!k.checked;mxEvent.consume(q)})):F.style.marginTop="12px";this.init=function(){t.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);
HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,g){this.ui=b;this.oldIndex=e;this.newIndex=g}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(b,e,g){this.ui=b;this.previousPage=this.page=e;null!=e&&(this.ui.updatePageRoot(e),null!=g&&(e.viewState=g))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,g=e.graph;b.isDiagramModified()&&(b.setDiagramModified(!1),EditorUi.removeChildNodes(b.node),b.node.appendChild(e.getGraphXml(!0)));b.viewState=g.getViewState();b.root=g.model.root;null!=b.model&&b.model.rootChanged(b.root);g.view.clear(b.root,!0);g.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;
g.model.prefix=Editor.guid()+"-";g.model.rootChanged(b.root);g.setViewState(b.viewState);g.gridEnabled=g.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,g,m,v){SelectPage.call(this,b,g);this.relatedPage=e;this.index=m;this.previousIndex=null;this.noSelect=v}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};function ReplaceDiagram(b,e){this.ui=b;this.data=e}
ReplaceDiagram.prototype.execute=function(){var b=this.ui.editor.graph,e=this.ui.editor.getGraphXml();this.ui.editor.readGraphState(this.data);this.ui.editor.updateGraphComponents();var g=new mxCodec(this.data.ownerDocument),m=new mxGraphModel;g.decode(this.data,m);this.data=e;this.ui.currentPage&&(this.ui.currentPage.viewState=b.getViewState(),this.ui.currentPage.root=m.root,null!=this.ui.currentPage.model&&this.ui.currentPage.model.rootChanged(this.ui.currentPage.model.root));b.view.clear(b.model.root,
!0);b.model.rootChanged(m.root);b.fireEvent(new mxEventObject(mxEvent.ROOT))};EditorUi.prototype.tabContainerVisible=!0;EditorUi.prototype.setTabContainerVisible=function(b,e){Editor.isSettingsEnabled()&&e&&(mxSettings.settings.pages=b,mxSettings.save());this.tabContainerVisible=b;this.updateTabContainer()};EditorUi.prototype.isTabContainerVisible=function(){return this.tabContainerVisible};EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var g=0;g<this.pages.length;g++)if(this.pages[g]==b){e=g;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var g=0;g<e.length;g++)if(e[g].getId()==b)return e[g];return null};
EditorUi.prototype.createImageForPageLink=function(b,e,g,m){var v=b.indexOf(","),n=null;0<v&&(v=this.getPageById(b.substring(v+1)),null!=v&&v!=e&&(n=this.getImageForPage(v,e,g,m),n.originalSrc=b));null==n&&(n={originalSrc:b});return n};
EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,e=this.currentPage;null!=e&&(b.tooltipHandler.hide(),null==e.viewState||null==e.viewState.scrollTop||null==e.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(e.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
EditorUi.prototype.getImageForPage=function(b,e,g,m){g=null!=g?g:this.editor.graph;var v=g.getGlobalVariable;g=this.createTemporaryGraph(g.getStylesheet());var n=this.getPageIndex(null!=e?e:this.currentPage);g.getGlobalVariable=function(G){return"pagenumber"==G?n+1:"page"==G&&null!=e?e.getName():v.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.setAdaptiveColors(b.viewState.adaptiveColors);g.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
"";m=g.getSvg(null,null,null,null,null,null,null,null,null,null,m,null,null,null,!0,!0);var A=g.getGraphBounds();document.body.removeChild(g.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(m)),A.width,A.height,A.x,A.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){e.apply(b.view,
arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(A,G){A=G.getProperty("edit").changes;for(G=0;G<A.length;G++)if(A[G]instanceof RenamePage||A[G]instanceof ChangePage||A[G]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==A.length&&A[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var g=b.sizeDidChange,m=null,v=this;b.sizeDidChange=
function(){var A=g.apply(this,arguments);null!=v.currentPage&&m!=v.currentPage&&(m=v.currentPage,v.pageSelected());return A};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var n=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",n);this.editor.addListener("pagesPatched",n);this.editor.addListener("pageRenamed",n);this.editor.addListener("pageMoved",n);this.editor.addListener("fileLoaded",n);
this.editor.addListener("pageSelected",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};
EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};
Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}})}catch(Q){console.log("ExtFonts format error: "+Q.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:A,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,m,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);g=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=g&&(e.setAttribute("pageWidth",g.width),e.setAttribute("pageHeight",g.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),m=this.getBackgroundImageObject(b.backgroundImage,m),null!=m&&e.setAttribute("backgroundImage",
JSON.stringify(m)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null==b||null==b.adaptiveColors?e.removeAttribute("adaptiveColors"):e.setAttribute("adaptiveColors",b.adaptiveColors);null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(v){return v.name+"^"+v.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,adaptiveColors:this.adaptiveColors,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.adaptiveColors=b.adaptiveColors;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;
this.pageFormat=b.pageFormat;this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var g=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=g)for(e=0;e<g.length;e++){var m=document.getElementById("extFont_"+g[e].name);null!=m&&m.parentNode.removeChild(m)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,
this.extFonts[e].url,!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,
this.pageFormat="undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.adaptiveColors=
null,this.connectionArrowsEnabled=!0,this.hiddenTags=[],this.extFonts=[];this.setAdaptiveColors(this.adaptiveColors);this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};Graph.prototype.setScrollbarPositions=function(b,e,g){null!=b&&null!=b.scrollLeft&&null!=b.scrollTop&&(this.container.scrollLeft=e*this.view.scale+b.scrollLeft,this.container.scrollTop=g*this.view.scale+b.scrollTop)};
Graph.prototype.addExtFont=function(b,e,g){if(b&&e){var m="extFont_"+b;if(null==document.getElementById(m))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,m);else{document.getElementsByTagName("head");var v=document.createElement("style");v.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));v.setAttribute("id",m);document.getElementsByTagName("head")[0].appendChild(v)}if(!g){null==this.extFonts&&(this.extFonts=[]);g=this.extFonts;
m=!0;for(v=0;v<g.length;v++)if(g[v].name==b){m=!1;break}m&&this.extFonts.push({name:b,url:e})}}};
EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var g=Editor.extractParserError(e);if(g)throw Error(g);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),g=new mxCodec(e.ownerDocument),b.root=g.decode(e).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);
if(g=Editor.extractParserError(e))throw Error(g);null!=e&&(b.graphModelNode=e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)e=new mxCell,e.setId("1"),b.root.insert(e),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
EditorUi.prototype.updateDiagramData=function(b,e){if(null==this.getPageIndex(b.page))this.insertPage(null,null,e);else{var g=new mxCodec(b.node.ownerDocument),m=new mxGraphModel;g.decode(b.node,m);g=new mxCodec(e.ownerDocument);var v=new mxGraphModel;g.decode(e,v);this.selectPage(b.page);e=this.diffCells(m.root,v.root);this.patchPage(b.page,e,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
EditorUi.prototype.selectPage=function(b,e,g){try{if(b!=this.currentPage){var m=this.editor.graph;m.isEditing()&&m.stopEditing(!1);e=null!=e?e:!1;m.isMouseDown=!1;m.reset();var v=m.model.createUndoableEdit();v.ignoreEdit=!0;var n=new SelectPage(this,b,g);n.execute();v.add(n);v.notify();e||m.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",v))}}catch(A){this.handleError(A)}};
EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),g),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(v){this.handleError(v)}return b};
EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var n={},A=m.createCellLookup([m.model.root]);g=new DiagramPage(v);g.root=m.cloneCell(m.model.root,null,n);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(n,A),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);
g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(Q){this.handleError(Q)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(v){e.push(mxResources.get("pageWithNumber",[m+1])+": "+v.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(v){}throw b;}return g};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,e=document.createElement("div");e.className="geTabScroller";for(var g=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(v,n){n.className="geTab gePageTab";this.pages[v]==this.currentPage&&n.classList.add("geActivePage");n.setAttribute("draggable",
"true");mxEvent.addListener(n,"dragstart",mxUtils.bind(this,function(A){b.isEnabled()?(mxClient.IS_FF&&A.dataTransfer.setData("Text","<diagram/>"),g=v):mxEvent.consume(A)}));mxEvent.addListener(n,"dragend",mxUtils.bind(this,function(A){g=null;A.stopPropagation();A.preventDefault()}));mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(A){null!=g&&(A.dataTransfer.dropEffect="move");A.stopPropagation();A.preventDefault()}));mxEvent.addListener(n,"drop",mxUtils.bind(this,function(A){null!=g&&
v!=g&&this.movePage(g,v);A.stopPropagation();A.preventDefault()}));e.appendChild(n)})(m,this.createTabForPage(this.pages[m],m+1));m=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(e);this.leftScrollTab=this.createLeftScrollTab();
this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=e;this.tabScroller.scrollLeft=m;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(v){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
EditorUi.prototype.getShortPageName=function(b){var e=null;null!=b&&(e=b.getName(),null!=e&&36<e.length&&(e=e.substring(0,34)+"..."));return e};EditorUi.prototype.createControlTab=function(b,e,g){var m=this.createTab();m.className="geTab geControlTab";null!=b&&m.setAttribute("title",b);b=document.createElement("div");b.className="geButton";b.style.backgroundImage="url("+e+")";m.appendChild(b);mxEvent.addListener(m,"click",g);return m};
EditorUi.prototype.createPageInsertTab=function(){return this.createControlTab(mxResources.get("insertPage"),Editor.plusImage,mxUtils.bind(this,function(b){try{this.insertPage()}catch(e){this.handleError(e)}mxEvent.consume(b)}))};
EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(null,Editor.chevronLeftImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:-e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft-=e;mxEvent.consume(b)}))};
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(v,n){this.menus.get("pages").funct(v,n)}));e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),m=mxEvent.getClientY(b);e.popup(g,
m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),v=b.getId();g.setAttribute("title",m+(null!=v?" ("+v+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(Q){this.renamePage(b);mxEvent.consume(Q)}));var m=document.createElement("div");m.style.backgroundImage="url("+Editor.thinExpandImage+")";m.className="geButton";e.appendChild(m);var v=!1,n=!1,A=mxUtils.bind(this,function(Q){v=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||n||this.selectPage(b)}),G=mxUtils.bind(this,
function(Q){if(!g.isMouseDown&&(n&&(mxEvent.isTouchEvent(Q)||mxEvent.getSource(Q)==m)||mxEvent.isPopupTrigger(Q))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(Q)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));F.smartSeparators=!0;F.showDisabled=!0;F.autoExpand=!0;F.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(F,arguments);this.resetCurrentMenu();F.destroy()});var L=mxEvent.getClientX(Q),c=mxEvent.getClientY(Q);F.popup(L,c,null,Q);
this.setCurrentMenu(F,e)}mxEvent.consume(Q)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||navigator.standalone||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));this.editor.graph.isEnabled()&&(g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",
[b.getName()]))}),m),g.addSeparator(m),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m))})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(v,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?n:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};
b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var v=g.ownerDocument.createElement("diagram");v.setAttribute("id",g.getAttribute("relatedPage"));v.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(v);v=g.getAttribute("viewState");null!=v&&(m.relatedPage.viewState=JSON.parse(v),g.removeAttribute("viewState"));g=g.cloneNode(!0);v=g.firstChild;if(null!=v)for(m.relatedPage.root=e.decodeCell(v,!1),m=
v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var n=v.getAttribute("id");null==e.lookup(n)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,n,A,G){v=null!=v?v:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var Q=n.slice(),F=0;F<n.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[F]),"treeFolding","0")&&this.foldTreeCell(m,n[F]);n=Q;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var n=
[];this.traverse(v,!0,mxUtils.bind(this,function(G,Q){var F=null!=Q&&this.isTreeEdge(Q);F&&n.push(Q);G==v||null!=Q&&!F||n.push(G);return(null==Q||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<n.length;A++)this.model.setVisible(n[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,n,A,G,Q){return this.model.filterCells(this.getEdges(m,v,n,A,G,Q),mxUtils.bind(this,
function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!1,!0,!1)};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 m(da){return q.isVertex(da)&&n(da)}function v(da){var W=!1;null!=da&&
(W="1"==t.getCurrentCellStyle(da).treeMoving);return W}function n(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),W="tree"==(null!=W?W.style:t.getCellStyle(da)).containerType);return W}function A(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),t.view.getState(da),W=null!=(null!=W?W.style:t.getCellStyle(da)).childLayout);return W}function G(da){da=t.view.getState(da);if(null!=da){var W=t.getIncomingTreeEdges(da.cell);if(0<W.length&&(W=t.view.getState(W[0]),null!=W&&
(W=W.absolutePoints,null!=W&&0<W.length&&(W=W[W.length-1],null!=W)))){if(W.y==da.y&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_SOUTH;if(W.y==da.y+da.height&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_NORTH;if(W.x>da.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function Q(da,W){W=null!=W?W:!0;t.model.beginUpdate();try{var U=t.model.getParent(da),l=t.getIncomingTreeEdges(da),B=t.cloneCells([l[0],da]);t.model.setTerminal(B[0],
t.model.getTerminal(l[0],!0),!0);var K=G(da),S=U.geometry;K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?B[1].geometry.x+=W?da.geometry.width+10:-B[1].geometry.width-10:B[1].geometry.y+=W?da.geometry.height+10:-B[1].geometry.height-10;t.view.currentRoot!=U&&(B[1].geometry.x-=S.x,B[1].geometry.y-=S.y);var P=t.view.getState(da),T=t.view.scale;if(null!=P){var Y=mxRectangle.fromRectangle(P);K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?Y.x+=(W?da.geometry.width+10:-B[1].geometry.width-
10)*T:Y.y+=(W?da.geometry.height+10:-B[1].geometry.height-10)*T;var aa=t.getOutgoingTreeEdges(t.model.getTerminal(l[0],!0));if(null!=aa){for(var la=K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH,va=S=l=0;va<aa.length;va++){var ta=t.model.getTerminal(aa[va],!1);if(K==G(ta)){var qa=t.view.getState(ta);ta!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(Y,qa)&&(l=10+Math.max(l,(Math.min(Y.x+Y.width,qa.x+qa.width)-Math.max(Y.x,
qa.x))/T),S=10+Math.max(S,(Math.min(Y.y+Y.height,qa.y+qa.height)-Math.max(Y.y,qa.y))/T))}}la?S=0:l=0;for(va=0;va<aa.length;va++)if(ta=t.model.getTerminal(aa[va],!1),K==G(ta)&&(qa=t.view.getState(ta),ta!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY()))){var Ba=[];t.traverse(qa.cell,!0,function(ya,La){var Aa=null!=La&&t.isTreeEdge(La);Aa&&Ba.push(La);(null==La||Aa)&&Ba.push(ya);return null==La||Aa});t.moveCells(Ba,(W?1:-1)*l,(W?1:-1)*S)}}}return t.addCells(B,
U)}finally{t.model.endUpdate()}}function F(da){t.model.beginUpdate();try{var W=G(da),U=t.getIncomingTreeEdges(da),l=t.cloneCells([U[0],da]);t.model.setTerminal(U[0],l[1],!1);t.model.setTerminal(l[0],l[1],!0);t.model.setTerminal(l[0],da,!1);var B=t.model.getParent(da),K=B.geometry,S=[];t.view.currentRoot!=B&&(l[1].geometry.x-=K.x,l[1].geometry.y-=K.y);t.traverse(da,!0,function(Y,aa){var la=null!=aa&&t.isTreeEdge(aa);la&&S.push(aa);(null==aa||la)&&S.push(Y);return null==aa||la});var P=da.geometry.width+
40,T=da.geometry.height+40;W==mxConstants.DIRECTION_SOUTH?P=0:W==mxConstants.DIRECTION_NORTH?(P=0,T=-T):W==mxConstants.DIRECTION_WEST?(P=-P,T=0):W==mxConstants.DIRECTION_EAST&&(T=0);t.moveCells(S,P,T);return t.addCells(l,B)}finally{t.model.endUpdate()}}function L(da,W){t.model.beginUpdate();try{var U=t.model.getParent(da),l=t.getIncomingTreeEdges(da),B=G(da);0==l.length&&(l=[t.createEdge(U,null,"",null,null,t.createCurrentEdgeStyle())],B=W);var K=t.cloneCells([l[0],da]);t.model.setTerminal(K[0],da,
!0);null==t.model.getTerminal(K[0],!1)&&(t.model.setTerminal(K[0],K[1],!1),t.applyNewEdgeStyle(K[1],[K[0]],B));l=t.getOutgoingTreeEdges(da);var S=U.geometry;W=[];t.view.currentRoot==U&&(S=new mxRectangle);for(var P=0;P<l.length;P++){var T=t.model.getTerminal(l[P],!1);null!=T&&W.push(T)}var Y=t.view.getBounds(W),aa=t.view.translate,la=t.view.scale;B==mxConstants.DIRECTION_SOUTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x-S.x+10,K[1].geometry.y+=
K[1].geometry.height-S.y+40):B==mxConstants.DIRECTION_NORTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x+-S.x+10,K[1].geometry.y-=K[1].geometry.height+S.y+40):(K[1].geometry.x=B==mxConstants.DIRECTION_WEST?K[1].geometry.x-(K[1].geometry.width+S.x+40):K[1].geometry.x+(K[1].geometry.width-S.x+40),K[1].geometry.y=null==Y?da.geometry.y+(da.geometry.height-K[1].geometry.height)/2:(Y.y+Y.height)/la-aa.y+-S.y+10);return t.addCells(K,U)}finally{t.model.endUpdate()}}
function c(da,W,U){da=t.getOutgoingTreeEdges(da);U=t.view.getState(U);var l=[];if(null!=U&&null!=da){for(var B=0;B<da.length;B++){var K=t.view.getState(t.model.getTerminal(da[B],!1));null!=K&&(!W&&Math.min(K.x+K.width,U.x+U.width)>=Math.max(K.x,U.x)||W&&Math.min(K.y+K.height,U.y+U.height)>=Math.max(K.y,U.y))&&l.push(K)}l.sort(function(S,P){return W?S.x+S.width-P.x-P.width:S.y+S.height-P.y-P.height})}return l}function f(da,W){var U=G(da),l=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;
(U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST)==l&&U!=W?k.actions.get("selectParent").funct():U==W?(W=t.getOutgoingTreeEdges(da),null!=W&&0<W.length&&t.setSelectionCell(t.model.getTerminal(W[0],!1))):(U=t.getIncomingTreeEdges(da),null!=U&&0<U.length&&(l=c(t.model.getTerminal(U[0],!0),l,da),da=t.view.getState(da),null!=da&&(da=mxUtils.indexOf(l,da),0<=da&&(da+=W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_WEST?-1:1,0<=da&&da<=l.length-1&&t.setSelectionCell(l[da].cell)))))}
var k=this,t=k.editor.graph,q=t.getModel(),D=k.menus.createPopupMenu;k.menus.createPopupMenu=function(da,W,U){D.apply(this,arguments);if(1==t.getSelectionCount()){W=t.getSelectionCell();var l=t.getOutgoingTreeEdges(W);da.addSeparator();0<l.length&&(m(t.getSelectionCell())&&this.addMenuItems(da,["selectChildren"],null,U),this.addMenuItems(da,["selectDescendants"],null,U));m(t.getSelectionCell())?(da.addSeparator(),0<t.getIncomingTreeEdges(W).length&&this.addMenuItems(da,["selectSiblings","selectParent"],
null,U)):0<t.model.getEdgeCount(W)&&this.addMenuItems(da,["selectConnections"],null,U)}};k.actions.addAction("selectChildren",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell();da=mxEvent.isControlDown(da)?null:t.getOutgoingTreeEdges(W);if(null!=da&&0<da.length){W=[];for(var U=0;U<da.length;U++)W.push(t.model.getTerminal(da[U],!1));t.setSelectionCells(W)}else t.setSelectionCells(t.model.getChildren(W))}},null,null,"Alt+Shift+C");k.actions.addAction("selectDescendants",
function(da){var W=t.getSelectionCell();if(t.isEnabled()&&null!=W){var U=[];mxEvent.isControlDown(da)||t.traverse(W,!0,function(l,B){var K=null!=B&&t.isTreeEdge(B);K&&mxEvent.isControlDown(da)&&U.push(B);(null==B||K)&&U.push(l);return null==B||K});if(0==U.length||1==U.length&&U[0]==W)U=t.model.getDescendants(W);t.setSelectionCells(U)}},null,null,"Alt+Shift+X");k.actions.addAction("selectParent",function(da){var W=t.getSelectionCell();t.isEnabled()&&null!=W&&(da=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W),
null!=da&&0<da.length?t.setSelectionCell(t.model.getTerminal(da[0],!0)):t.selectParentCell())},null,null,"Alt+Shift+P");k.actions.addAction("selectSiblings",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell(),U=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W);da=[];if(null!=U&&0<U.length&&(U=t.getOutgoingTreeEdges(t.model.getTerminal(U[0],!0)),null!=U))for(var l=0;l<U.length;l++)da.push(t.model.getTerminal(U[l],!1));0==da.length&&(da=t.model.getChildren(t.model.getParent(W)));
t.setSelectionCells(da)}},null,null,"Alt+Shift+S");var H=t.removeCells;t.removeCells=function(da,W){W=null!=W?W:!0;null==da&&(da=this.getDeletableCells(this.getSelectionCells()));W&&(da=this.getDeletableCells(this.addAllEdges(da)));for(var U=[],l=0;l<da.length;l++){var B=da[l];q.isEdge(B)&&n(B)&&(U.push(B),B=q.getTerminal(B,!1));if(m(B)){var K=[];t.traverse(B,!0,function(S,P){var T=null!=P&&t.isTreeEdge(P);T&&K.push(P);(null==P||T)&&K.push(S);return null==P||T});0<K.length&&(U=U.concat(K),B=t.getIncomingTreeEdges(da[l]),
da=da.concat(B))}else null!=B&&U.push(da[l])}da=U;return H.apply(this,arguments)};k.hoverIcons.getStateAt=function(da,W,U){return m(da.cell)?null:this.graph.view.getState(this.graph.getCellAt(W,U))};var O=t.duplicateCells;t.duplicateCells=function(da,W){da=null!=da?da:this.getSelectionCells();for(var U=da.slice(0),l=0;l<U.length;l++){var B=t.view.getState(U[l]);if(null!=B&&m(B.cell)){var K=t.getIncomingTreeEdges(B.cell);for(B=0;B<K.length;B++)mxUtils.remove(K[B],da)}}this.model.beginUpdate();try{var S=
O.call(this,da,W);if(S.length==da.length)for(l=0;l<da.length;l++)if(m(da[l])){var P=t.getIncomingTreeEdges(S[l]);K=t.getIncomingTreeEdges(da[l]);if(0==P.length&&0<K.length){var T=this.cloneCell(K[0]);this.addEdge(T,t.getDefaultParent(),this.model.getTerminal(K[0],!0),S[l])}}}finally{this.model.endUpdate()}return S};var J=t.moveCells;t.moveCells=function(da,W,U,l,B,K,S){for(var P=null,T=[],Y=0;Y<da.length;Y++)(v(da[Y])||m(da[Y]))&&!A(da[Y])&&this.isCellCollapsed(da[Y])?T=T.concat(this.getSubtree(da[Y])):
T.push(da[Y]);da=mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=B;var aa=this.getCurrentCellStyle(B);if(null!=da&&m(B)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(Y=0;Y<da.length;Y++)if(m(da[Y])||t.model.isEdge(da[Y])&&null==t.model.getTerminal(da[Y],!0)){B=t.model.getParent(da[Y]);break}if(null!=T&&B!=T&&null!=this.view.getState(da[0])){var la=t.getIncomingTreeEdges(da[0]);if(0<la.length){var va=t.view.getState(t.model.getTerminal(la[0],!0));if(null!=va){var ta=t.view.getState(T);
null!=ta&&(W=(ta.getCenterX()-va.getCenterX())/t.view.scale,U=(ta.getCenterY()-va.getCenterY())/t.view.scale)}}}}P=J.apply(this,arguments);if(null!=P&&null!=da&&P.length==da.length)for(Y=0;Y<P.length;Y++)if(this.model.isEdge(P[Y]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[Y],!0))&&this.model.setTerminal(P[Y],T,!0);else if(m(da[Y])&&(la=t.getIncomingTreeEdges(da[Y]),0<la.length))if(!l)m(T)&&0>mxUtils.indexOf(da,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],T,!0);else if(0==
t.getIncomingTreeEdges(P[Y]).length){aa=T;if(null==aa||aa==t.model.getParent(da[Y]))aa=t.model.getTerminal(la[0],!0);l=this.cloneCell(la[0]);this.addEdge(l,t.getDefaultParent(),aa,P[Y])}}finally{this.model.endUpdate()}return P};if(null!=k.sidebar){var I=k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(da,W,U,l){var B=t.model,K=null;B.beginUpdate();try{if(K=I.apply(this,arguments),m(da))for(var S=0;S<K.length;S++)if(B.isEdge(K[S])&&null==B.getTerminal(K[S],!0)){B.setTerminal(K[S],da,!0);
var P=t.getCellGeometry(K[S]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{B.endUpdate()}return K}}var Z={67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},ia={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},ha=k.onKeyDown;k.onKeyDown=function(da){try{var W=t.getSelectionCell();if(t.isEnabled()&&!t.isEditing()&&null!=W){var U=mxEvent.isAltDown(da)&&mxEvent.isShiftDown(da)?
Z[da.keyCode]:mxEvent.isAltDown(da)?ia[da.keyCode]:null;null!=U?(U.funct(da),mxEvent.consume(da)):m(W)&&(U=null,0<t.getIncomingTreeEdges(W).length&&(9==da.which?U=mxEvent.isShiftDown(da)?F(W):L(W):13==da.which&&(U=Q(W,!mxEvent.isShiftDown(da)))),null!=U&&0<U.length?(1==U.length&&t.model.isEdge(U[0])?t.setSelectionCell(t.model.getTerminal(U[0],!1)):t.setSelectionCell(U[U.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(t.view.getState(W)),t.startEditingAtCell(W),mxEvent.consume(da)):37==da.keyCode?
(f(W,mxConstants.DIRECTION_WEST),mxEvent.consume(da)):38==da.keyCode?(f(W,mxConstants.DIRECTION_NORTH),mxEvent.consume(da)):39==da.keyCode?(f(W,mxConstants.DIRECTION_EAST),mxEvent.consume(da)):40==da.keyCode&&(f(W,mxConstants.DIRECTION_SOUTH),mxEvent.consume(da)))}}catch(l){k.handleError(l)}mxEvent.isConsumed(da)||ha.apply(this,arguments)};var ca=t.connectVertex;t.connectVertex=function(da,W,U,l,B,K,S){var P=t.getIncomingTreeEdges(da);if(m(da)){var T=G(da),Y=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,
aa=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;return T==W||0==P.length?L(da,W):Y==aa?F(da):Q(da,W!=mxConstants.DIRECTION_NORTH&&W!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};t.getSubtree=function(da){var W=[da];!v(da)&&!m(da)||A(da)||t.traverse(da,!0,function(U,l){var B=null!=l&&t.isTreeEdge(l);B&&0>mxUtils.indexOf(W,l)&&W.push(l);(null==l||B)&&0>mxUtils.indexOf(W,U)&&W.push(U);return null==l||B});return W};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=
function(){na.apply(this,arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(da){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(da),mxEvent.getClientY(da),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(da);this.graph.isMouseDown=!0;k.hoverIcons.reset();mxEvent.consume(da)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var X=
mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){X.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(da){ba.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=da?"":"none")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(da,W){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,n=this;return m.concat([this.addEntry("tree container",
function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var Q=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
Q.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);Q.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(Q);return n.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;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var Q=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
Q.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);Q.insertEdge(F,!1);var L=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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);L.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
f.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),F.style);k.geometry.relative=!0;k.edge=!0;G.insertEdge(k,!0);f.insertEdge(k,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),F.style);q.geometry.relative=!0;q.edge=!0;G.insertEdge(q,!0);t.insertEdge(q,!1);A.insert(F);A.insert(c);A.insert(k);A.insert(q);A.insert(G);A.insert(Q);A.insert(L);A.insert(f);A.insert(t);return n.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;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
A.vertex=!0;return n.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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],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,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],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;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("Organization",new mxGeometry(80,
40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var Q=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');Q.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);Q.insertEdge(F,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
!0;c.edge=!0;G.insertEdge(c,!0);L.insertEdge(c,!1);A.insert(F);A.insert(c);A.insert(G);A.insert(Q);A.insert(L);return n.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;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return n.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;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],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;treeFolding=1;treeMoving=1;");A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var Q=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");Q.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;Q.insertEdge(F,!1);return n.createVertexTemplateFromCells([G,F,A,Q],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(L,c){if(EditorUi.windowed){var f=L.editor.graph;f.popupMenuHandler.hideMenu();null==L.formatWindow?(L.formatWindow=new WrapperWindow(L,"",Math.max(10,L.diagramContainer.clientWidth-248),60,240,Math.min(566,f.container.clientHeight-10),function(k){k.className="geSidebarContainer geFormatContainer";L.createFormat(k).init()}),L.dependsOnLanguage(mxUtils.bind(this,function(){L.formatWindow.window.setTitle(mxResources.get("format"))})),L.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){L.formatWindow.window.fit()})),L.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):L.formatWindow.window.setVisible(null!=c?c:!L.formatWindow.window.isVisible())}else null==L.formatElt&&(L.formatElt=L.createSidebarContainer(),L.createFormat(L.formatElt).init(),L.formatElt.style.border="none",L.formatElt.style.width="240px",L.formatElt.style.borderLeftWidth="1px",L.formatElt.style.borderLeftStyle="solid",L.formatElt.style.right="0px"),c=L.diagramContainer.parentNode,
null!=L.formatElt.parentNode?(L.formatElt.parentNode.removeChild(L.formatElt),c.style.right="0px"):(c.parentNode.appendChild(L.formatElt),c.style.right=L.formatElt.style.width)}function e(L,c){if(EditorUi.windowed){var f=L.editor.graph;f.popupMenuHandler.hideMenu();null==L.sidebarWindow?(L.sidebarWindow=new WrapperWindow(L,"",10,56,Math.min(f.container.clientWidth-10,218)-6,Math.min(f.container.clientHeight-40,650)-6,function(k){L.createShapesPanel(k)}),L.dependsOnLanguage(mxUtils.bind(this,function(){L.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
L.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){L.sidebarWindow.window.fit()})),L.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),L.sidebarWindow.window.setVisible(!0),isLocalStorage&&L.getLocalData("sidebar",function(k){L.sidebar.showEntries(k,null,!0)}),L.restoreLibraries()):L.sidebarWindow.window.setVisible(null!=c?c:!L.sidebarWindow.window.isVisible())}else null==L.sidebarElt&&(L.sidebarElt=L.createSidebarContainer(),L.createShapesPanel(L.sidebarElt),L.sidebarElt.style.border=
"none",L.sidebarElt.style.width="210px",L.sidebarElt.style.borderRight="1px solid gray"),c=L.diagramContainer.parentNode,null!=L.sidebarElt.parentNode?(L.sidebarElt.parentNode.removeChild(L.sidebarElt),c.style.left="0px"):(c.parentNode.appendChild(L.sidebarElt),c.style.left=L.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
document.body.clientWidth}catch(L){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><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.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";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;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.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(L,c){null!=c.shortcut&&900>g&&!mxClient.IS_IOS?L.firstChild.nextSibling.setAttribute("title",c.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
function(L){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=L?L:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();n.apply(this,arguments)};var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(L){A.apply(this,
arguments);if(L){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,
arguments);var L=this.editorUi;EditorUi.enablePlantUml&&!L.isOffline()&&L.actions.put("plantUml",new Action("plantUml...",function(){var k=new ParseDialog(L,mxResources.get("plantUml")+"...","plantUml");L.showDialog(k.container,620,420,!0,!1);k.init()}));L.actions.put("mermaid",new Action("mermaid...",function(){var k=new ParseDialog(L,mxResources.get("mermaid")+"...","mermaid");L.showDialog(k.container,620,420,!0,!1);k.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
f=function(k,t,q,D){k.addItem(q,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(L,q,D);L.showDialog(H.container,620,420,!0,!1);H.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,t){for(var q=0;q<c.length;q++)"-"==c[q]?k.addSeparator(t):f(k,t,mxResources.get(c[q])+"...",c[q])})))};EditorUi.prototype.installFormatToolbar=function(L){var c=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,t){0<c.getSelectionCount()?(L.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var Q=!1;EditorUi.prototype.initFormatWindow=function(){if(!Q&&null!=this.formatWindow){Q=!0;var L=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){L.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var F=EditorUi.prototype.init;EditorUi.prototype.init=
function(){function L(B,K,S){var P=q.menus.get(B);K=O.addMenu(mxResources.get(B),mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));K.className="geButton";K.setAttribute("title",mxResources.get(B));q.menus.menuCreated(P,K,"geButton");null!=S&&(K.style.backgroundImage="url("+S+")",K.innerText="");return K}function c(B,K,S,P,T,Y){var aa=document.createElement("a");aa.className="geButton";H.appendChild(aa);null!=Y?aa.style.backgroundImage="url("+Y+")":mxUtils.write(aa,B);mxEvent.addListener(aa,
"click",function(la){"disabled"!=aa.getAttribute("disabled")&&K(la);mxEvent.consume(la)});mxEvent.preventDefault(aa);null!=P&&aa.setAttribute("title",P);null!=T&&(B=function(){T.isEnabled()?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")},T.addListener("stateChanged",B),D.addListener("enabledChanged",B),B());return aa}function f(B,K,S){K=document.createElement("div");K.className="geButtonGroup";for(S=0;S<B.length;S++)null!=B[S]&&K.appendChild(B[S]);H.appendChild(K);return K}
function k(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;H.innerHTML="";var B=1E3>g,K=L("diagram",null,B?Editor.menuImage:null);f([K,c(mxResources.get("shapes"),q.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),q.actions.get("image"),B?Editor.shapesImage:null),c(mxResources.get("format"),q.actions.get("format").funct,null,mxResources.get("format")+" ("+q.actions.get("format").shortcut+")",q.actions.get("image"),B?Editor.formatImage:null)]);
K=L("insert",!0,B?ha:null);f([K,c(mxResources.get("delete"),q.actions.get("delete").funct,null,mxResources.get("delete"),q.actions.get("delete"),B?Editor.trashImage:null)]);D.isEnabled()||K.setAttribute("disabled","disabled");W.setAttribute("title",mxResources.get("undo")+" ("+ka.shortcut+")");U.setAttribute("title",mxResources.get("redo")+" ("+da.shortcut+")");l.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(f([W,U]),520<=g&&f([l,640<=g?c("",X.funct,!0,mxResources.get("zoomIn")+
" ("+Editor.ctrlKey+" +)",X,Editor.zoomInImage):null,640<=g?c("",ba.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ba,Editor.zoomOutImage):null]));H.appendChild(q.statusContainer);H.appendChild(q.buttonContainer)}F.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"),t.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
if(1E3<=g||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var q=this,D=q.editor.graph;q.toolbar=this.createToolbar(q.createDiv("geToolbar"));var H=document.createElement("div");H.className="geMenubarContainer";
var O=new Menubar(q,H),J=q.hideCurrentMenu;q.hideCurrentMenu=function(){J.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var I=q.descriptorChanged;q.descriptorChanged=function(){I.apply(this,arguments);var B=q.getCurrentFile();if(null!=B&&null!=B.getTitle()){var K=B.getMode();"google"==K?K="googleDrive":"github"==K?K="gitHub":"gitlab"==K?K="gitLab":"onedrive"==K&&(K="oneDrive");K=mxResources.get(K);H.setAttribute("title",B.getTitle()+(null!=K?" ("+K+")":""))}else H.removeAttribute("title")};
q.setStatusText(q.editor.getStatus());H.appendChild(q.statusContainer);q.buttonContainer=this.createButtonContainer();H.appendChild(q.buttonContainer);q.menubarContainer=q.buttonContainer;q.tabContainer=this.createTabContainer();var Z=this.createZoomInput(!0),ia=q.updateTabContainer;q.updateTabContainer=function(){ia.apply(this,arguments);q.tabContainer.appendChild(Z)};var ha=Editor.addBoxImage;if(null!=q.hoverIcons){var ca=q.hoverIcons.update;q.hoverIcons.update=function(){D.freehand.isDrawing()||
ca.apply(this,arguments)}}if(null!=D.freehand){var na=D.freehand.createStyle;D.freehand.createStyle=function(B){return na.apply(this,arguments)+"sketch=0;"}}q.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.setStatusText(q.editor.getStatus())}));q.setStatusText(q.editor.getStatus());var X=q.actions.get("zoomIn"),ba=q.actions.get("zoomOut");t=q.actions.get("resetView");var ka=q.actions.get("undo"),da=q.actions.get("redo"),W=c("",ka.funct,null,"",ka,Editor.undoImage),U=c("",da.funct,
null,"",da,Editor.redoImage),l=c("",function(B){mxEvent.isAltDown(B)?(q.hideCurrentMenu(),q.actions.get("customZoom").funct()):(q.hideCurrentMenu(),q.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",t,Editor.zoomFitImage);q.container.appendChild(q.tabContainer);q.container.appendChild(H);q.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);k();q.addListener("lockedChanged",k);q.addListener("languageChanged",k);q.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,
"resize",function(){k();null!=q.sidebarWindow&&q.sidebarWindow.window.fit();null!=q.formatWindow&&q.formatWindow.window.fit();null!=q.actions.outlineWindow&&q.actions.outlineWindow.window.fit();null!=q.actions.layersWindow&&q.actions.layersWindow.window.fit();null!=q.menus.chatWindow&&q.menus.chatWindow.window.fit();null!=q.menus.tagsWindow&&q.menus.tagsWindow.window.fit();null!=q.menus.findWindow&&q.menus.findWindow.window.fit();null!=q.menus.findReplaceWindow&&q.menus.findReplaceWindow.window.fit()})}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,v,n,A){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=v;this.isResolved=n;this.user=A;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,v){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,v){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=v};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\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\nbeta=beta\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\nbringForward=Bring Forward\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\ncompare=Compare\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.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\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\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\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.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nembedFonts=Embed Fonts\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\nexplore=Explore\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.\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\nflowAnimation=Flow Animation\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\nformatWebp=WebP\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">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\nlabels=Labels\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.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\nnotion=Notion\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\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\ntooLargeUseDownload=Too large, use download instead.\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\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\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\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\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create 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\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></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="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></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="default"/><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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;GraphViewer.prototype.darkMode=null;
GraphViewer.prototype.init=function(b,e,g){GraphViewer.initCss();this.graphConfig=null!=g?g:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=
null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.darkMode=null!=this.graphConfig["dark-mode"]?this.graphConfig["dark-mode"]:this.darkMode;
this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=
null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var v=
mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var G=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?G.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(G.style.padding="8px");G.style.forcedColorAdjust="none";G.style.boxSizing="border-box";G.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var q=
this.view.graphBounds,D=this.view.translate;G.setAttribute("viewBox",q.x+D.x-this.panDx+" "+(q.y+D.y-this.panDy)+" "+(q.width+1)+" "+(q.height+1));this.container.style.backgroundColor=G.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",q))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(q){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var Q=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=Q&&Q!=e)try{this.xml=mxUtils.getXml(Q),this.xmlNode=Q,this.xmlDocument=Q.ownerDocument}catch(q){}this.graph.getImageFromBundles=function(q){return m.getImageUrl(q)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);
if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(Q=0;Q<F.length;Q++)if(this.pageId==F[Q].getAttribute("id")){this.currentPage=Q;break}var L=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(q){var D=F[m.currentPage];return"page"==q?D.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==q?m.currentPage+1:"pagecount"==q?F.length:L.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=
function(q){this.handlingResize||(this.currentPage=mxUtils.mod(q,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(q){q=this.getIndexById(q);var D=0<=q;D&&this.selectPage(q);return D};Q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var f=this.graph.setBackgroundImage;this.graph.setBackgroundImage=
function(q){if(null!=q&&Graph.isPageLink(q.src)){var D=q.src,H=D.indexOf(",");0<H&&(H=m.getIndexById(D.substring(H+1)),0<=H&&(q=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[H])),q.originalSrc=D))}f.apply(this,arguments)};var k=this.graph.getGraphBounds;this.graph.getGraphBounds=function(q){var D=k.apply(this,arguments);q=this.backgroundImage;if(null!=q){var H=this.view.translate,O=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((H.x+q.x)*O,(H.y+q.y)*O,q.width*O,
q.height*O))}return D};this.addListener("xmlNodeChanged",Q);Q();urlParams.page=m.currentPage;Q=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,Q=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(q){return!mxEvent.isPopupTrigger(q.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=Q&&this.setLayersVisible(Q);this.graph.customLinkClicked=function(q,D){try{if(Graph.isPageLink(q)){var H=q.indexOf(",");m.selectPageById(q.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var O=
this.getGraphBounds();this.handleCustomLink(q,D);O.equals(this.getGraphBounds())||m.crop()}}catch(J){alert(J.message)}return!0};var t=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return t.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var n=
this.getObservableParent(b),A=new g(mxUtils.bind(this,function(G){0<b.offsetWidth&&(A.disconnect(),v())}));A.observe(n,{attributes:!0})}else v()}};
GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",
function(){e=b.background;g(!0)});this.addListener("darkModeChanged",function(){g(!0)});g(!1)}};GraphViewer.prototype.installDarkModeListener=function(){null!=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(){this.darkModeChanged();this.fireEvent(new mxEventObject("darkModeChanged"))}));this.darkModeChanged()};
GraphViewer.prototype.darkModeChanged=function(){if(null!=this.graph){var b=this.graph.container,e=this.isDarkMode();e?b.classList.add("geDarkMode"):b.classList.remove("geDarkMode");b.style.colorScheme=e?"dark":"light"}};GraphViewer.prototype.getAncestorDetails=function(b){for(;null!=b;){if("DETAILS"==b.nodeName)return b;b=b.parentNode}return null};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var g=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var v=0;v<m.getChildCount(m.root);v++){var n=m.getChildAt(m.root,v);e=e&&m.isVisible(n);g.push(m.isVisible(n));m.setVisible(n,null!=b?b[v]:!0)}}finally{m.endUpdate()}}return e?null:g};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var Q=mxUtils.getScrollOrigin(document.body);
Q="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-Q.x,top:-Q.y};G={left:G.left-Q.left,top:G.top-Q.top,bottom:G.bottom-Q.top,right:G.right-Q.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.top+"px"}else null!=
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());g=!1}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var Q=b.offsetWidth;Q==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},v=Q,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",m),this.graph.addListener("size",m)):new ResizeSensor(this.graph.container,m));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=v=null;m=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",m):new ResizeSensor(this.graph.container,m))}else 9>=document.documentMode||this.graph.addListener("size",
m);var A=mxUtils.bind(this,function(G){var Q=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||
null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=Q});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,n=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;n={};if(v)for(var G=0;G<m.length;G++){var Q=b.getCell(m[G]);null!=Q&&(e=!0,n[Q.id]=!0)}else for(G=0;G<g.length;G++)Q=b.getChildAt(b.root,parseInt(g[G])),null!=Q&&(e=!0,n[Q.id]=!0);for(G=0;e&&
G<A;G++)Q=b.getChildAt(b.root,G),b.setVisible(Q,n[Q.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}n=!0}return n};
GraphViewer.prototype.addToolbar=function(){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.display="flex";e.style.alignItems="center";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="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");
mxUtils.setOpacity(e,30);var m=null,v=null,n=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),ca||200)}),A=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=
"";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(A(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){A(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",
mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||A(30)}));var G=this.graph,Q=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(ca,na){},mouseUp:function(ca,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<Q&&Math.abs(this.scrollTop-G.container.scrollTop)<
Q&&Math.abs(this.startX-na.getGraphX())<Q&&Math.abs(this.startY-na.getGraphY())<Q&&(0<parseFloat(e.style.opacity||0)?n():A(30))}})}g=this.toolbarItems;for(var F=0,L=mxUtils.bind(this,function(ca,na,X,ba){ca=this.createToolbarButton(ca,na,X,ba);e.appendChild(ca);F++;return ca}),c=this.graph.getModel(),f=null,k=null,t=null,q=null,D=0;D<g.length;D++){var H=g[D];if("pages"==H){q=b.ownerDocument.createElement("div");q.style.display="inline-flex";q.style.position="relative";q.style.alignItems="center";
q.style.padding="4px";q.style.fontFamily=GraphViewer.cssFontFamily;q.style.fontSize="12px";q.style.cursor="default";q.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(q,70);var O=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");O.style.borderRightStyle="none";O.style.paddingLeft="0px";O.style.paddingRight="0px";e.appendChild(q);var J=L(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");J.style.paddingLeft="0px";J.style.paddingRight="0px";H=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-flex":"none";O.style.display=q.style.display;J.style.display=q.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(L(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
mxResources.get("zoomOut")||"Zoom Out"),L(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),L(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"==H){if(this.layersEnabled){var I=L(mxUtils.bind(this,function(ca){if(null!=f)f.parentNode.removeChild(f),
f=null;else{f=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var X=this.graph.getGraphBounds(),ba=this.graph.view;0>X.x||0>X.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale}):null!=this.graph.originalViewState&&0<X.x/ba.scale+this.graph.originalViewState.translate.x-ba.translate.x&&0<X.y/ba.scale+this.graph.originalViewState.translate.y-
ba.translate.y&&(ba.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale})}}));mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ca=I.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=GraphViewer.cssFontFamily;
f.style.fontSize="11px";f.style.overflowY="auto";f.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";f.style.zIndex=this.toolbarZIndex+1;f.style.color="#000";mxUtils.setOpacity(f,85);var na=mxUtils.getDocumentScrollOrigin(document);f.style.left=na.x+ca.left-1+"px";f.style.top=na.y+ca.bottom-2+"px";this.isDarkMode()&&(f.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
function(){I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Z=L(mxUtils.bind(this,function(ca){null==k&&(k=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),k.div.getElementsByTagName("div")[0].style.position="",k.div.style.maxHeight="160px",k.div.style.maxWidth="120px",k.div.style.padding="2px",k.div.style.overflow="auto",k.div.style.height="auto",k.div.style.position=
"fixed",k.div.style.fontFamily=GraphViewer.cssFontFamily,k.div.style.fontSize="11px",k.div.style.backgroundColor="#eee",k.div.style.color="#000",k.div.style.border="1px solid #d0d0d0",k.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(k.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(k.div,85));if(null!=t)t.parentNode.removeChild(t),t=null;else{t=k.div;t.style.position="absolute";mxEvent.addListener(t,"mouseleave",function(){null!=t&&(t.parentNode.removeChild(t),t=null)});
ca=Z.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);t.style.left=na.x+ca.left-1+"px";t.style.top=na.y+ca.bottom-2+"px";document.body.appendChild(t);k.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=t&&0==this.graph.getAllTags().length&&(t.parentNode.removeChild(t),t=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
"none"}}else"lightbox"==H?this.lightboxEnabled&&L(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=L(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=
b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var ia=b.style.border,
ha=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 ca=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};ca={left:ca.left-na.left,top:ca.top-na.top,bottom:ca.bottom-na.top,right:ca.right-na.left};e.style.left=
ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var X=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=t&&(t.parentNode.removeChild(t),t=null);null!=f&&(f.parentNode.removeChild(f),f=null);
b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ba){for(ba=mxEvent.getSource(ba);null!=ba;){if(ba==b||ba==e||ba==f||ba==t)return;ba=ba.parentNode}X()});mxEvent.addListener(document.body,"mouseleave",function(ba){X()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ha):ha();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ha()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var v=document.createElement("div");v.style.borderRight="1px solid #d0d0d0";v.style.display="inline-flex";v.style.alignItems="center";v.style.padding="6px";mxEvent.addListener(v,"click",b);null!=g&&v.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(v,"mouseenter",function(){v.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(v,"mouseleave",function(){v.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),v.style.cursor="pointer"):mxUtils.setOpacity(v,30);v.appendChild(b);return v};
GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(g,m,v){if(null==m)for(var n=mxEvent.getSource(g);n!=b.container&&null!=n&&null==m;)"a"==n.nodeName.toLowerCase()&&(m=n.getAttribute("href")),n=n.parentNode;null!=e?null==m||b.isCustomLink(m)?mxEvent.consume(g):b.isExternalProtocol(m)||b.isBlankLink(m)||window.setTimeout(function(){e.destroy()},0):null!=m&&null==e&&b.isCustomLink(m)&&
(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&b.customLinkClicked(m,v)&&(mxUtils.clearSelection(),mxEvent.consume(g))}),mxUtils.bind(this,function(g){if(null==e&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(g)||0==this.toolbarItems.length))try{this.showLightbox()}catch(m){alert(m.message)}}))};
GraphViewer.prototype.showLightbox=function(b,e,g){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;g={client:1,target:null!=g?g:"blank"};b&&(g.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)g.close=1;this.layersEnabled&&(g.layers=1);this.tagsEnabled&&(g.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(g.nav=1);null!=this.graphConfig&&null!=
this.graphConfig.highlight&&(g.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(g.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(m){"ready"==m.data&&m.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):g.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(g.dev=
"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(g)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElement("div");e.style.position="fixed";e.style.top="0";e.style.left="0";e.style.bottom="0";e.style.right="0";e.style.zIndex=this.lightboxZIndex;e.style.backgroundColor="#000000";mxUtils.setOpacity(e,70);document.body.appendChild(e);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("src",Editor.closeBlackImage);g.style.position="fixed";g.style.top="32px";g.style.right="32px";g.style.cursor="pointer";
g.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){n.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);n.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";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));v.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(v))}catch(k){}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(){};v=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=v;n.refresh=function(){};var A=mxUtils.bind(this,function(k){27==k.keyCode&&n.destroy()}),G=this.initialOverflow,
Q=n.destroy;n.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,Q.apply(this,arguments))};var F=n.editor.graph,L=F.container;L.style.overflow="hidden";L.style.inset="0";this.lightboxChrome&&null==b?(L.style.border="1px solid #c0c0c0",L.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",
g.style.display="none");var c=this;F.getImageFromBundles=function(k){return c.getImageUrl(k)};var f=n.createTemporaryGraph;n.createTemporaryGraph=function(){var k=f.apply(this,arguments);k.getImageFromBundles=function(t){return c.getImageUrl(t)};return k};this.graphConfig.move&&(F.isMoveCellsEvent=function(k){return!0});mxUtils.setPrefixedStyle(L.style,"border-radius","4px");L.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,n);
window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){n.destroy()}),L.style.outline="none",L.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(L)):(document.body.appendChild(L),document.body.appendChild(g)),n.setFileData(this.xml),mxUtils.setPrefixedStyle(L.style,"transform","rotateY(0deg)"),n.chromelessToolbar.style.bottom="60px",n.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(n.chromelessToolbar),
n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(F,this.graph),n.lightboxFit(),n.chromelessResize()}catch(k){n.handleError(k,null,function(){n.destroy()})}}),0);return n};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};
GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var g=0;g<e.length;g++)b.push(e[g]);return b}var m=document.getElementsByTagName("*");e=[];for(g=0;g<m.length;g++){var v=m[g].className;null!=v&&0<v.length&&(v=v.split(" "),0<=mxUtils.indexOf(v,b)&&e.push(m[g]))}return e};
GraphViewer.createViewerForElement=function(b,e){var g=b.getAttribute("data-mxgraph");if(null!=g){var m=JSON.parse(g),v=function(n){n=mxUtils.parseXml(n);n=new GraphViewer(b,n.documentElement,m);null!=e&&e(n)};null!=m.url?GraphViewer.getUrl(m.url,function(n){v(n)}):v(m.xml)}};
GraphViewer.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));for(var e="",g=0;g<window.location.ancestorOrigins.length;g++)if(e+=" -> "+window.location.ancestorOrigins[g],e.endsWith("dan6v7pm1f1a1.cloudfront.net")||e.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0;
(b.endsWith("ac.draw.io")||b.endsWith("aj.draw.io"))&&1==window.location.ancestorOrigins.length&&window.location.ancestorOrigins[0]&&window.location.ancestorOrigins[0].endsWith(".atlassian.net")}}catch(m){}return!1};GraphViewer.darkBackgroundColor=Editor.darkColor;GraphViewer.cssFontFamily=Editor.defaultHtmlFont;GraphViewer.shapeBackgroundColor=null;GraphViewer.viewerInitialized=function(b){};
GraphViewer.initCss=function(){try{null==GraphViewer.styleElement&&(GraphViewer.styleElement=document.createElement("style"),GraphViewer.styleElement.setAttribute("type","text/css"),GraphViewer.styleElement.innerHTML=GraphViewer.getCss(),GraphViewer.blockedAncestorFrames()||document.getElementsByTagName("head")[0].appendChild(GraphViewer.styleElement))}catch(b){}};
GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\n}\ndiv.mxTooltip {\n box-shadow: 3px 3px 12px light-dark(#c0c0c0, transparent);"," background: light-dark(#ffffcc, "+GraphViewer.darkBackgroundColor+");"," border-style: solid;\n border-width: 1px;\n border-color: black;"," font-family: "+GraphViewer.cssFontFamily+";"," font-size: 8pt;\n position: absolute;\n cursor: default;\n padding: 4px;\n color: black;\n}\ntd.mxPopupMenuIcon div {\n width: 16px;\n height: 16px;\n}\ndiv.mxPopupMenu {\n box-shadow: 2px 2px 3px light-dark(#d5d5d5, transparent);\n background: white;\n position: absolute;\n border: 3px solid #e7e7e7;\n padding: 3px;\n}\ntable.mxPopupMenu {\n border-collapse: collapse;\n margin: 0px;\n}\ntd.mxPopupMenuItem {\n padding: 7px 30px;",
" font-family: "+GraphViewer.cssFontFamily+";"," font-size: 10pt;\n}\ntd.mxPopupMenuIcon {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");"," padding: 0px;\n}\ntr.mxPopupMenuItemHover {\n background-color: #eeeeee;\n color: black;\n}\ntable.mxPopupMenu hr {\n color: #cccccc;\n background-color: #cccccc;\n border: none;\n height: 1px;\n}\ntable.mxPopupMenu tr {\n font-size: 4pt;\n}\n.geDialog, .geDialog table {"," font-family: "+GraphViewer.cssFontFamily+
";"," font-size: 10pt;\n border: none;\n margin: 0px;\n}\n.geDialog {\n position: fixed;"," background: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t color: light-dark(#3f3f3f, #c0c0c0);\n box-shadow: 0px 0px 2px 2px light-dark(#d5d5d5, transparent);\n border: 1px solid light-dark(#dadada, #565656);\n overflow: hidden;\n padding: 30px;\n left: 50%;\n top: 50%;\n max-height: 100%;\n max-width: 100%;\n\t box-sizing: border-box;\n transform: translate(-50%, -50%);",
"\t z-index: "+(GraphViewer.prototype.lightboxZIndex+2)+";","}\n.geBackground {"," background-color: light-dark(#ffffff, "+GraphViewer.darkBackgroundColor+");","\t position: fixed;\n left: 0px;\n top: 0px;\n right: 0px;\n bottom: 0px;\n opacity: 0.9;","\t z-index: "+(GraphViewer.prototype.lightboxZIndex+1)+";","}\n.geDialogTitle {\n box-sizing: border-box;\n white-space: nowrap;"," background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," border-bottom: 1px solid rgb(192, 192, 192);\n font-size: 15px;\n font-weight: bold;\n text-align: center;\n color: rgb(35, 86, 149);\n}\n.geDialogFooter {",
" background: light-dark(#f1f3f4, "+GraphViewer.darkBackgroundColor+");"," white-space: nowrap;\n text-align: right;\n box-sizing: border-box;\n border-top: 1px solid #e5e5e5;\n color: darkGray;\n}\n.geHelpIcon {\n width: 16px;\n margin: 0 4px;\n vertical-align: text-bottom;\n}\n.geBtn, .mxWindow .geBtn {\n background-color: light-dark(#eeeeee, #1b1d1e);\n border: 1px solid light-dark(#d8d8d8, #333333);\n color: light-dark(#3f3f3f, #c0c0c0);\n font-size: 13px;\n font-weight: 500;\n border-radius: 4px;\n height: 30px;\n margin: 0 0 0 8px;\n min-width: 72px;\n outline: 0;\n padding: 0 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.geBtn:hover:not(.gePrimaryBtn), .geBtn:focus {\n border: 1px solid light-dark(#c6c6c6, #333333);\n background: light-dark(#dadada, #333333);\n}\n.geBtn:disabled {\n opacity: .5;\n}\n.gePrimaryBtn {\n background: linear-gradient(light-dark(#4d90fe, #003555) 0px, light-dark(#4787ed, #003555) 100%);\n border: 1px solid light-dark(#3079ed, transparent);\n color: light-dark(#ffffff, #c0c0c0);\n}\n.gePrimaryBtn:hover:not([disabled]) {\n background: linear-gradient(light-dark(#4d90fe, #004a77) 0px, light-dark(#357ae8, #004a77) 100%);\n border: 1px solid light-dark(#2f5bb7, transparent);\n}\n.geBtn:disabled {\n opacity: .5;\n}"].join("\n")};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function v(){this.q=[];this.add=function(q){this.q.push(q)};var k,t;this.call=function(){k=0;for(t=this.q.length;k<t;k++)this.q[k].call()}}function n(k,t){return k.currentStyle?k.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(k,null).getPropertyValue(t):k.style[t]}function A(k,t){if(!k.resizedAttached)k.resizedAttached=
new v,k.resizedAttached.add(t);else if(k.resizedAttached){k.resizedAttached.add(t);return}k.resizeSensor=document.createElement("div");k.resizeSensor.className="resize-sensor";k.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";k.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>';
k.appendChild(k.resizeSensor);"static"==n(k,"position")&&(k.style.position="relative");var q=k.resizeSensor.childNodes[0],D=q.childNodes[0],H=k.resizeSensor.childNodes[1],O=function(){D.style.width="100000px";D.style.height="100000px";q.scrollLeft=1E5;q.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};O();var J=!1,I=function(){k.resizedAttached&&(J&&(k.resizedAttached.call(),J=!1),b(I))};b(I);var Z,ia,ha,ca;t=function(){if((ha=k.offsetWidth)!=Z||(ca=k.offsetHeight)!=ia)J=!0,Z=ha,ia=ca;O()};var na=
function(X,ba,ka){X.attachEvent?X.attachEvent("on"+ba,ka):X.addEventListener(ba,ka)};na(q,"scroll",t);na(H,"scroll",t)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var Q=null,F=!1;(new ResizeObserver(function(){F||(null!=Q&&window.clearTimeout(Q),Q=window.setTimeout(function(){F=!0;G();Q=null;F=!1},200))})).observe(g)}else{var L=Object.prototype.toString.call(g),c="[object Array]"===L||"[object NodeList]"===L||"[object HTMLCollection]"===
L||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(c){L=0;for(var f=g.length;L<f;L++)A(g[L],G)}else A(g,G);this.detach=function(){if(c)for(var k=0,t=g.length;k<t;k++)e.detach(g[k]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
{val:"boundNonint",dispName:"Bound Non-Interrupting"},{val:"throwing",dispName:"Throwing"},{val:"end",dispName:"End"},{val:"none",dispName:"None"}]},{name:"background",dispName:"Background",type:"enum",defVal:"none",enumList:[{val:"gateway",dispName:"Gateway"},{val:"none",dispName:"None"}]}];
mxBpmnShape.prototype.eventTypeEnum={START_STANDARD:"standard",EVENT_SP_INT:"eventInt",EVENT_SP_NONINT:"eventNonint",CATCHING:"catching",BOUND_INT:"boundInt",BOUND_NONINT:"boundNonint",THROWING:"throwing",END:"end",NONE:"none",GATEWAY:"gateway"};
mxBpmnShape.prototype.eventEnum={GENERAL:"general",MESSAGE:"message",TIMER:"timer",ESCALATION:"escalation",CONDITIONAL:"conditional",LINK:"link",ERROR:"error",CANCEL:"cancel",COMPENSATION:"compensation",SIGNAL:"signal",MULTIPLE:"multiple",PAR_MULTI:"parallelMultiple",TERMINATE:"terminate",GW_EXCLUSIVE:"exclusiveGw",GW_PARALLEL:"parallelGw",GW_COMPLEX:"complexGw"};mxBpmnShape.prototype.miscEnum={OUTLINE:"outline",BACKGROUND:"background",SYMBOL:"symbol",GATEWAY:"gateway"};
mxBpmnShape.prototype.paintVertexShape=function(a,d,e,b,c){this.redrawPath(a,d,e,b,c,mxBpmnShape.prototype.miscEnum.BACKGROUND);mxUtils.getValue(this.style,mxBpmnShape.prototype.miscEnum.BACKGROUND,mxBpmnShape.prototype.eventTypeEnum.NONE)===mxBpmnShape.prototype.eventTypeEnum.GATEWAY&&a.setShadow(!1);this.redrawPath(a,d,e,b,c,mxBpmnShape.prototype.miscEnum.OUTLINE);this.redrawPath(a,d,e,b,c,mxBpmnShape.prototype.miscEnum.SYMBOL)};
mxBpmnShape.prototype.redrawPath=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxBpmnShape.prototype.miscEnum.BACKGROUND,mxBpmnShape.prototype.eventTypeEnum.NONE);if(f==mxBpmnShape.prototype.miscEnum.BACKGROUND){if(null!=g){var h=this.backgrounds[g];null!=h&&(a.translate(d,e),h.call(this,a,d,e,b,c,f))}}else if(f==mxBpmnShape.prototype.miscEnum.OUTLINE){g===mxBpmnShape.prototype.eventTypeEnum.GATEWAY?(a.translate(b/4,c/4),c/=2,b/=2,this.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.75),!1),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.75,.75),!1)]):this.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.145,.145),!1),new mxConnectionConstraint(new mxPoint(.145,.855),!1),new mxConnectionConstraint(new mxPoint(.855,.145),!1),new mxConnectionConstraint(new mxPoint(.855,.855),!1)];var k=mxUtils.getValue(this.style,mxBpmnShape.prototype.miscEnum.OUTLINE,mxBpmnShape.prototype.eventTypeEnum.NONE);null!=k&&(h=this.outlines[k],null!=h&&h.call(this,a,d,e,b,c,g===mxBpmnShape.prototype.eventTypeEnum.GATEWAY))}else if(f==
mxBpmnShape.prototype.miscEnum.SYMBOL&&(g===mxBpmnShape.prototype.eventTypeEnum.GATEWAY&&(c/=2,b/=2),g=mxUtils.getValue(this.style,mxBpmnShape.prototype.miscEnum.SYMBOL,null),null!=g&&(h=this.symbols[g],null!=h))){var l=a.state.strokeColor,m=a.state.fillColor;k=mxUtils.getValue(this.style,mxBpmnShape.prototype.miscEnum.OUTLINE,mxBpmnShape.prototype.eventTypeEnum.NONE);g===mxBpmnShape.prototype.eventEnum.MESSAGE?(a.translate(.15*b,.3*c),b*=.7,c*=.4):g===mxBpmnShape.prototype.eventEnum.TIMER?(a.translate(.11*
b,.11*c),b*=.78,c*=.78):g===mxBpmnShape.prototype.eventEnum.ESCALATION?(a.translate(.19*b,.15*c),b*=.62,c*=.57):g===mxBpmnShape.prototype.eventEnum.CONDITIONAL?(a.translate(.3*b,.16*c),b*=.4,c*=.68):g===mxBpmnShape.prototype.eventEnum.LINK?(a.translate(.27*b,.33*c),b*=.46,c*=.34):g===mxBpmnShape.prototype.eventEnum.ERROR?(a.translate(.212*b,.243*c),b*=.58,c*=.507):g===mxBpmnShape.prototype.eventEnum.CANCEL?(a.translate(.22*b,.22*c),b*=.56,c*=.56):g===mxBpmnShape.prototype.eventEnum.COMPENSATION?(a.translate(.28*
b,.35*c),b*=.44,c*=.3):g===mxBpmnShape.prototype.eventEnum.SIGNAL?(a.translate(.19*b,.15*c),b*=.62,c*=.57):g===mxBpmnShape.prototype.eventEnum.MULTIPLE?(a.translate(.2*b,.19*c),b*=.6,c*=.565):g===mxBpmnShape.prototype.eventEnum.PAR_MULTI?(a.translate(.2*b,.2*c),b*=.6,c*=.6):g===mxBpmnShape.prototype.eventEnum.TERMINATE?(a.translate(.05*b,.05*c),b*=.9,c*=.9):g===mxBpmnShape.prototype.eventEnum.GW_EXCLUSIVE&&(a.translate(.12*b,0),b*=.76);var n=!1;if("star"===g)a.setFillColor(l);else if(k===mxBpmnShape.prototype.eventTypeEnum.THROWING||
k===mxBpmnShape.prototype.eventTypeEnum.END)a.setStrokeColor(m),a.setFillColor(l),n=!0;h.call(this,a,d,e,b,c,f,n);if("star"===g)a.setFillColor(m);else if(k===mxBpmnShape.prototype.eventTypeEnum.THROWING||k===mxBpmnShape.prototype.eventTypeEnum.END)a.setStrokeColor(l),a.setFillColor(m)}};mxBpmnShape.prototype.backgrounds={none:function(a,d,e,b,c){},gateway:function(a,d,e,b,c){a.begin();a.moveTo(b/2,0);a.lineTo(b,c/2);a.lineTo(b/2,c);a.lineTo(0,c/2);a.close();a.fillAndStroke()}};
mxBpmnShape.prototype.outlines={none:function(a,d,e,b,c,f){f||a.setShadow(!1)},standard:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1)},eventInt:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1)},eventNonint:function(a,d,e,b,c,f){d=a.state.dashed;a.setDashed(!0);a.ellipse(0,0,b,c);a.fillAndStroke();a.setDashed(d);f||a.setShadow(!1)},catching:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1);a.ellipse(2,2,b-4,c-
4);a.stroke()},boundInt:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1);a.ellipse(2,2,b-4,c-4);a.stroke()},boundNonint:function(a,d,e,b,c,f){d=a.state.dashed;a.setDashed(!0);a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1);a.ellipse(2,2,b-4,c-4);a.stroke();a.setDashed(d)},throwing:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();f||a.setShadow(!1);a.ellipse(.02*b+2,.02*c+2,.96*b-4,.96*c-4);a.stroke()},end:function(a,d,e,b,c,f){d=a.state.strokeWidth;a.setStrokeWidth(3*
d);a.ellipse(0,0,b,c);a.fillAndStroke();a.setStrokeWidth(d);f||a.setShadow(!1)}};
mxBpmnShape.prototype.symbols={general:function(a,d,e,b,c){},message:function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke();"none"===mxUtils.getValue(this.style,"fillColor","none")&&g&&a.setStrokeColor("#ffffff");a.begin();a.moveTo(0,0);a.lineTo(.5*b,.5*c);a.lineTo(b,0);a.stroke()},timer:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,.0642*c);a.moveTo(.7484*b,.0654*c);a.lineTo(.7126*b,.1281*c);a.moveTo(.93*b,.2471*c);a.lineTo(.8673*b,.2854*c);
a.moveTo(b,.5*c);a.lineTo(.9338*b,.5*c);a.moveTo(.93*b,.7509*c);a.lineTo(.8673*b,.7126*c);a.moveTo(.7484*b,.9326*c);a.lineTo(.7126*b,.8699*c);a.moveTo(.5*b,.9338*c);a.lineTo(.5*b,c);a.moveTo(.2496*b,.9325*c);a.lineTo(.2854*b,.8699*c);a.moveTo(.068*b,.7509*c);a.lineTo(.1307*b,.7126*c);a.moveTo(0,.5*c);a.lineTo(.0642*b,.5*c);a.moveTo(.068*b,.2471*c);a.lineTo(.1307*b,.2854*c);a.moveTo(.2496*b,.0654*c);a.lineTo(.2854*b,.1281*c);a.moveTo(.5246*b,.0706*c);a.lineTo(.5*b,.5*c);a.lineTo(.7804*b,.5118*c);a.stroke()},
escalation:function(a,d,e,b,c){a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.lineTo(.5*b,.5*c);a.close();a.fillAndStroke()},conditional:function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(0,.1027*c);a.lineTo(.798*b,.1027*c);a.moveTo(0,.3669*c);a.lineTo(.798*b,.3669*c);a.moveTo(0,.6311*c);a.lineTo(.798*b,.6311*c);a.moveTo(0,.8953*c);a.lineTo(.798*b,.8953*c);a.stroke()},link:function(a,d,e,b,c){a.begin();a.moveTo(0,.76*c);a.lineTo(0,.24*c);a.lineTo(.63*b,.24*c);a.lineTo(.63*
b,0);a.lineTo(b,.5*c);a.lineTo(.63*b,c);a.lineTo(.63*b,.76*c);a.close();a.fillAndStroke()},error:function(a,d,e,b,c,f,g){a.begin();a.moveTo(0,c);a.lineTo(.3287*b,.123*c);a.lineTo(.6194*b,.6342*c);a.lineTo(b,0);a.lineTo(.6625*b,.939*c);a.lineTo(.3717*b,.5064*c);a.close();g?a.fill():a.fillAndStroke()},cancel:function(a,d,e,b,c){a.begin();a.moveTo(.1051*b,0);a.lineTo(.5*b,.3738*c);a.lineTo(.8909*b,0);a.lineTo(b,.1054*c);a.lineTo(.623*b,.5*c);a.lineTo(b,.8926*c);a.lineTo(.8909*b,c);a.lineTo(.5*b,.6242*
c);a.lineTo(.1051*b,c);a.lineTo(0,.8926*c);a.lineTo(.373*b,.5*c);a.lineTo(0,.1054*c);a.close();a.fillAndStroke()},compensation:function(a,d,e,b,c){a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,0);a.lineTo(.5*b,c);a.close();a.moveTo(.5*b,.5*c);a.lineTo(b,0);a.lineTo(b,c);a.close();a.fillAndStroke()},signal:function(a,d,e,b,c){a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.close();a.fillAndStroke()},multiple:function(a,d,e,b,c){a.begin();a.moveTo(0,.39*c);a.lineTo(.5*b,0);a.lineTo(b,.39*c);a.lineTo(.815*
b,c);a.lineTo(.185*b,c);a.close();a.fillAndStroke()},parallelMultiple:function(a,d,e,b,c){a.begin();a.moveTo(.38*b,0);a.lineTo(.62*b,0);a.lineTo(.62*b,.38*c);a.lineTo(b,.38*c);a.lineTo(b,.62*c);a.lineTo(.62*b,.62*c);a.lineTo(.62*b,c);a.lineTo(.38*b,c);a.lineTo(.38*b,.62*c);a.lineTo(0,.62*c);a.lineTo(0,.38*c);a.lineTo(.38*b,.38*c);a.close();a.fillAndStroke()},terminate:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()},exclusiveGw:function(a,d,e,b,c){d=a.state.strokeColor;e=a.state.fillColor;
a.setStrokeColor(e);a.setFillColor(d);a.begin();a.moveTo(.105*b,0);a.lineTo(.5*b,.38*c);a.lineTo(.895*b,0*c);a.lineTo(b,.11*c);a.lineTo(.6172*b,.5*c);a.lineTo(b,.89*c);a.lineTo(.895*b,c);a.lineTo(.5*b,.62*c);a.lineTo(.105*b,c);a.lineTo(0,.89*c);a.lineTo(.3808*b,.5*c);a.lineTo(0,.11*c);a.close();a.fillAndStroke();a.setStrokeColor(d);a.setFillColor(e)},parallelGw:function(a,d,e,b,c){d=a.state.strokeColor;e=a.state.fillColor;a.setStrokeColor(e);a.setFillColor(d);a.begin();a.moveTo(.38*b,0);a.lineTo(.62*
b,0);a.lineTo(.62*b,.38*c);a.lineTo(b,.38*c);a.lineTo(b,.62*c);a.lineTo(.62*b,.62*c);a.lineTo(.62*b,c);a.lineTo(.38*b,c);a.lineTo(.38*b,.62*c);a.lineTo(0,.62*c);a.lineTo(0,.38*c);a.lineTo(.38*b,.38*c);a.close();a.fillAndStroke();a.setStrokeColor(d);a.setFillColor(e)},complexGw:function(a,d,e,b,c){d=a.state.strokeColor;e=a.state.fillColor;a.setStrokeColor(e);a.setFillColor(d);a.begin();a.moveTo(0,.44*c);a.lineTo(.36*b,.44*c);a.lineTo(.1*b,.18*c);a.lineTo(.18*b,.1*c);a.lineTo(.44*b,.36*c);a.lineTo(.44*
b,0);a.lineTo(.56*b,0);a.lineTo(.56*b,.36*c);a.lineTo(.82*b,.1*c);a.lineTo(.9*b,.18*c);a.lineTo(.64*b,.44*c);a.lineTo(b,.44*c);a.lineTo(b,.56*c);a.lineTo(.64*b,.56*c);a.lineTo(.9*b,.82*c);a.lineTo(.82*b,.9*c);a.lineTo(.56*b,.64*c);a.lineTo(.56*b,c);a.lineTo(.44*b,c);a.lineTo(.44*b,.64*c);a.lineTo(.18*b,.9*c);a.lineTo(.1*b,.82*c);a.lineTo(.36*b,.56*c);a.lineTo(0,.56*c);a.close();a.fillAndStroke();a.setStrokeColor(d);a.setFillColor(e)},star:function(a,d,e,b,c){a.translate(b/5,c/6);c*=2/3;b*=.6;a.begin();
a.moveTo(0,c/4);a.lineTo(b/3,c/4);a.lineTo(b/2,0);a.lineTo(2*b/3,c/4);a.lineTo(b,c/4);a.lineTo(5*b/6,c/2);a.lineTo(b,3*c/4);a.lineTo(2*b/3,3*c/4);a.lineTo(b/2,c);a.lineTo(b/3,3*c/4);a.lineTo(0,3*c/4);a.lineTo(b/6,c/2);a.close();a.fillAndStroke()}};mxCellRenderer.registerShape("mxgraph.bpmn.shape",mxBpmnShape);function mxShapeBpmn2SendMarker(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}
mxUtils.extend(mxShapeBpmn2SendMarker,mxActor);mxShapeBpmn2SendMarker.prototype.cst={SEND:"mxgraph.bpmn.sendMarker"};mxShapeBpmn2SendMarker.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(.5*b,.5*c);a.lineTo(b,0);a.stroke()};mxCellRenderer.registerShape(mxShapeBpmn2SendMarker.prototype.cst.SEND,mxShapeBpmn2SendMarker);
function mxShapeBpmnEvent(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBpmnEvent,mxShape);mxShapeBpmnEvent.prototype.eventTypeEnum={START_STANDARD:"standard",EVENT_SP_INT:"eventInt",EVENT_SP_NONINT:"eventNonint",CATCHING:"catching",BOUND_INT:"boundInt",BOUND_NONINT:"boundNonint",THROWING:"throwing",END:"end",NONE:"none"};
mxShapeBpmnEvent.prototype.eventEnum={GENERAL:"general",MESSAGE:"message",TIMER:"timer",ESCALATION:"escalation",CONDITIONAL:"conditional",LINK:"link",ERROR:"error",CANCEL:"cancel",COMPENSATION:"compensation",SIGNAL:"signal",MULTIPLE:"multiple",PAR_MULTI:"parallelMultiple",TERMINATE:"terminate"};mxShapeBpmnEvent.prototype.miscEnum={OUTLINE:"outline",SYMBOL:"symbol"};
mxShapeBpmnEvent.prototype.customProperties=[{name:mxShapeBpmnEvent.prototype.miscEnum.SYMBOL,dispName:"Event",type:"enum",defVal:mxShapeBpmnEvent.prototype.eventEnum.GENERAL,enumList:[{val:mxShapeBpmnEvent.prototype.eventEnum.GENERAL,dispName:"General"},{val:mxShapeBpmnEvent.prototype.eventEnum.MESSAGE,dispName:"Message"},{val:mxShapeBpmnEvent.prototype.eventEnum.TIMER,dispName:"Timer"},{val:mxShapeBpmnEvent.prototype.eventEnum.ESCALATION,dispName:"Escalation"},{val:mxShapeBpmnEvent.prototype.eventEnum.CONDITIONAL,
dispName:"Conditional"},{val:mxShapeBpmnEvent.prototype.eventEnum.LINK,dispName:"Link"},{val:mxShapeBpmnEvent.prototype.eventEnum.ERROR,dispName:"Error"},{val:mxShapeBpmnEvent.prototype.eventEnum.CANCEL,dispName:"Cancel"},{val:mxShapeBpmnEvent.prototype.eventEnum.COMPENSATION,dispName:"Compensation"},{val:mxShapeBpmnEvent.prototype.eventEnum.SIGNAL,dispName:"Signal"},{val:mxShapeBpmnEvent.prototype.eventEnum.MULTIPLE,dispName:"Multiple"},{val:mxShapeBpmnEvent.prototype.eventEnum.PAR_MULTI,dispName:"Parallel Multiple"},
{val:mxShapeBpmnEvent.prototype.eventEnum.TERMINATE,dispName:"Terminate"}]},{name:mxShapeBpmnEvent.prototype.miscEnum.OUTLINE,dispName:"Event Type",type:"enum",defVal:mxShapeBpmnEvent.prototype.eventTypeEnum.START_STANDARD,enumList:[{val:mxShapeBpmnEvent.prototype.eventTypeEnum.START_STANDARD,dispName:"Standard"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.EVENT_SP_INT,dispName:"Interrupting"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.EVENT_SP_NONINT,dispName:"Non-Interrupting"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.CATCHING,
dispName:"Catching"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.BOUND_INT,dispName:"Bound Interrupting"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.BOUND_NONINT,dispName:"Bound Non-Interrupting"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.THROWING,dispName:"Throwing"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.END,dispName:"End"},{val:mxShapeBpmnEvent.prototype.eventTypeEnum.NONE,dispName:"None"}]}];
mxShapeBpmnEvent.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.strictDrawShape(a,0,0,b,c,null)};
mxShapeBpmnEvent.prototype.strictDrawShape=function(a,d,e,b,c,f,g){null==f&&(f=mxUtils.getValue(this.style,this.miscEnum.OUTLINE,this.eventTypeEnum.NONE));if(null!=f){var h=mxShapeBpmnEvent.prototype.outlines[f];null!=h&&(a.translate(d,e),h.call(this,a,d,e,b,c))}null==g&&(g=mxUtils.getValue(this.style,this.miscEnum.SYMBOL,null));if(null!=g&&(h=mxShapeBpmnEvent.prototype.symbols[g],null!=h)){var k=a.state.strokeColor,l=a.state.fillColor;g===this.eventEnum.MESSAGE?(a.translate(.15*b,.3*c),b*=.7,c*=
.4):g===this.eventEnum.TIMER?(a.translate(.11*b,.11*c),b*=.78,c*=.78):g===this.eventEnum.ESCALATION?(a.translate(.19*b,.15*c),b*=.62,c*=.57):g===this.eventEnum.CONDITIONAL?(a.translate(.3*b,.16*c),b*=.4,c*=.68):g===this.eventEnum.LINK?(a.translate(.27*b,.33*c),b*=.46,c*=.34):g===this.eventEnum.ERROR?(a.translate(.212*b,.243*c),b*=.58,c*=.507):g===this.eventEnum.CANCEL?(a.translate(.22*b,.22*c),b*=.56,c*=.56):g===this.eventEnum.COMPENSATION?(a.translate(.28*b,.35*c),b*=.44,c*=.3):g===this.eventEnum.SIGNAL?
(a.translate(.19*b,.15*c),b*=.62,c*=.57):g===this.eventEnum.MULTIPLE?(a.translate(.2*b,.19*c),b*=.6,c*=.565):g===this.eventEnum.PAR_MULTI?(a.translate(.2*b,.2*c),b*=.6,c*=.6):g===this.eventEnum.TERMINATE?(a.translate(.05*b,.05*c),b*=.9,c*=.9):g===this.eventEnum.GW_EXCLUSIVE&&(a.translate(.12*b,0),b*=.76);var m=!1;if("star"===g)a.setFillColor(k);else if(f===this.eventTypeEnum.THROWING||f===this.eventTypeEnum.END)a.setStrokeColor(l),a.setFillColor(k),m=!0;h.call(this,a,d,e,b,c,m);if("star"===g)a.setFillColor(l);
else if(f===this.eventTypeEnum.THROWING||f===this.eventTypeEnum.END)a.setStrokeColor(k),a.setFillColor(l)}};
mxShapeBpmnEvent.prototype.outlines={none:function(a,d,e,b,c){a.setShadow(!1)},standard:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1)},eventInt:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1)},eventNonint:function(a,d,e,b,c){d=a.state.dashed;a.setDashed(!0);a.ellipse(0,0,b,c);a.fillAndStroke();a.setDashed(d);a.setShadow(!1)},catching:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.ellipse(2,2,b-4,c-4);a.stroke()},boundInt:function(a,
d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.ellipse(2,2,b-4,c-4);a.stroke()},boundNonint:function(a,d,e,b,c){d=a.state.dashed;a.setDashed(!0);a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.ellipse(2,2,b-4,c-4);a.stroke();a.setDashed(d)},throwing:function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.ellipse(.02*b+2,.02*c+2,.96*b-4,.96*c-4);a.stroke()},end:function(a,d,e,b,c){d=a.state.strokeWidth;a.setStrokeWidth(3*d);a.ellipse(0,0,b,c);a.fillAndStroke();
a.setStrokeWidth(d);a.setShadow(!1)}};
mxShapeBpmnEvent.prototype.symbols={general:function(a,d,e,b,c,f){},message:function(a,d,e,b,c,f){a.rect(0,0,b,c);a.fillAndStroke();"none"===mxUtils.getValue(this.style,"fillColor","none")&&f&&a.setStrokeColor("#ffffff");a.begin();a.moveTo(0,0);a.lineTo(.5*b,.5*c);a.lineTo(b,0);a.stroke()},timer:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,.0642*c);a.moveTo(.7484*b,.0654*c);a.lineTo(.7126*b,.1281*c);a.moveTo(.93*b,.2471*c);a.lineTo(.8673*b,.2854*
c);a.moveTo(b,.5*c);a.lineTo(.9338*b,.5*c);a.moveTo(.93*b,.7509*c);a.lineTo(.8673*b,.7126*c);a.moveTo(.7484*b,.9326*c);a.lineTo(.7126*b,.8699*c);a.moveTo(.5*b,.9338*c);a.lineTo(.5*b,c);a.moveTo(.2496*b,.9325*c);a.lineTo(.2854*b,.8699*c);a.moveTo(.068*b,.7509*c);a.lineTo(.1307*b,.7126*c);a.moveTo(0,.5*c);a.lineTo(.0642*b,.5*c);a.moveTo(.068*b,.2471*c);a.lineTo(.1307*b,.2854*c);a.moveTo(.2496*b,.0654*c);a.lineTo(.2854*b,.1281*c);a.moveTo(.5246*b,.0706*c);a.lineTo(.5*b,.5*c);a.lineTo(.7804*b,.5118*c);
a.stroke()},escalation:function(a,d,e,b,c,f){a.setMiterLimit(6);a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.lineTo(.5*b,.5*c);a.close();f?a.fill():a.fillAndStroke()},conditional:function(a,d,e,b,c,f){a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(0,.1027*c);a.lineTo(.798*b,.1027*c);a.moveTo(0,.3669*c);a.lineTo(.798*b,.3669*c);a.moveTo(0,.6311*c);a.lineTo(.798*b,.6311*c);a.moveTo(0,.8953*c);a.lineTo(.798*b,.8953*c);a.stroke()},link:function(a,d,e,b,c,f){a.begin();a.moveTo(0,.76*
c);a.lineTo(0,.24*c);a.lineTo(.63*b,.24*c);a.lineTo(.63*b,0);a.lineTo(b,.5*c);a.lineTo(.63*b,c);a.lineTo(.63*b,.76*c);a.close();f?a.fill():a.fillAndStroke()},error:function(a,d,e,b,c,f){a.setMiterLimit(7);a.begin();a.moveTo(0,c);a.lineTo(.3287*b,.123*c);a.lineTo(.6194*b,.6342*c);a.lineTo(b,0);a.lineTo(.6625*b,.939*c);a.lineTo(.3717*b,.5064*c);a.close();f?a.fill():a.fillAndStroke()},cancel:function(a,d,e,b,c,f){a.begin();a.moveTo(.1051*b,0);a.lineTo(.5*b,.3738*c);a.lineTo(.8909*b,0);a.lineTo(b,.1054*
c);a.lineTo(.623*b,.5*c);a.lineTo(b,.8926*c);a.lineTo(.8909*b,c);a.lineTo(.5*b,.6242*c);a.lineTo(.1051*b,c);a.lineTo(0,.8926*c);a.lineTo(.373*b,.5*c);a.lineTo(0,.1054*c);a.close();f?a.fill():a.fillAndStroke()},compensation:function(a,d,e,b,c,f){a.setMiterLimit(1);a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,0);a.lineTo(.5*b,c);a.close();a.moveTo(.5*b,.5*c);a.lineTo(b,0);a.lineTo(b,c);a.close();f?a.fill():a.fillAndStroke()},signal:function(a,d,e,b,c,f){a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,
c);a.close();f?a.fill():a.fillAndStroke()},multiple:function(a,d,e,b,c,f){a.begin();a.moveTo(0,.39*c);a.lineTo(.5*b,0);a.lineTo(b,.39*c);a.lineTo(.815*b,c);a.lineTo(.185*b,c);a.close();f?a.fill():a.fillAndStroke()},parallelMultiple:function(a,d,e,b,c,f){a.begin();a.moveTo(.38*b,0);a.lineTo(.62*b,0);a.lineTo(.62*b,.38*c);a.lineTo(b,.38*c);a.lineTo(b,.62*c);a.lineTo(.62*b,.62*c);a.lineTo(.62*b,c);a.lineTo(.38*b,c);a.lineTo(.38*b,.62*c);a.lineTo(0,.62*c);a.lineTo(0,.38*c);a.lineTo(.38*b,.38*c);a.close();
f?a.fill():a.fillAndStroke()},terminate:function(a,d,e,b,c,f){a.ellipse(0,0,b,c);a.fillAndStroke()},star:function(a,d,e,b,c,f){a.translate(b/5,c/6);c*=2/3;b*=.6;a.begin();a.moveTo(0,c/4);a.lineTo(b/3,c/4);a.lineTo(b/2,0);a.lineTo(2*b/3,c/4);a.lineTo(b,c/4);a.lineTo(5*b/6,c/2);a.lineTo(b,3*c/4);a.lineTo(2*b/3,3*c/4);a.lineTo(b/2,c);a.lineTo(b/3,3*c/4);a.lineTo(0,3*c/4);a.lineTo(b/6,c/2);a.close();a.fillAndStroke()}};mxCellRenderer.registerShape("mxgraph.bpmn.event",mxShapeBpmnEvent);
function mxShapeBpmnGateway(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBpmnGateway,mxShape);mxShapeBpmnGateway.prototype.customProperties=mxShapeBpmnEvent.prototype.customProperties;mxShapeBpmnGateway.prototype.eventTypeEnum=mxShapeBpmnEvent.prototype.eventTypeEnum;mxShapeBpmnGateway.prototype.eventEnum=mxShapeBpmnEvent.prototype.eventEnum;mxShapeBpmnGateway.prototype.miscEnum=mxShapeBpmnEvent.prototype.miscEnum;
mxShapeBpmnGateway.prototype.customProperties=mxShapeBpmnGateway.prototype.customProperties.concat({name:"gwType",dispName:"Gateway type",type:"enum",defVal:"event",enumList:[{val:"event",dispName:"Event-based"},{val:"exclusive",dispName:"Exclusive"},{val:"parallel",dispName:"Parallel"},{val:"complex",dispName:"Complex"}]});
mxShapeBpmnGateway.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.5*b,0);a.lineTo(b,.5*c);a.lineTo(.5*b,c);a.lineTo(0,.5*c);a.close();a.fillAndStroke();a.setShadow(!1);var f=.6*b,g=.6*c,h=mxUtils.getValue(this.style,"gwType","event"),k=mxUtils.getValue(this.style,"outline","none"),l=mxUtils.getValue(this.style,"symbol","standard");d=.5*b;e=.5*c;"event"===h&&null!==k&&"none"!==k?mxShapeBpmnEvent.prototype.strictDrawShape.call(this,a,.5*(b-f),.5*(c-g),f,g,k,l):"exclusive"==
h?(a.translate(.31*b,.25*c),d*=.76,b=a.state.strokeColor,c=a.state.fillColor,a.setFillColor(b),a.begin(),a.moveTo(.105*d,0),a.lineTo(.5*d,.38*e),a.lineTo(.895*d,0*e),a.lineTo(d,.11*e),a.lineTo(.6172*d,.5*e),a.lineTo(d,.89*e),a.lineTo(.895*d,e),a.lineTo(.5*d,.62*e),a.lineTo(.105*d,e),a.lineTo(0,.89*e),a.lineTo(.3808*d,.5*e),a.lineTo(0,.11*e),a.close(),a.fillAndStroke(),a.setFillColor(c),a.translate(.12*-d,0)):"parallel"==h?(a.translate(.25*b,.25*c),b=a.state.strokeColor,c=a.state.fillColor,a.setFillColor(b),
a.begin(),a.moveTo(.38*d,0),a.lineTo(.62*d,0),a.lineTo(.62*d,.38*e),a.lineTo(d,.38*e),a.lineTo(d,.62*e),a.lineTo(.62*d,.62*e),a.lineTo(.62*d,e),a.lineTo(.38*d,e),a.lineTo(.38*d,.62*e),a.lineTo(0,.62*e),a.lineTo(0,.38*e),a.lineTo(.38*d,.38*e),a.close(),a.fillAndStroke(),a.setFillColor(c)):"complex"==h&&(a.translate(.25*b,.25*c),b=a.state.strokeColor,c=a.state.fillColor,a.setFillColor(b),a.begin(),a.moveTo(0,.44*e),a.lineTo(.36*d,.44*e),a.lineTo(.1*d,.18*e),a.lineTo(.18*d,.1*e),a.lineTo(.44*d,.36*e),
a.lineTo(.44*d,0),a.lineTo(.56*d,0),a.lineTo(.56*d,.36*e),a.lineTo(.82*d,.1*e),a.lineTo(.9*d,.18*e),a.lineTo(.64*d,.44*e),a.lineTo(d,.44*e),a.lineTo(d,.56*e),a.lineTo(.64*d,.56*e),a.lineTo(.9*d,.82*e),a.lineTo(.82*d,.9*e),a.lineTo(.56*d,.64*e),a.lineTo(.56*d,e),a.lineTo(.44*d,e),a.lineTo(.44*d,.64*e),a.lineTo(.18*d,.9*e),a.lineTo(.1*d,.82*e),a.lineTo(.36*d,.56*e),a.lineTo(0,.56*e),a.close(),a.fillAndStroke(),a.setFillColor(c))};mxCellRenderer.registerShape("mxgraph.bpmn.gateway2",mxShapeBpmnGateway);
function mxShapeBpmn2Task(a,d,e,b){mxCellRenderer.prototype.getShape("mxgraph.basic.rect").call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeBpmn2Task,mxCellRenderer.prototype.getShape("mxgraph.basic.rect"));
mxShapeBpmn2Task.prototype.customProperties=[{name:"bpmnShapeType",dispName:"Type",defVal:"task",type:"enum",enumList:[{val:"task",dispName:"Task"},{val:"transaction",dispName:"Transaction"},{val:"call",dispName:"Call"},{val:"subprocess",dispName:"Sub-Process"}]},{name:"taskMarker",dispName:"Task Marker",defVal:"abstract",type:"enum",enumList:[{val:"abstract",dispName:"Abstract"},{val:"service",dispName:"Service"},{val:"send",dispName:"Send"},{val:"receive",dispName:"Receive"},{val:"user",dispName:"User"},
{val:"nime",dispName:"Non-Interrupting Message Event"},{val:"manual",dispName:"Manual"},{val:"businessRule",dispName:"Business Rule"},{val:"script",dispName:"Script"}]},{name:"isLoopSub",dispName:"Subprocess",type:"bool"},{name:"isLoopStandard",dispName:"Standard Loop",type:"bool"},{name:"isLoopMultiParallel",dispName:"Multi-Instance Parallel Loop",type:"bool"},{name:"isLoopMultiSeq",dispName:"Multi-Instance Sequential Loop",type:"bool"},{name:"isLoopComp",dispName:"Compensation Loop",type:"bool"},
{name:"isAdHoc",dispName:"Ad Hoc",type:"bool"}];mxShapeBpmn2Task.prototype.customProperties=mxShapeBpmn2Task.prototype.customProperties.concat(mxShapeBpmnEvent.prototype.customProperties);mxShapeBpmn2Task.prototype.customProperties=mxShapeBpmn2Task.prototype.customProperties.concat(mxCellRenderer.prototype.getShape("mxgraph.basic.rect").prototype.customProperties);mxShapeBpmn2Task.prototype.eventTypeEnum=mxShapeBpmnEvent.prototype.eventTypeEnum;mxShapeBpmn2Task.prototype.eventEnum=mxShapeBpmnEvent.prototype.eventEnum;
mxShapeBpmn2Task.prototype.miscEnum=mxShapeBpmnEvent.prototype.miscEnum;mxShapeBpmn2Task.prototype.cst={TASK:"mxgraph.bpmn.task"};
mxShapeBpmn2Task.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"bpmnShapeType","task"),g=mxUtils.getValue(this.style,"taskMarker","abstract"),h=mxUtils.getValue(this.style,"strokeWidth",1),k=mxUtils.getValue(this.style,"dashed",!1),l=mxUtils.getValue(this.style,"indent",3),m=14;mxUtils.getValue(this.style,"rectOutline","single");a.translate(d,e);d=mxCellRenderer.prototype.getShape("mxgraph.basic.rect");e={};"transaction"==f?(m+=l,e.rectOutline="double",e.indent=
3):"subprocess"==f?e.dashed=!0:"call"==f&&(e.strokeWidth=4);d.prototype.strictDrawShape.call(this,a,0,0,b,c,e);a.setStrokeWidth(h);a.setDashed(k);"call"==f&&a.setStrokeWidth(h);a.setDashed(!1);a.setShadow(!1);h=mxUtils.getValue(this.style,"isLoopSub",!1);var n=mxUtils.getValue(this.style,"isLoopStandard",!1);k=mxUtils.getValue(this.style,"isLoopMultiParallel",!1);l=mxUtils.getValue(this.style,"isLoopMultiSeq",!1);d=mxUtils.getValue(this.style,"isLoopComp",!1);e=mxUtils.getValue(this.style,"isAdHoc",
!1);f=0;n&&f++;k&&f++;l&&f++;d&&f++;h&&f++;e&&f++;f*=-7;n&&(n=mxStencilRegistry.getStencil("mxgraph.bpmn.loop"),null!=n&&(n.drawShape(a,this,.5*b+f+1,c-m+1,12,12),f+=14));k&&(a.translate(.5*b+f+1,c-m+1),a.begin(),a.moveTo(2.4,0),a.lineTo(2.4,12),a.moveTo(6,0),a.lineTo(6,12),a.moveTo(9.6,0),a.lineTo(9.6,12),a.stroke(),a.translate(.5*-b-f-1,m-1-c),f+=14);l&&(a.translate(.5*b+f+1,c-m+1),a.begin(),a.moveTo(0,2.4),a.lineTo(12,2.4),a.moveTo(0,6),a.lineTo(12,6),a.moveTo(0,9.6),a.lineTo(12,9.6),a.stroke(),
a.translate(.5*-b-f-1,m-1-c),f+=14);d&&(n=mxStencilRegistry.getStencil("mxgraph.bpmn.compensation"),null!=n&&(n.drawShape(a,this,.5*b+f,c-m+1,14,12),f+=14));h&&(a.translate(.5*b+f,c-m),a.rect(0,0,14,14),a.stroke(),a.begin(),a.moveTo(4,7),a.lineTo(10,7),a.moveTo(7,4),a.lineTo(7,10),a.stroke(),a.translate(.5*-b-f,m-c),f+=14);e&&(n=mxStencilRegistry.getStencil("mxgraph.bpmn.ad_hoc"),null!=n&&(h=mxUtils.getValue(this.style,"strokeColor","#000000"),k=mxUtils.getValue(this.style,"fillColor","#ffffff"),
a.setStrokeColor("none"),a.setFillColor(h),n.drawShape(a,this,.5*b+f+1,c-m+4,12,6),a.setStrokeColor(h),a.setFillColor(k)));switch(g){case "service":a.setFillColor(mxUtils.getValue(this.style,"fillColor","#ffffff"));n=mxStencilRegistry.getStencil("mxgraph.bpmn.service_task");null!=n&&n.drawShape(a,this,2,2,16,16);break;case "send":h=mxUtils.getValue(this.style,"strokeColor","#000000");k=mxUtils.getValue(this.style,"fillColor","#ffffff");a.setStrokeColor(k);a.setFillColor(h);mxShapeBpmn2SendMarker.prototype.paintVertexShape(a,
4,4,18,13);break;case "receive":mxShapeBpmn2SendMarker.prototype.paintVertexShape(a,4,4,18,13);break;case "user":n=mxStencilRegistry.getStencil("mxgraph.bpmn.user_task");null!=n&&n.drawShape(a,this,2,2,16,16);break;case "manual":n=mxStencilRegistry.getStencil("mxgraph.bpmn.manual_task");null!=n&&n.drawShape(a,this,3,3,18,14);break;case "businessRule":n=mxStencilRegistry.getStencil("mxgraph.bpmn.business_rule_task");null!=n&&n.drawShape(a,this,4,4,18,14);break;case "script":n=mxStencilRegistry.getStencil("mxgraph.bpmn.script_task"),
null!=n&&n.drawShape(a,this,3,3,19,18)}b=mxUtils.getValue(this.style,"outline","none");c=mxUtils.getValue(this.style,"symbol","standard");mxShapeBpmnEvent.prototype.strictDrawShape.call(this,a,0,0,20,20,b,c)};mxCellRenderer.registerShape(mxShapeBpmn2Task.prototype.cst.TASK,mxShapeBpmn2Task);function mxShapeBpmn2Task2(a,d,e,b){mxCellRenderer.prototype.getShape("mxgraph.basic.rect").call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}
mxUtils.extend(mxShapeBpmn2Task2,mxCellRenderer.prototype.getShape("mxgraph.basic.rect"));
mxShapeBpmn2Task2.prototype.customProperties=[{name:"bpmnShapeType",dispName:"Type",defVal:"task",type:"enum",enumList:[{val:"task",dispName:"Task"},{val:"transaction",dispName:"Transaction"},{val:"call",dispName:"Call"},{val:"subprocess",dispName:"Sub-Process"}]},{name:"taskMarker",dispName:"Task Marker",defVal:"abstract",type:"enum",enumList:[{val:"abstract",dispName:"Abstract"},{val:"service",dispName:"Service"},{val:"send",dispName:"Send"},{val:"receive",dispName:"Receive"},{val:"user",dispName:"User"},
{val:"nime",dispName:"Non-Interrupting Message Event"},{val:"manual",dispName:"Manual"},{val:"businessRule",dispName:"Business Rule"},{val:"script",dispName:"Script"}]},{name:"isLoopSub",dispName:"Subprocess",type:"bool"},{name:"isLoopStandard",dispName:"Standard Loop",type:"bool"},{name:"isLoopMultiParallel",dispName:"Multi-Instance Parallel Loop",type:"bool"},{name:"isLoopMultiSeq",dispName:"Multi-Instance Sequential Loop",type:"bool"},{name:"isLoopComp",dispName:"Compensation Loop",type:"bool"},
{name:"isAdHoc",dispName:"Ad Hoc",type:"bool"}];mxShapeBpmn2Task2.prototype.customProperties=mxShapeBpmn2Task2.prototype.customProperties.concat(mxShapeBpmnEvent.prototype.customProperties);mxShapeBpmn2Task2.prototype.customProperties=mxShapeBpmn2Task2.prototype.customProperties.concat(mxCellRenderer.prototype.getShape("mxgraph.basic.rect").prototype.customProperties);mxShapeBpmn2Task2.prototype.eventTypeEnum=mxShapeBpmnEvent.prototype.eventTypeEnum;mxShapeBpmn2Task2.prototype.eventEnum=mxShapeBpmnEvent.prototype.eventEnum;
mxShapeBpmn2Task2.prototype.miscEnum=mxShapeBpmnEvent.prototype.miscEnum;mxShapeBpmn2Task2.prototype.cst={TASK:"mxgraph.bpmn.task2"};
mxShapeBpmn2Task2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"bpmnShapeType","task"),g=mxUtils.getValue(this.style,"taskMarker","abstract"),h=mxUtils.getValue(this.style,"strokeWidth",1),k=mxUtils.getValue(this.style,"dashed",!1),l=mxUtils.getValue(this.style,"indent",3),m=14+.5*h;"call"==f&&(m=14+2*h);mxUtils.getValue(this.style,"rectOutline","single");a.translate(d,e);d=mxCellRenderer.prototype.getShape("mxgraph.basic.rect");e={};"transaction"==f?(m+=l,e.rectOutline=
"double",e.indent=3):"subprocess"==f?e.dashed=!0:"call"==f&&(e.strokeWidth=4*h);d.prototype.strictDrawShape.call(this,a,0,0,b,c,e);a.setStrokeWidth(h);a.setDashed(k);"call"==f&&a.setStrokeWidth(h);a.setDashed(!1);a.setShadow(!1);e=mxUtils.getValue(this.style,"isLoopSub",!1);l=mxUtils.getValue(this.style,"isLoopStandard",!1);var n=mxUtils.getValue(this.style,"isLoopMultiParallel",!1),p=mxUtils.getValue(this.style,"isLoopMultiSeq",!1),q=mxUtils.getValue(this.style,"isLoopComp",!1),t=mxUtils.getValue(this.style,
"isAdHoc",!1);k=0;l&&k++;n&&k++;p&&k++;q&&k++;e&&k++;t&&k++;k*=-7;a.setStrokeWidth(1);l&&(l=mxStencilRegistry.getStencil("mxgraph.bpmn.loop"),null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},l.drawShape(a,this,.5*b+k+1,c-m+1,12,12),a.setStrokeWidth=d,k+=14));n&&(a.translate(.5*b+k+1,c-m+1),a.begin(),a.moveTo(2.4,0),a.lineTo(2.4,12),a.moveTo(6,0),a.lineTo(6,12),a.moveTo(9.6,0),a.lineTo(9.6,12),a.stroke(),a.translate(.5*-b-k-1,m-1-c),k+=14);p&&(a.translate(.5*b+k+1,c-m+1),a.begin(),a.moveTo(0,
2.4),a.lineTo(12,2.4),a.moveTo(0,6),a.lineTo(12,6),a.moveTo(0,9.6),a.lineTo(12,9.6),a.stroke(),a.translate(.5*-b-k-1,m-1-c),k+=14);q&&(l=mxStencilRegistry.getStencil("mxgraph.bpmn.compensation"),null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},l.drawShape(a,this,.5*b+k,c-m+1,14,12),a.setStrokeWidth=d,k+=14));e&&(a.translate(.5*b+k,c-m),a.rect(0,0,14,14),a.stroke(),a.begin(),a.moveTo(4,7),a.lineTo(10,7),a.moveTo(7,4),a.lineTo(7,10),a.stroke(),a.translate(.5*-b-k,m-c),k+=14);t&&(l=mxStencilRegistry.getStencil("mxgraph.bpmn.ad_hoc"),
null!=l&&(d=mxUtils.getValue(this.style,"strokeColor","#000000"),e=mxUtils.getValue(this.style,"fillColor","#ffffff"),a.setStrokeColor("none"),a.setFillColor(d),l.drawShape(a,this,.5*b+k+1,c-m+4,12,6),k+=14,a.setStrokeColor(d),a.setFillColor(e),a.setStrokeWidth(1)));b=.5*h;"call"==f&&(b=2*h);switch(g){case "service":a.setFillColor(mxUtils.getValue(this.style,"fillColor","#ffffff"));l=mxStencilRegistry.getStencil("mxgraph.bpmn.service_task");null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},
l.drawShape(a,this,b+2,b+2,16,16),a.setStrokeWidth=d);break;case "send":d=mxUtils.getValue(this.style,"strokeColor","#000000");e=mxUtils.getValue(this.style,"fillColor","#ffffff");a.setStrokeColor(e);a.setFillColor(d);mxShapeBpmn2SendMarker.prototype.paintVertexShape(a,b+4,b+4,18,13);break;case "receive":mxShapeBpmn2SendMarker.prototype.paintVertexShape(a,b+4,b+4,18,13);break;case "user":l=mxStencilRegistry.getStencil("mxgraph.bpmn.user_task");null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},
l.drawShape(a,this,b+2,b+2,16,16),a.setStrokeWidth=d);break;case "manual":l=mxStencilRegistry.getStencil("mxgraph.bpmn.manual_task");null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},l.drawShape(a,this,b+3,b+3,18,14),a.setStrokeWidth=d);break;case "businessRule":l=mxStencilRegistry.getStencil("mxgraph.bpmn.business_rule_task");null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},l.drawShape(a,this,b+4,b+4,18,14),a.setStrokeWidth=d);break;case "script":l=mxStencilRegistry.getStencil("mxgraph.bpmn.script_task"),
null!=l&&(d=a.setStrokeWidth,a.setStrokeWidth=function(){},l.drawShape(a,this,b+3,b+3,19,18),a.setStrokeWidth=d)}f=mxUtils.getValue(this.style,"outline","none");g=mxUtils.getValue(this.style,"symbol","standard");d=a.setStrokeWidth;a.setStrokeWidth=function(){};mxShapeBpmnEvent.prototype.strictDrawShape.call(this,a,b,b,20,20,f,g);a.setStrokeWidth=d};mxCellRenderer.registerShape(mxShapeBpmn2Task2.prototype.cst.TASK,mxShapeBpmn2Task2);
function mxShapeBpmn2Data(a,d,e,b){mxCellRenderer.prototype.getShape("note").call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeBpmn2Data,mxCellRenderer.prototype.getShape("note"));mxShapeBpmn2Data.prototype.cst={DATA:"mxgraph.bpmn.data"};
mxShapeBpmn2Data.prototype.customProperties=[{name:"bpmnTransferType",dispName:"Transfer Type",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"input",dispName:"Input"},{val:"output",dispName:"Output"}]},{name:"isCollection",dispName:"Collection",type:"bool"}];
mxShapeBpmn2Data.prototype.paintVertexShape=function(a,d,e,b,c){mxCellRenderer.prototype.getShape("note").prototype.paintVertexShape.call(this,a,d,e,b,c);e=mxUtils.getValue(this.style,"bpmnTransferType","none");d=mxUtils.getValue(this.style,"isCollection",!1);a.setShadow(!1);if("input"===e||"output"===e)if(a.translate(3,3),a.begin(),a.moveTo(0,12*.3),a.lineTo(14*.55,12*.3),a.lineTo(14*.55,0),a.lineTo(14,6),a.lineTo(14*.55,12),a.lineTo(14*.55,12*.7),a.lineTo(0,12*.7),a.close(),a.translate(-3,-3),"input"===
e)a.stroke();else{e=mxUtils.getValue(this.style,"fillColor","#ffffff");var f=mxUtils.getValue(this.style,"strokeColor","#000000");a.setFillColor(f);a.fillAndStroke();a.setFillColor(e)}d&&(a.translate(.5*b-6,c-12),a.begin(),a.moveTo(2.4,0),a.lineTo(2.4,12),a.moveTo(6,0),a.lineTo(6,12),a.moveTo(9.6,0),a.lineTo(9.6,12),a.stroke(),a.translate(.5*-b+6,-c+12))};mxCellRenderer.registerShape(mxShapeBpmn2Data.prototype.cst.DATA,mxShapeBpmn2Data);Graph.handleFactory[mxShapeBpmn2Data.prototype.cst.DATA]=Graph.handleFactory.note;
function mxShapeBpmn2Data2(a,d,e,b){mxCellRenderer.prototype.getShape("note").call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeBpmn2Data2,mxCellRenderer.prototype.getShape("note"));mxShapeBpmn2Data2.prototype.cst={DATA:"mxgraph.bpmn.data2"};
mxShapeBpmn2Data2.prototype.customProperties=[{name:"bpmnTransferType",dispName:"Transfer Type",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"input",dispName:"Input"},{val:"output",dispName:"Output"}]},{name:"isCollection",dispName:"Collection",type:"bool"}];
mxShapeBpmn2Data2.prototype.paintVertexShape=function(a,d,e,b,c){mxCellRenderer.prototype.getShape("note").prototype.paintVertexShape.call(this,a,d,e,b,c);var f=mxUtils.getValue(this.style,"bpmnTransferType","none");d=mxUtils.getValue(this.style,"isCollection",!1);e=mxUtils.getValue(this.style,"strokeWidth",1);a.setShadow(!1);a.setStrokeWidth(1);if("input"===f||"output"===f){var g=3+.5*e,h=3+.5*e;a.translate(g,h);a.begin();a.moveTo(0,12*.3);a.lineTo(14*.55,12*.3);a.lineTo(14*.55,0);a.lineTo(14,6);
a.lineTo(14*.55,12);a.lineTo(14*.55,12*.7);a.lineTo(0,12*.7);a.close();a.translate(-g,-h);"input"===f?a.stroke():(f=mxUtils.getValue(this.style,"fillColor","#ffffff"),g=mxUtils.getValue(this.style,"strokeColor","#000000"),a.setFillColor(g),a.fillAndStroke(),a.setFillColor(f))}d&&(a.translate(.5*b-6,c-12-.5*e),a.begin(),a.moveTo(2.4,0),a.lineTo(2.4,12),a.moveTo(6,0),a.lineTo(6,12),a.moveTo(9.6,0),a.lineTo(9.6,12),a.stroke(),a.translate(.5*-b+6,-c+12))};
mxCellRenderer.registerShape(mxShapeBpmn2Data2.prototype.cst.DATA,mxShapeBpmn2Data2);Graph.handleFactory[mxShapeBpmn2Data2.prototype.cst.DATA]=Graph.handleFactory.note;function mxShapeBpmn2Swimlane(a,d,e,b){mxCellRenderer.prototype.getShape("note").call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeBpmn2Swimlane,mxSwimlane);mxShapeBpmn2Swimlane.prototype.cst={SWIMLANE:"mxgraph.bpmn.swimlane"};
mxShapeBpmn2Swimlane.prototype.customProperties=[{name:"isCollection",dispName:"Collection",type:"bool"}];mxShapeBpmn2Swimlane.prototype.paintVertexShape=function(a,d,e,b,c){mxSwimlane.prototype.paintVertexShape.call(this,a,d,e,b,c);d=mxUtils.getValue(this.style,"isCollection",!1);a.setShadow(!1);d&&(a.translate(.5*b-6,c-12),a.begin(),a.moveTo(2.4,0),a.lineTo(2.4,12),a.moveTo(6,0),a.lineTo(6,12),a.moveTo(9.6,0),a.lineTo(9.6,12),a.stroke(),a.translate(.5*-b+6,-c+12))};
mxCellRenderer.registerShape(mxShapeBpmn2Swimlane.prototype.cst.SWIMLANE,mxShapeBpmn2Swimlane);Graph.handleFactory[mxShapeBpmn2Swimlane.prototype.cst.SWIMLANE]=Graph.handleFactory.swimlane;function mxShapeBpmn2Conversation(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBpmn2Conversation,mxHexagon);
mxShapeBpmn2Conversation.prototype.customProperties=[{name:"bpmnConversationType",dispName:"Type",defVal:"conv",type:"enum",enumList:[{val:"conv",dispName:"Conversation"},{val:"call",dispName:"Call"}]},{name:"isLoopSub",dispName:"Subprocess",type:"bool"}];mxShapeBpmn2Conversation.prototype.cst={CONVERSATION:"mxgraph.bpmn.conversation"};
mxShapeBpmn2Conversation.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"bpmnConversationType","conv"),g=mxUtils.getValue(this.style,"strokeWidth",1);"call"==f&&a.setStrokeWidth(4*g);a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.75*b,c);a.lineTo(.25*b,c);a.close();a.fillAndStroke();"call"==f&&a.setStrokeWidth(g);mxUtils.getValue(this.style,"isLoopSub",!1)&&(a.translate(.5*b-7,c-14),a.rect(0,0,14,14),a.stroke(),
a.begin(),a.moveTo(4,7),a.lineTo(10,7),a.moveTo(7,4),a.lineTo(7,10),a.stroke())};mxCellRenderer.registerShape(mxShapeBpmn2Conversation.prototype.cst.CONVERSATION,mxShapeBpmn2Conversation);function mxShapeBpmn2Conversation2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBpmn2Conversation2,mxHexagon);
mxShapeBpmn2Conversation2.prototype.customProperties=[{name:"bpmnConversationType",dispName:"Type",defVal:"conv",type:"enum",enumList:[{val:"conv",dispName:"Conversation"},{val:"call",dispName:"Call"}]},{name:"isLoopSub",dispName:"Subprocess",type:"bool"}];mxShapeBpmn2Conversation2.prototype.cst={CONVERSATION:"mxgraph.bpmn.conversation2"};
mxShapeBpmn2Conversation2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"bpmnConversationType","conv"),g=mxUtils.getValue(this.style,"strokeWidth",1);"call"==f&&a.setStrokeWidth(4*g);a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.75*b,c);a.lineTo(.25*b,c);a.close();a.fillAndStroke();a.setStrokeWidth(1);mxUtils.getValue(this.style,"isLoopSub",!1)&&("call"==f?a.translate(.5*b-7,c-14-2*g):a.translate(.5*b-
7,c-14-.5*g),a.rect(0,0,14,14),a.stroke(),a.begin(),a.moveTo(4,7),a.lineTo(10,7),a.moveTo(7,4),a.lineTo(7,10),a.stroke())};mxCellRenderer.registerShape(mxShapeBpmn2Conversation2.prototype.cst.CONVERSATION,mxShapeBpmn2Conversation2);function mxShapeEmoji(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEmoji,mxShape);mxShapeEmoji.prototype.EMOJI_NAME="emoji";
mxShapeEmoji.prototype.emojis={grinning_face:"\ud83d\ude00",grinning_face_with_big_eyes:"\ud83d\ude03",grinning_face_with_smiling_eyes:"\ud83d\ude04",beaming_face_with_smiling_eyes:"\ud83d\ude01",grinning_squinting_face:"\ud83d\ude06",grinning_face_with_sweat:"\ud83d\ude05",rolling_on_the_floor_laughing:"\ud83e\udd23",face_with_tears_of_joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",winking_face:"\ud83d\ude09",smiling_face_with_smiling_eyes:"\ud83d\ude0a",
smiling_face_with_halo:"\ud83d\ude07",smiling_face_with_hearts:"\ud83e\udd70",smiling_face_with_heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",face_blowing_a_kiss:"\ud83d\ude18",kissing_face:"\ud83d\ude17",smiling_face:"☺️",kissing_face_with_closed_eyes:"\ud83d\ude1a",kissing_face_with_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",face_savoring_food:"\ud83d\ude0b",face_with_tongue:"\ud83d\ude1b",winking_face_with_tongue:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",squinting_face_with_tongue:"\ud83d\ude1d",
money_mouth_face:"\ud83e\udd11",smiling_face_with_open_hands:"\ud83e\udd17",face_with_hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking_face:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",face_with_raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless_face:"\ud83d\ude11",face_without_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\ud83c\udf2b",
smirking_face:"\ud83d\ude0f",unamused_face:"\ud83d\ude12",face_with_rolling_eyes:"\ud83d\ude44",grimacing_face:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved_face:"\ud83d\ude0c",pensive_face:"\ud83d\ude14",sleepy_face:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping_face:"\ud83d\ude34",face_with_medical_mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",
face_vomiting:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",face_with_crossed_out_eyes:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",smiling_face_with_sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",face_with_monocle:"\ud83e\uddd0",confused_face:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",
worried_face:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"☹️",face_with_open_mouth:"\ud83d\ude2e",hushed_face:"\ud83d\ude2f",astonished_face:"\ud83d\ude32",flushed_face:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning_face_with_open_mouth:"\ud83d\ude26",anguished_face:"\ud83d\ude27",fearful_face:"\ud83d\ude28",anxious_face_with_sweat:"\ud83d\ude30",sad_but_relieved_face:"\ud83d\ude25",crying_face:"\ud83d\ude22",loudly_crying_face:"\ud83d\ude2d",
face_screaming_in_fear:"\ud83d\ude31",confounded_face:"\ud83d\ude16",persevering_face:"\ud83d\ude23",disappointed_face:"\ud83d\ude1e",downcast_face_with_sweat:"\ud83d\ude13",weary_face:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",face_with_steam_from_nose:"\ud83d\ude24",enraged_face:"\ud83d\ude21",angry_face:"\ud83d\ude20",face_with_symbols_on_mouth:"\ud83e\udd2c",smiling_face_with_horns:"\ud83d\ude08",angry_face_with_horns:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"☠️",
pile_of_poo:"\ud83d\udca9",clown_face:"\ud83e\udd21",ogre:"\ud83d\udc79",goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",alien_monster:"\ud83d\udc7e",robot:"\ud83e\udd16",grinning_cat:"\ud83d\ude3a",grinning_cat_with_smiling_eyes:"\ud83d\ude38",cat_with_tears_of_joy:"\ud83d\ude39",smiling_cat_with_heart_eyes:"\ud83d\ude3b",cat_with_wry_smile:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",weary_cat:"\ud83d\ude40",crying_cat:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil_monkey:"\ud83d\ude48",
hear_no_evil_monkey:"\ud83d\ude49",speak_no_evil_monkey:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",heart_with_arrow:"\ud83d\udc98",heart_with_ribbon:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",growing_heart:"\ud83d\udc97",beating_heart:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heart_exclamation:"❣️",broken_heart:"\ud83d\udc94",heart_on_fire:"❤️‍\ud83d\udd25",mending_heart:"❤️‍\ud83e\ude79",red_heart:"❤️",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",
yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss_mark:"\ud83d\udc8b",hundred_points:"\ud83d\udcaf",anger_symbol:"\ud83d\udca2",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_droplets:"\ud83d\udca6",dashing_away:"\ud83d\udca8",hole:"\ud83d\udd73",speech_balloon:"\ud83d\udcac",eye_in_speech_bubble:"\ud83d\udc41\ud83d\udde8",
left_speech_bubble:"\ud83d\udde8",right_anger_bubble:"\ud83d\uddef",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",waving_hand:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",hand_with_fingers_splayed:"\ud83d\udd90",raised_hand:"✋",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",
pinching_hand:"\ud83e\udd0f",victory_hand:"✌️",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",sign_of_the_horns:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",backhand_index_pointing_left:"\ud83d\udc48",backhand_index_pointing_right:"\ud83d\udc49",backhand_index_pointing_up:"\ud83d\udc46",middle_finger:"\ud83d\udd95",backhand_index_pointing_down:"\ud83d\udc47",index_pointing_up:"☝️",index_pointing_at_the_viewer:"\ud83e\udef5",thumbs_up:"\ud83d\udc4d",
thumbs_down:"\ud83d\udc4e",raised_fist:"✊",oncoming_fist:"\ud83d\udc4a",left_facing_fist:"\ud83e\udd1b",right_facing_fist:"\ud83e\udd1c",clapping_hands:"\ud83d\udc4f",raising_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",folded_hands:"\ud83d\ude4f",writing_hand:"✍️",nail_polish:"\ud83d\udc85",selfie:"\ud83e\udd33",flexed_biceps:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",
foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41",tongue:"\ud83d\udc45",mouth:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",person:"\ud83e\uddd1",person_blond_hair:"\ud83d\udc71",man:"\ud83d\udc68",person_beard:"\ud83e\uddd4",
man_beard:"\ud83e\uddd4",woman_beard:"\ud83e\uddd4",man_red_hair:"\ud83d\udc68\ud83e\uddb0",man_curly_hair:"\ud83d\udc68\ud83e\uddb1",man_white_hair:"\ud83d\udc68\ud83e\uddb3",man_bald:"\ud83d\udc68\ud83e\uddb2",woman:"\ud83d\udc69",woman_red_hair:"\ud83d\udc69\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\ud83e\uddb0",woman_curly_hair:"\ud83d\udc69\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\ud83e\uddb1",woman_white_hair:"\ud83d\udc69\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\ud83e\uddb3",
woman_bald:"\ud83d\udc69\ud83e\uddb2",person_bald:"\ud83e\uddd1\ud83e\uddb2",woman_blond_hair:"\ud83d\udc71",man_blond_hair:"\ud83d\udc71",older_person:"\ud83e\uddd3",old_man:"\ud83d\udc74",old_woman:"\ud83d\udc75",person_frowning:"\ud83d\ude4d",man_frowning:"\ud83d\ude4d",woman_frowning:"\ud83d\ude4d",person_pouting:"\ud83d\ude4e",man_pouting:"\ud83d\ude4e",woman_pouting:"\ud83d\ude4e",person_gesturing_no:"\ud83d\ude45",man_gesturing_no:"\ud83d\ude45",woman_gesturing_no:"\ud83d\ude45",
person_gesturing_ok:"\ud83d\ude46",man_gesturing_ok:"\ud83d\ude46",woman_gesturing_ok:"\ud83d\ude46",person_tipping_hand:"\ud83d\udc81",man_tipping_hand:"\ud83d\udc81",woman_tipping_hand:"\ud83d\udc81",person_raising_hand:"\ud83d\ude4b",man_raising_hand:"\ud83d\ude4b",woman_raising_hand:"\ud83d\ude4b",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf",deaf_woman:"\ud83e\uddcf",person_bowing:"\ud83d\ude47",man_bowing:"\ud83d\ude47",woman_bowing:"\ud83d\ude47",person_facepalming:"\ud83e\udd26",
man_facepalming:"\ud83e\udd26",woman_facepalming:"\ud83e\udd26",person_shrugging:"\ud83e\udd37",man_shrugging:"\ud83e\udd37",woman_shrugging:"\ud83e\udd37",health_worker:"\ud83e\uddd1",man_health_worker:"\ud83d\udc68",woman_health_worker:"\ud83d\udc69",student:"\ud83e\uddd1\ud83c\udf93",man_student:"\ud83d\udc68\ud83c\udf93",woman_student:"\ud83d\udc69\ud83c\udf93",teacher:"\ud83e\uddd1\ud83c\udfeb",man_teacher:"\ud83d\udc68\ud83c\udfeb",woman_teacher:"\ud83d\udc69\ud83c\udfeb",
judge:"\ud83e\uddd1",man_judge:"\ud83d\udc68",woman_judge:"\ud83d\udc69",farmer:"\ud83e\uddd1\ud83c\udf3e",man_farmer:"\ud83d\udc68\ud83c\udf3e",woman_farmer:"\ud83d\udc69\ud83c\udf3e",cook:"\ud83e\uddd1\ud83c\udf73",man_cook:"\ud83d\udc68\ud83c\udf73",woman_cook:"\ud83d\udc69\ud83c\udf73",mechanic:"\ud83e\uddd1\ud83d\udd27",man_mechanic:"\ud83d\udc68\ud83d\udd27",woman_mechanic:"\ud83d\udc69\ud83d\udd27",factory_worker:"\ud83e\uddd1\ud83c\udfed",man_factory_worker:"\ud83d\udc68\ud83c\udfed",
woman_factory_worker:"\ud83d\udc69\ud83c\udfed",office_worker:"\ud83e\uddd1\ud83d\udcbc",man_office_worker:"\ud83d\udc68\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\ud83d\udcbc",scientist:"\ud83e\uddd1\ud83d\udd2c",man_scientist:"\ud83d\udc68\ud83d\udd2c",woman_scientist:"\ud83d\udc69\ud83d\udd2c",technologist:"\ud83e\uddd1\ud83d\udcbb",man_technologist:"\ud83d\udc68\ud83d\udcbb",woman_technologist:"\ud83d\udc69\ud83d\udcbb",singer:"\ud83e\uddd1\ud83c\udfa4",man_singer:"\ud83d\udc68\ud83c\udfa4",
woman_singer:"\ud83d\udc69\ud83c\udfa4",artist:"\ud83e\uddd1\ud83c\udfa8",man_artist:"\ud83d\udc68\ud83c\udfa8",woman_artist:"\ud83d\udc69\ud83c\udfa8",pilot:"\ud83e\uddd1",man_pilot:"\ud83d\udc68",woman_pilot:"\ud83d\udc69",astronaut:"\ud83e\uddd1\ud83d\ude80",man_astronaut:"\ud83d\udc68\ud83d\ude80",woman_astronaut:"\ud83d\udc69\ud83d\ude80",firefighter:"\ud83e\uddd1\ud83d\ude92",man_firefighter:"\ud83d\udc68\ud83d\ude92",woman_firefighter:"\ud83d\udc69\ud83d\ude92",police_officer:"\ud83d\udc6e",
man_police_officer:"\ud83d\udc6e",woman_police_officer:"\ud83d\udc6e",detective:"\ud83d\udd75",man_detective:"\ud83d\udd75",woman_detective:"\ud83d\udd75",guard:"\ud83d\udc82",man_guard:"\ud83d\udc82",woman_guard:"\ud83d\udc82",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",man_construction_worker:"\ud83d\udc77",woman_construction_worker:"\ud83d\udc77",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_wearing_turban:"\ud83d\udc73",
man_wearing_turban:"\ud83d\udc73",woman_wearing_turban:"\ud83d\udc73",person_with_skullcap:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35",woman_in_tuxedo:"\ud83e\udd35",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70",woman_with_veil:"\ud83d\udc70",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\ud83c\udf7c",
man_feeding_baby:"\ud83d\udc68\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\ud83c\udf7c",baby_angel:"\ud83d\udc7c",santa_claus:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\ud83c\udf84",superhero:"\ud83e\uddb8",man_superhero:"\ud83e\uddb8",woman_superhero:"\ud83e\uddb8",supervillain:"\ud83e\uddb9",man_supervillain:"\ud83e\uddb9",woman_supervillain:"\ud83e\uddb9",mage:"\ud83e\uddd9",man_mage:"\ud83e\uddd9",woman_mage:"\ud83e\uddd9",fairy:"\ud83e\uddda",man_fairy:"\ud83e\uddda",
woman_fairy:"\ud83e\uddda",vampire:"\ud83e\udddb",man_vampire:"\ud83e\udddb",woman_vampire:"\ud83e\udddb",merperson:"\ud83e\udddc",merman:"\ud83e\udddc",mermaid:"\ud83e\udddc",elf:"\ud83e\udddd",man_elf:"\ud83e\udddd",woman_elf:"\ud83e\udddd",genie:"\ud83e\uddde",man_genie:"\ud83e\uddde",woman_genie:"\ud83e\uddde",zombie:"\ud83e\udddf",man_zombie:"\ud83e\udddf",woman_zombie:"\ud83e\udddf",troll:"\ud83e\uddcc",person_getting_massage:"\ud83d\udc86",man_getting_massage:"\ud83d\udc86",
woman_getting_massage:"\ud83d\udc86",person_getting_haircut:"\ud83d\udc87",man_getting_haircut:"\ud83d\udc87",woman_getting_haircut:"\ud83d\udc87",person_walking:"\ud83d\udeb6",man_walking:"\ud83d\udeb6",woman_walking:"\ud83d\udeb6",person_standing:"\ud83e\uddcd",man_standing:"\ud83e\uddcd",woman_standing:"\ud83e\uddcd",person_kneeling:"\ud83e\uddce",man_kneeling:"\ud83e\uddce",woman_kneeling:"\ud83e\uddce",person_with_white_cane:"\ud83e\uddd1\ud83e\uddaf",man_with_white_cane:"\ud83d\udc68\ud83e\uddaf",
woman_with_white_cane:"\ud83d\udc69\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\ud83e\uddbd",person_running:"\ud83c\udfc3",man_running:"\ud83c\udfc3",woman_running:"\ud83c\udfc3",woman_dancing:"\ud83d\udc83",
man_dancing:"\ud83d\udd7a",person_in_suit_levitating:"\ud83d\udd74",people_with_bunny_ears:"\ud83d\udc6f",men_with_bunny_ears:"\ud83d\udc6f",women_with_bunny_ears:"\ud83d\udc6f",person_in_steamy_room:"\ud83e\uddd6",man_in_steamy_room:"\ud83e\uddd6",woman_in_steamy_room:"\ud83e\uddd6",person_climbing:"\ud83e\uddd7",man_climbing:"\ud83e\uddd7",woman_climbing:"\ud83e\uddd7",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"⛷️",snowboarder:"\ud83c\udfc2",person_golfing:"\ud83c\udfcc",
man_golfing:"\ud83c\udfcc",woman_golfing:"\ud83c\udfcc",person_surfing:"\ud83c\udfc4",man_surfing:"\ud83c\udfc4",woman_surfing:"\ud83c\udfc4",person_rowing_boat:"\ud83d\udea3",man_rowing_boat:"\ud83d\udea3",woman_rowing_boat:"\ud83d\udea3",person_swimming:"\ud83c\udfca",man_swimming:"\ud83c\udfca",woman_swimming:"\ud83c\udfca",person_bouncing_ball:"⛹️",man_bouncing_ball:"⛹️‍♂️",woman_bouncing_ball:"⛹️‍♀️",person_lifting_weights:"\ud83c\udfcb",man_lifting_weights:"\ud83c\udfcb",
woman_lifting_weights:"\ud83c\udfcb",person_biking:"\ud83d\udeb4",man_biking:"\ud83d\udeb4",woman_biking:"\ud83d\udeb4",person_mountain_biking:"\ud83d\udeb5",man_mountain_biking:"\ud83d\udeb5",woman_mountain_biking:"\ud83d\udeb5",person_cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38",woman_cartwheeling:"\ud83e\udd38",people_wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c",women_wrestling:"\ud83e\udd3c",person_playing_water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d",
woman_playing_water_polo:"\ud83e\udd3d",person_playing_handball:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e",woman_playing_handball:"\ud83e\udd3e",person_juggling:"\ud83e\udd39",man_juggling:"\ud83e\udd39",woman_juggling:"\ud83e\udd39",person_in_lotus_position:"\ud83e\uddd8",man_in_lotus_position:"\ud83e\uddd8",woman_in_lotus_position:"\ud83e\uddd8",person_taking_bath:"\ud83d\udec0",person_in_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\ud83e\udd1d\ud83e\uddd1",
women_holding_hands:"\ud83d\udc6d",woman_and_man_holding_hands:"\ud83d\udc6b",men_holding_hands:"\ud83d\udc6c",kiss:"\ud83d\udc8f",kiss_woman_man:"\ud83d\udc69\ud83d\udc8b\ud83d\udc68",kiss_man_man:"\ud83d\udc68\ud83d\udc8b\ud83d\udc68",kiss_woman_woman:"\ud83d\udc69\ud83d\udc8b\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\ud83d\udc69",
family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\ud83d\udc69\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\ud83d\udc69\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\ud83d\udc69\ud83d\udc67\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\ud83d\udc69\ud83d\udc66\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\ud83d\udc69\ud83d\udc67\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\ud83d\udc68\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\ud83d\udc68\ud83d\udc67",
family_man_man_girl_boy:"\ud83d\udc68\ud83d\udc68\ud83d\udc67\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\ud83d\udc68\ud83d\udc66\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\ud83d\udc68\ud83d\udc67\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\ud83d\udc69\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\ud83d\udc69\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\ud83d\udc69\ud83d\udc67\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\ud83d\udc69\ud83d\udc66\ud83d\udc66",
family_woman_woman_girl_girl:"\ud83d\udc69\ud83d\udc69\ud83d\udc67\ud83d\udc67",family_man_boy:"\ud83d\udc68\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\ud83d\udc66\ud83d\udc66",family_man_girl:"\ud83d\udc68\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\ud83d\udc67\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\ud83d\udc67\ud83d\udc67",family_woman_boy:"\ud83d\udc69\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\ud83d\udc66\ud83d\udc66",family_woman_girl:"\ud83d\udc69\ud83d\udc67",
family_woman_girl_boy:"\ud83d\udc69\ud83d\udc67\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\ud83d\udc67\ud83d\udc67",speaking_head:"\ud83d\udde3",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog_face:"\ud83d\udc36",dog:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\ud83e\uddba",poodle:"\ud83d\udc29",
wolf:"\ud83d\udc3a",fox:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat_face:"\ud83d\udc31",cat:"\ud83d\udc08",black_cat:"\ud83d\udc08⬛",lion:"\ud83e\udd81",tiger_face:"\ud83d\udc2f",tiger:"\ud83d\udc05",leopard:"\ud83d\udc06",horse_face:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",horse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow_face:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow:"\ud83d\udc04",pig_face:"\ud83d\udc37",
pig:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",ewe:"\ud83d\udc11",goat:"\ud83d\udc10",camel:"\ud83d\udc2a",two_hump_camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse_face:"\ud83d\udc2d",mouse:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit_face:"\ud83d\udc30",rabbit:"\ud83d\udc07",chipmunk:"\ud83d\udc3f",beaver:"\ud83e\uddab",
hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b",koala:"\ud83d\udc28",panda:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",front_facing_baby_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a",eagle:"\ud83e\udd85",
duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26⬛",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95",t_rex:"\ud83e\udd96",spouting_whale:"\ud83d\udc33",whale:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",
seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",spiral_shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77",spider_web:"\ud83d\udd78",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",
fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",
sheaf_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"☘️",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaf_fluttering_in_wind:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",red_apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",
pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",ear_of_corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",
beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese_wedge:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",french_fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hot_dog:"\ud83c\udf2d",
sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",cooking:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",pot_of_food:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento_box:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",cooked_rice:"\ud83c\udf5a",
curry_rice:"\ud83c\udf5b",steaming_bowl:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",roasted_sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake_with_swirl:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",soft_ice_cream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",
ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday_cake:"\ud83c\udf82",shortcake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",glass_of_milk:"\ud83e\udd5b",hot_beverage:"☕",teapot:"\ud83e\uded6",teacup_without_handle:"\ud83c\udf75",sake:"\ud83c\udf76",bottle_with_popping_cork:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",
cocktail_glass:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer_mug:"\ud83c\udf7a",clinking_beer_mugs:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice:"\ud83e\uddca",chopsticks:"\ud83e\udd62",fork_and_knife_with_plate:"\ud83c\udf7d",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",kitchen_knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",
globe_showing_europe_africa:"\ud83c\udf0d",globe_showing_americas:"\ud83c\udf0e",globe_showing_asia_australia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa",map_of_japan:"\ud83d\uddfe",compass:"\ud83e\udded",snow_capped_mountain:"\ud83c\udfd4",mountain:"⛰️",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5",beach_with_umbrella:"\ud83c\udfd6",desert:"\ud83c\udfdc",desert_island:"\ud83c\udfdd",national_park:"\ud83c\udfde",stadium:"\ud83c\udfdf",
classical_building:"\ud83c\udfdb",building_construction:"\ud83c\udfd7",brick:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8",derelict_house:"\ud83c\udfda",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office_building:"\ud83c\udfe2",japanese_post_office:"\ud83c\udfe3",post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",
department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"⛪",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"⛩️",kaaba:"\ud83d\udd4b",fountain:"⛲",tent:"⛺",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",cityscape_at_dusk:"\ud83c\udf06",
sunset:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hot_springs:"♨️",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber_pole:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",high_speed_train:"\ud83d\ude84",bullet_train:"\ud83d\ude85",train:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",
tram_car:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",automobile:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",sport_utility_vehicle:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",delivery_truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce",
motorcycle:"\ud83c\udfcd",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bicycle:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",bus_stop:"\ud83d\ude8f",motorway:"\ud83d\udee3",railway_track:"\ud83d\udee4",oil_drum:"\ud83d\udee2",fuel_pump:"⛽",wheel:"\ud83d\udede",police_car_light:"\ud83d\udea8",horizontal_traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",
stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"⚓",ring_buoy:"\ud83d\udedf",sailboat:"⛵",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3",ferry:"⛴️",motor_boat:"\ud83d\udee5",ship:"\ud83d\udea2",airplane:"✈️",small_airplane:"\ud83d\udee9",airplane_departure:"\ud83d\udeeb",airplane_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",
satellite:"\ud83d\udef0",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece",luggage:"\ud83e\uddf3",hourglass_done:"⌛",hourglass_not_done:"⏳",watch:"⌚",alarm_clock:"⏰",stopwatch:"⏱️",timer_clock:"⏲️",mantelpiece_clock:"\ud83d\udd70",twelve_o_clock:"\ud83d\udd5b",twelve_thirty:"\ud83d\udd67",one_o_clock:"\ud83d\udd50",one_thirty:"\ud83d\udd5c",two_o_clock:"\ud83d\udd51",two_thirty:"\ud83d\udd5d",three_o_clock:"\ud83d\udd52",three_thirty:"\ud83d\udd5e",four_o_clock:"\ud83d\udd53",
four_thirty:"\ud83d\udd5f",five_o_clock:"\ud83d\udd54",five_thirty:"\ud83d\udd60",six_o_clock:"\ud83d\udd55",six_thirty:"\ud83d\udd61",seven_o_clock:"\ud83d\udd56",seven_thirty:"\ud83d\udd62",eight_o_clock:"\ud83d\udd57",eight_thirty:"\ud83d\udd63",nine_o_clock:"\ud83d\udd58",nine_thirty:"\ud83d\udd64",ten_o_clock:"\ud83d\udd59",ten_thirty:"\ud83d\udd65",eleven_o_clock:"\ud83d\udd5a",eleven_thirty:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",
waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_face:"\ud83c\udf1a",first_quarter_moon_face:"\ud83c\udf1b",last_quarter_moon_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21",sun:"☀️",full_moon_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"⭐",glowing_star:"\ud83c\udf1f",shooting_star:"\ud83c\udf20",milky_way:"\ud83c\udf0c",
cloud:"☁️",sun_behind_cloud:"⛅",cloud_with_lightning_and_rain:"⛈️",sun_behind_small_cloud:"\ud83c\udf24",sun_behind_large_cloud:"\ud83c\udf25",sun_behind_rain_cloud:"\ud83c\udf26",cloud_with_rain:"\ud83c\udf27",cloud_with_snow:"\ud83c\udf28",cloud_with_lightning:"\ud83c\udf29",tornado:"\ud83c\udf2a",fog:"\ud83c\udf2b",wind_face:"\ud83c\udf2c",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",umbrella:"☂️",umbrella_with_rain_drops:"☔",umbrella_on_ground:"⛱️",high_voltage:"⚡",
snowflake:"❄️",snowman:"☃️",snowman_without_snow:"⛄",comet:"☄️",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",water_wave:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"✨",balloon:"\ud83c\udf88",party_popper:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",pine_decoration:"\ud83c\udf8d",japanese_dolls:"\ud83c\udf8e",carp_streamer:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",
moon_viewing_ceremony:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",wrapped_gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97",admission_tickets:"\ud83c\udf9f",ticket:"\ud83c\udfab",military_medal:"\ud83c\udf96",trophy:"\ud83c\udfc6",sports_medal:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer_ball:"⚽",baseball:"⚾",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",american_football:"\ud83c\udfc8",
rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",flag_in_hole:"⛳",ice_skate:"⛸️",fishing_pole:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt:"\ud83c\udfbd",skis:"\ud83c\udfbf",sled:"\ud83d\udef7",
curling_stone:"\ud83e\udd4c",bullseye:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",water_pistol:"\ud83d\udd2b",pool_8_ball:"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",puzzle_piece:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spade_suit:"♠️",heart_suit:"♥️",diamond_suit:"♦️",club_suit:"♣️",
chess_pawn:"♟️",joker:"\ud83c\udccf",mahjong_red_dragon:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc",artist_palette:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",glasses:"\ud83d\udc53",sunglasses:"\ud83d\udd76",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",t_shirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",
gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",briefs:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",woman_s_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",clutch_bag:"\ud83d\udc5d",shopping_bags:"\ud83d\udecd",backpack:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",man_s_shoe:"\ud83d\udc5e",running_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",
flat_shoe:"\ud83e\udd7f",high_heeled_shoe:"\ud83d\udc60",woman_s_sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",woman_s_boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",woman_s_hat:"\ud83d\udc52",top_hat:"\ud83c\udfa9",graduation_cap:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_s_helmet:"⛑️",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem_stone:"\ud83d\udc8e",muted_speaker:"\ud83d\udd07",speaker_low_volume:"\ud83d\udd08",
speaker_medium_volume:"\ud83d\udd09",speaker_high_volume:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",megaphone:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",bell_with_slash:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",musical_notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99",level_slider:"\ud83c\udf9a",control_knobs:"\ud83c\udf9b",microphone:"\ud83c\udfa4",headphone:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",
guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",mobile_phone:"\ud83d\udcf1",mobile_phone_with_arrow:"\ud83d\udcf2",telephone:"☎️",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax_machine:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",laptop:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5",
printer:"\ud83d\udda8",keyboard:"⌨️",computer_mouse:"\ud83d\uddb1",trackball:"\ud83d\uddb2",computer_disk:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",optical_disk:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_frames:"\ud83c\udf9e",film_projector:"\ud83d\udcfd",clapper_board:"\ud83c\udfac",television:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_with_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",videocassette:"\ud83d\udcfc",magnifying_glass_tilted_left:"\ud83d\udd0d",
magnifying_glass_tilted_right:"\ud83d\udd0e",candle:"\ud83d\udd6f",light_bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",red_paper_lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",
newspaper:"\ud83d\udcf0",rolled_up_newspaper:"\ud83d\uddde",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7",money_bag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen_banknote:"\ud83d\udcb4",dollar_banknote:"\ud83d\udcb5",euro_banknote:"\ud83d\udcb6",pound_banknote:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart_increasing_with_yen:"\ud83d\udcb9",envelope:"✉️",e_mail:"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",
outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5","package":"\ud83d\udce6",closed_mailbox_with_raised_flag:"\ud83d\udceb",closed_mailbox_with_lowered_flag:"\ud83d\udcea",open_mailbox_with_raised_flag:"\ud83d\udcec",open_mailbox_with_lowered_flag:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box_with_ballot:"\ud83d\uddf3",pencil:"✏️",black_nib:"✒️",fountain_pen:"\ud83d\udd8b",pen:"\ud83d\udd8a",paintbrush:"\ud83d\udd8c",crayon:"\ud83d\udd8d",memo:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",
open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2",calendar:"\ud83d\udcc5",tear_off_calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2",spiral_calendar:"\ud83d\uddd3",card_index:"\ud83d\udcc7",chart_increasing:"\ud83d\udcc8",chart_decreasing:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",linked_paperclips:"\ud83d\udd87",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",
scissors:"✂️",card_file_box:"\ud83d\uddc3",file_cabinet:"\ud83d\uddc4",wastebasket:"\ud83d\uddd1",locked:"\ud83d\udd12",unlocked:"\ud83d\udd13",locked_with_pen:"\ud83d\udd0f",locked_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"⛏️",hammer_and_pick:"⚒️",hammer_and_wrench:"\ud83d\udee0",dagger:"\ud83d\udde1",crossed_swords:"⚔️",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1",carpentry_saw:"\ud83e\ude9a",
wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"⚙️",clamp:"\ud83d\udddc",balance_scale:"⚖️",white_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"⛓️",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"⚗️",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite_antenna:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",
adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf",couch_and_lamp:"\ud83d\udecb",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",
bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",cigarette:"\ud83d\udeac",coffin:"⚰️",headstone:"\ud83e\udea6",funeral_urn:"⚱️",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm_sign:"\ud83c\udfe7",litter_in_bin_sign:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair_symbol:"♿",men_s_room:"\ud83d\udeb9",
women_s_room:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",water_closet:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"⚠️",children_crossing:"\ud83d\udeb8",no_entry:"⛔",prohibited:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",no_littering:"\ud83d\udeaf",non_potable_water:"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",no_one_under_eighteen:"\ud83d\udd1e",
radioactive:"☢️",biohazard:"☣️",up_arrow:"⬆️",up_right_arrow:"↗️",right_arrow:"➡️",down_right_arrow:"↘️",down_arrow:"⬇️",down_left_arrow:"↙️",left_arrow:"⬅️",up_left_arrow:"↖️",up_down_arrow:"↕️",left_right_arrow:"↔️",right_arrow_curving_left:"↩️",left_arrow_curving_right:"↪️",right_arrow_curving_up:"⤴️",right_arrow_curving_down:"⤵️",clockwise_vertical_arrows:"\ud83d\udd03",counterclockwise_arrows_button:"\ud83d\udd04",back_arrow:"\ud83d\udd19",end_arrow:"\ud83d\udd1a",on_arrow:"\ud83d\udd1b",soon_arrow:"\ud83d\udd1c",
top_arrow:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"⚛️",om:"\ud83d\udd49",star_of_david:"✡️",wheel_of_dharma:"☸️",yin_yang:"☯️",latin_cross:"✝️",orthodox_cross:"☦️",star_and_crescent:"☪️",peace_symbol:"☮️",menorah:"\ud83d\udd4e",dotted_six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓",ophiuchus:"⛎",shuffle_tracks_button:"\ud83d\udd00",repeat_button:"\ud83d\udd01",
repeat_single_button:"\ud83d\udd02",play_button:"▶️",fast_forward_button:"⏩",next_track_button:"⏭️",play_or_pause_button:"⏯️",reverse_button:"◀️",fast_reverse_button:"⏪",last_track_button:"⏮️",upwards_button:"\ud83d\udd3c",fast_up_button:"⏫",downwards_button:"\ud83d\udd3d",fast_down_button:"⏬",pause_button:"⏸️",stop_button:"⏹️",record_button:"⏺️",eject_button:"⏏️",cinema:"\ud83c\udfa6",dim_button:"\ud83d\udd05",bright_button:"\ud83d\udd06",antenna_bars:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",
mobile_phone_off:"\ud83d\udcf4",female_sign:"♀️",male_sign:"♂️",transgender_symbol:"⚧️",multiply:"✖️",plus:"",minus:"",divide:"➗",heavy_equals_sign:"\ud83d\udff0",infinity:"♾️",double_exclamation_mark:"‼️",exclamation_question_mark:"⁉️",red_question_mark:"❓",question_mark:"❓",white_question_mark:"❔",white_exclamation_mark:"❕",red_exclamation_mark:"❗",exclamation_mark:"❗",wavy_dash:"〰️",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"⚕️",recycling_symbol:"♻️",fleur_de_lis:"⚜️",
trident_emblem:"\ud83d\udd31",name_badge:"\ud83d\udcdb",japanese_symbol_for_beginner:"\ud83d\udd30",hollow_red_circle:"⭕",check_mark_button:"✅",check_box_with_check:"☑️",check_mark:"✔️",cross_mark:"❌",cross_mark_button:"❎",curly_loop:"➰",double_curly_loop:"➿",part_alternation_mark:"〽️",eight_spoked_asterisk:"✳️",eight_pointed_star:"✴️",sparkle:"❇️",copyright:"©️",registered:"®️",trade_mark:"™️",keycap_number_sign:"#️⃣",keycap_asterisk:"*️⃣",keycap_0:"0⃣",keycap_1:"1⃣",keycap_2:"2⃣",keycap_3:"3⃣",
keycap_4:"4⃣",keycap_5:"5⃣",keycap_6:"6⃣",keycap_7:"7⃣",keycap_8:"8⃣",keycap_9:"9⃣",keycap_10:"\ud83d\udd1f",input_latin_uppercase:"\ud83d\udd20",input_latin_lowercase:"\ud83d\udd21",input_numbers:"\ud83d\udd22",input_symbols:"\ud83d\udd23",input_latin_letters:"\ud83d\udd24",a_button:"\ud83c\udd70",ab_button:"\ud83c\udd8e",b_button:"\ud83c\udd71",cl_button:"\ud83c\udd91",cool_button:"\ud83c\udd92",free_button:"\ud83c\udd93",information:"",id_button:"\ud83c\udd94",circled_m:"Ⓜ️",new_button:"\ud83c\udd95",
ng_button:"\ud83c\udd96",o_button:"\ud83c\udd7e",ok_button:"\ud83c\udd97",p_button:"\ud83c\udd7f",sos_button:"\ud83c\udd98",up_button:"\ud83c\udd99",vs_button:"\ud83c\udd9a",japanese_here_button:"\ud83c\ude01",japanese_service_charge_button:"\ud83c\ude02",japanese_monthly_amount_button:"\ud83c\ude37",japanese_not_free_of_charge_button:"\ud83c\ude36",japanese_reserved_button:"\ud83c\ude2f",japanese_bargain_button:"\ud83c\ude50",japanese_discount_button:"\ud83c\ude39",japanese_free_of_charge_button:"\ud83c\ude1a",
japanese_prohibited_button:"\ud83c\ude32",japanese_acceptable_button:"\ud83c\ude51",japanese_application_button:"\ud83c\ude38",japanese_passing_grade_button:"\ud83c\ude34",japanese_vacancy_button:"\ud83c\ude33",japanese_congratulations_button:"㊗️",japanese_secret_button:"㊙️",japanese_open_for_business_button:"\ud83c\ude3a",japanese_no_vacancy_button:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",blue_circle:"\ud83d\udd35",
purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"⚫",white_circle:"⚪",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"⬛",white_large_square:"⬜",black_medium_square:"◼️",white_medium_square:"◻️",black_medium_small_square:"◾",white_medium_small_square:"◽",black_small_square:"▪️",white_small_square:"▫️",large_orange_diamond:"\ud83d\udd36",
large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",red_triangle_pointed_up:"\ud83d\udd3a",red_triangle_pointed_down:"\ud83d\udd3b",diamond_with_a_dot:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",chequered_flag:"\ud83c\udfc1",triangular_flag:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3",rainbow_flag:"\ud83c\udff3\ud83c\udf08",
transgender_flag:"\ud83c\udff3",pirate_flag:"\ud83c\udff4",flag_ascension_island:"\ud83c\udde6\ud83c\udde8",flag_andorra:"\ud83c\udde6\ud83c\udde9",flag_united_arab_emirates:"\ud83c\udde6\ud83c\uddea",flag_afghanistan:"\ud83c\udde6\ud83c\uddeb",flag_antigua_barbuda:"\ud83c\udde6\ud83c\uddec",flag_anguilla:"\ud83c\udde6\ud83c\uddee",flag_albania:"\ud83c\udde6\ud83c\uddf1",flag_armenia:"\ud83c\udde6\ud83c\uddf2",flag_angola:"\ud83c\udde6\ud83c\uddf4",flag_antarctica:"\ud83c\udde6\ud83c\uddf6",
flag_argentina:"\ud83c\udde6\ud83c\uddf7",flag_american_samoa:"\ud83c\udde6\ud83c\uddf8",flag_austria:"\ud83c\udde6\ud83c\uddf9",flag_australia:"\ud83c\udde6\ud83c\uddfa",flag_aruba:"\ud83c\udde6\ud83c\uddfc",flag_aland_islands:"\ud83c\udde6\ud83c\uddfd",flag_azerbaijan:"\ud83c\udde6\ud83c\uddff",flag_bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",flag_barbados:"\ud83c\udde7\ud83c\udde7",flag_bangladesh:"\ud83c\udde7\ud83c\udde9",flag_belgium:"\ud83c\udde7\ud83c\uddea",flag_burkina_faso:"\ud83c\udde7\ud83c\uddeb",
flag_bulgaria:"\ud83c\udde7\ud83c\uddec",flag_bahrain:"\ud83c\udde7\ud83c\udded",flag_burundi:"\ud83c\udde7\ud83c\uddee",flag_benin:"\ud83c\udde7\ud83c\uddef",flag_st_barthelemy:"\ud83c\udde7\ud83c\uddf1",flag_bermuda:"\ud83c\udde7\ud83c\uddf2",flag_brunei:"\ud83c\udde7\ud83c\uddf3",flag_bolivia:"\ud83c\udde7\ud83c\uddf4",flag_caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",flag_brazil:"\ud83c\udde7\ud83c\uddf7",flag_bahamas:"\ud83c\udde7\ud83c\uddf8",flag_bhutan:"\ud83c\udde7\ud83c\uddf9",flag_bouvet_island:"\ud83c\udde7\ud83c\uddfb",
flag_botswana:"\ud83c\udde7\ud83c\uddfc",flag_belarus:"\ud83c\udde7\ud83c\uddfe",flag_belize:"\ud83c\udde7\ud83c\uddff",flag_canada:"\ud83c\udde8\ud83c\udde6",flag_cocos_islands:"\ud83c\udde8\ud83c\udde8",flag_congo_kinshasa:"\ud83c\udde8\ud83c\udde9",flag_central_african_republic:"\ud83c\udde8\ud83c\uddeb",flag_congo_brazzaville:"\ud83c\udde8\ud83c\uddec",flag_switzerland:"\ud83c\udde8\ud83c\udded",flag_cote_d_ivoire:"\ud83c\udde8\ud83c\uddee",flag_cook_islands:"\ud83c\udde8\ud83c\uddf0",flag_chile:"\ud83c\udde8\ud83c\uddf1",
flag_cameroon:"\ud83c\udde8\ud83c\uddf2",flag_china:"\ud83c\udde8\ud83c\uddf3",flag_colombia:"\ud83c\udde8\ud83c\uddf4",flag_clipperton_island:"\ud83c\udde8\ud83c\uddf5",flag_costa_rica:"\ud83c\udde8\ud83c\uddf7",flag_cuba:"\ud83c\udde8\ud83c\uddfa",flag_cape_verde:"\ud83c\udde8\ud83c\uddfb",flag_curacao:"\ud83c\udde8\ud83c\uddfc",flag_christmas_island:"\ud83c\udde8\ud83c\uddfd",flag_cyprus:"\ud83c\udde8\ud83c\uddfe",flag_czechia:"\ud83c\udde8\ud83c\uddff",flag_germany:"\ud83c\udde9\ud83c\uddea",
flag_diego_garcia:"\ud83c\udde9\ud83c\uddec",flag_djibouti:"\ud83c\udde9\ud83c\uddef",flag_denmark:"\ud83c\udde9\ud83c\uddf0",flag_dominica:"\ud83c\udde9\ud83c\uddf2",flag_dominican_republic:"\ud83c\udde9\ud83c\uddf4",flag_algeria:"\ud83c\udde9\ud83c\uddff",flag_ceuta_melilla:"\ud83c\uddea\ud83c\udde6",flag_ecuador:"\ud83c\uddea\ud83c\udde8",flag_estonia:"\ud83c\uddea\ud83c\uddea",flag_egypt:"\ud83c\uddea\ud83c\uddec",flag_western_sahara:"\ud83c\uddea\ud83c\udded",flag_eritrea:"\ud83c\uddea\ud83c\uddf7",
flag_spain:"\ud83c\uddea\ud83c\uddf8",flag_ethiopia:"\ud83c\uddea\ud83c\uddf9",flag_european_union:"\ud83c\uddea\ud83c\uddfa",flag_finland:"\ud83c\uddeb\ud83c\uddee",flag_fiji:"\ud83c\uddeb\ud83c\uddef",flag_falkland_islands:"\ud83c\uddeb\ud83c\uddf0",flag_micronesia:"\ud83c\uddeb\ud83c\uddf2",flag_faroe_islands:"\ud83c\uddeb\ud83c\uddf4",flag_france:"\ud83c\uddeb\ud83c\uddf7",flag_gabon:"\ud83c\uddec\ud83c\udde6",flag_united_kingdom:"\ud83c\uddec\ud83c\udde7",flag_grenada:"\ud83c\uddec\ud83c\udde9",
flag_georgia:"\ud83c\uddec\ud83c\uddea",flag_french_guiana:"\ud83c\uddec\ud83c\uddeb",flag_guernsey:"\ud83c\uddec\ud83c\uddec",flag_ghana:"\ud83c\uddec\ud83c\udded",flag_gibraltar:"\ud83c\uddec\ud83c\uddee",flag_greenland:"\ud83c\uddec\ud83c\uddf1",flag_gambia:"\ud83c\uddec\ud83c\uddf2",flag_guinea:"\ud83c\uddec\ud83c\uddf3",flag_guadeloupe:"\ud83c\uddec\ud83c\uddf5",flag_equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",flag_greece:"\ud83c\uddec\ud83c\uddf7",flag_south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",
flag_guatemala:"\ud83c\uddec\ud83c\uddf9",flag_guam:"\ud83c\uddec\ud83c\uddfa",flag_guinea_bissau:"\ud83c\uddec\ud83c\uddfc",flag_guyana:"\ud83c\uddec\ud83c\uddfe",flag_hong_kong_sar_china:"\ud83c\udded\ud83c\uddf0",flag_heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",flag_honduras:"\ud83c\udded\ud83c\uddf3",flag_croatia:"\ud83c\udded\ud83c\uddf7",flag_haiti:"\ud83c\udded\ud83c\uddf9",flag_hungary:"\ud83c\udded\ud83c\uddfa",flag_canary_islands:"\ud83c\uddee\ud83c\udde8",flag_indonesia:"\ud83c\uddee\ud83c\udde9",
flag_ireland:"\ud83c\uddee\ud83c\uddea",flag_israel:"\ud83c\uddee\ud83c\uddf1",flag_isle_of_man:"\ud83c\uddee\ud83c\uddf2",flag_india:"\ud83c\uddee\ud83c\uddf3",flag_british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",flag_iraq:"\ud83c\uddee\ud83c\uddf6",flag_iran:"\ud83c\uddee\ud83c\uddf7",flag_iceland:"\ud83c\uddee\ud83c\uddf8",flag_italy:"\ud83c\uddee\ud83c\uddf9",flag_jersey:"\ud83c\uddef\ud83c\uddea",flag_jamaica:"\ud83c\uddef\ud83c\uddf2",flag_jordan:"\ud83c\uddef\ud83c\uddf4",flag_japan:"\ud83c\uddef\ud83c\uddf5",
flag_kenya:"\ud83c\uddf0\ud83c\uddea",flag_kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",flag_cambodia:"\ud83c\uddf0\ud83c\udded",flag_kiribati:"\ud83c\uddf0\ud83c\uddee",flag_comoros:"\ud83c\uddf0\ud83c\uddf2",flag_st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",flag_north_korea:"\ud83c\uddf0\ud83c\uddf5",flag_south_korea:"\ud83c\uddf0\ud83c\uddf7",flag_kuwait:"\ud83c\uddf0\ud83c\uddfc",flag_cayman_islands:"\ud83c\uddf0\ud83c\uddfe",flag_kazakhstan:"\ud83c\uddf0\ud83c\uddff",flag_laos:"\ud83c\uddf1\ud83c\udde6",
flag_lebanon:"\ud83c\uddf1\ud83c\udde7",flag_st_lucia:"\ud83c\uddf1\ud83c\udde8",flag_liechtenstein:"\ud83c\uddf1\ud83c\uddee",flag_sri_lanka:"\ud83c\uddf1\ud83c\uddf0",flag_liberia:"\ud83c\uddf1\ud83c\uddf7",flag_lesotho:"\ud83c\uddf1\ud83c\uddf8",flag_lithuania:"\ud83c\uddf1\ud83c\uddf9",flag_luxembourg:"\ud83c\uddf1\ud83c\uddfa",flag_latvia:"\ud83c\uddf1\ud83c\uddfb",flag_libya:"\ud83c\uddf1\ud83c\uddfe",flag_morocco:"\ud83c\uddf2\ud83c\udde6",flag_monaco:"\ud83c\uddf2\ud83c\udde8",flag_moldova:"\ud83c\uddf2\ud83c\udde9",
flag_montenegro:"\ud83c\uddf2\ud83c\uddea",flag_st_martin:"\ud83c\uddf2\ud83c\uddeb",flag_madagascar:"\ud83c\uddf2\ud83c\uddec",flag_marshall_islands:"\ud83c\uddf2\ud83c\udded",flag_north_macedonia:"\ud83c\uddf2\ud83c\uddf0",flag_mali:"\ud83c\uddf2\ud83c\uddf1",flag_myanmar:"\ud83c\uddf2\ud83c\uddf2",flag_mongolia:"\ud83c\uddf2\ud83c\uddf3",flag_macao_sar_china:"\ud83c\uddf2\ud83c\uddf4",flag_northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",flag_martinique:"\ud83c\uddf2\ud83c\uddf6",flag_mauritania:"\ud83c\uddf2\ud83c\uddf7",
flag_montserrat:"\ud83c\uddf2\ud83c\uddf8",flag_malta:"\ud83c\uddf2\ud83c\uddf9",flag_mauritius:"\ud83c\uddf2\ud83c\uddfa",flag_maldives:"\ud83c\uddf2\ud83c\uddfb",flag_malawi:"\ud83c\uddf2\ud83c\uddfc",flag_mexico:"\ud83c\uddf2\ud83c\uddfd",flag_malaysia:"\ud83c\uddf2\ud83c\uddfe",flag_mozambique:"\ud83c\uddf2\ud83c\uddff",flag_namibia:"\ud83c\uddf3\ud83c\udde6",flag_new_caledonia:"\ud83c\uddf3\ud83c\udde8",flag_niger:"\ud83c\uddf3\ud83c\uddea",flag_norfolk_island:"\ud83c\uddf3\ud83c\uddeb",flag_nigeria:"\ud83c\uddf3\ud83c\uddec",
flag_nicaragua:"\ud83c\uddf3\ud83c\uddee",flag_netherlands:"\ud83c\uddf3\ud83c\uddf1",flag_norway:"\ud83c\uddf3\ud83c\uddf4",flag_nepal:"\ud83c\uddf3\ud83c\uddf5",flag_nauru:"\ud83c\uddf3\ud83c\uddf7",flag_niue:"\ud83c\uddf3\ud83c\uddfa",flag_new_zealand:"\ud83c\uddf3\ud83c\uddff",flag_oman:"\ud83c\uddf4\ud83c\uddf2",flag_panama:"\ud83c\uddf5\ud83c\udde6",flag_peru:"\ud83c\uddf5\ud83c\uddea",flag_french_polynesia:"\ud83c\uddf5\ud83c\uddeb",flag_papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",flag_philippines:"\ud83c\uddf5\ud83c\udded",
flag_pakistan:"\ud83c\uddf5\ud83c\uddf0",flag_poland:"\ud83c\uddf5\ud83c\uddf1",flag_st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",flag_pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",flag_puerto_rico:"\ud83c\uddf5\ud83c\uddf7",flag_palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",flag_portugal:"\ud83c\uddf5\ud83c\uddf9",flag_palau:"\ud83c\uddf5\ud83c\uddfc",flag_paraguay:"\ud83c\uddf5\ud83c\uddfe",flag_qatar:"\ud83c\uddf6\ud83c\udde6",flag_reunion:"\ud83c\uddf7\ud83c\uddea",flag_romania:"\ud83c\uddf7\ud83c\uddf4",
flag_serbia:"\ud83c\uddf7\ud83c\uddf8",flag_russia:"\ud83c\uddf7\ud83c\uddfa",flag_rwanda:"\ud83c\uddf7\ud83c\uddfc",flag_saudi_arabia:"\ud83c\uddf8\ud83c\udde6",flag_solomon_islands:"\ud83c\uddf8\ud83c\udde7",flag_seychelles:"\ud83c\uddf8\ud83c\udde8",flag_sudan:"\ud83c\uddf8\ud83c\udde9",flag_sweden:"\ud83c\uddf8\ud83c\uddea",flag_singapore:"\ud83c\uddf8\ud83c\uddec",flag_st_helena:"\ud83c\uddf8\ud83c\udded",flag_slovenia:"\ud83c\uddf8\ud83c\uddee",flag_svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",
flag_slovakia:"\ud83c\uddf8\ud83c\uddf0",flag_sierra_leone:"\ud83c\uddf8\ud83c\uddf1",flag_san_marino:"\ud83c\uddf8\ud83c\uddf2",flag_senegal:"\ud83c\uddf8\ud83c\uddf3",flag_somalia:"\ud83c\uddf8\ud83c\uddf4",flag_suriname:"\ud83c\uddf8\ud83c\uddf7",flag_south_sudan:"\ud83c\uddf8\ud83c\uddf8",flag_sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",flag_el_salvador:"\ud83c\uddf8\ud83c\uddfb",flag_sint_maarten:"\ud83c\uddf8\ud83c\uddfd",flag_syria:"\ud83c\uddf8\ud83c\uddfe",flag_eswatini:"\ud83c\uddf8\ud83c\uddff",
flag_tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",flag_turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",flag_chad:"\ud83c\uddf9\ud83c\udde9",flag_french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",flag_togo:"\ud83c\uddf9\ud83c\uddec",flag_thailand:"\ud83c\uddf9\ud83c\udded",flag_tajikistan:"\ud83c\uddf9\ud83c\uddef",flag_tokelau:"\ud83c\uddf9\ud83c\uddf0",flag_timor_leste:"\ud83c\uddf9\ud83c\uddf1",flag_turkmenistan:"\ud83c\uddf9\ud83c\uddf2",flag_tunisia:"\ud83c\uddf9\ud83c\uddf3",flag_tonga:"\ud83c\uddf9\ud83c\uddf4",
flag_turkey:"\ud83c\uddf9\ud83c\uddf7",flag_trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",flag_tuvalu:"\ud83c\uddf9\ud83c\uddfb",flag_taiwan:"\ud83c\uddf9\ud83c\uddfc",flag_tanzania:"\ud83c\uddf9\ud83c\uddff",flag_ukraine:"\ud83c\uddfa\ud83c\udde6",flag_uganda:"\ud83c\uddfa\ud83c\uddec",flag_u_s_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",flag_united_nations:"\ud83c\uddfa\ud83c\uddf3",flag_united_states:"\ud83c\uddfa\ud83c\uddf8",flag_uruguay:"\ud83c\uddfa\ud83c\uddfe",flag_uzbekistan:"\ud83c\uddfa\ud83c\uddff",
flag_vatican_city:"\ud83c\uddfb\ud83c\udde6",flag_st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",flag_venezuela:"\ud83c\uddfb\ud83c\uddea",flag_british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",flag_u_s_virgin_islands:"\ud83c\uddfb\ud83c\uddee",flag_vietnam:"\ud83c\uddfb\ud83c\uddf3",flag_vanuatu:"\ud83c\uddfb\ud83c\uddfa",flag_wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",flag_samoa:"\ud83c\uddfc\ud83c\uddf8",flag_kosovo:"\ud83c\uddfd\ud83c\uddf0",flag_yemen:"\ud83c\uddfe\ud83c\uddea",flag_mayotte:"\ud83c\uddfe\ud83c\uddf9",
flag_south_africa:"\ud83c\uddff\ud83c\udde6",flag_zambia:"\ud83c\uddff\ud83c\uddf2",flag_zimbabwe:"\ud83c\uddff\ud83c\uddfc",flag_england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",flag_scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",flag_wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"};
mxShapeEmoji.prototype.emojiComponents={medium_light_skin_tone:"\ud83c\udffc",light_skin_tone:"\ud83c\udffb",medium_skin_tone:"\ud83c\udffd",medium_dark_skin_tone:"\ud83c\udffe",dark_skin_tone:"\ud83c\udfff",red_hair:String.fromCharCode(8205)+"\ud83e\uddb0",curly_hair:String.fromCharCode(8205)+"\ud83e\uddb1",white_hair:String.fromCharCode(8205)+"\ud83e\uddb3",bald:String.fromCharCode(8205)+"\ud83e\uddb2"};
mxShapeEmoji.prototype.getUnicodeText=function(a){var d="";if(""!=a&&(d=this.emojis[a],null==d))for(var e in this.emojiComponents)if(a.length>e.length&&a.indexOf(e)==a.length-e.length){a=a.substring(0,a.length-e.length-1);d=this.getUnicodeText(a);null!=d&&(d=0<e.indexOf("tone")&&2<d.length?d.substring(0,2)+this.emojiComponents[e]+d.substring(2):d+this.emojiComponents[e]);break}return d};
mxShapeEmoji.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,this.EMOJI_NAME,"");f=this.getUnicodeText(f)||"";a.rect(d,e,b,c);a.fillAndStroke();var g=a.state.fontSize;a.state.fontSize=Math.min(b,c);a.text(d,e-.12*c,b,c,f);a.state.fontSize=g};mxCellRenderer.registerShape("mxgraph.emoji",mxShapeEmoji);function mxShapeEREntity(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEREntity,mxShape);
mxShapeEREntity.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"textColor","#666666"),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,20);c=Math.max(c,20);this.background(a,d,e,b,c,10,g);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeEREntity.prototype.background=function(a,d,e,b,c,f,g){d=mxUtils.getValue(this.style,"buttonStyle","round").toString();"round"===d?(a.begin(),a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f),a.close(),a.fillAndStroke()):"rect"===d?(a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke()):"dblFrame"===d&&(f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,
"#ffffff"),a.setFillColor(f),a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke(),f=Math.min(b,c),a.begin(),a.moveTo(.1*f,.1*f),a.lineTo(b-.1*f,.1*f),a.lineTo(b-.1*f,c-.1*f),a.lineTo(.1*f,c-.1*f),a.close(),a.stroke())};mxShapeEREntity.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape("mxgraph.er.entity",mxShapeEREntity);
mxShapeEREntity.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeEREntityExt(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEREntityExt,mxShape);
mxShapeEREntityExt.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"subText","+ attribute 1,+ attribute 2,+ attribute 3").toString().split(","),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),k=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17"),l=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#008cff"),m=mxUtils.getValue(this.style,"fillColor2","#ffffff"),n=0;a.translate(d,
e);for(var p=1.25*k,q=0;q<g.length;q++){var t=mxUtils.getSizeForString(g[q],k,mxConstants.DEFAULT_FONTFAMILY).width;t>n&&(n=t)}b=Math.max(b,20,n+10);c=Math.max(c,20,(g.length+1)*p);this.background(a,d,e,b,c,10);a.setShadow(!1);this.shapes(a,d,e,b,c,k,l,m,10,p);this.mainText(a,d,e,b,c,f,k,m);this.attrText(a,d,e,b,c,g,k,h,p,10)};
mxShapeEREntityExt.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,"buttonStyle","round").toString();a.begin();"round"===d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):"rect"===d&&(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c));a.close();a.fillAndStroke()};
mxShapeEREntityExt.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*g,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxShapeEREntityExt.prototype.shapes=function(a,d,e,b,c,f,g,h,k,l){d=mxUtils.getValue(this.style,"buttonStyle","round").toString();"round"===d?(a.begin(),a.moveTo(0,k),a.arcTo(k,k,0,0,1,k,0),a.lineTo(b-k,0),a.arcTo(k,k,0,0,1,b,k),a.lineTo(b,l),a.lineTo(0,l),a.close(),a.fill(),a.setFillColor(h),a.begin(),a.moveTo(b,l),a.lineTo(b,c-k),a.arcTo(k,k,0,0,1,b-k,c),a.lineTo(k,c),a.arcTo(k,k,0,0,1,0,c-k),a.lineTo(0,l),a.close(),a.fill()):"rect"===d&&(a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,l),a.lineTo(0,
l),a.close(),a.fill(),a.setFillColor(h),a.begin(),a.moveTo(0,l),a.lineTo(b,l),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fill());a.begin();"round"===d?(a.moveTo(0,k),a.arcTo(k,k,0,0,1,k,0),a.lineTo(b-k,0),a.arcTo(k,k,0,0,1,b,k),a.lineTo(b,c-k),a.arcTo(k,k,0,0,1,b-k,c),a.lineTo(k,c),a.arcTo(k,k,0,0,1,0,c-k)):"rect"===d&&(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c));a.close();a.stroke()};
mxShapeEREntityExt.prototype.attrText=function(a,d,e,b,c,f,g,h,k,l){for(d=0;d<f.length;d++)a.begin(),a.setFontSize(g),a.setFontColor(h),a.text(.5*l,(d+1.5)*k,0,0,f[d],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.er.entityExt",mxShapeEREntityExt);
mxShapeEREntityExt.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERAttribute(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERAttribute,mxShape);
mxShapeERAttribute.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"textColor","#666666"),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,20);c=Math.max(c,20);this.background(a,d,e,b,c,10,g);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeERAttribute.prototype.background=function(a,d,e,b,c,f,g){d=mxUtils.getValue(this.style,"buttonStyle","simple").toString();"simple"===d?(a.begin(),a.ellipse(0,0,b,c),a.fillAndStroke()):"dblFrame"===d&&(d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#666666"),a.setFillColor(d),a.begin(),a.ellipse(0,0,b,c),a.fillAndStroke(),f=Math.min(b,c),a.begin(),a.ellipse(.1*f,.1*f,b-.2*f,c-.2*f),a.stroke())};
mxShapeERAttribute.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.er.attribute",mxShapeERAttribute);
mxShapeERAttribute.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.144,.144),!1),new mxConnectionConstraint(new mxPoint(.856,.144),!1),new mxConnectionConstraint(new mxPoint(.856,.856),!1),new mxConnectionConstraint(new mxPoint(.144,.856),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];
function mxShapeERHas(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERHas,mxShape);
mxShapeERHas.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"textColor","#666666"),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,20);c=Math.max(c,20);this.background(a,d,e,b,c,10,g);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeERHas.prototype.background=function(a,d,e,b,c,f,g){d=mxUtils.getValue(this.style,"buttonStyle","rhombus").toString();"rhombus"===d?(a.begin(),a.moveTo(0,.5*c),a.lineTo(.5*b,0),a.lineTo(b,.5*c),a.lineTo(.5*b,c),a.close(),a.fillAndStroke()):"dblFrame"===d&&(d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#666666"),a.setFillColor(d),a.begin(),a.moveTo(0,.5*c),a.lineTo(.5*b,0),a.lineTo(b,.5*c),a.lineTo(.5*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.1*b,.5*c),a.lineTo(.5*b,.1*
c),a.lineTo(.9*b,.5*c),a.lineTo(.5*b,.9*c),a.close(),a.stroke())};mxShapeERHas.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.er.has",mxShapeERHas);
mxShapeERHas.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.75),!1),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.75,.75),!1)];
function mxShapeERCloud(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERCloud,mxShape);
mxShapeERCloud.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"textColor","#666666"),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,20);c=Math.max(c,20);this.background(a,d,e,b,c,10,g);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeERCloud.prototype.background=function(a,d,e,b,c,f,g){a.begin();a.moveTo(.25*b,.25*c);a.curveTo(.05*b,.25*c,0,.5*c,.16*b,.55*c);a.curveTo(0,.66*c,.18*b,.9*c,.31*b,.8*c);a.curveTo(.4*b,c,.7*b,c,.8*b,.8*c);a.curveTo(b,.8*c,b,.6*c,.875*b,.5*c);a.curveTo(b,.3*c,.8*b,.1*c,.625*b,.2*c);a.curveTo(.5*b,.05*c,.3*b,.05*c,.25*b,.25*c);a.fillAndStroke()};
mxShapeERCloud.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.er.cloud",mxShapeERCloud);
mxShapeERCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.08,.5),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.1),!1),new mxConnectionConstraint(new mxPoint(.5,.92),!1),new mxConnectionConstraint(new mxPoint(.24,.24),!1),new mxConnectionConstraint(new mxPoint(.22,.8),!1),new mxConnectionConstraint(new mxPoint(.81,.2),!1),new mxConnectionConstraint(new mxPoint(.78,.78),!1)];
function mxShapeERHierarchy(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERHierarchy,mxShape);
mxShapeERHierarchy.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","main").toString().split(","),g=mxUtils.getValue(this.style,"subText","sub").toString().split(","),h=mxUtils.getValue(this.style,"textColor","#666666"),k=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,20);c=Math.max(c,20);this.background(a,d,e,b,c,10,h);a.setShadow(!1);this.shapeText(a,d,e,b,c,f,g,k,h)};
mxShapeERHierarchy.prototype.background=function(a,d,e,b,c,f,g){d=mxUtils.getValue(this.style,"buttonStyle","round").toString();"round"===d?(a.begin(),a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f),a.close(),a.fillAndStroke()):"rect"===d?(a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke()):"dblFrame"===d&&(f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,
"#666666"),a.setFillColor(f),a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke(),f=Math.min(b,c),a.begin(),a.moveTo(.1*f,.1*f),a.lineTo(b-.1*f,.1*f),a.lineTo(b-.1*f,c-.1*f),a.lineTo(.1*f,c-.1*f),a.close(),a.stroke());g=e=0;"round"===d?(e=.5*b,g=f,a.translate(e,g),b=.5*b-f,c-=2*f,a.begin(),a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f),a.close(),a.fillAndStroke()):
"rect"===d?(e=.5*b,g=f,a.translate(e,g),b=.5*b-f,c-=2*f,a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke()):"dblFrame"===d&&(e=.5*b,g=.15*f,a.translate(e,g),b=.5*b-.15*f,c-=.3*f,f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#666666"),a.setFillColor(f),a.begin(),a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.fillAndStroke(),f=Math.min(b,c),a.begin(),a.moveTo(.1*f,.1*f),a.lineTo(b-.1*f,.1*f),a.lineTo(b-.1*f,c-.1*f),a.lineTo(.1*
f,c-.1*f),a.close(),a.stroke());a.translate(-e,-g)};
mxShapeERHierarchy.prototype.shapeText=function(a,d,e,b,c,f,g,h,k,l){a.begin();a.setFontSize(h);a.setFontColor(k);a.text(.25*b,.5*(c-h),0,0,f[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.25*b,.5*(c+h),0,0,f[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.7*b,.5*(c-h),0,0,g[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.7*b,.5*(c+h),0,0,g[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape("mxgraph.er.hierarchy",mxShapeERHierarchy);
mxShapeERHierarchy.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERNote(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERNote,mxShape);
mxShapeERNote.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"buttonText","Entity"),g=mxUtils.getValue(this.style,"textColor","#666666"),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17"),k=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.translate(d,e);b=Math.max(b,40);c=Math.max(c,40);this.background(a,d,e,b,c,20);a.setShadow(!1);this.flipShape(a,d,e,b,c,20,k);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeERNote.prototype.background=function(a,d,e,b,c,f){a.begin();a.moveTo(0,0);a.lineTo(b-f,0);a.lineTo(b,f);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxShapeERNote.prototype.flipShape=function(a,d,e,b,c,f,g){a.setLineJoin("round");a.setFillColor(g);a.begin();a.moveTo(b-f,0);a.lineTo(b,f);a.lineTo(b-f,f);a.close();a.fillAndStroke()};
mxShapeERNote.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.er.note",mxShapeERNote);
mxShapeERNote.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!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(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERChen(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERChen,mxShape);
mxShapeERChen.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"textColor","#666666"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,40);c=Math.max(c,40);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c,g,f)};mxShapeERChen.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeERChen.prototype.foreground=function(a,d,e,b,c,f,g){a.begin();a.moveTo(0,.25*c);a.lineTo(b,.25*c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(0,.75*c);a.lineTo(b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,c);a.stroke();a.begin();a.setFontSize(f);a.setFontColor(g);a.text(.5*b,.125*c,0,0,"ERD Peter Chen's Notation",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(.85*f);a.text(.25*b,.375*
c,0,0,"Cardinality",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.75*b,.375*c,0,0,"Optionality",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(.7*f);a.text(.125*b,.625*c,0,0,"1",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.375*b,.625*c,0,0,"One",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.625*b,.625*c,0,0,"0",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.875*b,
.625*c,0,0,"Optional",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.125*b,.875*c,0,0,"N",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.375*b,.875*c,0,0,"Many",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.625*b,.875*c,0,0,"1",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.875*b,.875*c,0,0,"Mandatory",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape("mxgraph.er.chens",mxShapeERChen);
mxShapeERChen.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERBachman(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERBachman,mxShape);
mxShapeERBachman.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"textColor","#666666"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c,g,f)};mxShapeERBachman.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeERBachman.prototype.foreground=function(a,d,e,b,c,f,g){a.begin();a.moveTo(0,.125*c);a.lineTo(b,.125*c);a.moveTo(0,.25*c);a.lineTo(b,.25*c);a.moveTo(0,.375*c);a.lineTo(b,.375*c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(0,.625*c);a.lineTo(b,.625*c);a.moveTo(0,.75*c);a.lineTo(b,.75*c);a.moveTo(0,.875*c);a.lineTo(b,.875*c);a.moveTo(.5*b,.125*c);a.lineTo(.5*b,c);a.stroke();a.begin();a.setFontSize(f);a.setFontColor(g);a.text(.5*b,.0625*c,0,0,"ERD Bachman's Notation",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.setFontSize(.85*f);a.text(.52*b,.1875*c,0,0,"Relationship",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.3125*c,0,0,"Cardinality (One)",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.4375*c,0,0,"Cardinality (Many)",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.5625*c,0,0,"Mandatory, One",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.6875*c,0,0,"Mandatory, Many",mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.8125*c,0,0,"Optional, One",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.9375*c,0,0,"Optional, Many",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);d=mxUtils.getSizeForString("has/forms",f,mxConstants.DEFAULT_FONTFAMILY).width;a.begin();a.moveTo(.04*b,.1875*c);a.lineTo(.25*b-.5*d,.1875*c);a.moveTo(.25*b+.5*d,.1875*c);a.lineTo(.46*b,.1875*c);a.text(.25*b,.1875*c,0,0,"has/forms",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,!0,0,0);a.moveTo(.04*b,.3125*c);a.lineTo(.46*b,.3125*c);a.moveTo(.04*b,.4375*c);a.lineTo(.46*b,.4375*c);a.moveTo(.46*b,.405*c);a.lineTo(.4*b,.4375*c);a.lineTo(.46*b,.47*c);a.moveTo(.04*b,.5625*c);a.lineTo(.46*b,.5625*c);a.moveTo(.38*b,.53*c);a.lineTo(.38*b,.595*c);a.moveTo(.04*b,.6875*c);a.lineTo(.46*b,.6875*c);a.moveTo(.46*b,.655*c);a.lineTo(.4*b,.6875*c);a.lineTo(.46*b,.72*c);a.moveTo(.38*b,.655*c);a.lineTo(.38*b,.72*c);a.moveTo(.04*b,.8125*c);a.lineTo(.46*b,.8125*
c);a.moveTo(.04*b,.9375*c);a.lineTo(.46*b,.9375*c);a.moveTo(.46*b,.905*c);a.lineTo(.4*b,.9375*c);a.lineTo(.46*b,.97*c);a.stroke();d=c/15;a.begin();a.ellipse(.46*b-d,.8125*c-.5*d,d,d);a.fillAndStroke();a.begin();a.ellipse(.4*b-d,.9375*c-.5*d,d,d);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.er.bachmans",mxShapeERBachman);
mxShapeERBachman.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERInfEng(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERInfEng,mxShape);
mxShapeERInfEng.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"textColor","#666666"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17");a.translate(d,e);b=Math.max(b,c/1.5);c=Math.max(c,5*g);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c,g,f)};mxShapeERInfEng.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeERInfEng.prototype.foreground=function(a,d,e,b,c,f,g){a.begin();a.moveTo(0,.2*c);a.lineTo(b,.2*c);a.moveTo(0,.4*c);a.lineTo(b,.4*c);a.moveTo(0,.6*c);a.lineTo(b,.6*c);a.moveTo(0,.8*c);a.lineTo(b,.8*c);a.moveTo(.5*b,.2*c);a.lineTo(.5*b,c);a.stroke();a.begin();a.setFontSize(f);a.setFontColor(g);a.text(.5*b,.1*c,0,0,"ERD Information Engineering Notation",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(.85*f);a.text(.52*b,.3*c,0,0,"Zero or one",mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.5*c,0,0,"One only",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.7*c,0,0,"Zero or more",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.52*b,.9*c,0,0,"One or more",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);d=c/12;a.begin();a.moveTo(.04*b,.3*c);a.lineTo(.46*b,.3*c);a.moveTo(.46*b-d,.25*c);a.lineTo(.46*b-d,.35*c);a.moveTo(.04*b,.5*c);a.lineTo(.46*b,.5*c);a.moveTo(.46*b-2*d,.45*
c);a.lineTo(.46*b-2*d,.55*c);a.moveTo(.46*b-2.5*d,.45*c);a.lineTo(.46*b-2.5*d,.55*c);a.moveTo(.04*b,.7*c);a.lineTo(.46*b,.7*c);a.moveTo(.46*b,.65*c);a.lineTo(.46*b-2*d,.7*c);a.lineTo(.46*b,.75*c);a.stroke();a.moveTo(.04*b,.9*c);a.lineTo(.46*b,.9*c);a.moveTo(.46*b,.85*c);a.lineTo(.46*b-2*d,.9*c);a.lineTo(.46*b,.95*c);a.moveTo(.46*b-2.5*d,.85*c);a.lineTo(.46*b-2.5*d,.95*c);a.stroke();a.begin();a.ellipse(.46*b-3*d,.3*c-.5*d,d,d);a.fillAndStroke();a.begin();a.ellipse(.46*b-3*d,.7*c-.5*d,d,d);a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.er.ie",mxShapeERInfEng);
mxShapeERInfEng.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxMarker.addMarker("ERone",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(b.x-m/2-n/2,b.y-n/2+m/2);a.lineTo(b.x-m/2+n/2,b.y-n/2-m/2);a.stroke()}});
mxMarker.addMarker("ERmandOne",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(b.x-m/2-n/2,b.y-n/2+m/2);a.lineTo(b.x-m/2+n/2,b.y-n/2-m/2);a.moveTo(b.x-m-n/2,b.y-n+m/2);a.lineTo(b.x-m+n/2,b.y-n-m/2);a.stroke()}});mxMarker.addMarker("ERmany",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(b.x+n/2,b.y-m/2);a.lineTo(b.x-m,b.y-n);a.lineTo(b.x-n/2,b.y+m/2);a.stroke()}});
mxMarker.addMarker("ERoneToMany",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(b.x-m-n/2,b.y-n+m/2);a.lineTo(b.x-m+n/2,b.y-n-m/2);a.moveTo(b.x+n/2,b.y-m/2);a.lineTo(b.x-m,b.y-n);a.lineTo(b.x-n/2,b.y+m/2);a.stroke()}});
mxMarker.addMarker("ERzeroToMany",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2,q=b.x,t=b.y;l||(b.x-=2*m-c*k/2,b.y-=2*n-f*k/2);return function(){a.begin();a.ellipse(q-1.5*m-p,t-1.5*n-p,2*p,2*p);if(l){var u=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,"#666666");a.setFillColor("#ffffff");a.fillAndStroke();a.setFillColor(u)}else a.stroke();a.begin();a.moveTo(q+n/2,t-m/2);a.lineTo(q-m,t-n);a.lineTo(q-n/2,t+m/2);l||(a.moveTo(q-m,t-n),a.lineTo(q,t));a.stroke()}});
mxMarker.addMarker("ERzeroToOne",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2,q=b.x,t=b.y;l||(b.x-=2*m-c*k/2,b.y-=2*n-f*k/2);return function(){a.begin();a.ellipse(q-1.5*m-p,t-1.5*n-p,2*p,2*p);if(l){var u=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,"#666666");a.setFillColor("#ffffff");a.fillAndStroke();a.setFillColor(u)}else a.stroke();a.begin();a.moveTo(q-m/2-n/2,t-n/2+m/2);a.lineTo(q-m/2+n/2,t-n/2-m/2);l||(a.moveTo(q-m-c*k/2,t-n-f*k/2),a.lineTo(q,t));a.stroke()}});
function mxShapeERRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeERRRect,mxShape);mxShapeERRRect.prototype.cst={RRECT:"mxgraph.er.rrect",R_SIZE:"rSize"};mxShapeERRRect.prototype.customProperties=[{name:"rSize",dispName:"Rounding Size",type:"float"}];
mxShapeERRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeERRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeERRRect.prototype.cst.RRECT,mxShapeERRRect);
mxShapeERRRect.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxShapeERAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeERAnchor,mxShape);mxShapeERAnchor.prototype.cst={ANCHOR:"mxgraph.er.anchor"};mxShapeERAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeERAnchor.prototype.cst.ANCHOR,mxShapeERAnchor);
var mxIOS7C={MAIN_TEXT:"mainText",SUB_TEXT:"subText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",BAR_POS:"barPos",BUTTON_TEXT:"buttonText",BUTTON_STATE:"buttonState",SELECTED:"+",STATE_ON:"on",STATE_OFF:"off",GRID_SIZE:"gridSize",SHAPE_IOS7_APP_BAR:"mxgraph.ios7ui.appBar",SHAPE_IOS7_ON_OFF_BUTTON:"mxgraph.ios7ui.onOffButton",SHAPE_IOS7_SLIDER:"mxgraph.ios7ui.slider",SHAPE_IOS7_DOWNLOAD_BAR:"mxgraph.ios7ui.downloadBar",SHAPE_IOS7_ICON:"mxgraph.ios7ui.icon",SHAPE_IOS7_HOR_BUTTON_BAR:"mxgraph.ios7ui.horButtonBar",
SHAPE_IOS7_PAGE_CONTROL:"mxgraph.ios7ui.pageControl",SHAPE_IOS7_EXPAND:"mxgraph.ios7ui.expand",SHAPE_IOS7_ICON_GRID:"mxgraph.ios7ui.iconGrid",SHAPE_IOS7_PHONE:"mxgraph.ios7ui.phone",SHAPE_IOS7_SEARCH_BOX:"mxgraph.ios7ui.searchBox",SHAPE_IOS7_URL:"mxgraph.ios7ui.url",SHAPE_IOS7_ACTION_DIALOG:"mxgraph.ios7ui.actionDialog",STYLE_FILLCOLOR2:"fillColor2",STYLE_FILLCOLOR3:"fillColor3",STYLE_TEXTCOLOR:"textColor",STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",STYLE_STROKECOLOR3:"strokeColor3",
STYLE_TEXTSIZE:"textSize"};function mxShapeIOS7AppBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7AppBar,mxShape);mxShapeIOS7AppBar.prototype.customProperties=[{name:"fillColor2",dispName:"Fill Color 2",type:"color"}];mxShapeIOS7AppBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeIOS7AppBar.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fill()};
mxShapeIOS7AppBar.prototype.foreground=function(a,d,e,b,c){a.setFillColor(mxUtils.getValue(this.style,mxIOS7C.STYLE_FILLCOLOR2,"#222222"));a.ellipse(5,.5*c-1.5,3,3);a.fill();a.ellipse(9,.5*c-1.5,3,3);a.fill();a.ellipse(13,.5*c-1.5,3,3);a.fill();a.ellipse(17,.5*c-1.5,3,3);a.fill();a.ellipse(21,.5*c-1.5,3,3);a.fill();a.ellipse(54,.5*c+2,2,2);a.fillAndStroke();a.setStrokeWidth(2);a.begin();a.moveTo(52,.5*c+1);a.arcTo(3.5,3.5,0,0,1,58,.5*c+1);a.stroke();a.begin();a.moveTo(50,.5*c-1);a.arcTo(6,6,0,0,1,
60,.5*c-1);a.stroke();a.begin();a.moveTo(b-19,.5*c-2);a.lineTo(b-6,.5*c-2);a.lineTo(b-6,.5*c+2);a.lineTo(b-19,.5*c+2);a.close();a.fill();a.setStrokeWidth(1);a.begin();a.moveTo(b-44,.5*c-2.5);a.lineTo(b-36,.5*c+2.5);a.lineTo(b-40,.5*c+5);a.lineTo(b-40,.5*c-5);a.lineTo(b-36,.5*c-2.5);a.lineTo(b-44,.5*c+2.5);a.stroke();a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);
a.close();a.stroke()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_APP_BAR,mxShapeIOS7AppBar);function mxShapeIOS7OnOffButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7OnOffButton,mxShape);
mxShapeIOS7OnOffButton.prototype.customProperties=[{name:"buttonState",dispName:"Button State",type:"enum",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]},{name:"strokeColor2",dispName:"Stroke Color 2",type:"color"},{name:"fillColor2",dispName:"Fill Color 2",type:"color"}];
mxShapeIOS7OnOffButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,2*c);var f=mxUtils.getValue(this.style,mxIOS7C.BUTTON_STATE,mxIOS7C.STATE_ON);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeIOS7OnOffButton.prototype.background=function(a,d,e,b,c,f){f===mxIOS7C.STATE_ON?(a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke()):f===mxIOS7C.STATE_OFF&&(a.setStrokeColor(mxUtils.getValue(this.style,mxIOS7C.STYLE_STROKECOLOR2,"#aaaaaa")),a.setFillColor(mxUtils.getValue(this.style,mxIOS7C.STYLE_FILLCOLOR2,"#ffffff")),a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke())};
mxShapeIOS7OnOffButton.prototype.foreground=function(a,d,e,b,c,f){a.setFillColor("#ffffff");f===mxIOS7C.STATE_ON?(a.ellipse(b-c+1,1,c-2,c-2),a.fill()):(a.ellipse(0,0,c,c),a.stroke())};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_ON_OFF_BUTTON,mxShapeIOS7OnOffButton);function mxShapeIOS7Slider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.barPos=80}mxUtils.extend(mxShapeIOS7Slider,mxShape);
mxShapeIOS7Slider.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);this.foreground(a,b,c)};mxShapeIOS7Slider.prototype.foreground=function(a,d,e){a.setStrokeWidth(2);a.begin();a.moveTo(0,.5*e);a.lineTo(d,.5*e);a.stroke();var b=mxUtils.getValue(this.style,mxIOS7C.BAR_POS,"80");b=Math.min(b,100);b=Math.max(b,0);d=(d-0)*b/100;a.setStrokeColor(mxUtils.getValue(this.style,mxIOS7C.STYLE_STROKECOLOR2,"#a0a0a0"));a.ellipse(d-5,.5*e-5,10,10);a.fillAndStroke()};
mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_SLIDER,mxShapeIOS7Slider);Graph.handleFactory[mxIOS7C.SHAPE_IOS7_SLIDER]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(d.x+e/100*d.width,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeIOS7DownloadBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.barPos=80}mxUtils.extend(mxShapeIOS7DownloadBar,mxShape);mxShapeIOS7DownloadBar.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,max:1,defVal:30},{name:"strokeColor2",dispName:"Stroke Color 2",type:"color"}];mxShapeIOS7DownloadBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.foreground(a,b,c)};
mxShapeIOS7DownloadBar.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxIOS7C.BUTTON_TEXT,"");a.setFontStyle(mxConstants.FONT_BOLD);a.text(.5*d,.2*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);b=mxUtils.getValue(this.style,mxIOS7C.BAR_POS,"80");b=Math.min(b,100);b=Math.max(b,0);b=d*b/100;a.setStrokeWidth(2);a.setStrokeColor(mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,""));a.begin();a.moveTo(0,.5*e);a.lineTo(d,.5*e);a.stroke();a.setStrokeColor(mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,""));a.begin();a.moveTo(0,.5*e);a.lineTo(b,.5*e);a.stroke()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_DOWNLOAD_BAR,mxShapeIOS7DownloadBar);
Graph.handleFactory[mxIOS7C.SHAPE_IOS7_DOWNLOAD_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(d.x+e/100*d.width,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeIOS7Icon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7Icon,mxShape);mxShapeIOS7Icon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.foreground(a,b,c)};
mxShapeIOS7Icon.prototype.foreground=function(a,d,e){a.setGradient("#00D0F0","#0080F0",.325*d,0,.675*d,.5*e,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(0,0,d,e,.1*d,.1*e);a.fill();var b=mxUtils.getValue(this.style,mxIOS7C.BUTTON_TEXT,"");a.setFontColor("#ffffff");a.setFontStyle(mxConstants.FONT_BOLD);a.setFontSize(8);a.text(.5*d,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_ICON,mxShapeIOS7Icon);
function mxShapeIOS7horButtonBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7horButtonBar,mxShape);
mxShapeIOS7horButtonBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxIOS7C.BUTTON_TEXT,"+Button 1, Button 2, Button 3").toString().split(","),g=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTCOLOR,"#666666"),h=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTCOLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8.5").toString(),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,
"#ffffff"),n=mxUtils.getValue(this.style,mxIOS7C.STYLE_FILLCOLOR2,"#008cff"),p=f.length,q=Array(p),t=0,u=-1,v=0;v<p;v++){var r=f[v];r.charAt(0)===mxIOS7C.SELECTED&&(r=f[v].substring(1),u=v);q[v]=mxUtils.getSizeForString(r,k,mxConstants.DEFAULT_FONTFAMILY).width;t+=q[v]}c=Math.max(c,1.5*k,10);t=5*p+t;b=Math.max(b,t);a.translate(d,e);this.background(a,b,c,2.5,p,q,2.5,t,l,m,n,u);a.setShadow(!1);for(v=d=0;v<p;v++)v===u?a.setFontColor(h):a.setFontColor(g),d+=2.5,this.buttonText(a,d,c,f[v],q[v],k,t,b),
d=d+q[v]+2.5};
mxShapeIOS7horButtonBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n){a.begin();a.setStrokeColor(k);a.setFillColor(l);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.fillAndStroke();a.setStrokeColor(k);a.begin();for(m=1;m<c;m++)if(m!==n&&m!==n+1){for(var p=0,q=0;q<m;q++)p+=f[q]+2*g;p=p*d/h;a.moveTo(p,0);a.lineTo(p,e)}a.stroke();p=0;a.setStrokeColor(mxConstants.NONE);for(m=
0;m<n;m++)p+=f[m]+2*g;p=p*d/h;f=(f[n]+2*g)*d/h;f+=p;a.setFillColor("#0080F0");0===n?(a.begin(),a.moveTo(0,b),a.arcTo(b,b,0,0,1,b,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(b,e),a.arcTo(b,b,0,0,1,0,e-b),a.close(),a.fill()):n===c-1?(a.begin(),a.moveTo(p,0),a.lineTo(f-b,0),a.arcTo(b,b,0,0,1,f,b),a.lineTo(f,e-b),a.arcTo(b,b,0,0,1,f-b,e),a.lineTo(p,e),a.close(),a.fill()):-1!==n&&(a.begin(),a.moveTo(p,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(p,e),a.close(),a.fill());a.setStrokeColor(k);a.setFillColor(l);a.begin();
a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.stroke()};mxShapeIOS7horButtonBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxIOS7C.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_HOR_BUTTON_BAR,mxShapeIOS7horButtonBar);
function mxShapeIOS7pageControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7pageControl,mxShape);
mxShapeIOS7pageControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");var f=Math.min(.5*c,.05*b);a.setFillColor(e);a.ellipse(0,.5*c-f,2*f,2*f);a.fill();a.ellipse(.25*b-.5*f,.5*c-f,2*f,2*f);a.fill();a.ellipse(.5*b-f,.5*c-f,2*f,2*f);a.fill();a.ellipse(.75*b-1.5*f,.5*c-f,2*f,2*f);a.fill();a.setFillColor(d);a.ellipse(b-2*f,.5*c-f,2*f,2*f);a.fill()};
mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_PAGE_CONTROL,mxShapeIOS7pageControl);function mxShapeIOS7iconGrid(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7iconGrid,mxShape);mxShapeIOS7iconGrid.prototype.customProperties=[{name:"gridSize",dispName:"Grid Size",type:"string"}];
mxShapeIOS7iconGrid.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=decodeURIComponent(mxUtils.getValue(this.style,mxIOS7C.GRID_SIZE,"4,7").toString()).split(",");b/=parseInt(d[0],10)+.1*(d[0]-1);c/=parseInt(d[1],10)+.1*(d[1]-1);for(e=0;e<d[0];e++)for(var f=0;f<d[1];f++)a.rect(1.1*b*e,1.1*c*f,b,c),a.fill()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_ICON_GRID,mxShapeIOS7iconGrid);
function mxShapeIOS7phone(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7phone,mxShape);mxShapeIOS7phone.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b,c,25,25);a.fillAndStroke();a.setShadow(!1);this.foreground(a,d,e,b,c,25)};
mxShapeIOS7phone.prototype.foreground=function(a,d,e,b,c,f){a.rect(.0625*b,.15*c,.875*b,.7*c);a.stroke();a.ellipse(.4875*b,.04125*c,.025*b,.0125*c);a.stroke();a.roundrect(.375*b,.075*c,.25*b,.01875*c,.02*b,.01*c);a.stroke();a.ellipse(.4*b,.875*c,.2*b,.1*c);a.stroke();a.roundrect(.4575*b,.905*c,.085*b,.04375*c,.00625*c,.00625*c);a.stroke()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_PHONE,mxShapeIOS7phone);
function mxShapeIOS7searchBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7searchBox,mxShape);mxShapeIOS7searchBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeIOS7searchBox.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fill()};
mxShapeIOS7searchBox.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxIOS7C.BUTTON_TEXT,"Search"),c=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTCOLOR,"#666666"),f=mxUtils.getValue(this.style,mxIOS7C.STYLE_STROKECOLOR2,"#008cff");mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTSIZE,"17");var g=.1*Math.min(d,e);a.setFillColor("#ffffff");a.roundrect(.05*d,.15*e,.5*d,.7*e,g,g);a.fillAndStroke();a.setFontColor(c);a.setFontSize(Math.min(.7*e,.1*d));a.text(5,.5*e,0,0,b,mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(f);a.ellipse(.05*d+3,.5*e-3,4,4);a.stroke();a.begin();a.moveTo(.05*d+8,.5*e+3.5);a.lineTo(.05*d+6,.5*e+.5);a.stroke()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_SEARCH_BOX,mxShapeIOS7searchBox);function mxShapeIOS7URL(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7URL,mxShape);
mxShapeIOS7URL.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeIOS7URL.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fill()};
mxShapeIOS7URL.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxIOS7C.BUTTON_TEXT,"draw.io"),c=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTCOLOR,"#666666"),f=mxUtils.getValue(this.style,mxIOS7C.STYLE_STROKECOLOR2,"#008cff");mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTSIZE,"17");var g=.1*Math.min(d,e);a.setFillColor("#d8d8d8");a.roundrect(.05*d,.15*e,.9*d,.7*e,g,g);a.fill();a.setFontColor(c);a.setFontSize(Math.min(.7*e,.1*d));a.text(.5*d,.5*e,0,0,b,mxConstants.ALIGN_LEFT,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(f);a.begin();a.moveTo(.95*d-5,.5*e);a.arcTo(3,3,0,1,1,.95*d-8,.5*e-3);a.stroke();a.setFillColor(f);a.begin();a.moveTo(.95*d-8,.5*e-4);a.lineTo(.95*d-6,.5*e-3);a.lineTo(.95*d-8,.5*e-2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_URL,mxShapeIOS7URL);function mxShapeIOS7Actiondialog(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeIOS7Actiondialog,mxShape);
mxShapeIOS7Actiondialog.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxIOS7C.MAIN_TEXT,"Main Text"),g=mxUtils.getValue(this.style,mxIOS7C.SUB_TEXT,"Sub Text"),h=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTCOLOR,"#666666"),k=mxUtils.getValue(this.style,mxIOS7C.STYLE_TEXTSIZE,"17");a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);a.setFillColor("#e0e0e0");a.roundrect(.05*b,.1*c,.9*b,.35*c,.025*b,.05*c);a.fill();a.roundrect(.05*b,.55*c,.9*b,.35*c,.025*
b,.05*c);a.fill();a.setFontStyle(mxConstants.FONT_BOLD);this.mainText(a,d,e,b,c,f,k,h);this.subText(a,d,e,b,c,g,k/1.4,h)};mxShapeIOS7Actiondialog.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fill()};mxShapeIOS7Actiondialog.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.4*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxShapeIOS7Actiondialog.prototype.subText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.text(.5*b,.7*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxIOS7C.SHAPE_IOS7_ACTION_DIALOG,mxShapeIOS7Actiondialog);function mxShapeIOS7Anchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeIOS7Anchor,mxShape);mxShapeIOS7Anchor.prototype.cst={ANCHOR:"mxgraph.ios7ui.anchor"};
mxShapeIOS7Anchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeIOS7Anchor.prototype.cst.ANCHOR,mxShapeIOS7Anchor);function mxShapeIOS7RRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7RRect,mxShape);mxShapeIOS7RRect.prototype.cst={RRECT:"mxgraph.ios7ui.rrect",R_SIZE:"rSize"};mxShapeIOS7RRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:3}];
mxShapeIOS7RRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIOS7RRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7RRect.prototype.cst.RRECT,mxShapeIOS7RRect);function mxShapeIOS7LeftButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7LeftButton,mxShape);
mxShapeIOS7LeftButton.prototype.cst={LEFT_BUTTON:"mxgraph.ios7ui.leftButton",R_SIZE:"rSize"};mxShapeIOS7LeftButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:3}];
mxShapeIOS7LeftButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIOS7LeftButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7LeftButton.prototype.cst.LEFT_BUTTON,mxShapeIOS7LeftButton);
function mxShapeIOS7RightButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7RightButton,mxShape);mxShapeIOS7RightButton.prototype.cst={RIGHT_BUTTON:"mxgraph.ios7ui.rightButton",R_SIZE:"rSize"};mxShapeIOS7RightButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:3}];
mxShapeIOS7RightButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIOS7RightButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7RightButton.prototype.cst.RIGHT_BUTTON,mxShapeIOS7RightButton);
function mxShapeIOS7TopButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7TopButton,mxShape);mxShapeIOS7TopButton.prototype.cst={TOP_BUTTON:"mxgraph.ios7ui.topButton",R_SIZE:"rSize"};mxShapeIOS7TopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:3}];
mxShapeIOS7TopButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIOS7TopButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,c);a.lineTo(0,c);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7TopButton.prototype.cst.TOP_BUTTON,mxShapeIOS7TopButton);
function mxShapeIOS7BottomButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7BottomButton,mxShape);mxShapeIOS7BottomButton.prototype.cst={BOTTOM_BUTTON:"mxgraph.ios7ui.bottomButton",R_SIZE:"rSize"};mxShapeIOS7BottomButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:3}];
mxShapeIOS7BottomButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIOS7BottomButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,0);a.lineTo(0,0);a.lineTo(0,c-d);a.arcTo(d,d,0,0,0,d,c);a.lineTo(b-d,c);a.arcTo(d,d,0,0,0,b,c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7BottomButton.prototype.cst.BOTTOM_BUTTON,mxShapeIOS7BottomButton);
function mxShapeIOS7HorLines(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7HorLines,mxShape);mxShapeIOS7HorLines.prototype.cst={HOR_LINES:"mxgraph.ios7ui.horLines"};mxShapeIOS7HorLines.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fill();a.begin();a.moveTo(0,0);a.lineTo(b,0);a.moveTo(0,c);a.lineTo(b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeIOS7HorLines.prototype.cst.HOR_LINES,mxShapeIOS7HorLines);function mxShapeIOS7MarginRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7MarginRect,mxShape);
mxShapeIOS7MarginRect.prototype.customProperties=[{name:"rx",dispName:"Hor. Rounding Size",type:"float",min:0,defVal:3},{name:"ry",dispName:"Ver. Rounding Size",type:"float",min:0,defVal:3},{name:"rectMargin",dispName:"Global Margin",type:"float",min:0,defVal:5},{name:"rectMarginTop",dispName:"Top Margin",type:"float",min:0,defVal:0},{name:"rectMarginLeft",dispName:"Left Margin",type:"float",min:0,defVal:0},{name:"rectMarginBottom",dispName:"Bottom Margin",type:"float",min:0,defVal:0},{name:"rectMarginRight",
dispName:"Right Margin",type:"float",min:0,defVal:0}];mxShapeIOS7MarginRect.prototype.cst={SHAPE_MARGIN_RECT:"mxgraph.ios7ui.marginRect",MARGIN:"rectMargin",RX:"rx",RY:"ry",MARGIN_TOP:"rectMarginTop",MARGIN_LEFT:"rectMarginLeft",MARGIN_BOTTOM:"rectMarginBottom",MARGIN_RIGHT:"rectMarginRight"};mxShapeIOS7MarginRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeIOS7MarginRect.prototype.background=function(a,d,e,b,c,f){f=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.MARGIN,"0"));var g=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.MARGIN_TOP,"0")),h=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.MARGIN_LEFT,"0")),k=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.MARGIN_BOTTOM,"0")),l=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.MARGIN_RIGHT,
"0"));d=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.RX,"0"));e=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7MarginRect.prototype.cst.RY,"0"));h=f+h;g=f+g;b=b-l-h-f;c=c-k-g-f;0<b&&0<c&&(a.begin(),a.roundrect(h,g,b,c,d,e),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeIOS7MarginRect.prototype.cst.SHAPE_MARGIN_RECT,mxShapeIOS7MarginRect);
function mxShapeIOS7Callout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIOS7Callout,mxShape);mxShapeIOS7Callout.prototype.cst={SHAPE_CALLOUT:"mxgraph.ios7ui.callout"};mxShapeIOS7Callout.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeIOS7Callout.prototype.background=function(a,d,e,b,c,f){30<=b&&20<=c&&(a.begin(),a.moveTo(15,c-3),a.arcTo(20,10,0,0,1,0,c),a.arcTo(15,15,0,0,0,10,c-10),a.lineTo(10,10),a.arcTo(10,10,0,0,1,20,0),a.lineTo(b-10,0),a.arcTo(10,10,0,0,1,b,10),a.lineTo(b,c-10),a.arcTo(10,10,0,0,1,b-10,c),a.lineTo(20,c),a.arcTo(10,10,0,0,1,15,c-3),a.close(),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeIOS7Callout.prototype.cst.SHAPE_CALLOUT,mxShapeIOS7Callout);
function mxShapeIOS7SelectBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.dx2=70;this.size=10}mxUtils.extend(mxShapeIOS7SelectBar,mxActor);mxShapeIOS7SelectBar.prototype.cst={SELECT_BAR:"mxgraph.ios7ui.selectBar"};
mxShapeIOS7SelectBar.prototype.customProperties=[{name:"dx",dispName:"Callout Position",type:"float",min:0,defVal:120},{name:"dx2",dispName:"Field Size",type:"float",min:0,defVal:75},{name:"size",dispName:"Rounding size",type:"float",min:0,defVal:5},{name:"dy",dispName:"Callout Size",type:"float",min:0,defVal:5}];
mxShapeIOS7SelectBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=Math.max(0,Math.min(c,(b-Math.max(20,e)-e)/2,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.min(c/2,b/2,e);f=Math.max(e+g,f);f=Math.min(b-e-g,b-
20-g,f);a.begin();a.moveTo(f-g,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.lineTo(0,e);a.arcTo(e,e,0,0,1,e,0);a.lineTo(b-e,0);a.arcTo(e,e,0,0,1,b,e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(f+g,c);a.lineTo(f,c+g);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(b-Math.max(20,e),0);a.lineTo(b-Math.max(20,e),c);a.stroke();f=d;for(a.begin();f<b-Math.max(20,e);)a.moveTo(f,0),a.lineTo(f,c),f+=d;a.stroke();d=Math.min(Math.max(20,e),c);b-=.5*d;c*=.5;a.setFillColor(mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,""));a.begin();a.moveTo(b-.15*d,c-.225*d);a.lineTo(b+.25*d,c);a.lineTo(b-.15*d,c+.225*d);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeIOS7SelectBar.prototype.cst.SELECT_BAR,mxShapeIOS7SelectBar);mxShapeIOS7SelectBar.prototype.constraints=null;
Graph.handleFactory[mxShapeIOS7SelectBar.prototype.cst.SELECT_BAR]=function(a){var d=[Graph.createHandle(a,["dx"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(b.x+c,b.y+b.height)},function(b,c){var f=.6*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));this.state.style.dx=Math.round(100*Math.max(f,Math.min(b.width-f,c.x-b.x)))/100})],e=Graph.createHandle(a,["dy"],function(b){var c=Math.max(0,Math.min(b.height,
parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),b.y+b.height+c)},function(b,c){this.state.style.dy=Math.round(100*Math.max(0,Math.min(b.height,c.y-b.y-b.height)))/100});d.push(e);e=Graph.createHandle(a,["size"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+b.width-c,b.y+10)},function(b,c){this.state.style.size=Math.round(100*
Math.max(0,Math.min(b.width/2,b.height/2,b.x+b.width-c.x)))/100});d.push(e);a=Graph.createHandle(a,["dx2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width,c.x-b.x)))/100});d.push(a);return d};function mxShapeIOS7Slider2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeIOS7Slider2,mxShape);mxShapeIOS7Slider2.prototype.cst={SHAPE_SLIDER:"mxgraph.ios7ui.slider",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"};mxShapeIOS7Slider2.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,max:1,defVal:20},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}];mxShapeIOS7Slider2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeIOS7Slider2.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7Slider2.prototype.cst.HANDLE_SIZE,"10"));e=parseFloat(mxUtils.getValue(this.style,mxShapeIOS7Slider2.prototype.cst.BAR_POS,"40"))/100;e=Math.max(0,Math.min(1,e));a.save();a.setStrokeColor("#bbbbbb");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.fillAndStroke();a.restore();a.begin();a.moveTo(0,.5*c);a.lineTo(e*b,.5*c);a.fillAndStroke();a.setStrokeColor("#bbbbbb");a.begin();a.ellipse(e*b-
.5*d,.5*c-.5*d,d,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIOS7Slider2.prototype.cst.SHAPE_SLIDER,mxShapeIOS7Slider2);mxShapeIOS7Slider2.prototype.constraints=null;
Graph.handleFactory[mxShapeIOS7Slider2.prototype.cst.SHAPE_SLIDER]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeMockupMultiButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupMultiButton,mxShape);mxShapeMockupMultiButton.prototype.cst={MAIN_TEXT:"mainText",SHAPE_MULTILINE_BUTTON:"mxgraph.mockup.buttons.multiButton",SUB_TEXT:"subText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",BUTTON_STYLE:"buttonStyle",ROUND:"round",CHEVRON:"chevron"};
mxShapeMockupMultiButton.prototype.customProperties=[{name:"buttonStyle",dispName:"Style",type:"enum",defVal:"round",enumList:[{val:"round",dispName:"Round"},{val:"chevron",dispName:"Chevron"}]}];
mxShapeMockupMultiButton.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupMultiButton.prototype.cst.MAIN_TEXT,"Main Text"),g=mxUtils.getValue(this.style,mxShapeMockupMultiButton.prototype.cst.SUB_TEXT,"Sub Text"),h=mxUtils.getValue(this.style,mxShapeMockupMultiButton.prototype.cst.TEXT_COLOR,"#666666"),k=mxUtils.getValue(this.style,mxShapeMockupMultiButton.prototype.cst.TEXT_SIZE,"17");a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);a.setFontStyle(mxConstants.FONT_BOLD);
this.mainText(a,d,e,b,c,f,k,h);this.subText(a,d,e,b,c,g,k/1.4,h)};
mxShapeMockupMultiButton.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupMultiButton.prototype.cst.BUTTON_STYLE,mxShapeMockupMultiButton.prototype.cst.ROUND).toString();a.begin();d===mxShapeMockupMultiButton.prototype.cst.ROUND?(a.moveTo(0,10),a.arcTo(10,10,0,0,1,10,0),a.lineTo(b-10,0),a.arcTo(10,10,0,0,1,b,10),a.lineTo(b,c-10),a.arcTo(10,10,0,0,1,b-10,c),a.lineTo(10,c),a.arcTo(10,10,0,0,1,0,c-10)):d===mxShapeMockupMultiButton.prototype.cst.CHEVRON&&(a.moveTo(0,
.1*c),a.arcTo(.0372*b,.1111*c,0,0,1,.0334*b,0),a.lineTo(.768*b,0),a.arcTo(.0722*b,.216*c,0,0,1,.8014*b,.0399*c),a.lineTo(.99*b,.4585*c),a.arcTo(.09*b,.1*c,0,0,1,.99*b,.5415*c),a.lineTo(.8014*b,.9568*c),a.arcTo(.0722*b,.216*c,0,0,1,.768*b,c),a.lineTo(.0334*b,c),a.arcTo(.0372*b,.1111*c,0,0,1,0,.9*c));a.close();a.fillAndStroke()};
mxShapeMockupMultiButton.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.4*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxShapeMockupMultiButton.prototype.subText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.text(.5*b,.7*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupMultiButton.prototype.cst.SHAPE_MULTILINE_BUTTON,mxShapeMockupMultiButton);
function mxShapeMockupButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupButton,mxShape);mxShapeMockupButton.prototype.cst={MAIN_TEXT:"mainText",SHAPE_BUTTON:"mxgraph.mockup.buttons.button",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",BUTTON_STYLE:"buttonStyle",ROUND:"round",CHEVRON:"chevron"};
mxShapeMockupButton.prototype.customProperties=[{name:"buttonStyle",dispName:"Style",type:"enum",defVal:"round",enumList:[{val:"round",dispName:"Round"},{val:"chevron",dispName:"Chevron"}]}];
mxShapeMockupButton.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupButton.prototype.cst.MAIN_TEXT,"Main Text"),g=mxUtils.getValue(this.style,mxShapeMockupButton.prototype.cst.TEXT_COLOR,"#666666").toString(),h=mxUtils.getValue(this.style,mxShapeMockupButton.prototype.cst.TEXT_SIZE,"17").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeMockupButton.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupButton.prototype.cst.BUTTON_STYLE,mxShapeMockupButton.prototype.cst.ROUND).toString();a.begin();d===mxShapeMockupButton.prototype.cst.ROUND?(a.moveTo(0,10),a.arcTo(10,10,0,0,1,10,0),a.lineTo(b-10,0),a.arcTo(10,10,0,0,1,b,10),a.lineTo(b,c-10),a.arcTo(10,10,0,0,1,b-10,c),a.lineTo(10,c),a.arcTo(10,10,0,0,1,0,c-10)):d===mxShapeMockupButton.prototype.cst.CHEVRON&&(a.moveTo(0,.1*c),a.arcTo(.0372*b,.1111*
c,0,0,1,.0334*b,0),a.lineTo(.768*b,0),a.arcTo(.0722*b,.216*c,0,0,1,.8014*b,.0399*c),a.lineTo(.99*b,.4585*c),a.arcTo(.09*b,.1*c,0,0,1,.99*b,.5415*c),a.lineTo(.8014*b,.9568*c),a.arcTo(.0722*b,.216*c,0,0,1,.768*b,c),a.lineTo(.0334*b,c),a.arcTo(.0372*b,.1111*c,0,0,1,0,.9*c));a.close();a.fillAndStroke()};
mxShapeMockupButton.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.setFontStyle(mxConstants.FONT_BOLD);a.text(b/2,c/2,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupButton.prototype.cst.SHAPE_BUTTON,mxShapeMockupButton);function mxShapeMockupHorButtonBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupHorButtonBar,mxShape);mxShapeMockupHorButtonBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_HOR_BUTTON_BAR:"mxgraph.mockup.buttons.horButtonBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"};
mxShapeMockupHorButtonBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.MAIN_TEXT,"+Button 1, Button 2, Button 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.TEXT_COLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.STROKE_COLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxShapeMockupHorButtonBar.prototype.cst.FILL_COLOR2,"#008cff"),q=f.length,t=Array(q),u=0,v=-1,r=0;r<q;r++){var w=f[r];w.charAt(0)===mxShapeMockupHorButtonBar.prototype.cst.SELECTED&&(w=f[r].substring(1),v=r);t[r]=mxUtils.getSizeForString(w,k,mxConstants.DEFAULT_FONTFAMILY).width;
u+=t[r]}c=Math.max(c,1.5*k,20);u=10*q+u;b=Math.max(b,u);a.translate(d,e);this.background(a,b,c,10,q,t,5,u,l,m,n,p,v);a.setShadow(!1);a.setFontStyle(mxConstants.FONT_BOLD);for(r=d=0;r<q;r++)r===v?a.setFontColor(h):a.setFontColor(g),d+=5,this.buttonText(a,d,c,f[r],t[r],k,u,b),d=d+t[r]+5};
mxShapeMockupHorButtonBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.begin();a.setStrokeColor(k);a.setFillColor(m);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.fillAndStroke();a.setStrokeColor(l);a.begin();for(l=1;l<c;l++)if(l!==p&&l!==p+1){for(var q=0,t=0;t<l;t++)q+=f[t]+2*g;q=q*d/h;a.moveTo(q,0);a.lineTo(q,e)}a.stroke();q=0;a.setFillColor(n);for(l=0;l<p;l++)q+=
f[l]+2*g;q=q*d/h;f=(f[p]+2*g)*d/h;f+=q;0===p?(a.begin(),a.moveTo(0,b),a.arcTo(b,b,0,0,1,b,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(b,e),a.arcTo(b,b,0,0,1,0,e-b),a.close(),a.fill()):p===c-1?(a.begin(),a.moveTo(q,0),a.lineTo(f-b,0),a.arcTo(b,b,0,0,1,f,b),a.lineTo(f,e-b),a.arcTo(b,b,0,0,1,f-b,e),a.lineTo(q,e),a.close(),a.fill()):-1!==p&&(a.begin(),a.moveTo(q,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(q,e),a.close(),a.fill());a.setStrokeColor(k);a.setFillColor(m);a.begin();a.moveTo(0,b);a.arcTo(b,b,0,0,1,
b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.stroke()};mxShapeMockupHorButtonBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxShapeMockupHorButtonBar.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeMockupHorButtonBar.prototype.cst.SHAPE_HOR_BUTTON_BAR,mxShapeMockupHorButtonBar);function mxShapeMockupVerButtonBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupVerButtonBar,mxShape);
mxShapeMockupVerButtonBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_VER_BUTTON_BAR:"mxgraph.mockup.buttons.verButtonBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"};
mxShapeMockupVerButtonBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.MAIN_TEXT,"+Button 1, Button 2, Button 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.TEXT_COLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.STROKE_COLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxShapeMockupVerButtonBar.prototype.cst.FILL_COLOR2,"#008cff"),q=f.length,t=0,u=-1,v=0;v<q;v++){var r=f[v];r.charAt(0)===mxShapeMockupVerButtonBar.prototype.cst.SELECTED&&(r=f[v].substring(1),u=v);r=mxUtils.getSizeForString(r,k,mxConstants.DEFAULT_FONTFAMILY).width;
r>t&&(t=r)}var w=1.5*k,x=q*w;c=Math.max(c,x);b=Math.max(b,10+t);a.translate(d,e);this.background(a,b,c,10,q,5,q*w,l,m,n,p,u,w);a.setShadow(!1);r=0;a.setFontStyle(mxConstants.FONT_BOLD);for(v=0;v<q;v++)v===u?a.setFontColor(h):a.setFontColor(g),r+=5,this.buttonText(a,b,(v*w+.5*w)*c/x,f[v],k)};
mxShapeMockupVerButtonBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.begin();a.setStrokeColor(h);a.setFillColor(l);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.fillAndStroke();a.setStrokeColor(k);a.begin();for(f=1;f<c;f++)f!==n&&f!==n+1&&(k=f*p*e/g,a.moveTo(0,k),a.lineTo(d,k));a.stroke();a.setFillColor(m);0===n?(a.begin(),g=p*e/g,a.moveTo(0,b),a.arcTo(b,b,0,0,
1,b,0),a.lineTo(d-b,0),a.arcTo(b,b,0,0,1,d,b),a.lineTo(d,g),a.lineTo(0,g),a.close(),a.fill()):n===c-1?(a.begin(),c=e-p*e/g,a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e-b),a.arcTo(b,b,0,0,1,d-b,e),a.lineTo(b,e),a.arcTo(b,b,0,0,1,0,e-b),a.close(),a.fill()):-1!==n&&(a.begin(),c=p*n*e/g,g=p*(n+1)*e/g,a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,g),a.lineTo(0,g),a.close(),a.fill());a.begin();a.setStrokeColor(h);a.setFillColor(l);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,
e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.stroke()};mxShapeMockupVerButtonBar.prototype.buttonText=function(a,d,e,b,c){b.charAt(0)===mxShapeMockupVerButtonBar.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(c);a.text(.5*d,e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupVerButtonBar.prototype.cst.SHAPE_VER_BUTTON_BAR,mxShapeMockupVerButtonBar);
function mxShapeMockupOnOffButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupOnOffButton,mxShape);mxShapeMockupOnOffButton.prototype.cst={SHAPE_ON_OFF_BUTTON:"mxgraph.mockup.buttons.onOffButton",BUTTON_STATE:"buttonState",STATE_ON:"on",STATE_OFF:"off",FILL_COLOR2:"fillColor2",MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize"};
mxShapeMockupOnOffButton.prototype.customProperties=[{name:"buttonState",dispName:"Button State",type:"enum",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];mxShapeMockupOnOffButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,10);c=Math.max(c,10);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupOnOffButton.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b,c,10,10);a.fillAndStroke()};
mxShapeMockupOnOffButton.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupOnOffButton.prototype.cst.BUTTON_STATE,mxShapeMockupOnOffButton.prototype.cst.STATE_ON);e=mxUtils.getValue(this.style,mxShapeMockupOnOffButton.prototype.cst.FILL_COLOR2,"#008cff");var f=mxUtils.getValue(this.style,mxShapeMockupOnOffButton.prototype.cst.TEXT_COLOR,"#ffffff,#999999").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupOnOffButton.prototype.cst.MAIN_TEXT,"ON,OFF").toString().split(","),
h=mxUtils.getValue(this.style,mxShapeMockupOnOffButton.prototype.cst.TEXT_SIZE,"17");d===mxShapeMockupOnOffButton.prototype.cst.STATE_ON?(a.setFillColor(e),a.setFontColor(f[0]),a.roundrect(0,0,.75*b,c,10,10)):(a.setFontColor(f[1]),a.roundrect(.25*b,0,.75*b,c,10,10));a.fillAndStroke();a.setFontSize(h);a.setFontStyle(mxConstants.FONT_BOLD);d===mxShapeMockupOnOffButton.prototype.cst.STATE_ON?a.text(.375*b,.5*c,0,0,g[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):d===mxShapeMockupOnOffButton.prototype.cst.STATE_OFF&&
a.text(.625*b,.5*c,0,0,g[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupOnOffButton.prototype.cst.SHAPE_ON_OFF_BUTTON,mxShapeMockupOnOffButton);function mxShapeMockupRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRRect,mxShape);mxShapeMockupRRect.prototype.cst={RRECT:"mxgraph.mockup.rrect",R_SIZE:"rSize"};
mxShapeMockupRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];mxShapeMockupRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRRect.prototype.cst.RRECT,mxShapeMockupRRect);function mxShapeMockupAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}
mxUtils.extend(mxShapeMockupAnchor,mxShape);mxShapeMockupAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.anchor"};mxShapeMockupAnchor.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];mxShapeMockupAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupAnchor.prototype.cst.ANCHOR,mxShapeMockupAnchor);
function mxShapeMockupTopButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupTopButton,mxShape);mxShapeMockupTopButton.prototype.cst={TOP_BUTTON:"mxgraph.mockup.topButton",R_SIZE:"rSize"};mxShapeMockupTopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupTopButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupTopButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupTopButton.prototype.cst.TOP_BUTTON,mxShapeMockupTopButton);
function mxShapeMockupBottomButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupBottomButton,mxShape);mxShapeMockupBottomButton.prototype.cst={BOTTOM_BUTTON:"mxgraph.mockup.bottomButton",R_SIZE:"rSize"};mxShapeMockupBottomButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupBottomButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupBottomButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupBottomButton.prototype.cst.BOTTOM_BUTTON,mxShapeMockupBottomButton);
function mxShapeMockupRightButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRightButton,mxShape);mxShapeMockupRightButton.prototype.cst={RIGHT_BUTTON:"mxgraph.mockup.rightButton",R_SIZE:"rSize"};mxShapeMockupRightButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupRightButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupRightButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRightButton.prototype.cst.RIGHT_BUTTON,mxShapeMockupRightButton);
function mxShapeMockupLeftButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupLeftButton,mxShape);mxShapeMockupLeftButton.prototype.cst={LEFT_BUTTON:"mxgraph.mockup.leftButton",R_SIZE:"rSize"};mxShapeMockupLeftButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupLeftButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupLeftButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupLeftButton.prototype.cst.LEFT_BUTTON,mxShapeMockupLeftButton);
function mxShapeMockupVideoPlayer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.barPos=20;this.barHeight=30}mxUtils.extend(mxShapeMockupVideoPlayer,mxShape);mxShapeMockupVideoPlayer.prototype.cst={FILL_COLOR2:"fillColor2",TEXT_COLOR:"textColor",STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SHAPE_VIDEO_PLAYER:"mxgraph.mockup.containers.videoPlayer",BAR_POS:"barPos",BAR_HEIGHT:"barHeight"};
mxShapeMockupVideoPlayer.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"textColor",dispName:"Text Color",type:"color"},{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"},{name:"strokeColor3",dispName:"Stroke3 Color",type:"color"},{name:"barPos",dispName:"Handle Position",type:"float",min:0,max:100,defVal:20},{name:"barHeight",dispName:"Video Bar Height",type:"float",min:0,defVal:30}];
mxShapeMockupVideoPlayer.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxShapeMockupVideoPlayer.prototype.cst.FILL_COLOR2,"#c4c4c4"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),k=mxUtils.getValue(this.style,mxShapeMockupVideoPlayer.prototype.cst.STROKE_COLOR2,"#008cff"),l=mxUtils.getValue(this.style,mxShapeMockupVideoPlayer.prototype.cst.STROKE_COLOR3,"#c4c4c4"),m=mxUtils.getValue(this.style,
mxShapeMockupVideoPlayer.prototype.cst.BAR_HEIGHT,"30");b=Math.max(b,5*m);c=Math.max(c,m+10);a.translate(d,e);this.background(a,d,e,b,c,f,h);a.setShadow(!1);this.otherShapes(a,d,e,b,c,g,h,k,l,m)};mxShapeMockupVideoPlayer.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeMockupVideoPlayer.prototype.otherShapes=function(a,d,e,b,c,f,g,h,k,l){var m=mxUtils.getValue(this.style,mxShapeMockupVideoPlayer.prototype.cst.BAR_POS,"20");m=Math.max(0,m);m=Math.min(100,m);d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");e=c-l;m=8+(b-8-8)*m/100;a.setStrokeColor(h);a.begin();a.moveTo(0,e);a.lineTo(m,e);a.stroke();a.setStrokeColor(k);a.begin();a.moveTo(m,e);a.lineTo(b,e);a.stroke();a.setStrokeColor(g);a.begin();a.ellipse(m-8,e-8,16,16);a.fillAndStroke();a.begin();
a.setStrokeWidth(d/2);a.ellipse(m-4,e-4,8,8);a.fillAndStroke();a.setStrokeWidth(d);g=.3*l;h=c-.5*(l+g);k=.3*l;a.setFillColor(f);a.setStrokeColor(f);a.begin();a.moveTo(k,h);a.lineTo(k+g,h+.5*g);a.lineTo(k,h+g);a.close();a.fillAndStroke();f=c-l;a.moveTo(l+.05*l,f+.4*l);a.lineTo(l+.15*l,f+.4*l);a.lineTo(l+.3*l,f+.25*l);a.lineTo(l+.3*l,f+.75*l);a.lineTo(l+.15*l,f+.6*l);a.lineTo(l+.05*l,f+.6*l);a.close();a.fillAndStroke();a.begin();a.moveTo(l+.4*l,f+.35*l);a.arcTo(.2*l,.3*l,0,0,1,l+.4*l,f+.65*l);a.moveTo(l+
.425*l,f+.25*l);a.arcTo(.225*l,.35*l,0,0,1,l+.425*l,f+.75*l);a.stroke();b-=1.3*l;a.begin();a.moveTo(b+.1*l,f+.4*l);a.lineTo(b+.1*l,f+.3*l);a.lineTo(b+.25*l,f+.3*l);a.moveTo(b+.1*l,f+.6*l);a.lineTo(b+.1*l,f+.7*l);a.lineTo(b+.25*l,f+.7*l);a.moveTo(b+.9*l,f+.4*l);a.lineTo(b+.9*l,f+.3*l);a.lineTo(b+.75*l,f+.3*l);a.moveTo(b+.9*l,f+.6*l);a.lineTo(b+.9*l,f+.7*l);a.lineTo(b+.75*l,f+.7*l);a.stroke();b=mxUtils.getValue(this.style,mxShapeMockupVideoPlayer.prototype.cst.TEXT_COLOR,"#666666");a.begin();a.setFontSize(.5*
l);a.setFontColor(b);a.text(1.9*l,c-.45*l,0,0,"0:00/3:53",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupVideoPlayer.prototype.cst.SHAPE_VIDEO_PLAYER,mxShapeMockupVideoPlayer);
Graph.handleFactory[mxShapeMockupVideoPlayer.prototype.cst.SHAPE_VIDEO_PLAYER]=function(a){var d=[Graph.createHandle(a,["barPos"],function(e){var b=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos)))),c=parseFloat(mxUtils.getValue(this.state.style,"barHeight",this.barHeight));return new mxPoint(e.x+(e.width-16)*b/e.width/100*e.width+8,e.y+e.height-c-20)},function(e,b){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(b.x-e.x)/e.width)))/1E3})];
a=Graph.createHandle(a,["barHeight"],function(e){var b=Math.max(0,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"barHeight",this.barHeight))));return new mxPoint(e.x+e.width-20,e.y+e.height-b)},function(e,b){this.state.style.barHeight=Math.round(1E3*Math.max(0,Math.min(e.height,e.y+e.height-b.y)))/1E3});d.push(a);return d};function mxShapeMockupAccordion(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupAccordion,mxShape);mxShapeMockupAccordion.prototype.cst={TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",TEXT_SIZE:"textSize",SHAPE_ACCORDION:"mxgraph.mockup.containers.accordion",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",MAIN_TEXT:"mainText"};
mxShapeMockupAccordion.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.MAIN_TEXT,"+Group 1, Group 2, Group 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.TEXT_COLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.STROKE_COLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxShapeMockupAccordion.prototype.cst.FILL_COLOR2,"#008cff"),q=f.length,t=0,u=-1,v=0;v<q;v++){var r=f[v];r.charAt(0)===mxShapeMockupAccordion.prototype.cst.SELECTED&&(r=f[v].substring(1),u=v);r=mxUtils.getSizeForString(r,k,mxConstants.DEFAULT_FONTFAMILY).width;r>t&&(t=r)}var w=
1.5*k;c=Math.max(c,q*w);b=Math.max(b,10+t);a.translate(d,e);this.background(a,b,c,10,q,5,q*w,l,m,n,p,u,w);a.setShadow(!1);for(v=r=0;v<q;v++)v===u?a.setFontColor(h):a.setFontColor(g),r+=5,this.buttonText(a,b,-1===u||v<=u?v*w+.5*w:c-(q-v-.5)*w,f[v],k)};
mxShapeMockupAccordion.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.begin();a.setStrokeColor(h);a.setFillColor(l);a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke();a.setStrokeColor(k);a.begin();for(b=1;b<c;b++)b!==n&&(f=-1===n||b<n?b*p:e-(c-b)*p,a.moveTo(0,f),a.lineTo(d,f));a.stroke();a.setStrokeColor(mxConstants.NONE);a.setFillColor(m);-1!==n&&(a.begin(),c=p*n,n=p*(n+1),a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,n),a.lineTo(0,n),a.close(),a.fill());a.begin();
a.setStrokeColor(h);a.setFillColor(l);a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.stroke()};mxShapeMockupAccordion.prototype.buttonText=function(a,d,e,b,c){b.charAt(0)===mxShapeMockupAccordion.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(c);a.text(.5*d,e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupAccordion.prototype.cst.SHAPE_ACCORDION,mxShapeMockupAccordion);
function mxShapeMockupBrowserWindow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupBrowserWindow,mxShape);mxShapeMockupBrowserWindow.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",MAIN_TEXT:"mainText",SHAPE_BROWSER_WINDOW:"mxgraph.mockup.containers.browserWindow"};
mxShapeMockupBrowserWindow.prototype.customProperties=[{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"},{name:"strokeColor3",dispName:"Stroke3 Color",type:"color"}];
mxShapeMockupBrowserWindow.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupBrowserWindow.prototype.cst.STROKE_COLOR2,"#008cff"),k=mxUtils.getValue(this.style,mxShapeMockupBrowserWindow.prototype.cst.STROKE_COLOR3,"#c4c4c4");b=Math.max(b,260);c=Math.max(c,110);a.translate(d,e);this.background(a,d,e,b,c,f,g);a.setShadow(!1);
this.otherShapes(a,d,e,b,c,g,k,h)};mxShapeMockupBrowserWindow.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeMockupBrowserWindow.prototype.otherShapes=function(a,d,e,b,c,f,g,h){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");e=mxUtils.getValue(this.style,mxShapeMockupBrowserWindow.prototype.cst.MAIN_TEXT,"http://www.draw.io,Page 1").toString().split(",");a.setStrokeColor(f);a.ellipse(b-75,5,20,20);a.stroke();a.ellipse(b-50,5,20,20);a.stroke();a.setStrokeColor(h);a.ellipse(b-25,5,20,20);a.stroke();a.setStrokeColor(g);a.begin();a.moveTo(0,40);a.lineTo(30,40);a.lineTo(30,15);a.arcTo(5,
5,0,0,1,35,10);a.lineTo(170,10);a.arcTo(5,5,0,0,1,175,15);a.lineTo(175,40);a.lineTo(b,40);a.stroke();a.begin();a.moveTo(0,110);a.lineTo(b,110);a.stroke();a.begin();a.moveTo(100,60);a.arcTo(5,5,0,0,1,105,55);a.lineTo(b-15,55);a.arcTo(5,5,0,0,1,b-10,60);a.lineTo(b-10,85);a.arcTo(5,5,0,0,1,b-15,90);a.lineTo(105,90);a.arcTo(5,5,0,0,1,100,85);a.close();a.stroke();b=mxUtils.getValue(this.style,mxShapeMockupBrowserWindow.prototype.cst.TEXT_COLOR,"#666666");a.setFontColor(b);a.setFontSize(17);a.text(65,25,
0,0,e[1],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(130,73,0,0,e[0],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.stroke();a.translate(37,17);a.begin();a.moveTo(0,0);a.lineTo(11,0);a.lineTo(15,4);a.lineTo(15,18);a.lineTo(0,18);a.close();a.stroke();a.setStrokeWidth(.5*d);a.begin();a.moveTo(11,0);a.lineTo(11,4);a.lineTo(15,5);a.stroke();a.setStrokeWidth(2*d);a.translate(70,47);a.begin();a.moveTo(0,0);a.lineTo(11,0);a.lineTo(15,4);a.lineTo(15,18);a.lineTo(0,
18);a.close();a.stroke();a.setStrokeWidth(.5*d);a.begin();a.moveTo(11,0);a.lineTo(11,4);a.lineTo(15,5);a.stroke();a.setFillColor(g);a.begin();a.setStrokeWidth(2*d);a.translate(-95,0);a.moveTo(0,10);a.lineTo(10,0);a.lineTo(10,6);a.lineTo(20,6);a.lineTo(20,14);a.lineTo(10,14);a.lineTo(10,20);a.close();a.fillAndStroke();a.begin();a.translate(30,0);a.moveTo(20,10);a.lineTo(10,0);a.lineTo(10,6);a.lineTo(0,6);a.lineTo(0,14);a.lineTo(10,14);a.lineTo(10,20);a.close();a.fillAndStroke();a.begin();a.translate(30,
0);a.moveTo(20*.78,13.3);a.arcTo(6,6,0,1,1,13.5,5.04);a.lineTo(20*.595,6.5);a.lineTo(19.8,20*.415);a.lineTo(18,.8);a.lineTo(20*.815,2.4);a.arcTo(9.8,9.8,0,1,0,20*.92,16);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupBrowserWindow.prototype.cst.SHAPE_BROWSER_WINDOW,mxShapeMockupBrowserWindow);function mxShapeMockupUserMale(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupUserMale,mxShape);
mxShapeMockupUserMale.prototype.cst={STROKE_COLOR2:"strokeColor2",SHAPE_MALE_USER:"mxgraph.mockup.containers.userMale"};mxShapeMockupUserMale.prototype.customProperties=[{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"}];
mxShapeMockupUserMale.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupUserMale.prototype.cst.STROKE_COLOR2,"#008cff");a.translate(d,e);this.background(a,d,e,b,c,f,g);a.setShadow(!1);this.otherShapes(a,d,e,b,c,h,g)};
mxShapeMockupUserMale.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeMockupUserMale.prototype.otherShapes=function(a,d,e,b,c,f,g){a.setStrokeColor(f);a.setLineCap("round");a.setLineJoin("round");a.begin();a.moveTo(.5*b,.6721*c);a.curveTo(.3891*b,.6721*c,.31*b,.5648*c,.31*b,.3962*c);a.curveTo(.31*b,.3656*c,.3012*b,.3473*c,.3051*b,.3227*c);a.curveTo(.3126*b,.2762*c,.3124*b,.2212*c,.332*b,.1939*c);a.curveTo(.354*b,.1633*c,.4382*b,.12*c,.5*b,.12*c);a.stroke();a.begin();a.moveTo(.3046*b,.3716*c);a.curveTo(.3046*b,.3716*c,.3046*b,.341*c,.2826*b,.3594*c);a.curveTo(.2606*
b,.3778*c,.2661*b,.4452*c,.266*b,.4452*c);a.quadTo(.2715*b,.4942*c,.277*b,.5065*c);a.curveTo(.2825*b,.5187*c,.277*b,.5187*c,.2935*b,.5371*c);a.curveTo(.31*b,.5554*c,.3375*b,.5615*c,.3375*b,.5616*c);a.stroke();a.begin();a.moveTo(.3829*b,.6213*c);a.curveTo(.3829*b,.6213*c,.405*b,.7704*c,.2921*b,.7888*c);a.curveTo(.2536*b,.795*c,.1328*b,.85*c,.1052*b,.8745*c);a.curveTo(.0776*b,.899*c,.0641*b,.9316*c,.0571*b,.9622*c);a.quadTo(.05*b,c,.05*b,c);a.stroke();a.begin();a.moveTo(.3427*b,.4185*c);a.curveTo(.3427*
b,.4185*c,.3427*b,.3839*c,.3427*b,.3593*c);a.curveTo(.3427*b,.3348*c,.3663*b,.3103*c,.3718*b,.3041*c);a.curveTo(.3773*b,.298*c,.3822*b,.2673*c,.3877*b,.2551*c);a.curveTo(.3932*b,.2429*c,.4095*b,.2429*c,.4259*b,.2367*c);a.curveTo(.4424*b,.2306*c,.4984*b,.2357*c,.4984*b,.2357*c);a.stroke();a.begin();a.moveTo(.365*b,.7427*c);a.curveTo(.365*b,.7427*c,.3772*b,.8076*c,.4286*b,.8224*c);a.curveTo(.4816*b,.8377*c,.5028*b,.8347*c,.5028*b,.8347*c);a.stroke();a.begin();a.moveTo(.3322*b,.7764*c);a.curveTo(.3322*
b,.7764*c,.3556*b,.8386*c,.4038*b,.8684*c);a.curveTo(.4533*b,.8991*c,.5029*b,.8929*c,.5029*b,.8929*c);a.stroke();a.begin();a.moveTo(.2717*b,.9*c);a.lineTo(.2717*b,c);a.stroke();a.begin();a.moveTo(.1671*b,.8991*c);a.curveTo(.1671*b,.8991*c,.1726*b,.9114*c,.1836*b,.9481*c);a.curveTo(.1946*b,.9849*c,.2*b,c,.2*b,c);a.stroke();a.begin();a.moveTo(.5*b,.6721*c);a.curveTo(.6109*b,.6721*c,.69*b,.5648*c,.69*b,.3962*c);a.curveTo(.69*b,.3656*c,.6988*b,.3473*c,.6949*b,.3227*c);a.curveTo(.6847*b,.2762*c,.6876*
b,.2212*c,.668*b,.1939*c);a.curveTo(.646*b,.1633*c,.5618*b,.12*c,.5*b,.12*c);a.stroke();a.begin();a.moveTo(.6954*b,.3716*c);a.curveTo(.6954*b,.3716*c,.6954*b,.341*c,.7174*b,.3594*c);a.curveTo(.7394*b,.3778*c,.7339*b,.4452*c,.734*b,.4452*c);a.quadTo(.7285*b,.4942*c,.723*b,.5065*c);a.curveTo(.7175*b,.5187*c,.723*b,.5187*c,.7065*b,.5371*c);a.curveTo(.69*b,.5554*c,.6625*b,.5615*c,.6625*b,.5616*c);a.stroke();a.begin();a.moveTo(.6171*b,.6213*c);a.curveTo(.6171*b,.6213*c,.595*b,.7704*c,.7079*b,.7888*c);
a.curveTo(.7464*b,.795*c,.8672*b,.85*c,.8948*b,.8745*c);a.curveTo(.9224*b,.899*c,.9359*b,.9316*c,.9429*b,.9622*c);a.quadTo(.95*b,c,.95*b,c);a.stroke();a.begin();a.moveTo(.6573*b,.4185*c);a.curveTo(.6573*b,.4185*c,.6573*b,.3839*c,.6573*b,.3593*c);a.curveTo(.6573*b,.3348*c,.6337*b,.3103*c,.6282*b,.3041*c);a.curveTo(.6227*b,.298*c,.6178*b,.2673*c,.6123*b,.2551*c);a.curveTo(.6068*b,.2429*c,.5905*b,.2429*c,.5741*b,.2367*c);a.curveTo(.5576*b,.2306*c,.5016*b,.2357*c,.5016*b,.2357*c);a.stroke();a.begin();
a.moveTo(.635*b,.7427*c);a.curveTo(.635*b,.7427*c,.6228*b,.8076*c,.5714*b,.8224*c);a.curveTo(.5184*b,.8377*c,.4972*b,.8347*c,.4972*b,.8347*c);a.stroke();a.begin();a.moveTo(.6678*b,.7764*c);a.curveTo(.6678*b,.7764*c,.6444*b,.8386*c,.5962*b,.8684*c);a.curveTo(.5467*b,.8991*c,.4971*b,.8929*c,.4971*b,.8929*c);a.stroke();a.begin();a.moveTo(.7283*b,.9*c);a.lineTo(.7283*b,c);a.stroke();a.begin();a.moveTo(.8329*b,.8991*c);a.curveTo(.8329*b,.8991*c,.8274*b,.9114*c,.8164*b,.9481*c);a.curveTo(.8054*b,.9849*
c,.8*b,c,.8*b,c);a.stroke();a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeMockupUserMale.prototype.cst.SHAPE_MALE_USER,mxShapeMockupUserMale);function mxShapeMockupUserFemale(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupUserFemale,mxShape);mxShapeMockupUserFemale.prototype.cst={STROKE_COLOR2:"strokeColor2",SHAPE_FEMALE_USER:"mxgraph.mockup.containers.userFemale"};
mxShapeMockupUserFemale.prototype.customProperties=[{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"}];
mxShapeMockupUserFemale.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupUserFemale.prototype.cst.STROKE_COLOR2,"#008cff");a.translate(d,e);this.background(a,d,e,b,c,f,g);a.setShadow(!1);this.otherShapes(a,d,e,b,c,h,g)};
mxShapeMockupUserFemale.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxShapeMockupUserFemale.prototype.otherShapes=function(a,d,e,b,c,f,g){a.setStrokeColor(f);a.setLineCap("round");a.setLineJoin("round");a.begin();a.moveTo(.3148*b,.468*c);a.curveTo(.3045*b,.3195*c,.3176*b,.2383*c,.3302*b,.2069*c);a.curveTo(.3508*b,.1557*c,.44*b,.1156*c,.5026*b,.1156*c);a.stroke();a.begin();a.moveTo(.5029*b,.6728*c);a.curveTo(.4616*b,.6728*c,.4018*b,.6177*c,.3663*b,.5653*c);a.stroke();a.begin();a.moveTo(.3108*b,.4021*c);a.curveTo(.3108*b,.4021*c,.3091*b,.3765*c,.2891*b,.3933*c);a.curveTo(.2691*
b,.4101*c,.2782*b,.4661*c,.2782*b,.4661*c);a.quadTo(.2862*b,.5067*c,.2922*b,.5166*c);a.curveTo(.2982*b,.5265*c,.2929*b,.5268*c,.3097*b,.5412*c);a.stroke();a.begin();a.moveTo(.4038*b,.6176*c);a.curveTo(.4038*b,.6176*c,.4324*b,.7778*c,.3375*b,.7963*c);a.curveTo(.3054*b,.8026*c,.1753*b,.8578*c,.15*b,.8826*c);a.curveTo(.1247*b,.9074*c,.1126*b,.9412*c,.1063*b,.9722*c);a.curveTo(.1*b,1.0032*c,.1*b,c,.1*b,c);a.stroke();a.begin();a.moveTo(.6377*b,.3365*c);a.curveTo(.5927*b,.2634*c,.5206*b,.2634*c,.5206*b,
.2634*c);a.quadTo(.3769*b,.2591*c,.3713*b,.2659*c);a.curveTo(.3657*b,.2727*c,.3405*b,.3674*c,.3405*b,.3946*c);a.curveTo(.3405*b,.4218*c,.3405*b,.4602*c,.3405*b,.4602*c);a.quadTo(.3546*b,.6401*c,.3546*b,.6626*c);a.stroke();a.begin();a.moveTo(.2931*b,.818*c);a.curveTo(.2931*b,.818*c,.3224*b,.9159*c,.3826*b,.9677*c);a.curveTo(.4446*b,1.01*c,.5065*b,c,.5065*b,c);a.stroke();a.begin();a.moveTo(.2995*b,.9106*c);a.lineTo(.2995*b,c);a.stroke();a.begin();a.moveTo(.2081*b,.907*c);a.curveTo(.2081*b,.907*c,.2131*
b,.9194*c,.2232*b,.9565*c);a.curveTo(.2333*b,.9936*c,.24*b,c,.24*b,c);a.stroke();a.begin();a.moveTo(.6951*b,.4988*c);a.curveTo(.6951*b,.4662*c,.7042*b,.3453*c,.7*b,.32*c);a.curveTo(.6923*b,.273*c,.6926*b,.2175*c,.6727*b,.19*c);a.curveTo(.6504*b,.159*c,.5651*b,.1157*c,.5025*b,.1157*c);a.stroke();a.begin();a.moveTo(.5029*b,.6728*c);a.curveTo(.5546*b,.6728*c,.6107*b,.6316*c,.6461*b,.5602*c);a.stroke();a.begin();a.moveTo(.696*b,.4022*c);a.curveTo(.696*b,.4022*c,.6983*b,.3766*c,.7179*b,.4106*c);a.curveTo(.7375*
b,.4278*c,.7273*b,.4836*c,.7273*b,.4836*c);a.quadTo(.7184*b,.5241*c,.7123*b,.5338*c);a.curveTo(.7062*b,.5436*c,.7114*b,.544*c,.6943*b,.558*c);a.stroke();a.begin();a.moveTo(.5995*b,.6278*c);a.curveTo(.5995*b,.6278*c,.5724*b,.7777*c,.6663*b,.7963*c);a.curveTo(.6984*b,.8026*c,.8386*b,.8578*c,.8638*b,.8826*c);a.curveTo(.8891*b,.9074*c,.9016*b,.9412*c,.9079*b,.9722*c);a.curveTo(.9142*b,1.0032*c,.91*b,c,.91*b,c);a.stroke();a.begin();a.moveTo(.6545*b,.6802*c);a.lineTo(.6545*b,.3986*c);a.stroke();a.begin();
a.moveTo(.7132*b,.8078*c);a.curveTo(.7132*b,.8078*c,.6839*b,.916*c,.6237*b,.9678*c);a.curveTo(.5617*b,1.01*c,.4998*b,c,.4998*b,c);a.stroke();a.begin();a.moveTo(.7111*b,.9106*c);a.lineTo(.7111*b,c);a.stroke();a.begin();a.moveTo(.8075*b,.907*c);a.curveTo(.8075*b,.907*c,.8025*b,.9194*c,.7924*b,.9565*c);a.curveTo(.7823*b,.9936*c,.775*b,c,.775*b,c);a.stroke();a.begin();a.moveTo(.3148*b,.5448*c);a.curveTo(.3148*b,.5448*c,.32*b,.6216*c,.3148*b,.6677*c);a.quadTo(.2891*b,.7343*c,.2891*b,.7343*c);a.lineTo(.3303*
b,.7625*c);a.lineTo(.39*b,.7625*c);a.stroke();a.begin();a.moveTo(.6852*b,.5448*c);a.curveTo(.6852*b,.5448*c,.68*b,.6216*c,.6852*b,.6677*c);a.quadTo(.7109*b,.7343*c,.7109*b,.7343*c);a.lineTo(.6697*b,.7625*c);a.lineTo(.62*b,.7625*c);a.stroke();a.setStrokeColor(g);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeMockupUserFemale.prototype.cst.SHAPE_FEMALE_USER,mxShapeMockupUserFemale);
function mxShapeMockupGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupGroup,mxShape);mxShapeMockupGroup.prototype.cst={MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",FILL_COLOR2:"fillColor2",SHAPE_GROUP:"mxgraph.mockup.containers.group"};
mxShapeMockupGroup.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupGroup.prototype.cst.MAIN_TEXT,"Group").toString(),g=mxUtils.getValue(this.style,mxShapeMockupGroup.prototype.cst.TEXT_SIZE,"17"),h=mxUtils.getSizeForString(f,g,mxConstants.DEFAULT_FONTFAMILY).width;0===h&&(h=Math.max(80,h));a.translate(d,e);b=Math.max(b,h+15);c=Math.max(c,g+10);this.background(a,b,c,h,g);a.setShadow(!1);this.foreground(a,b,c,h,g);this.buttonText(a,b,c,f,g)};
mxShapeMockupGroup.prototype.background=function(a,d,e,b,c){a.roundrect(0,.5*c,d,e-.5*c,5,5);a.fillAndStroke()};mxShapeMockupGroup.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupGroup.prototype.cst.FILL_COLOR2,"#000000");a.setFillColor(d);a.roundrect(3,0,b+6,1.5*c,.25*c,.25*c);a.fill()};
mxShapeMockupGroup.prototype.buttonText=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupGroup.prototype.cst.TEXT_COLOR,"#ffffff");a.setFontColor(d);a.setFontSize(c);a.text(6,0,0,0,b,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupGroup.prototype.cst.SHAPE_GROUP,mxShapeMockupGroup);function mxShapeMockupWindow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupWindow,mxShape);mxShapeMockupWindow.prototype.cst={MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SHAPE_WINDOW:"mxgraph.mockup.containers.window"};mxShapeMockupWindow.prototype.customProperties=[{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"},{name:"strokeColor3",dispName:"Stroke3 Color",type:"color"}];
mxShapeMockupWindow.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupWindow.prototype.cst.STROKE_COLOR2,"#008cff"),k=mxUtils.getValue(this.style,mxShapeMockupWindow.prototype.cst.STROKE_COLOR3,"#c4c4c4");a.translate(d,e);c=Math.max(c,30);b=Math.max(b,90);this.background(a,d,e,b,c,f,g);a.setShadow(!1);this.otherShapes(a,
d,e,b,c,g,k,h)};mxShapeMockupWindow.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupWindow.prototype.otherShapes=function(a,d,e,b,c,f,g,h){mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeColor(f);a.ellipse(b-75,5,20,20);a.stroke();a.ellipse(b-50,5,20,20);a.stroke();a.setStrokeColor(h);a.ellipse(b-25,5,20,20);a.stroke();a.setStrokeColor(g);a.begin();a.moveTo(0,30);a.lineTo(b,30);a.stroke();d=mxUtils.getValue(this.style,mxShapeMockupWindow.prototype.cst.MAIN_TEXT,"Window Title");e=mxUtils.getValue(this.style,mxShapeMockupWindow.prototype.cst.TEXT_COLOR,
"#666666");b=mxUtils.getValue(this.style,mxShapeMockupWindow.prototype.cst.TEXT_SIZE,"17").toString();a.setFontColor(e);a.setFontSize(b);a.text(10,15,0,0,d,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupWindow.prototype.cst.SHAPE_WINDOW,mxShapeMockupWindow);function mxShapeMockupHorTabBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupHorTabBar,mxShape);
mxShapeMockupHorTabBar.prototype.cst={BLOCK:"block",CONE:"cone",HALF_CONE:"halfCone",ROUND:"round",TEXT_SIZE:"textSize",TAB_NAMES:"tabs",TAB_STYLE:"tabStyle",STYLE_FILLCOLOR2:"fillColor2",TEXT_COLOR:"textColor",SEL_TEXT_COLOR:"textColor2",SHAPE_HOR_TAB_BAR:"mxgraph.mockup.containers.horTabBar"};
mxShapeMockupHorTabBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TEXT_SIZE,"17").toString(),g=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TAB_NAMES,"Tab 1,+Tab 2,Tab 3").toString().split(","),h=1.5*f,k=g.length,l=20+5*(k-1)+20*k,m=[],n=-1,p=0;p<k;p++){var q=g[p];"+"===q.charAt(0)&&(q=q.substring(1),n=p);currW=mxUtils.getSizeForString(q,f,mxConstants.DEFAULT_FONTFAMILY).width;m[p]=0===currW?40:currW;
l+=m[p]}b=Math.max(b,l);c=Math.max(c,h+5);a.translate(d,e);this.background(a,b,c,5,h);a.setShadow(!1);this.backTabs(a,b,c,5,h,10,5,10,k,m,n);this.focusTab(a,b,c,5,h,10,5,10,k,m,n);this.tabText(a,b,c,5,h,10,5,10,k,m,n,g)};mxShapeMockupHorTabBar.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,c+b);a.arcTo(b,b,0,0,1,b,c);a.lineTo(d-b,c);a.arcTo(b,b,0,0,1,d,c+b);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};
mxShapeMockupHorTabBar.prototype.backTabs=function(a,d,e,b,c,f,g,h,k,l,m){d=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TAB_STYLE,mxShapeMockupHorTabBar.prototype.cst.BLOCK);for(e=0;e<k;e++){var n=l[e]+2*h;m!==e&&(d===mxShapeMockupHorTabBar.prototype.cst.BLOCK?a.rect(f,0,n,c):d===mxShapeMockupHorTabBar.prototype.cst.CONE?(a.begin(),a.moveTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+n-.5*h,0),a.lineTo(f+n,c)):d===mxShapeMockupHorTabBar.prototype.cst.HALF_CONE?(a.begin(),a.moveTo(f,c),
a.lineTo(f+.5*h,0),a.lineTo(f+n,0),a.lineTo(f+n,c)):d===mxShapeMockupHorTabBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(f-b,c),a.arcTo(b,b,0,0,0,f,c-b),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.lineTo(f+n-b,0),a.arcTo(b,b,0,0,1,f+n,b),a.lineTo(f+n,c-b),a.arcTo(b,b,0,0,0,f+n+b,c)),a.fillAndStroke());f=f+n+g}};
mxShapeMockupHorTabBar.prototype.focusTab=function(a,d,e,b,c,f,g,h,k,l,m){e=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TAB_STYLE,mxShapeMockupHorTabBar.prototype.cst.BLOCK);k=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.STYLE_FILLCOLOR2,"#008cff");a.setStrokeColor(k);a.setFillColor(k);for(k=0;k<=m;k++){var n=l[k]+2*h;m===k&&(e===mxShapeMockupHorTabBar.prototype.cst.BLOCK?(a.begin(),a.moveTo(0,c+b),a.arcTo(b,b,0,0,1,b,c),a.lineTo(f,c),a.lineTo(f,0),a.lineTo(f+
n,0),a.lineTo(f+n,c),a.lineTo(d-b,c),a.arcTo(b,b,0,0,1,d,c+b),a.close()):e===mxShapeMockupHorTabBar.prototype.cst.CONE?(a.begin(),a.moveTo(0,c+b),a.arcTo(b,b,0,0,1,b,c),a.lineTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+n-.5*h,0),a.lineTo(f+n,c),a.lineTo(d-b,c),a.arcTo(b,b,0,0,1,d,c+b),a.close()):e===mxShapeMockupHorTabBar.prototype.cst.HALF_CONE?(a.begin(),a.moveTo(0,c+b),a.arcTo(b,b,0,0,1,b,c),a.lineTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+n,0),a.lineTo(f+n,c),a.lineTo(d-b,c),a.arcTo(b,b,0,0,1,d,c+b),a.close()):
e===mxShapeMockupHorTabBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(0,c+b),a.arcTo(b,b,0,0,1,b,c),a.lineTo(f-b,c),a.arcTo(b,b,0,0,0,f,c-b),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.lineTo(f+n-b,0),a.arcTo(b,b,0,0,1,f+n,b),a.lineTo(f+n,c-b),a.arcTo(b,b,0,0,0,f+n+b,c),a.lineTo(d-b,c),a.arcTo(b,b,0,0,1,d,c+b),a.close()),a.fillAndStroke());f=f+n+g}};
mxShapeMockupHorTabBar.prototype.tabText=function(a,d,e,b,c,f,g,h,k,l,m,n){d=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TEXT_COLOR,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.SEL_TEXT_COLOR,"#ffffff");b=mxUtils.getValue(this.style,mxShapeMockupHorTabBar.prototype.cst.TEXT_SIZE,"17").toString();a.setFontColor(d);a.setFontSize(b);for(b=0;b<k;b++){var p=n[b];b===m&&a.setFontColor(e);"+"===p.charAt(0)&&(p=p.substring(1));var q=l[b]+2*h;a.text(f+
h,.5*c,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);f=f+q+g;b===m&&a.setFontColor(d)}};mxCellRenderer.registerShape(mxShapeMockupHorTabBar.prototype.cst.SHAPE_HOR_TAB_BAR,mxShapeMockupHorTabBar);function mxShapeMockupVerTabBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupVerTabBar,mxShape);
mxShapeMockupVerTabBar.prototype.cst={BLOCK:"block",ROUND:"round",TEXT_SIZE:"textSize",TAB_NAMES:"tabs",TAB_STYLE:"tabStyle",STYLE_FILLCOLOR2:"fillColor2",TEXT_COLOR:"textColor",SEL_TEXT_COLOR:"textColor2",SHAPE_VER_TAB_BAR:"mxgraph.mockup.containers.verTabBar"};
mxShapeMockupVerTabBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TEXT_SIZE,"17").toString(),g=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TAB_NAMES,"Tab 1,+Tab 2,Tab 3").toString().split(","),h=1.5*f,k=g.length,l=[],m=-1,n=0;n<k;n++){var p=g[n];"+"===p.charAt(0)&&(p=p.substring(1),m=n);p=mxUtils.getSizeForString(p,f,mxConstants.DEFAULT_FONTFAMILY).width;l[n]=0===p?42:p}f=20+Math.max.apply(Math,l);
b=Math.max(b,f+5);c=Math.max(c,20+k*h+5*(k-1));a.translate(d,e);this.background(a,b,c,5,f);a.setShadow(!1);this.backTabs(a,b,c,5,h,f,10,5,10,k,l,m);this.focusTab(a,b,c,5,h,f,10,5,10,k,l,m);this.tabText(a,b,c,5,h,f,10,5,10,k,l,m,g)};mxShapeMockupVerTabBar.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(c+b,e);a.arcTo(b,b,0,0,1,c,e-b);a.lineTo(c,b);a.arcTo(b,b,0,0,1,c+b,0);a.lineTo(d,0);a.lineTo(d,e);a.close();a.fillAndStroke()};
mxShapeMockupVerTabBar.prototype.backTabs=function(a,d,e,b,c,f,g,h,k,l,m,n){d=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TAB_STYLE,mxShapeMockupVerTabBar.prototype.cst.BLOCK);for(e=0;e<l;e++)n!==e&&(d===mxShapeMockupVerTabBar.prototype.cst.BLOCK?a.rect(0,g,f,c):d===mxShapeMockupVerTabBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(f,g+c+b),a.arcTo(b,b,0,0,0,f-b,g+c),a.lineTo(b,g+c),a.arcTo(b,b,0,0,1,0,g+c-b),a.lineTo(0,g+b),a.arcTo(b,b,0,0,1,b,g),a.lineTo(f-b,g),a.arcTo(b,b,0,0,
0,f,g-b)),a.fillAndStroke()),g=g+c+h};
mxShapeMockupVerTabBar.prototype.focusTab=function(a,d,e,b,c,f,g,h,k,l,m,n){d=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TAB_STYLE,mxShapeMockupVerTabBar.prototype.cst.BLOCK);k=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.STYLE_FILLCOLOR2,"#008cff");-1!==n&&(g+=(c+h)*n,a.setStrokeColor(k),a.setFillColor(k),d===mxShapeMockupVerTabBar.prototype.cst.BLOCK?(a.begin(),a.moveTo(f+b,e),a.arcTo(b,b,0,0,1,f,e-b),a.lineTo(f,g+c),a.lineTo(0,g+c),a.lineTo(0,g),a.lineTo(f,
g),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.close()):d===mxShapeMockupVerTabBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(f+b,e),a.arcTo(b,b,0,0,1,f,e-b),a.lineTo(f,g+c+b),a.arcTo(b,b,0,0,0,f-b,g+c),a.lineTo(b,g+c),a.arcTo(b,b,0,0,1,0,g+c-b),a.lineTo(0,g+b),a.arcTo(b,b,0,0,1,b,g),a.lineTo(f-b,g),a.arcTo(b,b,0,0,0,f,g-b),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.close()),a.fillAndStroke())};
mxShapeMockupVerTabBar.prototype.tabText=function(a,d,e,b,c,f,g,h,k,l,m,n,p){d=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TEXT_COLOR,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.SEL_TEXT_COLOR,"#ffffff");b=mxUtils.getValue(this.style,mxShapeMockupVerTabBar.prototype.cst.TEXT_SIZE,"17").toString();a.setFontColor(d);a.setFontSize(b);for(b=0;b<l;b++)k=p[b],b===n&&a.setFontColor(e),"+"===k.charAt(0)&&(k=k.substring(1)),a.text(.5*f,g+.5*c,0,0,k,mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0),g=g+c+h,b===n&&a.setFontColor(d)};mxCellRenderer.registerShape(mxShapeMockupVerTabBar.prototype.cst.SHAPE_VER_TAB_BAR,mxShapeMockupVerTabBar);function mxShapeMockupAlertBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupAlertBox,mxShape);
mxShapeMockupAlertBox.prototype.cst={MAIN_TEXT:"mainText",SUB_TEXT:"subText",BUTTON_TEXT:"buttonText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SHAPE_ALERT_BOX:"mxgraph.mockup.containers.alertBox"};
mxShapeMockupAlertBox.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.STROKE_COLOR2,"#008cff"),k=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.STROKE_COLOR3,"#c4c4c4");a.translate(d,e);c=Math.max(c,75);b=Math.max(b,90);this.background(a,d,e,b,c,f,g);a.setShadow(!1);this.foreground(a,
d,e,b,c,g,k,h)};mxShapeMockupAlertBox.prototype.background=function(a,d,e,b,c,f,g){a.setFillColor(f);a.setStrokeColor(g);a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupAlertBox.prototype.foreground=function(a,d,e,b,c,f,g,h){mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeColor(h);a.ellipse(b-25,5,20,20);a.stroke();a.setStrokeColor(g);a.begin();a.moveTo(0,30);a.lineTo(b,30);a.stroke();h=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.MAIN_TEXT,"Window Title").toString();d=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.SUB_TEXT,"Sub Text").toString().split(",");e=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.BUTTON_TEXT,
"OK,Cancel").toString().split(",");var k=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.TEXT_COLOR,"#666666");f=mxUtils.getValue(this.style,mxShapeMockupAlertBox.prototype.cst.TEXT_SIZE,"17").toString();g=e.length;g=(b-10*(g+1))/g;a.setFontColor(k);a.setFontSize(f);a.text(10,15,0,0,h,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);h=10;for(k=0;k<e.length;k++)""!==e[k]&&(a.rect(h,c-10-1.5*f,g,1.5*f),a.stroke(),a.text(h+.5*g,c-10-.75*f,0,0,e[k],mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0)),h=h+g+10;for(k=0;k<d.length;k++)a.text(.5*b,30+f*(1.5*k+.75),0,0,d[k],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupAlertBox.prototype.cst.SHAPE_ALERT_BOX,mxShapeMockupAlertBox);function mxShapeMockupContainersRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupContainersRRect,mxShape);
mxShapeMockupContainersRRect.prototype.cst={RRECT:"mxgraph.mockup.containers.rrect",R_SIZE:"rSize"};mxShapeMockupContainersRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];mxShapeMockupContainersRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupContainersRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeMockupContainersRRect.prototype.cst.RRECT,mxShapeMockupContainersRRect);function mxShapeMockupContainersAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeMockupContainersAnchor,mxShape);mxShapeMockupContainersAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.containers.anchor"};mxShapeMockupContainersAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupContainersAnchor.prototype.cst.ANCHOR,mxShapeMockupContainersAnchor);
function mxShapeMockupContrainersTopButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupContrainersTopButton,mxShape);mxShapeMockupContrainersTopButton.prototype.cst={TOP_BUTTON:"mxgraph.mockup.containers.topButton",R_SIZE:"rSize"};mxShapeMockupContrainersTopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupContrainersTopButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupContrainersTopButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupContrainersTopButton.prototype.cst.TOP_BUTTON,mxShapeMockupContrainersTopButton);
function mxShapeMockupContainersLeftButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupContainersLeftButton,mxShape);mxShapeMockupContainersLeftButton.prototype.cst={LEFT_BUTTON:"mxgraph.mockup.containers.leftButton",R_SIZE:"rSize"};mxShapeMockupContainersLeftButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupContainersLeftButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupContainersLeftButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupContainersLeftButton.prototype.cst.LEFT_BUTTON,mxShapeMockupContainersLeftButton);
function mxShapeMockupContainersMarginRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupContainersMarginRect,mxShape);mxShapeMockupContainersMarginRect.prototype.cst={SHAPE_MARGIN_RECT:"mxgraph.mockup.containers.marginRect",MARGIN:"rectMargin",MARGIN_TOP:"rectMarginTop",MARGIN_LEFT:"rectMarginLeft",MARGIN_BOTTOM:"rectMarginBottom",MARGIN_RIGHT:"rectMarginRight"};
mxShapeMockupContainersMarginRect.prototype.customProperties=[{name:"rectMargin",dispName:"Global Margin",type:"float",min:0,defVal:0},{name:"rectMarginTop",dispName:"Top Margin",type:"float",min:0,defVal:0},{name:"rectMarginLeft",dispName:"Left Margin",type:"float",min:0,defVal:0},{name:"rectMarginBottom",dispName:"Bottom Margin",type:"float",min:0,defVal:0},{name:"rectMarginRight",dispName:"Right Margin",type:"float",min:0,defVal:0}];
mxShapeMockupContainersMarginRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeMockupContainersMarginRect.prototype.background=function(a,d,e,b,c,f){d=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect.prototype.cst.MARGIN,"0"));var g=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect.prototype.cst.MARGIN_TOP,"0"));f=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect.prototype.cst.MARGIN_LEFT,"0"));e=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect.prototype.cst.MARGIN_BOTTOM,"0"));
var h=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect.prototype.cst.MARGIN_RIGHT,"0"));f=d+f;g=d+g;b=b-h-f-d;c=c-e-g-d;0<b&&0<c&&(a.begin(),a.roundrect(f,g,b,c,10,10),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeMockupContainersMarginRect.prototype.cst.SHAPE_MARGIN_RECT,mxShapeMockupContainersMarginRect);function mxShapeMockupContainersMarginRect2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupContainersMarginRect2,mxShape);mxShapeMockupContainersMarginRect2.prototype.cst={SHAPE_MARGIN_RECT:"mxgraph.mockup.containers.marginRect2",MARGIN:"rectMargin",MARGIN_TOP:"rectMarginTop",MARGIN_LEFT:"rectMarginLeft",MARGIN_BOTTOM:"rectMarginBottom",MARGIN_RIGHT:"rectMarginRight"};
mxShapeMockupContainersMarginRect2.prototype.customProperties=[{name:"rectMargin",dispName:"Global Margin",type:"float",min:0,defVal:0},{name:"rectMarginTop",dispName:"Top Margin",type:"float",min:0,defVal:0},{name:"rectMarginLeft",dispName:"Left Margin",type:"float",min:0,defVal:0},{name:"rectMarginBottom",dispName:"Bottom Margin",type:"float",min:0,defVal:0},{name:"rectMarginRight",dispName:"Right Margin",type:"float",min:0,defVal:0}];
mxShapeMockupContainersMarginRect2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeMockupContainersMarginRect2.prototype.background=function(a,d,e,b,c,f){d=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect2.prototype.cst.MARGIN,"0"));var g=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect2.prototype.cst.MARGIN_TOP,"0"));f=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect2.prototype.cst.MARGIN_LEFT,"0"));e=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect2.prototype.cst.MARGIN_BOTTOM,
"0"));var h=parseFloat(mxUtils.getValue(this.style,mxShapeMockupContainersMarginRect2.prototype.cst.MARGIN_RIGHT,"0"));f=d+f;g=d+g;b=b-h-f-d;c=c-e-g-d;0<b&&0<c&&(a.begin(),a.rect(f,g,b,c),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeMockupContainersMarginRect2.prototype.cst.SHAPE_MARGIN_RECT,mxShapeMockupContainersMarginRect2);function mxShapeMockupCheckboxGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupCheckboxGroup,mxShape);mxShapeMockupCheckboxGroup.prototype.cst={MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SELECTED:"+",SHAPE_CHECKBOX_GROUP:"mxgraph.mockup.forms.checkboxGroup"};
mxShapeMockupCheckboxGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxShapeMockupCheckboxGroup.prototype.cst.TEXT_COLOR,"#666666,#008cff").toString().split(",");var f=mxUtils.getValue(this.style,mxShapeMockupCheckboxGroup.prototype.cst.TEXT_SIZE,"17").toString();e=mxUtils.getValue(this.style,mxShapeMockupCheckboxGroup.prototype.cst.MAIN_TEXT,"Option 1").toString().split(",");var g=e.length,h=Math.max(1.5*f,15),k=0,l=-1,m=g*h;c=Math.max(c,m);for(var n=
0;n<g;n++){var p=e[n];p.charAt(0)===mxShapeMockupCheckboxGroup.prototype.cst.SELECTED&&(p=e[n].substring(1),l=n);p=mxUtils.getSizeForString(p,f,mxConstants.DEFAULT_FONTFAMILY).width;p>k&&(k=p)}a.rect(0,0,Math.max(b,5+k+30),c);a.fillAndStroke();a.setShadow(!1);a.setFontSize(f);for(n=0;n<g;n++)b=(n*h+.5*h)*c/m,p=e[n],p.charAt(0)===mxShapeMockupCheckboxGroup.prototype.cst.SELECTED?(a.setFontColor(d[1]),p=e[n].substring(1),l=n):a.setFontColor(d[0]),a.text(32.5,b,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0),b-=7.5,a.setFillColor("#dddddd"),a.setStrokeColor("#999999"),l===n?(a.setGradient("#aaaaaa","#666666",7.5,b,15,15,mxConstants.DIRECTION_SOUTH,1,1),a.rect(7.5,b,15,15),a.fillAndStroke(),a.setStrokeColor("#333333"),a.begin(),a.moveTo(11.25,b+7.5),a.lineTo(15,b+11.25),a.lineTo(18.75,b+3.75),a.stroke()):(a.setGradient("#eeeeee","#cccccc",7.5,b,15,15,mxConstants.DIRECTION_SOUTH,1,1),a.rect(7.5,b,15,15),a.fillAndStroke()),l=-1};
mxCellRenderer.registerShape(mxShapeMockupCheckboxGroup.prototype.cst.SHAPE_CHECKBOX_GROUP,mxShapeMockupCheckboxGroup);function mxShapeMockupRadioGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRadioGroup,mxShape);mxShapeMockupRadioGroup.prototype.cst={MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SELECTED:"+",SHAPE_RADIO_GROUP:"mxgraph.mockup.forms.radioGroup"};
mxShapeMockupRadioGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxShapeMockupRadioGroup.prototype.cst.TEXT_COLOR,"#666666,#008cff").toString().split(",");var f=mxUtils.getValue(this.style,mxShapeMockupRadioGroup.prototype.cst.TEXT_SIZE,"17").toString();e=mxUtils.getValue(this.style,mxShapeMockupRadioGroup.prototype.cst.MAIN_TEXT,"Option 1").toString().split(",");var g=e.length,h=Math.max(1.5*f,15),k=0,l=-1,m=g*h;c=Math.max(c,m);for(var n=0;n<g;n++){var p=
e[n];p.charAt(0)===mxShapeMockupRadioGroup.prototype.cst.SELECTED&&(p=e[n].substring(1),l=n);p=mxUtils.getSizeForString(p,f,mxConstants.DEFAULT_FONTFAMILY).width;p>k&&(k=p)}a.rect(0,0,Math.max(b,5+k+30),c);a.fillAndStroke();a.setShadow(!1);a.setFontSize(f);for(n=0;n<g;n++)b=(n*h+.5*h)*c/m,p=e[n],p.charAt(0)===mxShapeMockupRadioGroup.prototype.cst.SELECTED?(a.setFontColor(d[1]),p=e[n].substring(1),l=n):a.setFontColor(d[0]),a.text(32.5,b,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,
0,0,0),b-=7.5,a.setStrokeColor("#999999"),l===n?(a.setGradient("#aaaaaa","#666666",7.5,b,15,15,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(7.5,b,15,15),a.fillAndStroke(),a.setFillColor("#333333"),a.setStrokeColor("#333333"),a.ellipse(11.25,b+3.75,7.5,7.5)):(a.setGradient("#eeeeee","#cccccc",7.5,b,15,15,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(7.5,b,15,15)),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRadioGroup.prototype.cst.SHAPE_RADIO_GROUP,mxShapeMockupRadioGroup);
function mxShapeMockupColorPicker(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupColorPicker,mxShape);mxShapeMockupColorPicker.prototype.cst={COLOR:"chosenColor",SHAPE_COLOR_PICKER:"mxgraph.mockup.forms.colorPicker"};mxShapeMockupColorPicker.prototype.customProperties=[{name:"chosenColor",dispName:"Current Color",type:"color"}];
mxShapeMockupColorPicker.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupColorPicker.prototype.cst.COLOR,"#aaddff");a.translate(d,e);a.setStrokeColor("#999999");a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.rect(.1*b,.1*c,.8*b,.8*c);a.fill();a.setFillColor("#ffffff");a.begin();a.moveTo(.75*b,.75*c);a.lineTo(.75*b,c);a.lineTo(.95*b,c);a.arcTo(.05*b,.05*c,0,0,0,b,.95*c);a.lineTo(b,.75*c);a.close();a.fill();a.setFillColor("#999999");
a.begin();a.moveTo(.77*b,.77*c);a.lineTo(.875*b,.98*c);a.lineTo(.98*b,.77*c);a.close();a.fill();a.roundrect(0,0,b,c,.05*b,.05*c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupColorPicker.prototype.cst.SHAPE_COLOR_PICKER,mxShapeMockupColorPicker);function mxShapeMockupComboBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupComboBox,mxShape);
mxShapeMockupComboBox.prototype.cst={MAIN_TEXT:"mainText",FILL_COLOR2:"fillColor2",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_COMBO_BOX:"mxgraph.mockup.forms.comboBox"};mxShapeMockupComboBox.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"}];mxShapeMockupComboBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c);this.mainText(a,d,e,b,c)};
mxShapeMockupComboBox.prototype.background=function(a,d,e,b,c){a.setFillColor("#ffffff");a.roundrect(0,0,b,c,5,5);a.fillAndStroke()};
mxShapeMockupComboBox.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxShapeMockupComboBox.prototype.cst.FILL_COLOR2,"").toString();a.setGradient(d,e,b-30,0,30,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(b-30,0);a.lineTo(b-5,0);a.arcTo(5,5,0,0,1,b,5);a.lineTo(b,c-5);a.arcTo(5,5,0,0,1,b-5,c);a.lineTo(b-30,c);a.close();a.fillAndStroke();a.setFillColor("#ffffff");a.begin();a.moveTo(b-22,.5*c-5);
a.lineTo(b-15,.5*c+5);a.lineTo(b-8,.5*c-5);a.fill()};
mxShapeMockupComboBox.prototype.mainText=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupComboBox.prototype.cst.MAIN_TEXT,"Main Text");e=mxUtils.getValue(this.style,mxShapeMockupComboBox.prototype.cst.TEXT_COLOR,"#666666").toString();b=mxUtils.getValue(this.style,mxShapeMockupComboBox.prototype.cst.TEXT_SIZE,"17").toString();a.begin();a.setFontSize(b);a.setFontColor(e);a.text(5,.5*c,0,0,d,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeMockupComboBox.prototype.cst.SHAPE_COMBO_BOX,mxShapeMockupComboBox);function mxShapeMockupSpinner(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupSpinner,mxShape);
mxShapeMockupSpinner.prototype.cst={LAYOUT:"spinLayout",SPINNER_STYLE:"spinStyle",ADJ_STYLE:"adjStyle",LAYOUT_RIGHT:"right",LAYOUT_LEFT:"left",LAYOUT_TOP:"top",LAYOUT_BOTTOM:"bottom",LAYOUT_VERTICAL:"vertical",LAYOUT_HORIZONTAL:"horizontal",SPINNER_MERGED:"merged",SPINNER_NORMAL:"normal",ADJ_TRIANGLE:"triangle",ADJ_PLUSMINUS:"plusMinus",ADJ_ARROW:"arrow",MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_SPINNER:"mxgraph.mockup.forms.spinner"};
mxShapeMockupSpinner.prototype.customProperties=[{name:"spinLayout",dispName:"Layout",type:"enum",enumList:[{val:"right",dispName:"Right"},{val:"left",dispName:"Left"},{val:"top",dispName:"Top"},{val:"bottom",dispName:"Bottom"},{val:"vertical",dispName:"Vertical"},{val:"horizontal",dispName:"Horizontal"}]},{name:"spinStyle",dispName:"Spinner Style",type:"enum",enumList:[{val:"merged",dispName:"Merged"},{val:"normal",dispName:"Normal"}]},{name:"adjStyle",dispName:"Button Style",type:"enum",enumList:[{val:"triangle",
dispName:"Triangle"},{val:"plusMinus",dispName:"+/-"},{val:"arrow",dispName:"Arrow"}]}];mxShapeMockupSpinner.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.LAYOUT,mxShapeMockupSpinner.prototype.cst.LAYOUT_RIGHT);a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c,f);this.mainText(a,b,c,f)};mxShapeMockupSpinner.prototype.background=function(a,d,e){a.setFillColor("#ffffff");a.roundrect(0,0,d,e,10,10);a.fillAndStroke()};
mxShapeMockupSpinner.prototype.foreground=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.SPINNER_STYLE,mxShapeMockupSpinner.prototype.cst.SPINNER_NORMAL),f=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.ADJ_STYLE,mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE),g=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.setFillColor(g);c===mxShapeMockupSpinner.prototype.cst.SPINNER_NORMAL&&(b===mxShapeMockupSpinner.prototype.cst.LAYOUT_RIGHT?
(a.begin(),a.moveTo(d-20,0),a.lineTo(d-20,e),a.moveTo(d-20,.5*e),a.lineTo(d,.5*e),a.stroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_LEFT?(a.begin(),a.moveTo(20,0),a.lineTo(20,e),a.moveTo(20,.5*e),a.lineTo(0,.5*e),a.stroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_TOP?(a.begin(),a.moveTo(0,15),a.lineTo(d,15),a.moveTo(.5*d,15),a.lineTo(.5*d,0),a.stroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_BOTTOM?(a.begin(),a.moveTo(0,e-15),a.lineTo(d,e-15),a.moveTo(.5*d,e-15),a.lineTo(.5*
d,e),a.stroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_VERTICAL?(a.begin(),a.moveTo(0,15),a.lineTo(d,15),a.moveTo(0,e-15),a.lineTo(d,e-15),a.stroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_HORIZONTAL&&(a.begin(),a.moveTo(20,0),a.lineTo(20,e),a.moveTo(d-20,0),a.lineTo(d-20,e),a.stroke()));a.setStrokeColor(g);b===mxShapeMockupSpinner.prototype.cst.LAYOUT_RIGHT?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(d-14,.25*e+4.5),a.lineTo(d-10,.25*e-2.5),a.lineTo(d-
6,.25*e+4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(d-10,.25*e-4),a.lineTo(d-10,.25*e+4),a.moveTo(d-14,.25*e),a.lineTo(d-6,.25*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&(a.begin(),a.moveTo(d-14,.25*e+1.5),a.lineTo(d-10,.25*e-2.5),a.lineTo(d-6,.25*e+1.5),a.close(),a.moveTo(d-10,.25*e+4.5),a.lineTo(d-10,.25*e-2.5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_LEFT?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?
(a.begin(),a.moveTo(14,.25*e+4.5),a.lineTo(10,.25*e-2.5),a.lineTo(6,.25*e+4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(10,.25*e-4),a.lineTo(10,.25*e+4),a.moveTo(14,.25*e),a.lineTo(6,.25*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&(a.begin(),a.moveTo(14,.25*e+1.5),a.lineTo(10,.25*e-2.5),a.lineTo(6,.25*e+1.5),a.close(),a.moveTo(10,.25*e+4.5),a.lineTo(10,.25*e-2.5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_TOP?
f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.75*d+4,12),a.lineTo(.75*d,5),a.lineTo(.75*d-4,12),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.75*d,3.5),a.lineTo(.75*d,11.5),a.moveTo(.75*d+4,7.5),a.lineTo(.75*d-4,7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&(a.begin(),a.moveTo(.75*d+4,9),a.lineTo(.75*d,5),a.lineTo(.75*d-4,9),a.close(),a.moveTo(.75*d,12),a.lineTo(.75*d,5),a.fillAndStroke()):b===
mxShapeMockupSpinner.prototype.cst.LAYOUT_BOTTOM?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.75*d+4,e-5),a.lineTo(.75*d,e-12),a.lineTo(.75*d-4,e-5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.75*d,e-3.5),a.lineTo(.75*d,e-11.5),a.moveTo(.75*d+4,e-7.5),a.lineTo(.75*d-4,e-7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&(a.begin(),a.moveTo(.75*d+4,e-6),a.lineTo(.75*d,e-10),a.lineTo(.75*d-4,e-6),
a.close(),a.moveTo(.75*d,e-3),a.lineTo(.75*d,e-10),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_VERTICAL?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.5*d+4,12),a.lineTo(.5*d,5),a.lineTo(.5*d-4,12),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.5*d,3.5),a.lineTo(.5*d,11.5),a.moveTo(.5*d+4,7.5),a.lineTo(.5*d-4,7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&(a.begin(),a.moveTo(.5*
d+4,9),a.lineTo(.5*d,5),a.lineTo(.5*d-4,9),a.close(),a.moveTo(.5*d,12),a.lineTo(.5*d,5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_HORIZONTAL&&(f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(d-6,.5*e+4.5),a.lineTo(d-10,.5*e-2.5),a.lineTo(d-14,.5*e+4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(d-10,.5*e-4),a.lineTo(d-10,.5*e+4),a.moveTo(d-14,.5*e),a.lineTo(d-6,.5*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(d-14,.5*e+1.5),a.lineTo(d-10,.5*e-2.5),a.lineTo(d-6,.5*e+1.5),a.close(),a.moveTo(d-10,.5*e+4.5),a.lineTo(d-10,.5*e-2.5),a.fillAndStroke()));b===mxShapeMockupSpinner.prototype.cst.LAYOUT_RIGHT?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(d-14,.75*e-4.5),a.lineTo(d-10,.75*e+2.5),a.lineTo(d-6,.75*e-4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(d-14,.75*e),a.lineTo(d-6,.75*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(d-14,.75*e-1.5),a.lineTo(d-10,.75*e+2.5),a.lineTo(d-6,.75*e-1.5),a.close(),a.moveTo(d-10,.75*e-4.5),a.lineTo(d-10,.75*e+2.5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_LEFT?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(14,.75*e-4.5),a.lineTo(10,.75*e+2.5),a.lineTo(6,.75*e-4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(14,.75*e),a.lineTo(6,.75*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(14,.75*e-1.5),a.lineTo(10,.75*e+2.5),a.lineTo(6,.75*e-1.5),a.close(),a.moveTo(10,.75*e-4.5),a.lineTo(10,.75*e+2.5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_TOP?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.25*d+4,5),a.lineTo(.25*d,12),a.lineTo(.25*d-4,5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.25*d+4,7.5),a.lineTo(.25*d-4,7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(.25*d+4,6),a.lineTo(.25*d,10),a.lineTo(.25*d-4,6),a.close(),a.moveTo(.25*d,3),a.lineTo(.25*d,10),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_BOTTOM?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.25*d+4,e-12),a.lineTo(.25*d,e-5),a.lineTo(.25*d-4,e-12),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.25*d+4,e-7.5),a.lineTo(.25*d-4,e-7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(.25*d+4,e-9),a.lineTo(.25*d,e-5),a.lineTo(.25*d-4,e-9),a.close(),a.moveTo(.25*d,e-12),a.lineTo(.25*d,e-5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_VERTICAL?f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(.5*d+4,e-12),a.lineTo(.5*d,e-5),a.lineTo(.5*d-4,e-12),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(.5*d+4,e-7.5),a.lineTo(.5*d-4,e-7.5),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(.5*d+4,e-9),a.lineTo(.5*d,e-5),a.lineTo(.5*d-4,e-9),a.close(),a.moveTo(.5*d,e-12),a.lineTo(.5*d,e-5),a.fillAndStroke()):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_HORIZONTAL&&(f===mxShapeMockupSpinner.prototype.cst.ADJ_TRIANGLE?(a.begin(),a.moveTo(6,.5*e-4.5),a.lineTo(10,.5*e+2.5),a.lineTo(14,.5*e-4.5),a.close(),a.fillAndStroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_PLUSMINUS?(a.begin(),a.moveTo(14,.5*e),a.lineTo(6,.5*e),a.stroke()):f===mxShapeMockupSpinner.prototype.cst.ADJ_ARROW&&
(a.begin(),a.moveTo(14,.5*e-1.5),a.lineTo(10,.5*e+2.5),a.lineTo(6,.5*e-1.5),a.close(),a.moveTo(10,.5*e-4.5),a.lineTo(10,.5*e+2.5),a.fillAndStroke()))};
mxShapeMockupSpinner.prototype.mainText=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.MAIN_TEXT,"100").toString(),f=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.TEXT_SIZE,"17"),g=mxUtils.getValue(this.style,mxShapeMockupSpinner.prototype.cst.TEXT_COLOR,"#666666");a.setFontSize(f);a.setFontColor(g);b===mxShapeMockupSpinner.prototype.cst.LAYOUT_RIGHT?a.text(.5*(d-20),.5*e,0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):
b===mxShapeMockupSpinner.prototype.cst.LAYOUT_LEFT?a.text(.5*(d+20),.5*e,0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_TOP?a.text(.5*d,.5*(e+15),0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_BOTTOM?a.text(.5*d,.5*(e-15),0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_VERTICAL?a.text(.5*d,.5*e,
0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):b===mxShapeMockupSpinner.prototype.cst.LAYOUT_HORIZONTAL&&a.text(.5*d,.5*e,0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupSpinner.prototype.cst.SHAPE_SPINNER,mxShapeMockupSpinner);function mxShapeMockupMenuBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupMenuBar,mxShape);
mxShapeMockupMenuBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_MENU_BAR:"mxgraph.mockup.forms.menuBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"};
mxShapeMockupMenuBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.MAIN_TEXT,"+Menu 1, Menu 2, Menu 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.TEXT_COLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
"#666666"),m=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.STROKE_COLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxShapeMockupMenuBar.prototype.cst.FILL_COLOR2,"#008cff"),q=f.length,t=Array(q),u=0,v=-1,r=0;r<q;r++){var w=f[r];w.charAt(0)===mxShapeMockupMenuBar.prototype.cst.SELECTED&&(w=f[r].substring(1),v=r);t[r]=mxUtils.getSizeForString(w,k,mxConstants.DEFAULT_FONTFAMILY).width;u+=t[r]}c=Math.max(c,1.5*k,20);
u=10*q+u;b=Math.max(b,u);a.translate(d,e);this.background(a,b,c,10,q,t,5,u,l,m,n,p,v);a.setShadow(!1);for(r=d=0;r<q;r++)r===v?a.setFontColor(h):a.setFontColor(g),d+=5,this.buttonText(a,d,c,f[r],t[r],k,u,b),d=d+t[r]+5};
mxShapeMockupMenuBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.setStrokeColor(k);a.setFillColor(m);a.rect(0,0,d,e);a.fillAndStroke();a.setStrokeColor(l);a.begin();for(b=1;b<c;b++)if(b!==p&&b!==p+1){for(var q=l=0;q<b;q++)l+=f[q]+2*g;l=l*d/h;a.moveTo(l,0);a.lineTo(l,e)}a.stroke();if(-1!==p){c=0;a.setFillColor(n);for(b=0;b<p;b++)c+=f[b]+2*g;c=c*d/h;a.rect(c,0,(f[p]+2*g)*d/h+c-c,e);a.fill()}a.setStrokeColor(k);a.setFillColor(m);a.rect(0,0,d,e);a.stroke()};
mxShapeMockupMenuBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxShapeMockupMenuBar.prototype.cst.SELECTED&&(b=b.substring(1));a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupMenuBar.prototype.cst.SHAPE_MENU_BAR,mxShapeMockupMenuBar);function mxShapeMockupHorSlider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupHorSlider,mxShape);mxShapeMockupHorSlider.prototype.cst={STYLE:"sliderStyle",SLIDER_BASIC:"basic",SLIDER_FANCY:"fancy",SLIDER_POS:"sliderPos",HANDLE_TRIANGLE:"triangle",HANDLE_CIRCLE:"circle",HANDLE_HANDLE:"handle",HANDLE_STYLE:"handleStyle",FILL_COLOR2:"fillColor2",SHAPE_HOR_SLIDER:"mxgraph.mockup.forms.horSlider"};
mxShapeMockupHorSlider.prototype.customProperties=[{name:"sliderStyle",dispName:"Slider Style",type:"enum",enumList:[{val:"basic",dispName:"Basic"},{val:"fancy",dispName:"Fancy"}]},{name:"handleStyle",dispName:"Handle Style",type:"enum",enumList:[{val:"triangle",dispName:"Triangle"},{val:"circle",dispName:"Circle"},{val:"handle",dispName:"Handle"}]},{name:"sliderPos",dispName:"Handle Position",type:"float"},{name:"fillColor2",dispName:"Fill2 Color",type:"color"}];
mxShapeMockupHorSlider.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupHorSlider.prototype.cst.STYLE,mxShapeMockupHorSlider.prototype.cst.SLIDER_BASIC);a.translate(d,e);this.background(a,b,c,5,f);a.setShadow(!1);this.foreground(a,b,c,5,f);this.sliderPos=20};
mxShapeMockupHorSlider.prototype.background=function(a,d,e,b,c){c===mxShapeMockupHorSlider.prototype.cst.SLIDER_BASIC?(a.begin(),a.moveTo(0,.5*e),a.lineTo(d,.5*e),a.stroke()):c===mxShapeMockupHorSlider.prototype.cst.SLIDER_FANCY&&(a.roundrect(0,.5*e-b,d,2*b,b,b),a.fillAndStroke())};
mxShapeMockupHorSlider.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupHorSlider.prototype.cst.SLIDER_POS,"20"),g=mxUtils.getValue(this.style,mxShapeMockupHorSlider.prototype.cst.HANDLE_STYLE,mxShapeMockupHorSlider.prototype.cst.HANDLE_CIRCLE),h=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupHorSlider.prototype.cst.FILL_COLOR2,"#ddeeff"),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
"#999999");f=Math.min(100,f);f=Math.max(0,f);c===mxShapeMockupHorSlider.prototype.cst.SLIDER_BASIC?(a.setStrokeColor(k),c=d*f/100,a.begin(),a.moveTo(0,.5*e),a.lineTo(c,.5*e),a.stroke(),a.setStrokeColor(l)):c===mxShapeMockupHorSlider.prototype.cst.SLIDER_FANCY&&(c=10+(d-10)*f/100,a.setFillColor(k),a.roundrect(0,.5*e-b,c,2*b,b,b),a.fillAndStroke(),a.setFillColor(h));d=5+(d-10)*f/100;g===mxShapeMockupHorSlider.prototype.cst.HANDLE_CIRCLE?(a.ellipse(d-10,.5*e-10,20,20),a.fillAndStroke()):g===mxShapeMockupHorSlider.prototype.cst.HANDLE_TRIANGLE?
(a.begin(),a.moveTo(d-10,.5*e+10),a.lineTo(d,.5*e-10),a.lineTo(d+10,.5*e+10),a.close(),a.fillAndStroke()):g===mxShapeMockupHorSlider.prototype.cst.HANDLE_HANDLE&&(a.begin(),a.moveTo(d-7,.5*e+10),a.lineTo(d-7,.5*e),a.lineTo(d,.5*e-10),a.lineTo(d+7,.5*e),a.lineTo(d+7,.5*e+10),a.close(),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeMockupHorSlider.prototype.cst.SHAPE_HOR_SLIDER,mxShapeMockupHorSlider);
Graph.handleFactory[mxShapeMockupHorSlider.prototype.cst.SHAPE_HOR_SLIDER]=function(a){return[Graph.createHandle(a,["sliderPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"sliderPos",this.sliderPos))));return new mxPoint(d.x+(d.width-10)*e/d.width/100*d.width+5,d.y+d.height/2)},function(d,e){this.state.style.sliderPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeMockupListBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupListBox,mxShape);mxShapeMockupListBox.prototype.cst={MAIN_TEXT:"mainText",SUB_TEXT:"subText",BUTTON_TEXT:"buttonText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SELECTED_COLOR:"selectedColor",SELECTED:"+",SHAPE_LIST_BOX:"mxgraph.mockup.forms.listBox"};
mxShapeMockupListBox.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupListBox.prototype.cst.TEXT_SIZE,"17").toString(),k=-1,l=b,m=mxUtils.getValue(this.style,mxShapeMockupListBox.prototype.cst.SUB_TEXT,"Sub Text").toString().split(","),n=0;n<m.length;n++){var p=m[n];p.charAt(0)===mxShapeMockupListBox.prototype.cst.SELECTED&&
(p=m[n].substring(1),k=n);p=mxUtils.getSizeForString(p,h,mxConstants.DEFAULT_FONTFAMILY).width;p>l&&(l=p)}a.translate(d,e);b=Math.min(b,l);c=Math.max(c,30+m.length*h*1.5);this.background(a,b,c,f,g);a.setShadow(!1);this.foreground(a,b,c,g,k,m,h)};mxShapeMockupListBox.prototype.background=function(a,d,e,b,c){a.setFillColor(b);a.setStrokeColor(c);a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupListBox.prototype.foreground=function(a,d,e,b,c,f,g){mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");b=mxUtils.getValue(this.style,mxShapeMockupListBox.prototype.cst.SELECTED_COLOR,"#ddeeff");-1!==c&&(a.setFillColor(b),a.rect(0,30+c*g*1.5,d,1.5*g),a.fill());a.begin();a.moveTo(0,30);a.lineTo(d,30);a.stroke();c=mxUtils.getValue(this.style,mxShapeMockupListBox.prototype.cst.MAIN_TEXT,"Window Title").toString();b=mxUtils.getValue(this.style,mxShapeMockupListBox.prototype.cst.TEXT_COLOR,
"#666666,#008cff").toString().split(",");a.setFontColor(b[1]);a.setFontSize(g);a.text(10,15,0,0,c,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontColor(b[0]);for(c=0;c<f.length;c++)b=f[c],b.charAt(0)===mxShapeMockupListBox.prototype.cst.SELECTED&&(b=f[c].substring(1)),a.text(10,30+g*(1.5*c+.75),0,0,b,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.rect(0,0,d,e);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupListBox.prototype.cst.SHAPE_LIST_BOX,mxShapeMockupListBox);
function mxShapeMockupPwField(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPwField,mxShape);mxShapeMockupPwField.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_PW_FIELD:"mxgraph.mockup.forms.pwField"};mxShapeMockupPwField.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupPwField.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupPwField.prototype.foreground=function(a,d,e){d=mxUtils.getValue(this.style,mxShapeMockupPwField.prototype.cst.MAIN_TEXT,"******");var b=mxUtils.getValue(this.style,mxShapeMockupPwField.prototype.cst.TEXT_COLOR,"#666666"),c=mxUtils.getValue(this.style,mxShapeMockupPwField.prototype.cst.TEXT_SIZE,"17");a.setFontColor(b);a.setFontSize(c);a.text(5,.5*e,0,0,d,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeMockupPwField.prototype.cst.SHAPE_PW_FIELD,mxShapeMockupPwField);function mxShapeMockupSplitter(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupSplitter,mxShape);mxShapeMockupSplitter.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_SPLITTER:"mxgraph.mockup.forms.splitter"};
mxShapeMockupSplitter.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,35);a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupSplitter.prototype.background=function(a,d,e){a.begin();a.moveTo(0,.5*e-5);a.lineTo(d,.5*e-5);a.lineTo(d,.5*e+5);a.lineTo(0,.5*e+5);a.close();a.fill()};
mxShapeMockupSplitter.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.begin();a.moveTo(0,.5*e-5);a.lineTo(d,.5*e-5);a.moveTo(d,.5*e+5);a.lineTo(0,.5*e+5);a.stroke();a.setFillColor(b);a.ellipse(.5*d-17,.5*e-2,4,4);a.fill();a.ellipse(.5*d-2,.5*e-2,4,4);a.fill();a.ellipse(.5*d+13,.5*e-2,4,4);a.fill()};mxCellRenderer.registerShape(mxShapeMockupSplitter.prototype.cst.SHAPE_SPLITTER,mxShapeMockupSplitter);
function mxShapeMockupWedgeBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupWedgeBar,mxShape);mxShapeMockupWedgeBar.prototype.cst={BLOCK:"block",CONE:"cone",HALF_CONE:"halfCone",ROUND:"round",TEXT_SIZE:"textSize",TAB_NAMES:"tabs",TAB_STYLE:"tabStyle",STYLE_FILLCOLOR2:"fillColor2",TEXT_COLOR:"textColor",SEL_TEXT_COLOR:"textColor2",SHAPE_WEDGE_BAR:"mxgraph.mockup.forms.wedgeBar"};
mxShapeMockupWedgeBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TEXT_SIZE,"17").toString(),g=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TAB_NAMES,"Tab 1,+Tab 2,Tab 3").toString().split(","),h=1.5*f,k=g.length,l=20+5*(k-1)+20*k,m=[],n=-1,p=0;p<k;p++){var q=g[p];"+"===q.charAt(0)&&(q=q.substring(1),n=p);q=mxUtils.getSizeForString(q,f,mxConstants.DEFAULT_FONTFAMILY).width;m[p]=0===q?42:q;l+=m[p]}b=Math.max(b,
l);c=Math.max(c,h+5);a.translate(d,e);a.setShadow(!1);this.backTabs(a,b,c,5,h,10,5,10,k,m,n);this.focusTab(a,b,c,5,h,10,5,10,k,m,n);this.tabText(a,b,c,5,h,10,5,10,k,m,n,g)};
mxShapeMockupWedgeBar.prototype.backTabs=function(a,d,e,b,c,f,g,h,k,l,m){d=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TAB_STYLE,mxShapeMockupWedgeBar.prototype.cst.BLOCK);for(e=0;e<k;e++){var n=l[e]+2*h;m!==e&&(d===mxShapeMockupWedgeBar.prototype.cst.BLOCK?(a.begin(),a.moveTo(f,c),a.lineTo(f,0),a.lineTo(f+n,0),a.lineTo(f+n,c)):d===mxShapeMockupWedgeBar.prototype.cst.CONE?(a.begin(),a.moveTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+n-.5*h,0),a.lineTo(f+n,c)):d===mxShapeMockupWedgeBar.prototype.cst.HALF_CONE?
(a.begin(),a.moveTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+n,0),a.lineTo(f+n,c)):d===mxShapeMockupWedgeBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(f-b,c),a.arcTo(b,b,0,0,0,f,c-b),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.lineTo(f+n-b,0),a.arcTo(b,b,0,0,1,f+n,b),a.lineTo(f+n,c-b),a.arcTo(b,b,0,0,0,f+n+b,c)),a.fillAndStroke());f=f+n+g}};
mxShapeMockupWedgeBar.prototype.focusTab=function(a,d,e,b,c,f,g,h,k,l,m){d=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TAB_STYLE,mxShapeMockupWedgeBar.prototype.cst.BLOCK);e=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.STYLE_FILLCOLOR2,"#008cff");a.setStrokeColor(e);a.setFillColor(e);for(e=0;e<=m;e++)k=l[e]+2*h,m===e&&(d===mxShapeMockupWedgeBar.prototype.cst.BLOCK?(a.begin(),a.moveTo(f,c),a.lineTo(f,0),a.lineTo(f+k,0),a.lineTo(f+k,c)):d===mxShapeMockupWedgeBar.prototype.cst.CONE?
(a.begin(),a.moveTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+k-.5*h,0),a.lineTo(f+k,c)):d===mxShapeMockupWedgeBar.prototype.cst.HALF_CONE?(a.begin(),a.moveTo(f,c),a.lineTo(f+.5*h,0),a.lineTo(f+k,0),a.lineTo(f+k,c)):d===mxShapeMockupWedgeBar.prototype.cst.ROUND&&(a.begin(),a.moveTo(f-b,c),a.arcTo(b,b,0,0,0,f,c-b),a.lineTo(f,b),a.arcTo(b,b,0,0,1,f+b,0),a.lineTo(f+k-b,0),a.arcTo(b,b,0,0,1,f+k,b),a.lineTo(f+k,c-b),a.arcTo(b,b,0,0,0,f+k+b,c)),a.fillAndStroke()),f=f+k+g};
mxShapeMockupWedgeBar.prototype.tabText=function(a,d,e,b,c,f,g,h,k,l,m,n){d=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TEXT_COLOR,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.SEL_TEXT_COLOR,"#ffffff");b=mxUtils.getValue(this.style,mxShapeMockupWedgeBar.prototype.cst.TEXT_SIZE,"17").toString();a.setFontColor(d);a.setFontSize(b);for(b=0;b<k;b++){var p=n[b];b===m&&a.setFontColor(e);"+"===p.charAt(0)&&(p=p.substring(1));var q=l[b]+2*h;a.text(f+h,.5*
c,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);f=f+q+g;b===m&&a.setFontColor(d)}};mxCellRenderer.registerShape(mxShapeMockupWedgeBar.prototype.cst.SHAPE_WEDGE_BAR,mxShapeMockupWedgeBar);function mxShapeMockupSearchBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupSearchBox,mxShape);
mxShapeMockupSearchBox.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",STROKE_COLOR2:"strokeColor2",SHAPE_SEARCH_BOX:"mxgraph.mockup.forms.searchBox"};mxShapeMockupSearchBox.prototype.customProperties=[{name:"strokeColor2",dispName:"Icon Color",type:"color"}];mxShapeMockupSearchBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupSearchBox.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupSearchBox.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupSearchBox.prototype.cst.MAIN_TEXT,"Search"),c=mxUtils.getValue(this.style,mxShapeMockupSearchBox.prototype.cst.TEXT_COLOR,"#666666"),f=mxUtils.getValue(this.style,mxShapeMockupSearchBox.prototype.cst.STROKE_COLOR2,"#008cff"),g=mxUtils.getValue(this.style,mxShapeMockupSearchBox.prototype.cst.TEXT_SIZE,"17");a.setFontColor(c);a.setFontSize(g);a.text(5,.5*e,0,0,b,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.setStrokeColor(f);a.ellipse(d-15,.5*e-8,10,10);a.stroke();a.begin();a.moveTo(d-19,.5*e+9);a.lineTo(d-13,.5*e+1);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupSearchBox.prototype.cst.SHAPE_SEARCH_BOX,mxShapeMockupSearchBox);function mxShapeMockupSignIn(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupSignIn,mxShape);
mxShapeMockupSignIn.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",TEXT_SIZE:"textSize",TEXT_SIZE2:"textSize2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SHAPE_SIGN_IN:"mxgraph.mockup.forms.signIn"};mxShapeMockupSignIn.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupSignIn.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupSignIn.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.MAIN_TEXT,"Sign In,User Name:,johndoe,Password:,********,Forgot Password?,New User,SIGN IN,SIGN UP").toString().split(","),c=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.TEXT_COLOR,"#666666"),f=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.TEXT_COLOR2,"#ffffff"),g=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.TEXT_SIZE,"12"),
h=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.TEXT_SIZE2,"15"),k=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.STROKE_COLOR2,"#ddeeff"),l=mxUtils.getValue(this.style,mxShapeMockupSignIn.prototype.cst.FILL_COLOR2,"#66bbff");a.setFillColor(l);a.roundrect(.09*d,.52*e,.36*d,.09*e,5,5);a.fill();a.roundrect(.09*d,.84*e,.36*d,.09*e,5,5);a.fill();a.rect(.05*d,.22*e,.75*d,.08*e);a.stroke();a.rect(.05*d,.4*e,.75*d,.08*e);a.stroke();a.setStrokeColor(k);a.setStrokeWidth(2);a.begin();
a.moveTo(.05*d,.12*e);a.lineTo(.95*d,.12*e);a.moveTo(.05*d,.72*e);a.lineTo(.95*d,.72*e);a.stroke();a.setFontColor(c);a.setFontSize(g);a.text(.05*d,.1*e,0,0,b[0],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,0,null,0,0,0);a.text(.05*d,.2*e,0,0,b[1],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,0,null,0,0,0);a.text(.075*d,.26*e,0,0,b[2],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.05*d,.38*e,0,0,b[3],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,0,null,0,0,0);a.text(.075*
d,.44*e,0,0,b[4],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.05*d,.8*e,0,0,b[6],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeWidth(1);a.setFontColor("#9999ff");a.setStrokeColor("#9999ff");c=mxUtils.getSizeForString(b[5],g,mxConstants.DEFAULT_FONTFAMILY).width;a.text(.05*d,.7*e,0,0,b[5],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,0,null,0,0,0);a.begin();a.moveTo(.05*d,.7*e);a.lineTo(.05*d+c,.7*e);a.stroke();a.setFontColor(f);a.setFontStyle(mxConstants.FONT_BOLD);
a.setFontSize(h);a.text(.27*d,.565*e,0,0,b[7],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.27*d,.885*e,0,0,b[8],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupSignIn.prototype.cst.SHAPE_SIGN_IN,mxShapeMockupSignIn);function mxShapeMockupCalendar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupCalendar,mxShape);
mxShapeMockupCalendar.prototype.cst={SHAPE_CALENDAR:"mxgraph.mockup.forms.calendar",DAYS:"days",SELECTED_DAY:"selDay",PREV_DAYS:"prevDays",FIRST_DAY:"firstDay",START_ON:"startOn",DAY_NAMES:"dayNames",MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2"};mxShapeMockupCalendar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupCalendar.prototype.background=function(a,d,e){a.roundrect(0,0,d,e,.0312*d,.0286*e);a.fillAndStroke()};
mxShapeMockupCalendar.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999"),c=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.STROKE_COLOR2,"#008cff"),g=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.FILL_COLOR2,"#ddeeff"),h=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.MAIN_TEXT,""),k=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.TEXT_SIZE,
"15"),l=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.TEXT_COLOR,"#999999"),m=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.TEXT_COLOR2,"#ffffff"),n=parseInt(mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.DAYS,"30"),10),p=parseInt(mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.PREV_DAYS,"31"),10),q=parseInt(mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.FIRST_DAY,"0"),10),t=parseInt(mxUtils.getValue(this.style,
mxShapeMockupCalendar.prototype.cst.START_ON,"6",10)),u=mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.DAY_NAMES,"Mo,Tu,We,Th,Fr,Sa,Su").toString().split(","),v=parseInt(mxUtils.getValue(this.style,mxShapeMockupCalendar.prototype.cst.SELECTED_DAY,"24"),10);fistDay=Math.max(q,0);t=Math.max(t,0);fistDay=Math.min(q,6);t=Math.min(t,6);a.roundrect(.05*d,.0457*e,.1438*d,.1029*e,.025*d,.0229*e);a.stroke();a.roundrect(.8125*d,.0457*e,.1438*d,.1029*e,.025*d,.0229*e);a.stroke();a.setStrokeWidth(2);
a.setStrokeColor(f);a.begin();a.moveTo(.1438*d,.0743*e);a.lineTo(.1*d,.0971*e);a.lineTo(.1438*d,.12*e);a.moveTo(.8625*d,.0743*e);a.lineTo(.9062*d,.0971*e);a.lineTo(.8625*d,.12*e);a.stroke();a.setFontSize(k);a.setFontColor(l);a.text(.5*d,.0971*e,0,0,h,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);h=.875*d/7;for(k=0;7>k;k++){l=.0625*d+.5*h+k*h;var r=k+t;6<r&&(r-=7);a.text(l,.2114*e,0,0,u[r],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)}a.setStrokeWidth(1);var w=0;
r=u=-1;if(q!==t){a.setStrokeColor(b);a.setFillColor(g);q-=t;0>q&&(q+=7);for(k=0;k<q;k++)l=.0625*d+k*h,a.rect(l,.2686*e,h,.1143*e),a.fillAndStroke(),a.text(l+.5*h,.2686*e+.5*h,0,0,(p-q+k+1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);w=q}a.setFillColor(c);a.setStrokeColor(b);for(k=b=0;k<n;k++)c=k+1,l=.0625*d+w*h,p=.2686*e+b*e*.1143,c===v?(u=l,r=p):(a.rect(l,p,h,.1143*e),a.fillAndStroke(),a.text(l+.5*h,p+.5*h,0,0,c.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0)),6>w?w++:(w=0,b++);k=1;for(a.setFillColor(g);6>b;)l=.0625*d+w*h,p=.2686*e+b*e*.1143,a.rect(l,p,h,.1143*e),a.fillAndStroke(),a.text(l+.5*h,p+.5*h,0,0,k.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),6>w?w++:(w=0,b++),k++;0<=u&&(a.setStrokeColor("#ff0000"),a.setStrokeWidth(2),a.setFillColor(f),a.setFontColor(m),a.rect(u,r,h,.1143*e),a.fillAndStroke(),a.text(u+.5*h,r+.5*h,0,0,v.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0))};
mxCellRenderer.registerShape(mxShapeMockupCalendar.prototype.cst.SHAPE_CALENDAR,mxShapeMockupCalendar);function mxShapeMockupEmailForm(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupEmailForm,mxShape);mxShapeMockupEmailForm.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",SHOW_CC:"showCC",SHOW_BCC:"showBCC",TEXT_SIZE:"textSize",SHAPE_EMAIL_FORM:"mxgraph.mockup.forms.emailForm"};
mxShapeMockupEmailForm.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupEmailForm.prototype.cst.TEXT_SIZE,"12"),g=mxUtils.getValue(this.style,mxShapeMockupEmailForm.prototype.cst.SHOW_CC,"true"),h=mxUtils.getValue(this.style,mxShapeMockupEmailForm.prototype.cst.SHOW_BCC,"true"),k=4*f,l=0;"true"===g&&l++;"true"===h&&l++;b=Math.max(b,5*f);c=Math.max(c,10.5*f+l*f*3);a.translate(d,e);this.background(a,b,c,f,k,g,h);a.setShadow(!1);this.foreground(a,b,c,f,k,
g,h)};mxShapeMockupEmailForm.prototype.background=function(a,d,e,b,c,f,g){var h=9*b;"true"===f&&(h+=3*b,a.rect(c,9*b,d-c,1.5*b),a.fillAndStroke());"true"===g&&(a.rect(c,h,d-c,1.5*b),h+=3*b,a.fillAndStroke());a.rect(c,0,d-c,1.5*b);a.fillAndStroke();a.rect(c,3*b,d-c,1.5*b);a.fillAndStroke();a.rect(c,6*b,d-c,1.5*b);a.fillAndStroke();a.rect(0,h,d,e-h);a.fillAndStroke()};
mxShapeMockupEmailForm.prototype.foreground=function(a,d,e,b,c,f,g){d=mxUtils.getValue(this.style,mxShapeMockupEmailForm.prototype.cst.MAIN_TEXT,"john@jgraph.com,Greeting,fred@jgraph.com,,,Lorem ipsum").toString().split(",");e=mxUtils.getValue(this.style,mxShapeMockupEmailForm.prototype.cst.TEXT_COLOR,"#666666");a.setFontColor(e);a.setFontSize(b);a.text(c-.5*b,.75*b,0,0,"From",mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(c-.5*b,3.75*b,0,0,"Subject",mxConstants.ALIGN_RIGHT,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(c-.5*b,6.75*b,0,0,"To",mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(c+.5*b,.75*b,0,0,d[0],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(c+.5*b,3.75*b,0,0,d[1],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(c+.5*b,6.75*b,0,0,d[2],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);e=9*b;"true"===f&&(e+=3*b,a.text(c-.5*b,9.75*b,0,0,"CC",mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0),a.text(c+.5*b,9.75*b,0,0,d[3],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0));"true"===g&&(a.text(c-.5*b,e+.75*b,0,0,"BCC",mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),a.text(c+.5*b,e+.75*b,0,0,d[4],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e+=3*b);a.text(.5*b,e+.75*b,0,0,d[5],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupEmailForm.prototype.cst.SHAPE_EMAIL_FORM,mxShapeMockupEmailForm);
function mxShapeMockupFormsRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupFormsRRect,mxShape);mxShapeMockupFormsRRect.prototype.cst={RRECT:"mxgraph.mockup.forms.rrect",R_SIZE:"rSize"};mxShapeMockupFormsRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupFormsRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupFormsRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupFormsRRect.prototype.cst.RRECT,mxShapeMockupFormsRRect);function mxShapeMockupFormsAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeMockupFormsAnchor,mxShape);mxShapeMockupFormsAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.forms.anchor"};
mxShapeMockupFormsAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupFormsAnchor.prototype.cst.ANCHOR,mxShapeMockupFormsAnchor);function mxShapeMockupFormsCheckbox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupFormsCheckbox,mxShape);mxShapeMockupFormsCheckbox.prototype.cst={CHECKBOX:"mxgraph.mockup.forms.checkbox"};
mxShapeMockupFormsCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupFormsCheckbox.prototype.cst.CHECKBOX,mxShapeMockupFormsCheckbox);function mxShapeMockupFormsURect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupFormsURect,mxShape);
mxShapeMockupFormsURect.prototype.cst={U_RECT:"mxgraph.mockup.forms.uRect"};mxShapeMockupFormsURect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupFormsURect.prototype.cst.U_RECT,mxShapeMockupFormsURect);function mxShapeMockupBarChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupBarChart,mxShape);mxShapeMockupBarChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",FILL_COLOR2:"fillColor2",FILL_COLOR3:"fillColor3",SHAPE_BAR_CHART:"mxgraph.mockup.graphics.barChart"};
mxShapeMockupBarChart.prototype.customProperties=[{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"},{name:"strokeColor3",dispName:"Stroke3 Color",type:"color"},{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"fillColor3",dispName:"Fill3 Color",type:"color"}];
mxShapeMockupBarChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);"none"!==mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none")&&a.setShadow(!1);this.bars(a,d,e,b,c)};mxShapeMockupBarChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupBarChart.prototype.bars=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupBarChart.prototype.cst.STROKE_COLOR2,"none");e=mxUtils.getValue(this.style,mxShapeMockupBarChart.prototype.cst.STROKE_COLOR3,"#666666");var f=mxUtils.getValue(this.style,mxShapeMockupBarChart.prototype.cst.FILL_COLOR2,"#008cff"),g=mxUtils.getValue(this.style,mxShapeMockupBarChart.prototype.cst.FILL_COLOR3,"#dddddd"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeColor(d);
a.setFillColor(f);a.rect(0,.2*c,.75*b,.05*c);a.fillAndStroke();a.rect(0,.45*c,.6*b,.05*c);a.fillAndStroke();a.rect(0,.7*c,.95*b,.05*c);a.fillAndStroke();a.setFillColor(g);a.rect(0,.25*c,.85*b,.05*c);a.fillAndStroke();a.rect(0,.5*c,.65*b,.05*c);a.fillAndStroke();a.rect(0,.75*c,.8*b,.05*c);a.fillAndStroke();a.setStrokeWidth(2*h);a.setStrokeColor(e);a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeMockupBarChart.prototype.cst.SHAPE_BAR_CHART,mxShapeMockupBarChart);function mxShapeMockupColumnChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupColumnChart,mxShape);mxShapeMockupColumnChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",FILL_COLOR2:"fillColor2",FILL_COLOR3:"fillColor3",SHAPE_COLUMN_CHART:"mxgraph.mockup.graphics.columnChart"};
mxShapeMockupColumnChart.prototype.customProperties=[{name:"strokeColor2",dispName:"Bar Stroke Color",type:"color"},{name:"strokeColor3",dispName:"Coord System Color",type:"color"},{name:"fillColor2",dispName:"Bar1 Color",type:"color"},{name:"fillColor3",dispName:"Bar2 Color",type:"color"}];
mxShapeMockupColumnChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);"none"!==mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none")&&a.setShadow(!1);this.bars(a,d,e,b,c)};mxShapeMockupColumnChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupColumnChart.prototype.bars=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupColumnChart.prototype.cst.STROKE_COLOR2,"none");e=mxUtils.getValue(this.style,mxShapeMockupColumnChart.prototype.cst.STROKE_COLOR3,"#666666");var f=mxUtils.getValue(this.style,mxShapeMockupColumnChart.prototype.cst.FILL_COLOR2,"#008cff"),g=mxUtils.getValue(this.style,mxShapeMockupColumnChart.prototype.cst.FILL_COLOR3,"#dddddd"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeColor(d);
a.setFillColor(f);a.rect(.2*b,.25*c,.05*b,.75*c);a.fillAndStroke();a.rect(.45*b,.4*c,.05*b,.6*c);a.fillAndStroke();a.rect(.7*b,.05*c,.05*b,.95*c);a.fillAndStroke();a.setFillColor(g);a.rect(.25*b,.15*c,.05*b,.85*c);a.fillAndStroke();a.rect(.5*b,.35*c,.05*b,.65*c);a.fillAndStroke();a.rect(.75*b,.2*c,.05*b,.8*c);a.fillAndStroke();a.setStrokeWidth(2*h);a.setStrokeColor(e);a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeMockupColumnChart.prototype.cst.SHAPE_COLUMN_CHART,mxShapeMockupColumnChart);function mxShapeMockupLineChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupLineChart,mxShape);mxShapeMockupLineChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",STROKE_COLOR4:"strokeColor4",SHAPE_LINE_CHART:"mxgraph.mockup.graphics.lineChart"};
mxShapeMockupLineChart.prototype.customProperties=[{name:"strokeColor2",dispName:"Coord. System Color",type:"color"},{name:"strokeColor3",dispName:"Line1 Color",type:"color"},{name:"strokeColor4",dispName:"Line2 Color",type:"color"}];mxShapeMockupLineChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);"none"!==mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none")&&a.setShadow(!1);this.bars(a,d,e,b,c)};
mxShapeMockupLineChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupLineChart.prototype.bars=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupLineChart.prototype.cst.STROKE_COLOR2,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupLineChart.prototype.cst.STROKE_COLOR3,"#008cff");var f=mxUtils.getValue(this.style,mxShapeMockupLineChart.prototype.cst.STROKE_COLOR4,"#dddddd"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeWidth(2*g);a.setStrokeColor(f);a.begin();a.moveTo(0,c);a.lineTo(.3*b,.5*c);a.lineTo(.6*
b,.74*c);a.lineTo(.9*b,.24*c);a.stroke();a.setStrokeColor(e);a.begin();a.moveTo(0,c);a.lineTo(.3*b,.65*c);a.lineTo(.6*b,.6*c);a.lineTo(.9*b,.35*c);a.stroke();a.setStrokeColor(d);a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupLineChart.prototype.cst.SHAPE_LINE_CHART,mxShapeMockupLineChart);function mxShapeMockupPieChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupPieChart,mxShape);mxShapeMockupPieChart.prototype.cst={PARTS:"parts",PART_COLORS:"partColors",SHAPE_PIE_CHART:"mxgraph.mockup.graphics.pieChart"};
mxShapeMockupPieChart.prototype.customProperties=[{name:"partsCount",dispName:"partsCount",type:"int",defVal:4,dependentProps:["partColors","parts"]},{name:"partColors",dispName:"Part Colors",type:"staticArr",subType:"color",sizeProperty:"partsCount",subDefVal:"#FFFFFF"},{name:"parts",dispName:"Part Sizes",type:"staticArr",subType:"int",sizeProperty:"partsCount",subDefVal:"10"}];
mxShapeMockupPieChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupPieChart.prototype.background=function(a,d,e,b,c,f,g){a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapeMockupPieChart.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupPieChart.prototype.cst.PARTS,"10,20,30").toString().split(",");e=d.length;for(var f=mxUtils.getValue(this.style,mxShapeMockupPieChart.prototype.cst.PART_COLORS,"#333333,#666666,#999999").toString().split(","),g=0,h=0;h<e;h++)g+=parseInt(d[h],10);for(h=0;h<e;h++){f.length>h?a.setFillColor(f[h]):a.setFillColor("#ff0000");var k=0;var l=parseInt(d[h],10)/g;.5===l&&(l=.501);for(var m=0;m<h;m++)k+=
parseInt(d[m],10)/g;l+=k;var n=2*Math.PI*k,p=2*Math.PI*l;m=.5*b-b*Math.sin(n)*.5;n=.5*c-c*Math.cos(n)*.5;var q=.5*b-b*Math.sin(p)*.5;p=.5*c-c*Math.cos(p)*.5;var t=1;.5>l-k&&(t=0);a.begin();a.moveTo(.5*b,.5*c);a.lineTo(q,p);a.arcTo(.5*b,.5*c,0,t,1,m,n);a.close();a.fillAndStroke()}};mxCellRenderer.registerShape(mxShapeMockupPieChart.prototype.cst.SHAPE_PIE_CHART,mxShapeMockupPieChart);
function mxShapeMockupIconGrid(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupIconGrid,mxShape);mxShapeMockupIconGrid.prototype.cst={GRID_SIZE:"gridSize",SHAPE_ICON_GRID:"mxgraph.mockup.graphics.iconGrid"};
mxShapeMockupIconGrid.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxShapeMockupIconGrid.prototype.cst.GRID_SIZE,"3,3").toString().split(",");this.background(a,b,c,d);a.setShadow(!1);this.foreground(a,b,c,d)};mxShapeMockupIconGrid.prototype.background=function(a,d,e,b){d/=parseInt(b[0],10)+.5*(b[0]-1);e/=parseInt(b[1],10)+.5*(b[1]-1);for(var c=0;c<b[0];c++)for(var f=0;f<b[1];f++)a.rect(1.5*d*c,1.5*e*f,d,e),a.fillAndStroke()};
mxShapeMockupIconGrid.prototype.foreground=function(a,d,e,b){d/=parseInt(b[0],10)+.5*(b[0]-1);e/=parseInt(b[1],10)+.5*(b[1]-1);for(var c=0;c<b[0];c++)for(var f=0;f<b[1];f++)a.begin(),a.moveTo(1.5*d*c,1.5*e*f),a.lineTo(1.5*d*c+d,1.5*e*f+e),a.moveTo(1.5*d*c+d,1.5*e*f),a.lineTo(1.5*d*c,1.5*e*f+e),a.stroke()};mxCellRenderer.registerShape(mxShapeMockupIconGrid.prototype.cst.SHAPE_ICON_GRID,mxShapeMockupIconGrid);
function mxShapeMockupBubbleChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupBubbleChart,mxShape);mxShapeMockupBubbleChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",FILL_COLOR2:"fillColor2",FILL_COLOR3:"fillColor3",SHAPE_BUBBLE_CHART:"mxgraph.mockup.graphics.bubbleChart"};
mxShapeMockupBubbleChart.prototype.customProperties=[{name:"strokeColor2",dispName:"Bubble Stroke Color",type:"color"},{name:"strokeColor3",dispName:"Coord. System Color",type:"color"},{name:"fillColor2",dispName:"Bubble1 Color",type:"color"},{name:"fillColor3",dispName:"Bubble2 Color",type:"color"}];
mxShapeMockupBubbleChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);"none"!==mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none")&&a.setShadow(!1);this.bars(a,d,e,b,c)};mxShapeMockupBubbleChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupBubbleChart.prototype.bars=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupBubbleChart.prototype.cst.STROKE_COLOR2,"none");d=mxUtils.getValue(this.style,mxShapeMockupBubbleChart.prototype.cst.STROKE_COLOR3,"#666666");var g=mxUtils.getValue(this.style,mxShapeMockupBubbleChart.prototype.cst.FILL_COLOR2,"#008cff");e=mxUtils.getValue(this.style,mxShapeMockupBubbleChart.prototype.cst.FILL_COLOR3,"#dddddd");var h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,
"1");a.setStrokeColor(f);a.setFillColor(g);f=.14*Math.min(c,b);a.ellipse(.4*b-f,.45*c-f,2*f,2*f);a.fillAndStroke();f=.1*Math.min(c,b);a.ellipse(.1*b-f,.8*c-f,2*f,2*f);a.fillAndStroke();f=.22*Math.min(c,b);a.ellipse(.7*b-f,.7*c-f,2*f,2*f);a.fillAndStroke();a.setFillColor(e);f=.19*Math.min(c,b);a.ellipse(.15*b-f,.25*c-f,2*f,2*f);a.fillAndStroke();f=.12*Math.min(c,b);a.ellipse(.48*b-f,.7*c-f,2*f,2*f);a.fillAndStroke();f=.1*Math.min(c,b);a.ellipse(.74*b-f,.17*c-f,2*f,2*f);a.fillAndStroke();a.setStrokeWidth(2*
h);a.setStrokeColor(d);a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupBubbleChart.prototype.cst.SHAPE_BUBBLE_CHART,mxShapeMockupBubbleChart);function mxShapeMockupGauge(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.gaugePos=25}mxUtils.extend(mxShapeMockupGauge,mxShape);
mxShapeMockupGauge.prototype.cst={SCALE_COLORS:"scaleColors",GAUGE_LABELS:"gaugeLabels",NEEDLE_COLOR:"needleColor",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",GAUGE_POS:"gaugePos",SHAPE_GAUGE:"mxgraph.mockup.graphics.gauge"};mxShapeMockupGauge.prototype.customProperties=[{name:"scaleColors",dispName:"Scale Colors",type:"string"},{name:"needleColor",dispName:"Needle Color",type:"color"},{name:"gaugePos",dispName:"Needle Position",type:"float",min:0,max:100,defVal:25}];
mxShapeMockupGauge.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupGauge.prototype.background=function(a,d,e){a.ellipse(0,0,d,e);a.fillAndStroke()};
mxShapeMockupGauge.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.GAUGE_POS,"0"),c=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.SCALE_COLORS,"#888888,#aaaaaa,#444444").toString()).split(","),f=mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.GAUGE_LABELS,"CPU[%],0,100").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.NEEDLE_COLOR,"#008cff"),h=mxUtils.getValue(this.style,
mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.TEXT_COLOR,"#666666"),l=mxUtils.getValue(this.style,mxShapeMockupGauge.prototype.cst.TEXT_SIZE,"12");b=Math.max(0,b);b=Math.min(100,b);a.setFillColor(c[1]);a.begin();a.moveTo(.05*d,.5*e);a.arcTo(.4*d,.4*e,0,0,1,.95*d,.5*e);a.lineTo(d,.5*e);a.arcTo(.5*d,.5*e,0,0,0,0,.5*e);a.close();a.fill();a.setFillColor(c[0]);a.begin();a.moveTo(.05*d,.5*e);a.arcTo(.45*d,.45*e,0,0,0,.182*d,.818*e);a.lineTo(.146*d,
.854*e);a.arcTo(.5*d,.5*e,0,0,1,0,.5*e);a.close();a.fill();a.setFillColor(c[2]);a.begin();a.moveTo(d,.5*e);a.arcTo(.5*d,.5*e,0,0,1,.854*d,.854*e);a.lineTo(.818*d,.818*e);a.arcTo(.45*d,.45*e,0,0,0,.95*d,.5*e);a.close();a.fill();a.setFontSize(l);a.setFontColor(k);a.text(.5*d,.3*e,0,0,f[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.2*d,.85*e,0,0,f[1],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8*d,.85*e,0,0,f[2],mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);b=.75*(2*Math.PI*parseFloat(b)/100)+1.25*Math.PI;c=.5*d+.38*d*Math.sin(b);f=.5*e-.38*e*Math.cos(b);a.setFillColor(g);a.begin();a.moveTo(c,f);c=.5*d+.05*d*Math.cos(b);f=.5*e+.05*e*Math.sin(b);a.lineTo(c,f);g=.5*d+-.05*d*Math.sin(b);c=.5*e- -.05*e*Math.cos(b);a.arcTo(.05*d,.05*e,0,0,1,g,c);g=.5*d-.05*d*Math.cos(b);c=.5*e-.05*e*Math.sin(b);a.arcTo(.05*d,.05*e,0,0,1,g,c);a.close();a.fill();a.setFillColor(h);a.begin();a.moveTo(.49*d,.49*e);a.lineTo(.51*d,.49*e);a.lineTo(.51*d,.51*e);a.lineTo(.49*
d,.51*e);a.close();a.fill();a.begin();a.ellipse(0,0,d,e);a.stroke();a.begin();a.moveTo(.146*d,.854*e);a.lineTo(.219*d,.781*e);a.moveTo(.854*d,.854*e);a.lineTo(.781*d,.781*e);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupGauge.prototype.cst.SHAPE_GAUGE,mxShapeMockupGauge);
Graph.handleFactory[mxShapeMockupGauge.prototype.cst.SHAPE_GAUGE]=function(a){return[Graph.createHandle(a,["gaugePos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"gaugePos",this.gaugePos))));return new mxPoint(d.x+.2*d.width+.6*e*d.width/100,d.y+.8*d.height)},function(d,e){this.state.style.gaugePos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeMockupPlotChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPlotChart,mxShape);mxShapeMockupPlotChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SHAPES_COLORS:"fillColor2",SHAPE_PLOT_CHART:"mxgraph.mockup.graphics.plotChart"};
mxShapeMockupPlotChart.prototype.customProperties=[{name:"strokeColor2",dispName:"Bubble Stroke Color",type:"color"},{name:"strokeColor3",dispName:"Coord. System Color",type:"color"},{name:"fillColor2",dispName:"Shapes Color",type:"string"}];mxShapeMockupPlotChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);"none"!==mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none")&&a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupPlotChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupPlotChart.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupPlotChart.prototype.cst.STROKE_COLOR2,"#dddddd");d=mxUtils.getValue(this.style,mxShapeMockupPlotChart.prototype.cst.STROKE_COLOR3,"#666666");e=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupPlotChart.prototype.cst.SHAPES_COLORS,"#00aaff,#0044ff,#008cff").toString()).split(",");var g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1"),h=.03*Math.min(b,c);a.setStrokeColor(f);
a.setFillColor(e[0]);f=.2*b;var k=.8*c;a.begin();a.moveTo(f-.5*h,k-.5*h);a.lineTo(f+.5*h,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();f=.3*b;k=.65*c;a.begin();a.moveTo(f-.5*h,k-.5*h);a.lineTo(f+.5*h,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();f=.6*b;k=.44*c;a.begin();a.moveTo(f-.5*h,k-.5*h);a.lineTo(f+.5*h,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();f=.85*b;k=.9*c;a.begin();a.moveTo(f-
.5*h,k-.5*h);a.lineTo(f+.5*h,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();a.setFillColor(e[1]);f=.08*b;k=.65*c;a.begin();a.moveTo(f,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();f=.58*b;k=.85*c;a.begin();a.moveTo(f,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();f=.72*b;k=.92*c;a.begin();a.moveTo(f,k-.5*h);a.lineTo(f+.5*h,k+.5*h);a.lineTo(f-.5*h,k+.5*h);a.close();a.fillAndStroke();a.setFillColor(e[2]);
f=.32*b;k=.28*c;a.begin();a.moveTo(f,k-.75*h);a.lineTo(f+.75*h,k);a.lineTo(f,k+.75*h);a.lineTo(f-.75*h,k);a.close();a.fillAndStroke();f=.92*b;k=.45*c;a.begin();a.moveTo(f,k-.75*h);a.lineTo(f+.75*h,k);a.lineTo(f,k+.75*h);a.lineTo(f-.75*h,k);a.close();a.fillAndStroke();f=.81*b;k=.37*c;a.begin();a.moveTo(f,k-.75*h);a.lineTo(f+.75*h,k);a.lineTo(f,k+.75*h);a.lineTo(f-.75*h,k);a.close();a.fillAndStroke();f=.51*b;k=.7*c;a.begin();a.moveTo(f,k-.75*h);a.lineTo(f+.75*h,k);a.lineTo(f,k+.75*h);a.lineTo(f-.75*
h,k);a.close();a.fillAndStroke();a.setStrokeWidth(2*g);a.setStrokeColor(d);a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupPlotChart.prototype.cst.SHAPE_PLOT_CHART,mxShapeMockupPlotChart);function mxShapeMockupGanttChart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupGanttChart,mxShape);
mxShapeMockupGanttChart.prototype.cst={STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3",SHAPES_COLORS:"fillColor2",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_GANTT_CHART:"mxgraph.mockup.graphics.ganttChart"};mxShapeMockupGanttChart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupGanttChart.prototype.background=function(a,d,e,b,c,f,g){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupGanttChart.prototype.foreground=function(a,d,e,b,c){d=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupGanttChart.prototype.cst.SHAPES_COLORS,"#888888,#bbbbbb").toString()).split(",");mxUtils.getValue(this.style,mxShapeMockupGanttChart.prototype.cst.TEXT_COLOR,"#666666");mxUtils.getValue(this.style,mxShapeMockupGanttChart.prototype.cst.TEXT_SIZE,"#12");a.begin();a.moveTo(0,.13*c);a.lineTo(b,.13*c);a.moveTo(.4*b,0);a.lineTo(.4*b,c);a.moveTo(.4*b,.065*c);a.lineTo(b,.065*c);a.moveTo(.03*
b,0);a.lineTo(.03*b,.13*c);a.moveTo(.1*b,0);a.lineTo(.1*b,.13*c);a.moveTo(.315*b,0);a.lineTo(.315*b,.13*c);a.moveTo(.45*b,.065*c);a.lineTo(.45*b,.13*c);a.moveTo(.5*b,.065*c);a.lineTo(.5*b,c);a.moveTo(.55*b,.065*c);a.lineTo(.55*b,.13*c);a.moveTo(.6*b,.065*c);a.lineTo(.6*b,c);a.moveTo(.65*b,.065*c);a.lineTo(.65*b,.13*c);a.moveTo(.7*b,.065*c);a.lineTo(.7*b,c);a.moveTo(.75*b,0);a.lineTo(.75*b,.13*c);a.moveTo(.8*b,.065*c);a.lineTo(.8*b,c);a.moveTo(.85*b,.065*c);a.lineTo(.85*b,.13*c);a.moveTo(.9*b,.065*
c);a.lineTo(.9*b,c);a.moveTo(.95*b,.065*c);a.lineTo(.95*b,.13*c);a.stroke();a.setFillColor(d[0]);a.begin();a.moveTo(.41*b,.15*c);a.lineTo(.64*b,.15*c);a.lineTo(.64*b,.18*c);a.lineTo(.625*b,.21*c);a.lineTo(.61*b,.18*c);a.lineTo(.44*b,.18*c);a.lineTo(.425*b,.21*c);a.lineTo(.41*b,.18*c);a.close();a.moveTo(.41*b,.24*c);a.lineTo(.49*b,.24*c);a.lineTo(.49*b,.275*c);a.lineTo(.41*b,.275*c);a.close();a.moveTo(.46*b,.31*c);a.lineTo(.64*b,.31*c);a.lineTo(.64*b,.345*c);a.lineTo(.46*b,.345*c);a.close();a.moveTo(.56*
b,.39*c);a.lineTo(.69*b,.39*c);a.lineTo(.69*b,.425*c);a.lineTo(.56*b,.425*c);a.close();a.fill();a.setFillColor(d[1]);a.begin();a.moveTo(.46*b,.32*c);a.lineTo(.58*b,.32*c);a.lineTo(.58*b,.335*c);a.lineTo(.46*b,.335*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupGanttChart.prototype.cst.SHAPE_GANTT_CHART,mxShapeMockupGanttChart);function mxShapeMockupSimpleIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupSimpleIcon,mxShape);mxShapeMockupSimpleIcon.prototype.cst={SIMPLE_ICON:"mxgraph.mockup.graphics.simpleIcon"};mxShapeMockupSimpleIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(0,0);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(b,0);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupSimpleIcon.prototype.cst.SIMPLE_ICON,mxShapeMockupSimpleIcon);
function mxShapeMockupGraphicsAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeMockupGraphicsAnchor,mxShape);mxShapeMockupGraphicsAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.graphics.anchor"};mxShapeMockupGraphicsAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupGraphicsAnchor.prototype.cst.ANCHOR,mxShapeMockupGraphicsAnchor);
function mxShapeMockupGraphicsRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupGraphicsRRect,mxShape);mxShapeMockupGraphicsRRect.prototype.cst={RRECT:"mxgraph.mockup.graphics.rrect",R_SIZE:"rSize"};mxShapeMockupGraphicsRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeMockupGraphicsRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupGraphicsRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupGraphicsRRect.prototype.cst.RRECT,mxShapeMockupGraphicsRRect);function mxShapeMockupCurlyBrace(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupCurlyBrace,mxShape);
mxShapeMockupCurlyBrace.prototype.cst={SHAPE_CURLY_BRACE:"mxgraph.mockup.markup.curlyBrace"};mxShapeMockupCurlyBrace.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxShapeMockupCurlyBrace.prototype.background=function(a,d,e,b,c){d=.5*c;e=Math.min(.125*b,d);a.begin();a.moveTo(0,d+e);a.arcTo(e,e,0,0,1,e,d);a.lineTo(.5*b-e,d);a.arcTo(e,e,0,0,0,.5*b,d-e);a.arcTo(e,e,0,0,0,.5*b+e,d);a.lineTo(b-e,d);a.arcTo(e,e,0,0,1,b,d+e);a.stroke()};
mxCellRenderer.registerShape(mxShapeMockupCurlyBrace.prototype.cst.SHAPE_CURLY_BRACE,mxShapeMockupCurlyBrace);function mxShapeMockupLine(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupLine,mxShape);mxShapeMockupLine.prototype.cst={SHAPE_LINE:"mxgraph.mockup.markup.line"};mxShapeMockupLine.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke()};
mxCellRenderer.registerShape(mxShapeMockupLine.prototype.cst.SHAPE_LINE,mxShapeMockupLine);function mxShapeMockupScratchOut(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupScratchOut,mxShape);mxShapeMockupScratchOut.prototype.cst={SHAPE_SCRATCH_OUT:"mxgraph.mockup.markup.scratchOut"};
mxShapeMockupScratchOut.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.038*b,.095*c);a.curveTo(.038*b,.095*c,.289*b,-.045*c,.186*b,.05*c);a.curveTo(.084*b,.145*c,-.046*b,.251*c,.072*b,.208*c);a.curveTo(.191*b,.164*c,.522*b,-.09*c,.366*b,.062*c);a.curveTo(.21*b,.215*c,-.094*b,.38*c,.108*b,.304*c);a.curveTo(.309*b,.228*c,.73*b,-.126*c,.544*b,.096*c);a.curveTo(.358*b,.319*c,-.168*b,.592*c,.108*b,.476*c);a.curveTo(.382*b,.36*c,.972*b,-.138*c,.779*b,.114*c);a.curveTo(.585*
b,.365*c,-.12*b,.688*c,.071*b,.639*c);a.curveTo(.262*b,.59*c,1.174*b,.012*c,.936*b,.238*c);a.curveTo(.699*b,.462*c,-.216*b,.855*c,.085*b,.806*c);a.curveTo(.386*b,.758*c,1.185*b,.26*c,.935*b,.534*c);a.curveTo(.685*b,.808*c,-.186*b,.94*c,.236*b,.895*c);a.curveTo(.659*b,.85*c,1.095*b,.608*c,.905*b,.769*c);a.curveTo(.715*b,.93*c,.286*b,.962*c,.661*b,.931*c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupScratchOut.prototype.cst.SHAPE_SCRATCH_OUT,mxShapeMockupScratchOut);
function mxShapeMockupRedX(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRedX,mxShape);mxShapeMockupRedX.prototype.cst={SHAPE_RED_X:"mxgraph.mockup.markup.redX"};
mxShapeMockupRedX.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.1*b,0);a.lineTo(.5*b,.4*c);a.lineTo(.9*b,0);a.lineTo(b,.1*c);a.lineTo(.6*b,.5*c);a.lineTo(b,.9*c);a.lineTo(.9*b,c);a.lineTo(.5*b,.6*c);a.lineTo(.1*b,c);a.lineTo(0,.9*c);a.lineTo(.4*b,.5*c);a.lineTo(0,.1*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRedX.prototype.cst.SHAPE_RED_X,mxShapeMockupRedX);
function mxShapeMockupPlaybackControls(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPlaybackControls,mxShape);mxShapeMockupPlaybackControls.prototype.cst={SHAPE_PLAYBACK_CONTROLS:"mxgraph.mockup.misc.playbackControls",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR3:"fillColor3",STROKE_COLOR3:"strokeColor3"};
mxShapeMockupPlaybackControls.prototype.customProperties=[{name:"fillColor2",dispName:"Outline Color",type:"color"},{name:"fillColor3",dispName:"Symbol Color",type:"color"},{name:"strokeColor2",dispName:"Outline Stroke Color",type:"color"},{name:"strokeColor3",dispName:"Symbol Stroke Color",type:"color"}];
mxShapeMockupPlaybackControls.prototype.paintVertexShape=function(a,d,e,b,c){c=Math.max(c,30);b=Math.max(225,b);a.translate(d,e);this.background(a,b,c,30);a.setShadow(!1);this.foreground(a,b,c,30,22)};mxShapeMockupPlaybackControls.prototype.background=function(a,d,e,b){a.rect(0,.5*(e-b),d,b);a.fillAndStroke()};
mxShapeMockupPlaybackControls.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.FILL_COLOR2,"#99ddff");var f=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.STROKE_COLOR2,"none"),g=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.FILL_COLOR3,"#ffffff"),h=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.STROKE_COLOR3,"none");a.setStrokeColor(f);a.setFillColor(d);a.ellipse(10,
.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(40,.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(70,.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(100,.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(130,.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(160,.5*e-.5*c,c,c);a.fillAndStroke();a.ellipse(190,.5*e-.5*c,c,c);a.fillAndStroke();a.setStrokeColor(h);a.setFillColor(g);e=.5*e-.5*b;a.begin();a.moveTo(16,e+10);a.lineTo(16,e+20);a.lineTo(18,e+20);a.lineTo(18,e+10);a.close();a.moveTo(20,e+15);a.lineTo(25,e+20);a.lineTo(25,
e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(44,e+15);a.lineTo(49,e+20);a.lineTo(49,e+10);a.close();a.moveTo(51,e+15);a.lineTo(56,e+20);a.lineTo(56,e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(77,e+15);a.lineTo(82,e+20);a.lineTo(82,e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(108,e+10);a.lineTo(108,e+20);a.lineTo(110,e+20);a.lineTo(110,e+10);a.close();a.moveTo(117,e+15);a.lineTo(112,e+20);a.lineTo(112,e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(144,e+15);a.lineTo(139,
e+20);a.lineTo(139,e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(171,e+15);a.lineTo(166,e+20);a.lineTo(166,e+10);a.close();a.moveTo(178,e+15);a.lineTo(173,e+20);a.lineTo(173,e+10);a.close();a.fillAndStroke();a.begin();a.moveTo(203,e+10);a.lineTo(203,e+20);a.lineTo(205,e+20);a.lineTo(205,e+10);a.close();a.moveTo(201,e+15);a.lineTo(196,e+20);a.lineTo(196,e+10);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupPlaybackControls.prototype.cst.SHAPE_PLAYBACK_CONTROLS,mxShapeMockupPlaybackControls);
function mxShapeMockupProgressBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.barPos=20}mxUtils.extend(mxShapeMockupProgressBar,mxShape);mxShapeMockupProgressBar.prototype.cst={SHAPE_PROGRESS_BAR:"mxgraph.mockup.misc.progressBar",BAR_POS:"barPos",FILL_COLOR2:"fillColor2"};
mxShapeMockupProgressBar.prototype.customProperties=[{name:"fillColor2",dispName:"Outline Color",type:"color"},{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:80}];mxShapeMockupProgressBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupProgressBar.prototype.background=function(a,d,e){a.roundrect(0,.5*e-5,d,10,5,5);a.fillAndStroke()};
mxShapeMockupProgressBar.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupProgressBar.prototype.cst.FILL_COLOR2,"#ddeeff"),c=mxUtils.getValue(this.style,mxShapeMockupProgressBar.prototype.cst.BAR_POS,"80");c=Math.min(c,100);c=Math.max(c,0);d=(d-0)*c/100;a.setFillColor(b);a.roundrect(0,.5*e-5,d,10,5,5);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupProgressBar.prototype.cst.SHAPE_PROGRESS_BAR,mxShapeMockupProgressBar);
Graph.handleFactory[mxShapeMockupProgressBar.prototype.cst.SHAPE_PROGRESS_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(d.x+e*d.width/100,d.y+.5*d.height)},function(d,e){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeMockupShoppingCart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupShoppingCart,mxShape);mxShapeMockupShoppingCart.prototype.cst={SHAPE_SHOPPING_CART:"mxgraph.mockup.misc.shoppingCart"};
mxShapeMockupShoppingCart.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.translate(d,e);a.setStrokeWidth(3);a.begin();a.moveTo(.975*b,.025*c);a.lineTo(.82*b,.055*c);a.lineTo(.59*b,.66*c);a.lineTo(.7*b,.765*c);a.arcTo(.06*b,.06*c,0,0,1,.665*b,.86*c);a.lineTo(.05*b,.86*c);a.moveTo(.74*b,.26*c);a.lineTo(.03*b,.28*c);a.lineTo(.065*b,.61*c);a.lineTo(.59*b,.66*c);a.stroke();a.setStrokeWidth(1);a.begin();a.moveTo(.15*b,.28*c);a.lineTo(.15*
b,.62*c);a.moveTo(.265*b,.275*c);a.lineTo(.265*b,.63*c);a.moveTo(.38*b,.27*c);a.lineTo(.38*b,.64*c);a.moveTo(.495*b,.265*c);a.lineTo(.495*b,.65*c);a.moveTo(.61*b,.265*c);a.lineTo(.61*b,.61*c);a.stroke();a.begin();a.moveTo(.69*b,.405*c);a.lineTo(.045*b,.405*c);a.moveTo(.645*b,.52*c);a.lineTo(.055*b,.52*c);a.stroke();a.setFillColor(f);a.ellipse(.075*b,.89*c,.1*b,.1*c);a.fillAndStroke();a.ellipse(.62*b,.89*c,.1*b,.1*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeMockupShoppingCart.prototype.cst.SHAPE_SHOPPING_CART,mxShapeMockupShoppingCart);function mxShapeMockupRating(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRating,mxShape);mxShapeMockupRating.prototype.cst={SHAPE_RATING:"mxgraph.mockup.misc.rating",RATING_STYLE:"ratingStyle",RATING_SCALE:"ratingScale",RATING_HEART:"heart",RATING_STAR:"star",EMPTY_FILL_COLOR:"emptyFillColor",GRADE:"grade"};
mxShapeMockupRating.prototype.customProperties=[{name:"ratingStyle",dispName:"Style",type:"enum",enumList:[{val:"heart",dispName:"Heart"},{val:"star",dispName:"Star"}]},{name:"ratingScale",dispName:"Max. Rating",type:"int"},{name:"grade",dispName:"Current Rating",type:"int"},{name:"emptyFillColor",dispName:"Fill2 Color",type:"color"}];
mxShapeMockupRating.prototype.paintVertexShape=function(a,d,e,b,c){b=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.RATING_STYLE,mxShapeMockupRating.prototype.cst.RATING_STAR);var f=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.GRADE,"5"),g=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.RATING_SCALE,"10");a.translate(d,e);if(b===mxShapeMockupRating.prototype.cst.RATING_STAR)for(d=0;d<f;d++)a.begin(),a.moveTo(d*c*1.5,.33*c),a.lineTo(d*c*1.5+.364*c,.33*
c),a.lineTo(d*c*1.5+.475*c,0),a.lineTo(d*c*1.5+.586*c,.33*c),a.lineTo(d*c*1.5+.95*c,.33*c),a.lineTo(d*c*1.5+.66*c,.551*c),a.lineTo(d*c*1.5+.775*c,.9*c),a.lineTo(d*c*1.5+.475*c,.684*c),a.lineTo(d*c*1.5+.175*c,.9*c),a.lineTo(d*c*1.5+.29*c,.551*c),a.close(),a.fillAndStroke();else if(b===mxShapeMockupRating.prototype.cst.RATING_HEART)for(d=0;d<f;d++)a.begin(),a.moveTo(d*c*1.5+.519*c,.947*c),a.curveTo(d*c*1.5+.558*c,.908*c,d*c*1.5+.778*c,.682*c,d*c*1.5+.916*c,.54*c),a.curveTo(d*c*1.5+1.039*c,.414*c,d*
c*1.5+1.036*c,.229*c,d*c*1.5+.924*c,.115*c),a.curveTo(d*c*1.5+.812*c,0,d*c*1.5+.631*c,0,d*c*1.5+.519*c,.115*c),a.curveTo(d*c*1.5+.408*c,0,d*c*1.5+.227*c,0,d*c*1.5+.115*c,.115*c),a.curveTo(d*c*1.5+.03*c,.229*c,d*c*1.5,.414*c,d*c*1.5+.123*c,.54*c),a.close(),a.fillAndStroke();d=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.EMPTY_FILL_COLOR,"#ffffff");a.setFillColor(d);if(b===mxShapeMockupRating.prototype.cst.RATING_STAR)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.5,.33*c),a.lineTo(d*c*1.5+
.364*c,.33*c),a.lineTo(d*c*1.5+.475*c,0),a.lineTo(d*c*1.5+.586*c,.33*c),a.lineTo(d*c*1.5+.95*c,.33*c),a.lineTo(d*c*1.5+.66*c,.551*c),a.lineTo(d*c*1.5+.775*c,.9*c),a.lineTo(d*c*1.5+.475*c,.684*c),a.lineTo(d*c*1.5+.175*c,.9*c),a.lineTo(d*c*1.5+.29*c,.551*c),a.close(),a.fillAndStroke();else if(b===mxShapeMockupRating.prototype.cst.RATING_HEART)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.5+.519*c,.947*c),a.curveTo(d*c*1.5+.558*c,.908*c,d*c*1.5+.778*c,.682*c,d*c*1.5+.916*c,.54*c),a.curveTo(d*c*1.5+1.039*
c,.414*c,d*c*1.5+1.036*c,.229*c,d*c*1.5+.924*c,.115*c),a.curveTo(d*c*1.5+.812*c,0,d*c*1.5+.631*c,0,d*c*1.5+.519*c,.115*c),a.curveTo(d*c*1.5+.408*c,0,d*c*1.5+.227*c,0,d*c*1.5+.115*c,.115*c),a.curveTo(d*c*1.5+.03*c,.229*c,d*c*1.5,.414*c,d*c*1.5+.123*c,.54*c),a.close(),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRating.prototype.cst.SHAPE_RATING,mxShapeMockupRating);
function mxShapeMockupMail(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupMail,mxShape);mxShapeMockupMail.prototype.cst={SHAPE_MAIL:"mxgraph.mockup.misc.mail2"};mxShapeMockupMail.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,0);a.lineTo(.5*b,.5*c);a.lineTo(b,0);a.stroke()};
mxCellRenderer.registerShape(mxShapeMockupMail.prototype.cst.SHAPE_MAIL,mxShapeMockupMail);function mxShapeMockupVolumeSlider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.barPos=80}mxUtils.extend(mxShapeMockupVolumeSlider,mxShape);mxShapeMockupVolumeSlider.prototype.cst={SHAPE_VOLUME_SLIDER:"mxgraph.mockup.misc.volumeSlider",BAR_POS:"barPos",FILL_COLOR2:"fillColor2"};
mxShapeMockupVolumeSlider.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"barPos",dispName:"Handle Position",type:"float"}];
mxShapeMockupVolumeSlider.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);e=mxUtils.getValue(this.style,mxShapeMockupVolumeSlider.prototype.cst.BAR_POS,"80");d=mxUtils.getValue(this.style,mxShapeMockupVolumeSlider.prototype.cst.FILL_COLOR2,"#ddeeff");mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e=Math.min(e,100);e=Math.max(e,0);c=Math.max(c,25);b=Math.max(b,87.5);var f=b-25,g=.5*(c-25);a.begin();a.moveTo(f+1.25,g+8.75);a.lineTo(f+3.75,g+8.75);a.lineTo(f+7.5,
g+5);a.lineTo(f+7.5,g+20);a.lineTo(f+3.75,g+16.25);a.lineTo(f+1.25,g+16.25);a.close();a.fill();e=(b-32.5)*e/100;f=b-25;g=.5*(c-25);a.begin();a.moveTo(f+10,g+8.75);a.arcTo(5,7.5,0,0,1,f+10,g+16.25);a.moveTo(f+10.625,g+6.25);a.arcTo(5.625,8.75,0,0,1,f+10.625,g+18.75);a.moveTo(f+12.5,g+5);a.arcTo(6.25,10,0,0,1,f+12.5,g+20);a.fillAndStroke();c=.5*(c-25);a.roundrect(0,c+8.75,b-32.5,7.5,5,5);a.fill();a.setShadow(!1);a.setFillColor(d);a.roundrect(0,c+8.75,e,7.5,5,5);a.fill();a.ellipse(e-6.25,c+6.25,12.5,
12.5);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupVolumeSlider.prototype.cst.SHAPE_VOLUME_SLIDER,mxShapeMockupVolumeSlider);
Graph.handleFactory[mxShapeMockupVolumeSlider.prototype.cst.SHAPE_VOLUME_SLIDER]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(d.x+e*(d.width-32.5)/100,d.y+.5*d.height)},function(d,e){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/1E3})]};
function mxShapeMockupEdit(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupEdit,mxShape);mxShapeMockupEdit.prototype.cst={SHAPE_EDIT:"mxgraph.mockup.misc.editIcon"};
mxShapeMockupEdit.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.11*b,.8*c);a.lineTo(.2*b,.89*c);a.lineTo(.05*b,.95*c);a.close();a.moveTo(.74*b,.16*c);a.lineTo(.84*b,.26*c);a.lineTo(.22*b,.88*c);a.lineTo(.12*b,.78*c);a.close();a.moveTo(.755*b,.145*c);a.lineTo(.82*b,.08*c);a.lineTo(.92*b,.18*c);a.lineTo(.855*
b,.245*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupEdit.prototype.cst.SHAPE_EDIT,mxShapeMockupEdit);function mxShapeMockupPrint(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPrint,mxShape);mxShapeMockupPrint.prototype.cst={SHAPE_PRINT:"mxgraph.mockup.misc.printIcon"};
mxShapeMockupPrint.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.15*b,.58*c);a.arcTo(.03*b,.03*c,0,0,1,.18*b,.55*c);a.lineTo(.82*b,.55*c);a.arcTo(.03*b,.03*c,0,0,1,.85*b,.58*c);a.lineTo(.85*b,.82*c);a.arcTo(.03*b,.03*c,0,0,1,.82*b,.85*c);a.lineTo(.18*b,.85*c);a.arcTo(.03*b,.03*c,0,0,1,.15*b,.82*c);a.close();
a.moveTo(.7*b,.52*c);a.lineTo(.3*b,.52*c);a.lineTo(.3*b,.15*c);a.lineTo(.55*b,.15*c);a.lineTo(.55*b,.3*c);a.lineTo(.7*b,.3*c);a.close();a.moveTo(.57*b,.15*c);a.lineTo(.7*b,.28*c);a.lineTo(.57*b,.28*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupPrint.prototype.cst.SHAPE_PRINT,mxShapeMockupPrint);function mxShapeMockupShare(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupShare,mxShape);
mxShapeMockupShare.prototype.cst={SHAPE_SHARE:"mxgraph.mockup.misc.shareIcon"};
mxShapeMockupShare.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.15*b,.18*c);a.arcTo(.03*b,.03*c,0,0,1,.18*b,.15*c);a.lineTo(.82*b,.15*c);a.arcTo(.03*b,.03*c,0,0,1,.85*b,.18*c);a.lineTo(.85*b,.82*c);a.arcTo(.03*b,.03*c,0,0,1,.82*b,.85*c);a.lineTo(.18*b,.85*c);a.arcTo(.03*b,.03*c,0,0,1,.15*b,.82*c);a.close();
a.fill();d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.setFillColor(d);a.begin();a.moveTo(.563*b,.34*c);a.arcTo(.095*b,.095*c,0,1,1,.603*b,.42*c);a.lineTo(.44*b,.5*c);a.lineTo(.602*b,.582*c);a.arcTo(.095*b,.095*c,0,1,1,.563*b,.653*c);a.lineTo(.403*b,.575*c);a.arcTo(.095*b,.095*c,0,1,1,.4*b,.42*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupShare.prototype.cst.SHAPE_SHARE,mxShapeMockupShare);
function mxShapeMockupTrashcan(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupTrashcan,mxShape);mxShapeMockupTrashcan.prototype.cst={SHAPE_TRASHCAN:"mxgraph.mockup.misc.trashcanIcon"};
mxShapeMockupTrashcan.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.24*b,.24*c);a.arcTo(.04*b,.04*c,0,0,1,.24*b,.16*c);a.lineTo(.4*b,.16*c);a.lineTo(.4*b,.12*c);a.lineTo(.6*b,.12*c);a.lineTo(.6*b,.16*c);a.lineTo(.76*b,.16*c);a.arcTo(.04*b,.04*c,0,0,1,.76*b,.24*c);a.close();a.fill();a.roundrect(.26*b,.3*
c,.1*b,.6*c,.06*b,.06*c);a.fill();a.roundrect(.44*b,.3*c,.1*b,.6*c,.06*b,.06*c);a.fill();a.roundrect(.62*b,.3*c,.1*b,.6*c,.06*b,.06*c);a.fill()};mxCellRenderer.registerShape(mxShapeMockupTrashcan.prototype.cst.SHAPE_TRASHCAN,mxShapeMockupTrashcan);function mxShapeMockupCopyright(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupCopyright,mxShape);mxShapeMockupCopyright.prototype.cst={SHAPE_COPYRIGHT:"mxgraph.mockup.misc.copyrightIcon"};
mxShapeMockupCopyright.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.713*b,.288*c);a.arcTo(.3*b,.3*c,0,1,0,.713*b,.712*c);a.lineTo(.784*b,.783*c);a.arcTo(.4*b,.4*c,0,1,1,.784*b,.217*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupCopyright.prototype.cst.SHAPE_COPYRIGHT,mxShapeMockupCopyright);
function mxShapeMockupRegistered(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRegistered,mxShape);mxShapeMockupRegistered.prototype.cst={SHAPE_REGISTERED:"mxgraph.mockup.misc.registeredIcon"};
mxShapeMockupRegistered.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.29*b,.9*c);a.lineTo(.29*b,.09*c);a.lineTo(.5*b,.09*c);a.arcTo(.2195*b,.2195*c,0,0,1,.545*b,.525*c);a.lineTo(.738*b,.91*c);a.lineTo(.674*b,.91*c);a.lineTo(.4825*b,.53*c);a.lineTo(.35*b,.53*c);a.lineTo(.35*b,.9*c);a.close();a.moveTo(.35*b,.47*c);a.lineTo(.5*
b,.47*c);a.arcTo(.15*b,.15*c,0,0,0,.5*b,.15*c);a.lineTo(.35*b,.15*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupRegistered.prototype.cst.SHAPE_REGISTERED,mxShapeMockupRegistered);function mxShapeMockupVolume(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupVolume,mxShape);mxShapeMockupVolume.prototype.cst={SHAPE_VOLUME:"mxgraph.mockup.misc.volumeIcon"};
mxShapeMockupVolume.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");a.translate(d,e);a.roundrect(0,0,b,c,.05*b,.05*c);a.fillAndStroke();a.setShadow(!1);a.setFillColor(f);a.begin();a.moveTo(.1*b,.3*c);a.lineTo(.3*b,.3*c);a.lineTo(.5*b,.15*c);a.lineTo(.5*b,.85*c);a.lineTo(.3*b,.7*c);a.lineTo(.1*b,.7*c);a.close();a.fill();a.begin();a.moveTo(.6*b,.4*c);a.arcTo(.2*b,.2*c,0,0,1,.6*b,.6*c);a.moveTo(.7*b,.3*c);a.arcTo(.3*b,.3*c,0,0,
1,.7*b,.7*c);a.moveTo(.8*b,.2*c);a.arcTo(.4*b,.4*c,0,0,1,.8*b,.8*c);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupVolume.prototype.cst.SHAPE_VOLUME,mxShapeMockupVolume);function mxShapeMockupRuler(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRuler,mxShape);mxShapeMockupRuler.prototype.cst={SHAPE_RULER:"mxgraph.mockup.misc.ruler",ORIENTATION:"rulerOrient",UNIT_SIZE:"unitSize",FACE_UP:"up",FACE_DOWN:"down"};
mxShapeMockupRuler.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupRuler.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupRuler.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupRuler.prototype.cst.ORIENTATION,mxShapeMockupRuler.prototype.cst.FACE_DOWN),c=mxUtils.getValue(this.style,mxShapeMockupRuler.prototype.cst.UNIT_SIZE,"10"),f=c=Math.max(c,1),g=1;if(b===mxShapeMockupRuler.prototype.cst.FACE_DOWN){for(a.begin();f<d;)b=g%10,0===b?a.moveTo(f,.5*e):5===b?a.moveTo(f,.7*e):a.moveTo(f,.8*e),a.lineTo(f,e),f+=c,g+=1;a.stroke()}else if(b===mxShapeMockupRuler.prototype.cst.FACE_UP){for(a.begin();f<
d;)b=g%10,0===b?a.moveTo(f,.5*e):5===b?a.moveTo(f,.3*e):a.moveTo(f,.2*e),a.lineTo(f,0),f+=c,g+=1;a.stroke()}};mxCellRenderer.registerShape(mxShapeMockupRuler.prototype.cst.SHAPE_RULER,mxShapeMockupRuler);function mxShapeMockupRuler2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRuler2,mxShape);
mxShapeMockupRuler2.prototype.cst={SHAPE_RULER:"mxgraph.mockup.misc.ruler2",ORIENTATION:"rulerOrient",UNIT_SIZE:"dx",FACE_UP:"up",FACE_DOWN:"down"};mxShapeMockupRuler2.prototype.customProperties=[{name:"rulerOrient",dispName:"Orientation",defVal:"up",type:"enum",enumList:[{val:"up",dispName:"Up"},{val:"down",dispName:"Down"}]},{name:"dx",dispName:"Unit Size",type:"float",min:0,defVal:100}];
mxShapeMockupRuler2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupRuler2.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupRuler2.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupRuler2.prototype.cst.ORIENTATION,mxShapeMockupRuler2.prototype.cst.FACE_DOWN);e=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000");d=mxUtils.getValue(this.style,"dx","100");this.state.style.spacingLeft=Math.round(1E3*Math.max(0,Math.min(b,d)))/1E3-4;d=Math.max(d/10,1);a.setFontColor(e);e=d;var g=1;if(f===mxShapeMockupRuler2.prototype.cst.FACE_DOWN){for(a.begin();e<b;)f=g%10,
0===f?(a.moveTo(e,c-10),a.lineTo(e,c),f=this.state.view.graph.getLabel(this.state.cell),isNaN(f)||(a.stroke(),f=g*Math.round(100*f)/1E3,10!=g&&0!=f&&a.text(e,.5*(c-10),0,0,f.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),a.begin())):(5===f?a.moveTo(e,c-6):a.moveTo(e,c-4),a.lineTo(e,c)),e+=d,g+=1;a.stroke()}else if(f===mxShapeMockupRuler2.prototype.cst.FACE_UP){for(a.begin();e<b;)f=g%10,0===f?(a.moveTo(e,10),a.lineTo(e,0),f=this.state.view.graph.getLabel(this.state.cell),
isNaN(f)||(a.stroke(),f=g*Math.round(100*f)/1E3,10!=g&&0!=f&&a.text(e,.5*(c+10),0,0,f.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),a.begin())):(5===f?a.moveTo(e,6):a.moveTo(e,4),a.lineTo(e,0)),e+=d,g+=1;a.stroke()}};mxCellRenderer.registerShape(mxShapeMockupRuler2.prototype.cst.SHAPE_RULER,mxShapeMockupRuler2);
Graph.handleFactory[mxShapeMockupRuler2.prototype.cst.SHAPE_RULER]=function(a){return[Graph.createHandle(a,"dx spacingLeft align varticalAlign spacingBottom spacingTop spacingRight spacing".split(" "),function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+d.height-10)},function(d,e){this.state.style.dx=Math.round(1E3*Math.max(0,Math.min(d.width,e.x-d.x)))/1E3;this.state.style.spacingLeft=Math.round(1E3*Math.max(0,Math.min(d.width,
e.x-d.x)))/1E3-4;this.state.style.align="left";this.state.style.verticalAlign="middle";"down"==mxUtils.getValue(this.state.style,"rulerOrient","1")?(this.state.style.spacingBottom=10,this.state.style.spacingTop=0):(this.state.style.spacingBottom=0,this.state.style.spacingTop=10);this.state.style.spacingRight=0;this.state.style.spacing=0})]};function mxShapeMockupRevisionTable(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupRevisionTable,mxShape);mxShapeMockupRevisionTable.prototype.cst={SHAPE_REVISION_TABLE:"mxgraph.mockup.misc.revisionTable",MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize"};mxShapeMockupRevisionTable.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupRevisionTable.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupRevisionTable.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.MAIN_TEXT,"").toString().split(","),c=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.TEXT_COLOR,"#999999"),f=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.TEXT_SIZE,"17");a.begin();a.moveTo(0,.33*e);a.lineTo(d,.33*e);a.moveTo(0,.67*e);a.lineTo(d,.67*e);a.moveTo(.125*d,.33*e);a.lineTo(.125*d,e);a.moveTo(.5*d,.33*e);a.lineTo(.5*
d,e);a.stroke();a.setFontSize(f);a.setFontColor(c);a.text(.5*d,.165*e,0,0,b[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.0625*d,.5*e,0,0,b[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.3125*d,.5*e,0,0,b[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.75*d,.5*e,0,0,b[3],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.0625*d,.835*e,0,0,b[4],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.text(.3125*d,.835*e,0,0,b[5],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.75*d,.835*e,0,0,b[6],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupRevisionTable.prototype.cst.SHAPE_REVISION_TABLE,mxShapeMockupRevisionTable);function mxShapeMockupStatusBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupStatusBar,mxShape);
mxShapeMockupStatusBar.prototype.cst={SHAPE_STATUS_BAR:"mxgraph.mockup.misc.statusBar",MAIN_TEXT:"mainText",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize"};mxShapeMockupStatusBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,105);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupStatusBar.prototype.background=function(a,d,e){a.rect(0,.5*e-15,d,30);a.fillAndStroke()};
mxShapeMockupStatusBar.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.FILL_COLOR2,"#ddeeff"),c=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.STROKE_COLOR2,"#008cff"),f=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.MAIN_TEXT,"").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.TEXT_COLOR,"#999999"),h=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.TEXT_SIZE,
"17");a.setFillColor(b);a.roundrect(5,.5*e-10,.46*(d-75),20,5,5);a.fill();a.roundrect(10+.46*(d-75),.5*e-10,.23*(d-75),20,5,5);a.fill();a.roundrect(15+.69*(d-75),.5*e-10,.276*(d-75),20,5,5);a.fill();a.setFontSize(h);a.setFontColor(g);a.text(10,.5*e,0,0,f[0],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(10+.575*(d-75),.5*e,0,0,f[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(15+.828*(d-75),.5*e,0,0,f[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.setStrokeColor(c);a.ellipse(d-25,.5*e-10,20,20);a.stroke();a.begin();a.moveTo(d-55,.5*e+10);a.lineTo(d-35,.5*e+10);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupStatusBar.prototype.cst.SHAPE_STATUS_BAR,mxShapeMockupStatusBar);function mxShapeMockupPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPin,mxShape);
mxShapeMockupPin.prototype.cst={SHAPE_PIN:"mxgraph.mockup.misc.pin",FILL_COLOR2:"fillColor2",FILL_COLOR3:"fillColor3"};mxShapeMockupPin.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"fillColor3",dispName:"Fill3 Color",type:"color"}];
mxShapeMockupPin.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupPin.prototype.cst.FILL_COLOR2,"#000000"),g=mxUtils.getValue(this.style,mxShapeMockupPin.prototype.cst.FILL_COLOR3,"#000000"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setShadow(!1);a.translate(d,e);a.setStrokeWidth(3);a.setStrokeColor("#666666");a.begin();a.moveTo(.5*b,.4*c);a.lineTo(.5*b,c);a.stroke();a.setStrokeWidth(2);a.setStrokeColor(h);a.setGradient(f,
g,0,0,b,.4*c,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.9);a.ellipse(0,0,b,.4*c);a.fillAndStroke();a.setFillColor("#ffffff");a.setAlpha(.5);a.ellipse(.2*b,.08*c,.3*b,.12*c);a.fill()};mxCellRenderer.registerShape(mxShapeMockupPin.prototype.cst.SHAPE_PIN,mxShapeMockupPin);function mxShapeMockupMiscRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupMiscRRect,mxShape);
mxShapeMockupMiscRRect.prototype.cst={RRECT:"mxgraph.mockup.misc.rrect",R_SIZE:"rSize"};mxShapeMockupMiscRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];mxShapeMockupMiscRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupMiscRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupMiscRRect.prototype.cst.RRECT,mxShapeMockupMiscRRect);
function mxShapeMockupMiscAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeMockupMiscAnchor,mxShape);mxShapeMockupMiscAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.misc.anchor"};mxShapeMockupMiscAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupMiscAnchor.prototype.cst.ANCHOR,mxShapeMockupMiscAnchor);
function mxShapeMockupBreadcrumb(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupBreadcrumb,mxShape);mxShapeMockupBreadcrumb.prototype.cst={SHAPE_BREADCRUMB:"mxgraph.mockup.navigation.breadcrumb",MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2"};
mxShapeMockupBreadcrumb.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupBreadcrumb.prototype.cst.MAIN_TEXT,"Layer 1, Layer 2, Layer 3").toString()).split(","),g=mxUtils.getValue(this.style,mxShapeMockupBreadcrumb.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupBreadcrumb.prototype.cst.TEXT_COLOR2,"#008cff"),k=mxUtils.getValue(this.style,mxShapeMockupBreadcrumb.prototype.cst.TEXT_SIZE,"17").toString(),
l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#c4c4c4"),m=f.length,n=Array(m),p=0,q=0;q<m;q++)n[q]=mxUtils.getSizeForString(f[q],k,mxConstants.DEFAULT_FONTFAMILY).width,p+=n[q];c=Math.max(c,1.5*k,20);p=20*m+p;b=Math.max(b,p);a.translate(d,e);a.setShadow(!1);this.separators(a,b,c,m,n,10,p,l);for(q=d=0;q<m;q++)q+1===m?a.setFontColor(h):a.setFontColor(g),d+=10,this.buttonText(a,d,c,f[q],n[q],k,p,b),d=d+n[q]+10};
mxShapeMockupBreadcrumb.prototype.separators=function(a,d,e,b,c,f,g,h){a.setStrokeColor(h);e*=.5;a.begin();for(h=1;h<b;h++){for(var k=0,l=0;l<h;l++)k+=c[l]+2*f;k=k*d/g;a.moveTo(k-2.5,e-5);a.lineTo(k+2.5,e);a.lineTo(k-2.5,e+5)}a.stroke()};mxShapeMockupBreadcrumb.prototype.buttonText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeMockupBreadcrumb.prototype.cst.SHAPE_BREADCRUMB,mxShapeMockupBreadcrumb);function mxShapeMockupStepBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupStepBar,mxShape);mxShapeMockupStepBar.prototype.cst={SHAPE_STEP_BAR:"mxgraph.mockup.navigation.stepBar",SELECTED:"+",MAIN_TEXT:"mainText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2"};
mxShapeMockupStepBar.prototype.customProperties=[{name:"mainText",dispName:"Text",type:"string"},{name:"textSize",dispName:"Text Size",type:"float"},{name:"textColor",dispName:"Text Color",type:"color"},{name:"textColor2",dispName:"Text2 Color",type:"color"}];
mxShapeMockupStepBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupStepBar.prototype.cst.MAIN_TEXT,"Step 1, Step 2, Step 3").toString()).split(","),g=mxUtils.getValue(this.style,mxShapeMockupStepBar.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupStepBar.prototype.cst.TEXT_COLOR2,"#008cff"),k=mxUtils.getValue(this.style,mxShapeMockupStepBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,"#c4c4c4"),m=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#666666"),n=f.length,p=Array(n),q=0,t=-1,u=0;u<n;u++){var v=f[u];v.charAt(0)===mxShapeMockupStepBar.prototype.cst.SELECTED&&(v=f[u].substring(1),t=u);p[u]=mxUtils.getSizeForString(v,k,mxConstants.DEFAULT_FONTFAMILY).width;q+=p[u]}c=Math.max(c,1.5*k,20);q=20*n+q;b=Math.max(b,q);a.translate(d,e);this.stepLineBg(a,b,c,n,p,10,q,l,k,b);a.setShadow(!1);this.stepLineFg(a,b,c,n,p,10,q,l,m,h,k,b,t);for(u=d=
0;u<n;u++)u>=t?a.setFontColor(h):a.setFontColor(g),d+=10,this.buttonText(a,d,c,f[u],p[u],k,q,b),d=d+p[u]+10};mxShapeMockupStepBar.prototype.stepLineBg=function(a,d,e,b,c,f,g,h,k,l){a.setStrokeColor(h);a.setFillColor(h);e=2*k;for(l=k=h=0;l<b;l++){for(var m=0,n=0;n<l;n++)m+=c[n]+2*f;m+=.5*c[l]+f;m=m*d/g;0===l?h=m:l+1===b&&(k=m);a.begin();a.ellipse(m-10,e-10,20,20);a.fillAndStroke()}a.begin();a.rect(h,e-2,k-h,4);a.fillAndStroke()};
mxShapeMockupStepBar.prototype.stepLineFg=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.setStrokeColor(k);e=2*m;m=b=0;n=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");for(var q=0;q<=p;q++){for(var t=0,u=0;u<q;u++)t+=c[u]+2*f;t+=.5*c[q]+f;t=t*d/g;0===q?b=t:q===p&&(m=t)}a.setFillColor(k);a.begin();a.rect(b,e-1.125,m-b,2.25);a.fill();a.setFillColor(h);for(q=0;q<=p;q++){for(u=t=0;u<q;u++)t+=c[u]+2*f;t+=.5*c[q]+f;t=t*d/g;q<p?(a.setStrokeWidth(n),a.begin(),a.ellipse(t-7.5,e-7.5,15,15),a.fillAndStroke(),
a.setStrokeWidth(.5*n),a.begin(),a.ellipse(t-4.5,e-4.5,9,9)):(a.setStrokeWidth(n),a.setFillColor(h),a.setStrokeColor(h),a.begin(),a.ellipse(t-10,e-10,20,20),a.fillAndStroke(),a.setStrokeWidth(n),a.setFillColor("#ffffff"),a.setStrokeColor("#ffffff"),a.begin(),a.ellipse(t-7.5,e-7.5,15,15),a.fillAndStroke(),a.setFillColor(l),a.setStrokeColor(l),a.setStrokeWidth(.5*n),a.begin(),a.ellipse(t-5.25,e-5.25,10.5,10.5));a.fillAndStroke()}};
mxShapeMockupStepBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxShapeMockupStepBar.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*f,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupStepBar.prototype.cst.SHAPE_STEP_BAR,mxShapeMockupStepBar);function mxShapeMockupCoverFlow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupCoverFlow,mxShape);mxShapeMockupCoverFlow.prototype.cst={SHAPE_COVER_FLOW:"mxgraph.mockup.navigation.coverFlow"};
mxShapeMockupCoverFlow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.0924*b,.07*c);a.lineTo(.005*b,.01*c);a.lineTo(.005*b,.99*c);a.lineTo(.0924*b,.93*c);a.moveTo(.1774*b,.09*c);a.lineTo(.0924*b,.01*c);a.lineTo(.0924*b,.99*c);a.lineTo(.1774*b,.91*c);a.moveTo(.3373*b,.22*c);a.lineTo(.1774*b,.01*c);a.lineTo(.1774*b,.99*c);a.lineTo(.3373*b,.78*c);a.moveTo(.912*b,.07*c);a.lineTo(.998*b,.01*c);a.lineTo(.998*b,.99*c);a.lineTo(.912*b,.93*c);a.moveTo(.8271*b,.09*c);a.lineTo(.912*
b,.01*c);a.lineTo(.912*b,.99*c);a.lineTo(.8271*b,.91*c);a.moveTo(.6672*b,.22*c);a.lineTo(.8271*b,.01*c);a.lineTo(.8271*b,.99*c);a.lineTo(.6672*b,.78*c);a.moveTo(.3373*b,.005*c);a.lineTo(.3373*b,.995*c);a.lineTo(.6672*b,.995*c);a.lineTo(.6672*b,.005*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupCoverFlow.prototype.cst.SHAPE_COVER_FLOW,mxShapeMockupCoverFlow);
function mxShapeMockupScrollBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupScrollBar,mxShape);mxShapeMockupScrollBar.prototype.cst={SHAPE_SCROLL_BAR:"mxgraph.mockup.navigation.scrollBar",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",BAR_POS:"barPos"};
mxShapeMockupScrollBar.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float"},{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"}];mxShapeMockupScrollBar.prototype.paintVertexShape=function(a,d,e,b,c){c=20;b=Math.max(b,40);a.translate(d,e);this.background(a,b,c,20);a.setShadow(!1);this.foreground(a,b,c,20);this.barPos=20};
mxShapeMockupScrollBar.prototype.background=function(a,d,e,b){a.rect(0,0,d,e);a.fillAndStroke();a.begin();a.moveTo(b,0);a.lineTo(b,e);a.moveTo(d-b,0);a.lineTo(d-b,e);a.stroke()};
mxShapeMockupScrollBar.prototype.foreground=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxShapeMockupScrollBar.prototype.cst.BAR_POS,"20"),f=mxUtils.getValue(this.style,mxShapeMockupScrollBar.prototype.cst.FILL_COLOR2,"#99ddff"),g=mxUtils.getValue(this.style,mxShapeMockupScrollBar.prototype.cst.STROKE_COLOR2,"none");c=Math.max(0,c);c=Math.min(100,c);a.setStrokeColor(g);a.setFillColor(f);a.begin();a.moveTo(.2*b,.5*e);a.lineTo(.8*b,.2*e);a.lineTo(.8*b,.8*e);a.close();a.moveTo(d-.2*b,.5*e);a.lineTo(d-
.8*b,.2*e);a.lineTo(d-.8*b,.8*e);a.close();a.fillAndStroke();f=d-b;d=Math.min(60,f-b);a.roundrect(b+(f-d/2-(b+d/2))*c/100,.15*e,d,.7*e,5,5);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupScrollBar.prototype.cst.SHAPE_SCROLL_BAR,mxShapeMockupScrollBar);
Graph.handleFactory[mxShapeMockupScrollBar.prototype.cst.SHAPE_SCROLL_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(d.x+(d.width-100)*e/d.width/100*d.width+50,d.y+10)},function(d,e){this.state.style.barPos=Math.round(1E3*Math.max(0,Math.min(100,100*(e.x-d.x-50)/(d.width-100))))/1E3})]};
function mxShapeMockupPagination(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupPagination,mxShape);mxShapeMockupPagination.prototype.cst={MAIN_TEXT:"linkText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SHAPE_PAGINATION:"mxgraph.mockup.navigation.pagination"};
mxShapeMockupPagination.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxShapeMockupPagination.prototype.cst.MAIN_TEXT,"0-9 A B C D E F G H I J K L M N O P Q R S T U V X Y Z")),g=mxUtils.getValue(this.style,mxShapeMockupPagination.prototype.cst.TEXT_SIZE,"17"),h=mxUtils.getValue(this.style,mxShapeMockupPagination.prototype.cst.TEXT_COLOR,"#0000ff");a.translate(d,e);d=mxUtils.getSizeForString(f,g,mxConstants.DEFAULT_FONTFAMILY).width;a.setStrokeColor(h);
a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.begin();a.moveTo(.5*b-.5*d,.5*(c+parseInt(g,10)));a.lineTo(.5*b+.5*d,.5*(c+parseInt(g,10)));a.stroke()};mxCellRenderer.registerShape(mxShapeMockupPagination.prototype.cst.SHAPE_PAGINATION,mxShapeMockupPagination);function mxShapeMockupPageControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupPageControl,mxShape);mxShapeMockupPageControl.prototype.cst={SHAPE_PAGE_CONTROL:"mxgraph.mockup.navigation.pageControl"};
mxShapeMockupPageControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");var f=Math.min(.5*c,.05*b);a.setFillColor(e);a.ellipse(0,.5*c-f,2*f,2*f);a.fill();a.setFillColor(d);a.ellipse(.35*b-f,.5*c-f,2*f,2*f);a.fill();a.ellipse(.65*b-f,.5*c-f,2*f,2*f);a.fill();a.ellipse(b-2*f,.5*c-f,2*f,2*f);a.fill()};
mxCellRenderer.registerShape(mxShapeMockupPageControl.prototype.cst.SHAPE_PAGE_CONTROL,mxShapeMockupPageControl);function mxShapeMockupMapNavigator(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupMapNavigator,mxShape);mxShapeMockupMapNavigator.prototype.cst={SHAPE_MAP_NAVIGATOR:"mxgraph.mockup.navigation.mapNavigator",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",STROKE_COLOR3:"strokeColor3"};
mxShapeMockupMapNavigator.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"},{name:"strokeColor3",dispName:"Stroke3 Color",type:"color"}];mxShapeMockupMapNavigator.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupMapNavigator.prototype.background=function(a,d,e){a.ellipse(0,0,d,.6*e);a.fillAndStroke();a.begin();a.moveTo(.35*d,.584*e);a.lineTo(.35*d,.95*e);a.arcTo(.083*d,.05*e,0,0,0,.43*d,e);a.lineTo(.56*d,e);a.arcTo(.083*d,.05*e,0,0,0,.65*d,.95*e);a.lineTo(.65*d,.584*e);a.fillAndStroke()};
mxShapeMockupMapNavigator.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupMapNavigator.prototype.cst.FILL_COLOR2,"#99ddff"),c=mxUtils.getValue(this.style,mxShapeMockupMapNavigator.prototype.cst.STROKE_COLOR2,"none"),f=mxUtils.getValue(this.style,mxShapeMockupMapNavigator.prototype.cst.STROKE_COLOR3,"#ffffff");a.setFillColor(b);a.setStrokeColor(c);a.ellipse(.4*d,.65*e,.2*d,.12*e);a.fillAndStroke();a.ellipse(.4*d,.85*e,.2*d,.12*e);a.fillAndStroke();a.begin();a.moveTo(.1806*
d,.34*e);a.lineTo(.1357*d,.366*e);a.lineTo(.0228*d,.3*e);a.lineTo(.1357*d,.234*e);a.lineTo(.1806*d,.26*e);a.lineTo(.1142*d,.3*e);a.close();a.fillAndStroke();a.begin();a.moveTo(.433*d,.108*e);a.lineTo(.3881*d,.08*e);a.lineTo(.4994*d,.012*e);a.lineTo(.6123*d,.08*e);a.lineTo(.5658*d,.108*e);a.lineTo(.4994*d,.068*e);a.close();a.fillAndStroke();a.begin();a.moveTo(.8198*d,.262*e);a.lineTo(.868*d,.233*e);a.lineTo(.9776*d,.3*e);a.lineTo(.868*d,.367*e);a.lineTo(.8198*d,.341*e);a.lineTo(.8863*d,.3*e);a.close();
a.fillAndStroke();a.begin();a.moveTo(.5641*d,.493*e);a.lineTo(.6123*d,.522*e);a.lineTo(.4994*d,.588*e);a.lineTo(.3881*d,.521*e);a.lineTo(.4363*d,.493*e);a.lineTo(.4994*d,.533*e);a.close();a.fillAndStroke();a.begin();a.moveTo(.3333*d,.32*e);a.lineTo(.3333*d,.28*e);a.lineTo(.4163*d,.3*e);a.close();a.moveTo(.4662*d,.2*e);a.lineTo(.5326*d,.2*e);a.lineTo(.4994*d,.25*e);a.close();a.moveTo(.6654*d,.28*e);a.lineTo(.6654*d,.32*e);a.lineTo(.5824*d,.3*e);a.close();a.moveTo(.5326*d,.4*e);a.lineTo(.4662*d,.4*
e);a.lineTo(.4994*d,.35*e);a.close();a.fillAndStroke();a.setStrokeWidth(2);a.setStrokeColor(f);a.begin();a.moveTo(.5*d,.67*e);a.lineTo(.5*d,.75*e);a.moveTo(.43*d,.71*e);a.lineTo(.57*d,.71*e);a.moveTo(.43*d,.91*e);a.lineTo(.57*d,.91*e);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupMapNavigator.prototype.cst.SHAPE_MAP_NAVIGATOR,mxShapeMockupMapNavigator);function mxShapeMockupNavigationAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeMockupNavigationAnchor,mxShape);
mxShapeMockupNavigationAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.navigation.anchor"};mxShapeMockupNavigationAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeMockupNavigationAnchor.prototype.cst.ANCHOR,mxShapeMockupNavigationAnchor);function mxShapeMockupLink(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupLink,mxShape);
mxShapeMockupLink.prototype.cst={LINK_TEXT:"linkText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SHAPE_LINK:"mxgraph.mockup.text.link"};
mxShapeMockupLink.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupLink.prototype.cst.LINK_TEXT,"Link"),g=mxUtils.getValue(this.style,mxShapeMockupLink.prototype.cst.TEXT_SIZE,"17"),h=mxUtils.getValue(this.style,mxShapeMockupLink.prototype.cst.TEXT_COLOR,"#0000ff");a.translate(d,e);d=mxUtils.getSizeForString(f,g,mxConstants.DEFAULT_FONTFAMILY).width;a.setStrokeColor(h);a.setFontSize(g);a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.begin();a.moveTo(.5*b-.5*d,.5*(c+parseInt(g,10)));a.lineTo(.5*b+.5*d,.5*(c+parseInt(g,10)));a.stroke()};mxCellRenderer.registerShape(mxShapeMockupLink.prototype.cst.SHAPE_LINK,mxShapeMockupLink);function mxShapeMockupLinkBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupLinkBar,mxShape);
mxShapeMockupLinkBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_LINK_BAR:"mxgraph.mockup.text.linkBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"};
mxShapeMockupLinkBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.MAIN_TEXT,"+Button 1, Button 2, Button 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.TEXT_COLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,
mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.STROKE_COLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxShapeMockupLinkBar.prototype.cst.FILL_COLOR2,"#008cff"),q=f.length,t=Array(q),u=0,v=-1,r=0;r<q;r++){var w=f[r];w.charAt(0)===mxShapeMockupLinkBar.prototype.cst.SELECTED&&(w=f[r].substring(1),v=r);w=mxUtils.getSizeForString(w,k,mxConstants.DEFAULT_FONTFAMILY).width;t[r]=
0===w?42:w;u+=t[r]}c=Math.max(c,1.5*k,20);u=10*q+u;b=Math.max(b,u);a.translate(d,e);this.background(a,b,c,10,q,t,5,u,l,m,n,p,v);a.setShadow(!1);for(r=d=0;r<q;r++)r===v?(a.setFontColor(h),a.setStrokeColor(h)):(a.setFontColor(g),a.setStrokeColor(g)),d+=5,this.buttonText(a,d,c,f[r],t[r],k,u,b),d=d+t[r]+5};
mxShapeMockupLinkBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.begin();a.setStrokeColor(k);a.setFillColor(m);a.rect(0,0,d,e);a.fillAndStroke();a.setStrokeColor(l);a.begin();for(b=1;b<c;b++)if(b!==p&&b!==p+1){for(var q=l=0;q<b;q++)l+=f[q]+2*g;l=l*d/h;a.moveTo(l,0);a.lineTo(l,e)}a.stroke();l=0;a.setFillColor(n);for(b=0;b<p;b++)l+=f[b]+2*g;l=l*d/h;f=(f[p]+2*g)*d/h;f+=l;0===p?(a.rect(0,0,f,e),a.fill()):p===c-1?(a.rect(l,0,f-l,e),a.fill()):-1!==p&&(a.rect(l,0,f-l,e),a.fill());a.setStrokeColor(k);
a.setFillColor(m);a.rect(0,0,d,e);a.stroke()};mxShapeMockupLinkBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxShapeMockupLinkBar.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);var k=.5*mxUtils.getSizeForString(b,f,mxConstants.DEFAULT_FONTFAMILY).width;null!==b&&""!==b&&(a.begin(),a.moveTo((d+.5*c)*h/g-k,.5*e+.5*f),a.lineTo((d+.5*c)*h/g+k,.5*e+.5*f),a.stroke())};
mxCellRenderer.registerShape(mxShapeMockupLinkBar.prototype.cst.SHAPE_LINK_BAR,mxShapeMockupLinkBar);function mxShapeMockupCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupCallout,mxShape);
mxShapeMockupCallout.prototype.cst={CALLOUT_TEXT:"linkText",CALLOUT_DIR:"callDir",CALLOUT_STYLE:"callStyle",STYLE_LINE:"line",STYLE_RECT:"rect",STYLE_ROUNDRECT:"roundRect",DIR_NW:"NW",DIR_NE:"NE",DIR_SE:"SE",DIR_SW:"SW",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SHAPE_CALLOUT:"mxgraph.mockup.text.callout"};
mxShapeMockupCallout.prototype.customProperties=[{name:"callDir",dispName:"Direction",type:"enum",enumList:[{val:"NW",dispName:"North-West"},{val:"NE",dispName:"North-East"},{val:"SE",dispName:"South-East"},{val:"SW",dispName:"South-West"}]},{name:"callStyle",dispName:"Style",type:"enum",enumList:[{val:"line",dispName:"Line"},{val:"rect",dispName:"Rectangle"}]}];
mxShapeMockupCallout.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupCallout.prototype.cst.CALLOUT_TEXT,"Callout"),g=mxUtils.getValue(this.style,mxShapeMockupCallout.prototype.cst.TEXT_SIZE,"17"),h=mxUtils.getValue(this.style,mxShapeMockupCallout.prototype.cst.TEXT_COLOR,"#666666"),k=mxUtils.getValue(this.style,mxShapeMockupCallout.prototype.cst.CALLOUT_STYLE,mxShapeMockupCallout.prototype.cst.STYLE_LINE),l=mxUtils.getValue(this.style,mxShapeMockupCallout.prototype.cst.CALLOUT_DIR,
mxShapeMockupCallout.prototype.cst.DIR_NW),m=mxUtils.getSizeForString(f,g,mxConstants.DEFAULT_FONTFAMILY).width;m*=1.2;0==m&&(m=70);a.translate(d,e);a.setFontSize(g);a.setFontColor(h);d=1.5*g;l===mxShapeMockupCallout.prototype.cst.DIR_NW?(k===mxShapeMockupCallout.prototype.cst.STYLE_LINE?(a.begin(),a.moveTo(0,d),a.lineTo(m,d),a.lineTo(b,c),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_RECT?(a.rect(0,0,m,d),a.fillAndStroke(),a.begin(),a.moveTo(.5*m,d),a.lineTo(b,c),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_ROUNDRECT&&
(a.roundrect(0,0,m,d,.25*d,.25*d),a.fillAndStroke(),a.begin(),a.moveTo(.5*m,d),a.lineTo(b,c),a.stroke()),a.text(.5*m,.5*d,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):l===mxShapeMockupCallout.prototype.cst.DIR_NE?(k===mxShapeMockupCallout.prototype.cst.STYLE_LINE?(a.begin(),a.moveTo(b,d),a.lineTo(b-m,d),a.lineTo(0,c),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_RECT?(a.rect(b-m,0,m,d),a.fillAndStroke(),a.begin(),a.moveTo(b-.5*m,d),a.lineTo(0,c),a.stroke()):k===
mxShapeMockupCallout.prototype.cst.STYLE_ROUNDRECT&&(a.roundrect(b-m,0,m,d,.25*d,.25*d),a.fillAndStroke(),a.begin(),a.moveTo(b-.5*m,d),a.lineTo(0,c),a.stroke()),a.text(b-.5*m,.5*d,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):l===mxShapeMockupCallout.prototype.cst.DIR_SE?(k===mxShapeMockupCallout.prototype.cst.STYLE_LINE?(a.begin(),a.moveTo(b,c),a.lineTo(b-m,c),a.lineTo(0,0),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_RECT?(a.rect(b-m,c-d,m,d),a.fillAndStroke(),
a.begin(),a.moveTo(b-.5*m,c-d),a.lineTo(0,0),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_ROUNDRECT&&(a.roundrect(b-m,c-d,m,d,.25*d,.25*d),a.fillAndStroke(),a.begin(),a.moveTo(b-.5*m,c-d),a.lineTo(0,0),a.stroke()),a.text(b-.5*m,c-.5*d,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):l===mxShapeMockupCallout.prototype.cst.DIR_SW&&(k===mxShapeMockupCallout.prototype.cst.STYLE_LINE?(a.begin(),a.moveTo(0,c),a.lineTo(m,c),a.lineTo(b,0),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_RECT?
(a.rect(0,c-d,m,d),a.fillAndStroke(),a.begin(),a.moveTo(.5*m,c-d),a.lineTo(b,0),a.stroke()):k===mxShapeMockupCallout.prototype.cst.STYLE_ROUNDRECT&&(a.roundrect(0,c-d,m,d,.25*d,.25*d),a.fillAndStroke(),a.begin(),a.moveTo(.5*m,c-d),a.lineTo(b,0),a.stroke()),a.text(.5*m,c-.5*d,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0))};mxCellRenderer.registerShape(mxShapeMockupCallout.prototype.cst.SHAPE_CALLOUT,mxShapeMockupCallout);
function mxShapeMockupStickyNote(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupStickyNote,mxShape);mxShapeMockupStickyNote.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_STICKY_NOTE:"mxgraph.mockup.text.stickyNote"};mxShapeMockupStickyNote.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupStickyNote.prototype.background=function(a,d,e){a.setFillColor("#ffffcc");a.begin();a.moveTo(.03*d,.07*e);a.lineTo(.89*d,.06*e);a.arcTo(2.81*d,2.92*e,1,0,0,.99*d,.98*e);a.lineTo(.09*d,.99*e);a.arcTo(2.81*d,2.92*e,1,0,1,.03*d,.07*e);a.close();a.fill()};
mxShapeMockupStickyNote.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupStickyNote.prototype.cst.MAIN_TEXT,"Note line 1,Note line 2,Note line 3").toString().split(","),c=mxUtils.getValue(this.style,mxShapeMockupStickyNote.prototype.cst.TEXT_COLOR,"#666666").toString(),f=mxUtils.getValue(this.style,mxShapeMockupStickyNote.prototype.cst.TEXT_SIZE,"17").toString();a.setFillColor("#ff3300");a.begin();a.moveTo(.28*d,0);a.lineTo(.59*d,0);a.lineTo(.6*d,.12*e);a.lineTo(.28*
d,.13*e);a.close();a.fill();a.setFontSize(f);a.setFontColor(c);c=b.length*f*1.5;for(var g=0;g<b.length;g++)a.text(d/2,(e-c)/2+g*f*1.5+.75*f,0,0,b[g],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeMockupStickyNote.prototype.cst.SHAPE_STICKY_NOTE,mxShapeMockupStickyNote);function mxShapeMockupStickyNote2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupStickyNote2,mxShape);
mxShapeMockupStickyNote2.prototype.cst={SHAPE_STICKY_NOTE:"mxgraph.mockup.text.stickyNote2"};mxShapeMockupStickyNote2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupStickyNote2.prototype.background=function(a,d,e){a.begin();a.moveTo(.03*d,.07*e);a.lineTo(.89*d,.06*e);a.arcTo(2.81*d,2.92*e,1,0,0,.99*d,.98*e);a.lineTo(.09*d,.99*e);a.arcTo(2.81*d,2.92*e,1,0,1,.03*d,.07*e);a.close();a.fill()};
mxShapeMockupStickyNote2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,"strokeColor","#000000");a.setFillColor(b);a.begin();a.moveTo(.28*d,0);a.lineTo(.59*d,0);a.lineTo(.6*d,.12*e);a.lineTo(.28*d,.13*e);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeMockupStickyNote2.prototype.cst.SHAPE_STICKY_NOTE,mxShapeMockupStickyNote2);function mxShapeMockupBulletedList(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupBulletedList,mxShape);mxShapeMockupBulletedList.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",BULLET_STYLE:"bulletStyle",STYLE_HYPHEN:"hyphen",STYLE_NUM:"number",STYLE_DOT:"dot",SHAPE_BULLETED_LIST:"mxgraph.mockup.text.bulletedList"};mxShapeMockupBulletedList.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupBulletedList.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupBulletedList.prototype.foreground=function(a,d,e){d=mxUtils.getValue(this.style,mxShapeMockupBulletedList.prototype.cst.MAIN_TEXT,"Note line 1,Note line 2,Note line 3").toString().split(",");var b=mxUtils.getValue(this.style,mxShapeMockupBulletedList.prototype.cst.TEXT_COLOR,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupBulletedList.prototype.cst.TEXT_SIZE,"17");var c=mxUtils.getValue(this.style,mxShapeMockupBulletedList.prototype.cst.BULLET_STYLE,"none");a.setFontColor(b);a.setFontSize(e);
for(b=0;b<d.length;b++){var f=c===mxShapeMockupBulletedList.prototype.cst.STYLE_NUM?b+1+") "+d[b]:c===mxShapeMockupBulletedList.prototype.cst.STYLE_HYPHEN?"- "+d[b]:c===mxShapeMockupBulletedList.prototype.cst.STYLE_DOT?String.fromCharCode(8226)+" "+d[b]:" "+d[b];a.text(10,b*e*1.5+.75*e,0,0,f,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)}};mxCellRenderer.registerShape(mxShapeMockupBulletedList.prototype.cst.SHAPE_BULLETED_LIST,mxShapeMockupBulletedList);
function mxShapeMockupTextBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupTextBox,mxShape);mxShapeMockupTextBox.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_TEXT_BOX:"mxgraph.mockup.text.textBox"};mxShapeMockupTextBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupTextBox.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupTextBox.prototype.foreground=function(a,d,e){d=mxUtils.getValue(this.style,mxShapeMockupTextBox.prototype.cst.MAIN_TEXT,"Note line 1").toString().split(",");var b=mxUtils.getValue(this.style,mxShapeMockupTextBox.prototype.cst.TEXT_COLOR,"#666666");e=mxUtils.getValue(this.style,mxShapeMockupTextBox.prototype.cst.TEXT_SIZE,"17");a.setFontColor(b);a.setFontSize(e);for(b=0;b<d.length;b++)a.text(5,b*e*1.5+.75*e,0,0,d[b],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeMockupTextBox.prototype.cst.SHAPE_TEXT_BOX,mxShapeMockupTextBox);function mxShapeMockupCaptcha(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupCaptcha,mxShape);mxShapeMockupCaptcha.prototype.cst={MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize",SHAPE_CAPTCHA:"mxgraph.mockup.text.captcha"};
mxShapeMockupCaptcha.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxShapeMockupCaptcha.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxShapeMockupCaptcha.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxShapeMockupCaptcha.prototype.cst.MAIN_TEXT,"Note line 1"),c=mxUtils.getValue(this.style,mxShapeMockupCaptcha.prototype.cst.TEXT_COLOR,"#666666"),f=mxUtils.getValue(this.style,mxShapeMockupCaptcha.prototype.cst.TEXT_SIZE,"25");a.setFillColor("#88aaff");a.begin();a.moveTo(0,0);a.lineTo(.35*d,0);a.lineTo(.55*d,.85*e);a.lineTo(.4*d,.75*e);a.close();a.fill();a.begin();a.moveTo(.7*d,.1*e);a.lineTo(.95*d,.23*e);
a.lineTo(d,.4*e);a.lineTo(d,.9*e);a.lineTo(d,e);a.lineTo(.8*d,e);a.close();a.fill();a.setFontColor(c);a.setFontSize(f);a.text(.5*d,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.rect(0,0,d,e);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupCaptcha.prototype.cst.SHAPE_CAPTCHA,mxShapeMockupCaptcha);function mxShapeMockupAlphanumeric(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupAlphanumeric,mxShape);mxShapeMockupAlphanumeric.prototype.cst={MAIN_TEXT:"linkText",TEXT_SIZE:"textSize",TEXT_COLOR:"textColor",SHAPE_ALPHANUMERIC:"mxgraph.mockup.text.alphanumeric"};
mxShapeMockupAlphanumeric.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeMockupAlphanumeric.prototype.cst.MAIN_TEXT,"0-9 A B C D E F G H I J K L M N O P Q R S T U V X Y Z"),g=mxUtils.getValue(this.style,mxShapeMockupAlphanumeric.prototype.cst.TEXT_SIZE,"17"),h=mxUtils.getValue(this.style,mxShapeMockupAlphanumeric.prototype.cst.TEXT_COLOR,"#0000ff");a.translate(d,e);d=mxUtils.getSizeForString(f,g,mxConstants.DEFAULT_FONTFAMILY).width;a.setStrokeColor(h);a.setFontSize(g);
a.setFontColor(h);a.text(.5*b,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.begin();a.moveTo(.5*b-.5*d,.5*(c+parseInt(g,10)));a.lineTo(.5*b+.5*d,.5*(c+parseInt(g,10)));a.stroke()};mxCellRenderer.registerShape(mxShapeMockupAlphanumeric.prototype.cst.SHAPE_ALPHANUMERIC,mxShapeMockupAlphanumeric);function mxShapeMockupTextRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupTextRRect,mxShape);
mxShapeMockupTextRRect.prototype.cst={RRECT:"mxgraph.mockup.text.rrect",R_SIZE:"rSize"};mxShapeMockupTextRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupTextRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupTextRRect.prototype.cst.RRECT,mxShapeMockupTextRRect);
var mxMockupC={BAR_HEIGHT:"barHeight",BAR_POS:"barPos",BG_STYLE:"bgStyle",BG_FLAT_GREEN:"bgGreen",BG_FLAT_WHITE:"bgWhite",BG_FLAT_GRAY:"bgGray",BG_FLAT_CUSTOM:"bgFlat",BG_MAP:"bgMap",BG_STRIPED:"bgStriped",BUTTON_STYLE:"buttonStyle",BUTTON_TEXT:"buttonText",BUTTON_STATE:"buttonState",CHEVRON:"chevron",GRID_SIZE:"gridSize",POINTER_BOTTOM:"bottom",POINTER_POS:"pointerPos",POINTER_TOP:"top",ROUND:"round",SELECTED:"+",STATE_ON:"on",STATE_OFF:"off",SUB_TEXT:"subText",SHAPE_IADD_ICON:"mxgraph.ios.iAddIcon",
SHAPE_IALERT_BOX:"mxgraph.ios.iAlertBox",SHAPE_IALPHA_LIST:"mxgraph.ios.iAlphaList",SHAPE_IAPP_BAR:"mxgraph.ios.iAppBar",SHAPE_IARROW_ICON:"mxgraph.ios.iArrowIcon",SHAPE_IBG_FLAT:"mxgraph.ios.iBgFlat",SHAPE_IBG_MAP:"mxgraph.ios.iBgMap",SHAPE_IBG_STRIPED:"mxgraph.ios.iBgStriped",SHAPE_IBUTTON:"mxgraph.ios.iButton",SHAPE_IBUTTON_BACK:"mxgraph.ios.iButtonBack",SHAPE_IBUTTON_FORWARD:"mxgraph.ios.iButtonFw",SHAPE_IBUTTON_BAR:"mxgraph.ios.iButtonBar",SHAPE_ICALL_BUTTONS:"mxgraph.ios.iCallButtons",SHAPE_ICALL_DIALOG:"mxgraph.ios.iCallDialog",
SHAPE_ICHECKBOX_GROUP:"mxgraph.ios.iCheckboxGroup",SHAPE_ICHECK_ICON:"mxgraph.ios.iCheckIcon",SHAPE_ICLOUD_PROGRESS_BAR:"mxgraph.ios.iCloudProgressBar",SHAPE_ICOMBO_BOX:"mxgraph.ios.iComboBox",SHAPE_ICOPY:"mxgraph.ios.iCopy",SHAPE_ICOPY_AREA:"mxgraph.ios.iCopyArea",SHAPE_IICON_GRID:"mxgraph.ios.iIconGrid",SHAPE_IDELETE_APP:"mxgraph.ios.iDeleteApp",SHAPE_IDELETE_ICON:"mxgraph.ios.iDeleteIcon",SHAPE_IDOWNLOAD_BAR:"mxgraph.ios.iDownloadBar",SHAPE_IDIALOG_BOX:"mxgraph.ios.iDialogBox",SHAPE_IDIRECTION:"mxgraph.ios.iDir",
SHAPE_IHOME_PAGE_CONTROL:"mxgraph.ios.iHomePageControl",SHAPE_IKEYB_LETTERS:"mxgraph.ios.iKeybLett",SHAPE_IKEYB_NUMBERS:"mxgraph.ios.iKeybNumb",SHAPE_IKEYB_SYMBOLS:"mxgraph.ios.iKeybSymb",SHAPE_ILOCATION_BAR:"mxgraph.ios.iLocBar",SHAPE_ILOCK_BUTTON:"mxgraph.ios.iLockButton",SHAPE_IHOR_BUTTON_BAR:"mxgraph.ios.iHorButtonBar",SHAPE_IINFO_ICON:"mxgraph.ios.iInfoIcon",SHAPE_ION_OFF_BUTTON:"mxgraph.ios.iOnOffButton",SHAPE_IOPTION:"mxgraph.ios.iOption",SHAPE_IPAGE_CONTROL:"mxgraph.ios.iPageControl",SHAPE_IPAD:"mxgraph.ios.iPad",
SHAPE_IPHONE:"mxgraph.ios.iPhone",SHAPE_IPIN:"mxgraph.ios.iPin",SHAPE_IPREV_NEXT:"mxgraph.ios.iPrevNext",SHAPE_IPROGRESS_BAR:"mxgraph.ios.iProgressBar",SHAPE_IRADIO_GROUP:"mxgraph.ios.iRadioGroup",SHAPE_ISLIDER:"mxgraph.ios.iSlider",SHAPE_ISORT_FIND_ICON:"mxgraph.ios.iSortFindIcon",SHAPE_ITEXT_INPUT:"mxgraph.ios.iTextInput",SHAPE_ITOP_BAR:"mxgraph.ios.iTopBar",SHAPE_ITOP_BAR_LOCKED:"mxgraph.ios.iTopBarLocked",SHAPE_IURL_BAR:"mxgraph.ios.iURLBar",SHAPE_IVIDEO_CONTROLS:"mxgraph.ios.iVideoControls",
SHAPE_ISCREEN_NAME_BAR:"mxgraph.ios.iScreenNameBar",STYLE_FILLCOLOR2:"fillColor2",STYLE_FILLCOLOR3:"fillColor3",STYLE_TEXTCOLOR:"textColor",STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",STYLE_STROKECOLOR3:"strokeColor3"};function mxShapeMockupiPhone(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiPhone,mxShape);
mxShapeMockupiPhone.prototype.customProperties=[{name:"bgStyle",dispName:"Background",type:"enum",enumList:[{val:"bgGreen",dispName:"Green"},{val:"bgWhite",dispName:"White"},{val:"bgGray",dispName:"Gray"},{val:"bgFlat",dispName:"Flat"},{val:"bgMap",dispName:"Map"},{val:"bgStriped",dispName:"Striped"}]}];mxShapeMockupiPhone.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=100>b?4:25;this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiPhone.prototype.background=function(a,d,e,b,c,f){a.setFillColor("#000000");a.setStrokeColor("#000000");a.roundrect(0,0,b,c,f,f);a.fillAndStroke()};
mxShapeMockupiPhone.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(1.5);a.begin();a.setGradient("#808080","#000000",.325*b,0,.675*b,.5*c,mxConstants.DIRECTION_SOUTH,1,1);a.moveTo(.325*b,0);a.lineTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,.5*c);a.lineTo(.7*b,.5*c);a.close();a.fill();d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"");e=mxUtils.getValue(this.style,mxMockupC.BG_STYLE,mxMockupC.BG_FLAT_GREEN);a.setStrokeWidth(1);if(e===mxMockupC.BG_FLAT_WHITE)a.setFillColor("#ffffff"),
a.rect(.0625*b,.15*c,.875*b,.7*c),a.fill();else if(e===mxMockupC.BG_FLAT_GREEN)a.setFillColor("#1f2923"),a.rect(.0625*b,.15*c,.875*b,.7*c),a.fill();else if(e===mxMockupC.BG_FLAT_GRAY)a.setFillColor("#dddddd"),a.rect(.0625*b,.15*c,.875*b,.7*c),a.fill();else if(e===mxMockupC.BG_FLAT_CUSTOM)a.setFillColor(d),a.rect(.0625*b,.15*c,.875*b,.7*c),a.fill();else if(e===mxMockupC.BG_STRIPED){d=b;e=c;a.translate(.0625*b,.15*c);b*=.875;c*=.7;a.setFillColor("#5D7585");a.rect(0,0,b,c);a.fillAndStroke();a.setStrokeColor("#657E8F");
var g=5;for(a.begin();g<b;)a.moveTo(g,0),a.lineTo(g,c),g+=5;a.stroke();a.setStrokeColor("#18211b");a.begin();a.rect(0,0,b,c);a.stroke();b=d;c=e;a.translate(.0625*-b,.15*-c)}else e===mxMockupC.BG_MAP&&(d=b,e=c,a.translate(.0625*b,.15*c),b*=.875,c*=.7,a.setFillColor("#ffffff"),a.rect(0,0,b,c),a.fillAndStroke(),a.setFillColor("#96D1FF"),a.setStrokeColor("#008cff"),a.setStrokeWidth(1),a.begin(),a.moveTo(0,0),a.lineTo(.1171*b,0),a.lineTo(.1136*b,.0438*c),a.lineTo(.0993*b,.054*c),a.lineTo(0,.0446*c),a.close(),
a.fillAndStroke(),a.begin(),a.moveTo(.1993*b,0),a.lineTo(.1914*b,.03884*c),a.lineTo(.1536*b,.0362*c),a.lineTo(.1586*b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.24*b,0),a.lineTo(.2257*b,.054*c),a.lineTo(.2414*b,.0674*c),a.lineTo(.4707*b,.0835*c),a.lineTo(.5264*b,.0906*c),a.lineTo(.6429*b,.0929*c),a.arcTo(.0857*b,.0536*c,0,0,0,.7193*b,.0621*c),a.arcTo(.48*b,.2143*c,0,0,0,.7286*b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8*b,0),a.lineTo(.7886*b,.04554*c),a.arcTo(.0857*b,.0536*c,0,0,
0,.8164*b,.0875*c),a.arcTo(.1429*b,.0893*c,0,0,0,.88*b,.1036*c),a.lineTo(b,.1112*c),a.lineTo(b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.0933*c),a.lineTo(.08*b,.1036*c),a.lineTo(.1021*b,.1246*c),a.lineTo(.1007*b,.1768*c),a.lineTo(.0471*b,.2241*c),a.lineTo(0,.2527*c),a.close(),a.fillAndStroke(),a.ellipse(.1214*b,.0603*c,.0843*b,.0576*c),a.fillAndStroke(),a.begin(),a.moveTo(.1293*b,.1924*c),a.lineTo(.1729*b,.142*c),a.lineTo(.1407*b,.1411*c),a.lineTo(.14*b,.1777*c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(.4586*b,.1241*c),a.lineTo(.455*b,.1835*c),a.lineTo(.3893*b,.2246*c),a.lineTo(.2171*b,.1362*c),a.lineTo(.2171*b,.1308*c),a.lineTo(.2293*b,.1214*c),a.lineTo(.2857*b,.1174*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.5079*b,.1134*c),a.lineTo(.7307*b,.1223*c),a.lineTo(.7279*b,.1625*c),a.lineTo(.715*b,.1772*c),a.lineTo(.6929*b,.1688*c),a.lineTo(.625*b,.1795*c),a.lineTo(.4779*b,.2835*c),a.lineTo(.395*b,.2299*c),a.lineTo(.4657*b,.1826*c),a.lineTo(.4707*b,.1223*c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(b,.1362*c),a.lineTo(.7643*b,.1237*c),a.lineTo(.7543*b,.1562*c),a.lineTo(.7643*b,.1585*c),a.lineTo(.9186*b,.2366*c),a.lineTo(b,.1732*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2079*b,.1545*c),a.lineTo(.3886*b,.2536*c),a.lineTo(.3414*b,.2933*c),a.lineTo(.1743*b,.1969*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.1579*b,.2134*c),a.lineTo(.3221*b,.3067*c),a.lineTo(.2957*b,.3237*c),a.lineTo(.1157*b,.2424*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.405*b,.2656*c),
a.lineTo(.31*b,.3353*c),a.lineTo(.3693*b,.3661*c),a.lineTo(.4571*b,.2982*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.7121*b,.1848*c),a.lineTo(.6879*b,.1754*c),a.lineTo(.6329*b,.1844*c),a.lineTo(.61*b,.2018*c),a.lineTo(.6207*b,.2085*c),a.lineTo(.4986*b,.2982*c),a.lineTo(.535*b,.3237*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.5557*b,.3379*c),a.lineTo(.7464*b,.1826*c),a.lineTo(.8036*b,.2076*c),a.lineTo(.595*b,.3616*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8293*b,.2188*c),a.lineTo(.8979*
b,.2509*c),a.lineTo(.6936*b,.4125*c),a.lineTo(.6171*b,.3737*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.2138*c),a.lineTo(.6821*b,.4603*c),a.lineTo(.815*b,.5277*c),a.lineTo(b,.4*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.317*c),a.lineTo(.0971*b,.2554*c),a.lineTo(.4121*b,.4143*c),a.lineTo(.3736*b,.4415*c),a.lineTo(.315*b,.4076*c),a.lineTo(.3093*b,.4116*c),a.lineTo(.3686*b,.4455*c),a.lineTo(.285*b,.5045*c),a.lineTo(.1114*b,.4134*c),a.lineTo(.025*b,.4603*c),a.lineTo(.0371*b,.4723*c),
a.lineTo(.1114*b,.4371*c),a.lineTo(.2871*b,.5312*c),a.lineTo(.1929*b,.6058*c),a.lineTo(.2271*b,.6705*c),a.lineTo(.17*b,.7147*c),a.lineTo(.0314*b,.6321*c),a.lineTo(0,.6246*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.48*b,.3121*c),a.lineTo(.5157*b,.3375*c),a.lineTo(.4314*b,.3982*c),a.lineTo(.3929*b,.3786*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.3086*b,.5179*c),a.lineTo(.53*b,.3518*c),a.lineTo(.5757*b,.3745*c),a.lineTo(.3479*b,.5411*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.5964*
b,.3884*c),a.lineTo(.6736*b,.4277*c),a.lineTo(.445*b,.5991*c),a.lineTo(.3664*b,.5531*c),a.lineTo(.5057*b,.4545*c),a.lineTo(.5507*b,.4754*c),a.lineTo(.5571*b,.4723*c),a.lineTo(.5114*b,.4504*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4793*b,.6161*c),a.lineTo(.6771*b,.4643*c),a.lineTo(.8086*b,.5326*c),a.lineTo(.7471*b,.5817*c),a.lineTo(.7214*b,.567*c),a.lineTo(.715*b,.571*c),a.lineTo(.7421*b,.5871*c),a.lineTo(.6014*b,.6933*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.4371*c),a.lineTo(.8443*
b,.546*c),a.lineTo(.9071*b,.5701*c),a.lineTo(b,.5022*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8407*b,.5504*c),a.lineTo(.8993*b,.5759*c),a.lineTo(.6757*b,.7416*c),a.lineTo(.6286*b,.7139*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.5321*c),a.lineTo(.6979*b,.7549*c),a.lineTo(.7457*b,.7781*c),a.lineTo(.9814*b,.6094*c),a.lineTo(b,.6067*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.6254*c),a.lineTo(.7664*b,.792*c),a.lineTo(.9586*b,.9062*c),a.lineTo(b,.8786*c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(.3093*b,.5464*c),a.lineTo(.4271*b,.6152*c),a.lineTo(.245*b,.7643*c),a.lineTo(.185*b,.7228*c),a.lineTo(.2493*b,.6728*c),a.lineTo(.2214*b,.6143*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.65*c),a.lineTo(.2179*b,.7826*c),a.lineTo(.1136*b,.8424*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.7272*c),a.lineTo(.0821*b,.859*c),a.lineTo(0,.9085*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4529*b,.6366*c),a.lineTo(.575*b,.7143*c),a.lineTo(.39*b,.8621*c),a.lineTo(.2657*
b,.7902*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.9415*c),a.lineTo(.1036*b,.8821*c),a.lineTo(.2343*b,.959*c),a.lineTo(.1721*b,c),a.lineTo(0,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2586*b,.7951*c),a.lineTo(.3829*b,.8674*c),a.lineTo(.2543*b,.9451*c),a.lineTo(.1279*b,.8692*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2836*b,.9639*c),a.lineTo(.4207*b,.8772*c),a.lineTo(.605*b,.7321*c),a.lineTo(.6521*b,.7634*c),a.lineTo(.3486*b,c),a.lineTo(.3393*b,c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(.3879*b,c),a.lineTo(.6721*b,.7759*c),a.lineTo(.7171*b,.7982*c),a.lineTo(.4564*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4986*b,c),a.lineTo(.7386*b,.8125*c),a.lineTo(.9307*b,.925*c),a.lineTo(.8264*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8671*b,c),a.lineTo(.9464*b,.9491*c),a.lineTo(b,.975*c),a.lineTo(b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2295*b,c),a.lineTo(.2648*b,.9792*c),a.lineTo(.2981*b,c),a.close(),a.fillAndStroke(),b=d,c=e,a.translate(.0625*
-b,.15*-c));a.setStrokeWidth(1);a.setStrokeColor("#18211b");a.rect(.0625*b,.15*c,.875*b,.7*c);a.stroke();a.setStrokeWidth(1.5);a.setAlpha(.8);a.setStrokeColor("#dddddd");a.roundrect(0,0,b,c,f,f);a.stroke();50<b&&(f=100>b?3:22.5,a.begin(),a.setStrokeColor("#666666"),a.roundrect(5,5,b-10,c-10,f,f),a.stroke());a.setAlpha(1);a.ellipse(.4875*b,.04125*c,.025*b,.0125*c);a.setStrokeWidth(2.5);a.setStrokeColor("#000000");a.setFillColor("#000099");a.fillAndStroke();a.begin();a.setStrokeWidth(1.5);a.setFillColor("#444444");
a.setStrokeColor("#333333");a.roundrect(.375*b,.075*c,.25*b,.01875*c,.02*b,.01*c);a.fillAndStroke();a.setGradient("#bbbbbb","#000000",.4*b,.875*c,.2*b,.1*c,mxConstants.DIRECTION_SOUTH,1,1);a.ellipse(.4*b,.875*c,.2*b,.1*c);a.fill();a.setAlpha(.5);a.ellipse(.404*b,.876*c,.19*b,.095*c);a.stroke();a.begin();a.setAlpha(.85);a.setFillColor("#000000");a.moveTo(.4025*b,.925*c);a.arcTo(.0975*b,.04625*c,0,0,1,.5975*b,.925*c);a.arcTo(.2*b,.1*c,0,0,1,.4025*b,.925*c);a.close();a.fillAndStroke();a.begin();a.setAlpha(.7);
a.setStrokeWidth(1.5);a.setStrokeColor("#dddddd");a.roundrect(.4575*b,.905*c,.0875*b,.04375*c,.00625*c,.00625*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IPHONE,mxShapeMockupiPhone);function mxShapeMockupiBgFlat(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiBgFlat,mxShape);mxShapeMockupiBgFlat.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeMockupiBgFlat.prototype.background=function(a,d,e,b,c){a.begin();a.rect(0,0,b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBG_FLAT,mxShapeMockupiBgFlat);function mxShapeMockupiBgStriped(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiBgStriped,mxShape);
mxShapeMockupiBgStriped.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiBgStriped.prototype.background=function(a,d,e,b,c){a.setStrokeWidth(1);a.begin();a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiBgStriped.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"");e=mxUtils.getValue(this.style,mxMockupC.STYLE_STROKECOLOR2,"");a.setStrokeColor(e);e=5;for(a.begin();e<b;)a.moveTo(e,0),a.lineTo(e,c),e+=5;a.stroke();a.setStrokeColor(d);a.begin();a.rect(0,0,b,c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBG_STRIPED,mxShapeMockupiBgStriped);
function mxShapeMockupiBgMap(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiBgMap,mxShape);mxShapeMockupiBgMap.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiBgMap.prototype.background=function(a,d,e,b,c){a.begin();a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiBgMap.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"");var f=mxUtils.getValue(this.style,mxMockupC.STYLE_STROKECOLOR2,"");a.setFillColor(d);a.setStrokeColor(f);a.setStrokeWidth(.5);a.begin();a.moveTo(0,0);a.lineTo(.1171*b,0);a.lineTo(.1136*b,.0438*c);a.lineTo(.0993*b,.054*c);a.lineTo(0,.0446*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.1993*b,0);a.lineTo(.1914*b,
.03884*c);a.lineTo(.1536*b,.0362*c);a.lineTo(.1586*b,0);a.close();a.fillAndStroke();a.begin();a.moveTo(.24*b,0);a.lineTo(.2257*b,.054*c);a.lineTo(.2414*b,.0674*c);a.lineTo(.4707*b,.0835*c);a.lineTo(.5264*b,.0906*c);a.lineTo(.6429*b,.0929*c);a.arcTo(.0857*b,.0536*c,0,0,0,.7193*b,.0621*c);a.arcTo(.48*b,.2143*c,0,0,0,.7286*b,0);a.close();a.fillAndStroke();a.begin();a.moveTo(.8*b,0);a.lineTo(.7886*b,.04554*c);a.arcTo(.0857*b,.0536*c,0,0,0,.8164*b,.0875*c);a.arcTo(.1429*b,.0893*c,0,0,0,.88*b,.1036*c);
a.lineTo(b,.1112*c);a.lineTo(b,0);a.close();a.fillAndStroke();a.begin();a.moveTo(0,.0933*c);a.lineTo(.08*b,.1036*c);a.lineTo(.1021*b,.1246*c);a.lineTo(.1007*b,.1768*c);a.lineTo(.0471*b,.2241*c);a.lineTo(0,.2527*c);a.close();a.fillAndStroke();a.ellipse(.1214*b,.0603*c,.0843*b,.0576*c);a.fillAndStroke();a.begin();a.moveTo(.1293*b,.1924*c);a.lineTo(.1729*b,.142*c);a.lineTo(.1407*b,.1411*c);a.lineTo(.14*b,.1777*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.4586*b,.1241*c);a.lineTo(.455*b,.1835*c);
a.lineTo(.3893*b,.2246*c);a.lineTo(.2171*b,.1362*c);a.lineTo(.2171*b,.1308*c);a.lineTo(.2293*b,.1214*c);a.lineTo(.2857*b,.1174*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.5079*b,.1134*c);a.lineTo(.7307*b,.1223*c);a.lineTo(.7279*b,.1625*c);a.lineTo(.715*b,.1772*c);a.lineTo(.6929*b,.1688*c);a.lineTo(.625*b,.1795*c);a.lineTo(.4779*b,.2835*c);a.lineTo(.395*b,.2299*c);a.lineTo(.4657*b,.1826*c);a.lineTo(.4707*b,.1223*c);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.1362*c);a.lineTo(.7643*b,.1237*
c);a.lineTo(.7543*b,.1562*c);a.lineTo(.7643*b,.1585*c);a.lineTo(.9186*b,.2366*c);a.lineTo(b,.1732*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.2079*b,.1545*c);a.lineTo(.3886*b,.2536*c);a.lineTo(.3414*b,.2933*c);a.lineTo(.1743*b,.1969*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.1579*b,.2134*c);a.lineTo(.3221*b,.3067*c);a.lineTo(.2957*b,.3237*c);a.lineTo(.1157*b,.2424*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.405*b,.2656*c);a.lineTo(.31*b,.3353*c);a.lineTo(.3693*b,.3661*c);a.lineTo(.4571*
b,.2982*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.7121*b,.1848*c);a.lineTo(.6879*b,.1754*c);a.lineTo(.6329*b,.1844*c);a.lineTo(.61*b,.2018*c);a.lineTo(.6207*b,.2085*c);a.lineTo(.4986*b,.2982*c);a.lineTo(.535*b,.3237*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.5557*b,.3379*c);a.lineTo(.7464*b,.1826*c);a.lineTo(.8036*b,.2076*c);a.lineTo(.595*b,.3616*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.8293*b,.2188*c);a.lineTo(.8979*b,.2509*c);a.lineTo(.6936*b,.4125*c);a.lineTo(.6171*b,
.3737*c);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.2138*c);a.lineTo(.6821*b,.4603*c);a.lineTo(.815*b,.5277*c);a.lineTo(b,.4*c);a.close();a.fillAndStroke();a.begin();a.moveTo(0,.317*c);a.lineTo(.0971*b,.2554*c);a.lineTo(.4121*b,.4143*c);a.lineTo(.3736*b,.4415*c);a.lineTo(.315*b,.4076*c);a.lineTo(.3093*b,.4116*c);a.lineTo(.3686*b,.4455*c);a.lineTo(.285*b,.5045*c);a.lineTo(.1114*b,.4134*c);a.lineTo(.025*b,.4603*c);a.lineTo(.0371*b,.4723*c);a.lineTo(.1114*b,.4371*c);a.lineTo(.2871*b,.5312*c);
a.lineTo(.1929*b,.6058*c);a.lineTo(.2271*b,.6705*c);a.lineTo(.17*b,.7147*c);a.lineTo(.0314*b,.6321*c);a.lineTo(0,.6246*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.48*b,.3121*c);a.lineTo(.5157*b,.3375*c);a.lineTo(.4314*b,.3982*c);a.lineTo(.3929*b,.3786*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.3086*b,.5179*c);a.lineTo(.53*b,.3518*c);a.lineTo(.5757*b,.3745*c);a.lineTo(.3479*b,.5411*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.5964*b,.3884*c);a.lineTo(.6736*b,.4277*c);a.lineTo(.445*
b,.5991*c);a.lineTo(.3664*b,.5531*c);a.lineTo(.5057*b,.4545*c);a.lineTo(.5507*b,.4754*c);a.lineTo(.5571*b,.4723*c);a.lineTo(.5114*b,.4504*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.4793*b,.6161*c);a.lineTo(.6771*b,.4643*c);a.lineTo(.8086*b,.5326*c);a.lineTo(.7471*b,.5817*c);a.lineTo(.7214*b,.567*c);a.lineTo(.715*b,.571*c);a.lineTo(.7421*b,.5871*c);a.lineTo(.6014*b,.6933*c);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.4371*c);a.lineTo(.8443*b,.546*c);a.lineTo(.9071*b,.5701*c);a.lineTo(b,
.5022*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.8407*b,.5504*c);a.lineTo(.8993*b,.5759*c);a.lineTo(.6757*b,.7416*c);a.lineTo(.6286*b,.7139*c);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.5321*c);a.lineTo(.6979*b,.7549*c);a.lineTo(.7457*b,.7781*c);a.lineTo(.9814*b,.6094*c);a.lineTo(b,.6067*c);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.6254*c);a.lineTo(.7664*b,.792*c);a.lineTo(.9586*b,.9062*c);a.lineTo(b,.8786*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.3093*b,.5464*c);a.lineTo(.4271*
b,.6152*c);a.lineTo(.245*b,.7643*c);a.lineTo(.185*b,.7228*c);a.lineTo(.2493*b,.6728*c);a.lineTo(.2214*b,.6143*c);a.close();a.fillAndStroke();a.begin();a.moveTo(0,.65*c);a.lineTo(.2179*b,.7826*c);a.lineTo(.1136*b,.8424*c);a.close();a.fillAndStroke();a.begin();a.moveTo(0,.7272*c);a.lineTo(.0821*b,.859*c);a.lineTo(0,.9085*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.4529*b,.6366*c);a.lineTo(.575*b,.7143*c);a.lineTo(.39*b,.8621*c);a.lineTo(.2657*b,.7902*c);a.close();a.fillAndStroke();a.begin();
a.moveTo(0,.9415*c);a.lineTo(.1036*b,.8821*c);a.lineTo(.2343*b,.959*c);a.lineTo(.1721*b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.2586*b,.7951*c);a.lineTo(.3829*b,.8674*c);a.lineTo(.2543*b,.9451*c);a.lineTo(.1279*b,.8692*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.2836*b,.9639*c);a.lineTo(.4207*b,.8772*c);a.lineTo(.605*b,.7321*c);a.lineTo(.6521*b,.7634*c);a.lineTo(.3486*b,c);a.lineTo(.3393*b,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.3879*b,c);a.lineTo(.6721*
b,.7759*c);a.lineTo(.7171*b,.7982*c);a.lineTo(.4564*b,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.4986*b,c);a.lineTo(.7386*b,.8125*c);a.lineTo(.9307*b,.925*c);a.lineTo(.8264*b,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.8671*b,c);a.lineTo(.9464*b,.9491*c);a.lineTo(b,.975*c);a.lineTo(b,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.2295*b,c);a.lineTo(.2648*b,.9792*c);a.lineTo(.2981*b,c);a.close();a.fillAndStroke();a.setStrokeWidth(1);a.setStrokeColor(e);a.begin();a.rect(0,0,b,c);
a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBG_MAP,mxShapeMockupiBgMap);function mxShapeMockupiButtonBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiButtonBar,mxShape);
mxShapeMockupiButtonBar.prototype.customProperties=[{name:"buttonText",dispName:"Labels",type:"string"},{name:"textColor",dispName:"Text Color",type:"color"},{name:"textColor2",dispName:"Text2 Color",type:"color"},{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"}];
mxShapeMockupiButtonBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"+Button 1, Button 2, Button 3").toString()).split(","),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR,"#666666"),h=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17").toString(),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,
mxMockupC.STYLE_STROKECOLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=f.length,q=0,t=-1,u=0;u<p;u++){var v=f[u];v.charAt(0)===mxMockupC.SELECTED&&(v=f[u].substring(1),t=u);v=mxUtils.getSizeForString(v,k,mxConstants.DEFAULT_FONTFAMILY).width;v>q&&(q=v)}var r=1.5*k,w=p*r;c=Math.max(c,w);b=Math.max(b,5+q);a.translate(d,e);this.background(a,b,c,2.5,p,2.5,p*r,l,m,n,t,r);a.setShadow(!1);this.foreground(a,b,c,2.5,p,2.5,p*r,l,m,n,t,r);for(u=v=0;u<p;u++)u===t?a.setFontColor(h):
a.setFontColor(g),v+=2.5,this.buttonText(a,b,(u*r+.5*r)*c/w,f[u],k,m)};mxShapeMockupiButtonBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n){a.begin();a.setStrokeWidth(1);a.setStrokeColor(h);a.setFillColor(l);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.fillAndStroke()};
mxShapeMockupiButtonBar.prototype.foreground=function(a,d,e,b,c,f,g,h,k,l,m,n){f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1");a.setStrokeWidth(f);a.setStrokeColor(k);a.begin();for(k=1;k<c;k++)k!==m&&k!==m+1&&(f=k*n*e/g,a.moveTo(0,f),a.lineTo(d,f));a.stroke();a.setStrokeColor(mxConstants.NONE);0===m?(a.begin(),g=n*e/g,a.setGradient("#5D7585","#008cff",0,0,d,g,mxConstants.DIRECTION_SOUTH,1,1),a.moveTo(0,b),a.arcTo(b,b,0,0,1,b,0),a.lineTo(d-b,0),a.arcTo(b,b,0,0,1,d,b),a.lineTo(d,g),
a.lineTo(0,g),a.close(),a.fill()):m===c-1?(a.begin(),c=e-n*e/g,a.setGradient("#5D7585","#008cff",0,c,d,e-c,mxConstants.DIRECTION_SOUTH,1,1),a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e-b),a.arcTo(b,b,0,0,1,d-b,e),a.lineTo(b,e),a.arcTo(b,b,0,0,1,0,e-b),a.close(),a.fill()):-1!==m&&(a.begin(),c=n*m*e/g,g=n*(m+1)*e/g,a.setGradient("#5D7585","#008cff",0,c,d,g-c,mxConstants.DIRECTION_SOUTH,1,1),a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,g),a.lineTo(0,g),a.close(),a.fill());a.begin();a.setStrokeColor(h);a.setFillColor(l);
a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.stroke()};
mxShapeMockupiButtonBar.prototype.buttonText=function(a,d,e,b,c,f){b.charAt(0)===mxMockupC.SELECTED&&(b=b.substring(1));a.setFontSize(c);a.text(10,e,0,0,b,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);b=.5*c;a.setStrokeWidth(.3*c);a.setStrokeColor(f);a.begin();a.moveTo(d-20-b,e-b);a.lineTo(d-20,e);a.lineTo(d-20-b,e+b);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBUTTON_BAR,mxShapeMockupiButtonBar);
function mxShapeMockupiAppBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiAppBar,mxShape);mxShapeMockupiAppBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiAppBar.prototype.background=function(a,d,e,b,c){a.setGradient("#eeeeee","#999999",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill()};
mxShapeMockupiAppBar.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#0099ff");a.rect(5,.5*c+1.75,1.5,2.5);a.fill();a.rect(7,.5*c+.75,1.5,3.5);a.fill();a.rect(9,.5*c-.25,1.5,4.5);a.fill();a.rect(11,.5*c-1.25,1.5,5.5);a.fill();a.rect(13,.5*c-2.25,1.5,6.5);a.fill();a.rect(15,.5*c-3.25,1.5,7.5);a.fill();a.setFillColor("#999999");a.ellipse(b-56.5,.5*c-4,8,8);a.fill();a.setStrokeColor("#cccccc");a.begin();a.moveTo(b-52.5,.5*c-3);a.lineTo(b-52.5,.5*c);a.lineTo(b-54.5,.5*c);a.stroke();a.setStrokeWidth(.5);
a.setStrokeColor("#333333");a.setFillColor("#990000");a.begin();a.moveTo(b-45.5,.5*c);a.lineTo(b-37.5,.5*c-5);a.lineTo(b-41.5,.5*c+4);a.lineTo(b-42,.5*c+.5);a.close();a.fillAndStroke();a.setFillColor("#999999");a.setStrokeColor("#999999");a.begin();a.moveTo(b-28.5,.5*c+3.5);a.arcTo(3.5,3.5,0,1,1,b-26.5,.5*c+1);a.stroke();a.begin();a.moveTo(b-27.25,.5*c+.25);a.lineTo(b-25.75,.5*c+.25);a.lineTo(b-26.5,.5*c+1.5);a.close();a.fillAndStroke();a.begin();a.moveTo(b-31,.5*c-.5);a.arcTo(1,1.5,0,0,1,b-29,.5*
c-.5);a.stroke();a.rect(b-31.5,.5*c-.5,3,2);a.fillAndStroke();a.setGradient("#eeeeee","#444444",b-20,.5*c-3,16.5,6,mxConstants.DIRECTION_NORTH,1,1);a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.fill();a.setGradient("#E2FFEB","#008215",b-20,.5*c-3,10,6,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-10,.5*c-3);a.lineTo(b-10,
.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.fill();a.setStrokeColor("#666666");a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IAPP_BAR,mxShapeMockupiAppBar);function mxShapeMockupiTopBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiTopBar,mxShape);mxShapeMockupiTopBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiTopBar.prototype.background=function(a,d,e,b,c){a.setAlpha(.5);a.setFillColor("#999999");a.rect(0,0,b,c);a.fill()};
mxShapeMockupiTopBar.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#cccccc");a.setStrokeColor("#cccccc");a.setFontColor("#cccccc");a.setFontSize(7.5);a.rect(5,.5*c+1.75,1.5,2.5);a.fill();a.rect(7,.5*c+.75,1.5,3.5);a.fill();a.rect(9,.5*c-.25,1.5,4.5);a.fill();a.rect(11,.5*c-1.25,1.5,5.5);a.fill();a.rect(13,.5*c-2.25,1.5,6.5);a.fill();a.rect(15,.5*c-3.25,1.5,7.5);a.fill();a.text(18,.5*c,0,0,"CARRIER",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.5*c,0,0,"11:15AM",
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.begin();a.moveTo(b-19,.5*c-2);a.lineTo(b-10,.5*c-2);a.lineTo(b-10,.5*c+2);a.lineTo(b-19,.5*c+2);a.close();a.fill();a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ITOP_BAR,mxShapeMockupiTopBar);
function mxShapeMockupiTopBar2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiTopBar2,mxShape);mxShapeMockupiTopBar2.prototype.cst={SHAPE_ITOP_BAR2:"mxgraph.ios.iTopBar2"};mxShapeMockupiTopBar2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiTopBar2.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fill()};
mxShapeMockupiTopBar2.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.setStrokeColor(d);a.rect(5,.5*c+1.75,1.5,2.5);a.fill();a.rect(7,.5*c+.75,1.5,3.5);a.fill();a.rect(9,.5*c-.25,1.5,4.5);a.fill();a.rect(11,.5*c-1.25,1.5,5.5);a.fill();a.rect(13,.5*c-2.25,1.5,6.5);a.fill();a.rect(15,.5*c-3.25,1.5,7.5);a.fill();a.begin();a.moveTo(b-19,.5*c-2);a.lineTo(b-10,.5*c-2);a.lineTo(b-10,.5*c+2);a.lineTo(b-19,.5*c+2);a.close();
a.fill();a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeMockupiTopBar2.prototype.cst.SHAPE_ITOP_BAR2,mxShapeMockupiTopBar2);function mxShapeMockupiTopBarLocked(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiTopBarLocked,mxShape);
mxShapeMockupiTopBarLocked.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiTopBarLocked.prototype.background=function(a,d,e,b,c){a.setFillColor("#000000");a.rect(0,0,b,c);a.fill()};
mxShapeMockupiTopBarLocked.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#cccccc");a.setStrokeColor("#cccccc");a.rect(5,.5*c+1.75,1.5,2.5);a.fill();a.rect(7,.5*c+.75,1.5,3.5);a.fill();a.rect(9,.5*c-.25,1.5,4.5);a.fill();a.rect(11,.5*c-1.25,1.5,5.5);a.fill();a.rect(13,.5*c-2.25,1.5,6.5);a.fill();a.rect(15,.5*c-3.25,1.5,7.5);a.fill();a.begin();a.moveTo(.5*b-2,.5*c-1);a.arcTo(2,3,0,0,1,.5*b+2,.5*c-1);a.stroke();a.rect(.5*b-3,.5*c-1,6,4);a.fillAndStroke();a.begin();a.moveTo(b-19,.5*c-2);a.lineTo(b-
10,.5*c-2);a.lineTo(b-10,.5*c+2);a.lineTo(b-19,.5*c+2);a.close();a.fill();a.begin();a.moveTo(b-20,.5*c-3);a.lineTo(b-5,.5*c-3);a.lineTo(b-5,.5*c-1);a.lineTo(b-3.5,.5*c-1);a.lineTo(b-3.5,.5*c+1);a.lineTo(b-5,.5*c+1);a.lineTo(b-5,.5*c+3);a.lineTo(b-20,.5*c+3);a.close();a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ITOP_BAR_LOCKED,mxShapeMockupiTopBarLocked);function mxShapeMockupiButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiButton,mxShape);mxShapeMockupiButton.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text")),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8.5").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeMockupiButton.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(0,0,b,c,2.5,2.5);a.fill()};mxShapeMockupiButton.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(b/2,c/2,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IBUTTON,mxShapeMockupiButton);function mxShapeMockupiButtonBack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiButtonBack,mxShape);
mxShapeMockupiButtonBack.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text")),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeMockupiButtonBack.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);rSize=2.5;a.begin();a.moveTo(b,rSize);a.arcTo(rSize,rSize,0,0,0,b-rSize,0);a.lineTo(10,0);a.lineTo(.87,.5*c-.75);a.arcTo(rSize,rSize,0,0,0,.87,.5*c+.75);a.lineTo(10,c);a.lineTo(b-rSize,c);a.arcTo(rSize,rSize,0,0,0,b,c-rSize);a.close();
a.fill()};mxShapeMockupiButtonBack.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b+2.5,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBUTTON_BACK,mxShapeMockupiButtonBack);function mxShapeMockupiButtonForward(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiButtonForward,mxShape);
mxShapeMockupiButtonForward.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text")),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"17").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeMockupiButtonForward.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);rSize=2.5;a.begin();a.moveTo(0,rSize);a.arcTo(rSize,rSize,0,0,1,rSize,0);a.lineTo(b-10,0);a.lineTo(b-.87,.5*c-.75);a.arcTo(rSize,rSize,0,0,1,b-.87,.5*c+.75);a.lineTo(b-10,c);a.lineTo(rSize,c);a.arcTo(rSize,rSize,0,0,1,0,c-rSize);
a.close();a.fill()};mxShapeMockupiButtonForward.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(.5*b-2.5,.5*c,0,0,f,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IBUTTON_FORWARD,mxShapeMockupiButtonForward);function mxShapeMockupiPrevNextButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiPrevNextButton,mxShape);
mxShapeMockupiPrevNextButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupiPrevNextButton.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(0,0,b,c,5,5);a.fill();a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,c);a.stroke()};
mxShapeMockupiPrevNextButton.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR3,"").toString();a.setFillColor(d);a.begin();a.moveTo(.25*b,.25*c);a.lineTo(.35*b,.75*c);a.lineTo(.15*b,.75*c);a.close();a.fill();a.begin();a.moveTo(.75*b,.75*c);a.lineTo(.85*b,.25*c);a.lineTo(.65*b,.25*c);a.close();a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IPREV_NEXT,mxShapeMockupiPrevNextButton);
function mxShapeMockupiTextInput(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiTextInput,mxShape);
mxShapeMockupiTextInput.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text")),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#000000").toString(),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.mainText(a,d,e,b,c,f,h,g)};mxShapeMockupiTextInput.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b,c,2.5,2.5);a.fillAndStroke()};
mxShapeMockupiTextInput.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(2,.5*c,0,0,f,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_ITEXT_INPUT,mxShapeMockupiTextInput);function mxShapeMockupiRadioGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiRadioGroup,mxShape);
mxShapeMockupiRadioGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString();d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Option 1").toString()).split(",");e=d.length;var h=Math.max(1.5*g,5),k=0,l=-1,m=e*h;c=Math.max(c,m);for(var n=0;n<e;n++){var p=d[n];p.charAt(0)===mxMockupC.SELECTED&&(p=d[n].substring(1),
l=n);p=mxUtils.getSizeForString(p,g,mxConstants.DEFAULT_FONTFAMILY).width;p>k&&(k=p)}a.roundrect(0,0,Math.max(b,5+k+10),c,2.5,2.5);a.fillAndStroke();a.setShadow(!1);a.setFontSize(g);a.setFontColor(f);for(n=0;n<e;n++)b=(n*h+.5*h)*c/m,p=d[n],p.charAt(0)===mxMockupC.SELECTED&&(p=d[n].substring(1),l=n),a.text(12.5,b,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),b-=2.5,a.setFillColor("#dddddd"),a.setStrokeColor("#000000"),l===n?(a.setGradient("#aaaaaa","#666666",2.5,b,5,5,mxConstants.DIRECTION_SOUTH,
1,1),a.ellipse(2.5,b,5,5),a.fillAndStroke(),a.setFillColor("#333333"),a.setStrokeColor("#333333"),a.ellipse(3.75,b+1.25,2.5,2.5)):(a.setGradient("#eeeeee","#cccccc",2.5,b,5,5,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(2.5,b,5,5)),a.fillAndStroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IRADIO_GROUP,mxShapeMockupiRadioGroup);function mxShapeMockupiCheckboxGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiCheckboxGroup,mxShape);
mxShapeMockupiCheckboxGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString();d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Option 1").toString()).split(",");e=d.length;var h=Math.max(1.5*g,5),k=0,l=-1,m=e*h;c=Math.max(c,m);for(var n=0;n<e;n++){var p=d[n];p.charAt(0)===mxMockupC.SELECTED&&(p=d[n].substring(1),
l=n);p=mxUtils.getSizeForString(p,g,mxConstants.DEFAULT_FONTFAMILY).width;p>k&&(k=p)}a.roundrect(0,0,Math.max(b,5+k+10),c,2.5,2.5);a.fillAndStroke();a.setShadow(!1);a.setFontSize(g);a.setFontColor(f);for(n=0;n<e;n++)b=(n*h+.5*h)*c/m,p=d[n],p.charAt(0)===mxMockupC.SELECTED&&(p=d[n].substring(1),l=n),a.text(12.5,b,0,0,p,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),b-=2.5,a.setFillColor("#dddddd"),a.setStrokeColor("#000000"),l===n?(a.setGradient("#aaaaaa","#666666",2.5,b,5,5,mxConstants.DIRECTION_SOUTH,
1,1),a.rect(2.5,b,5,5),a.fillAndStroke(),a.setStrokeColor("#333333"),a.begin(),a.moveTo(3.75,b+2.5),a.lineTo(5,b+3.75),a.lineTo(6.25,b+1.25),a.stroke()):(a.setGradient("#eeeeee","#cccccc",2.5,b,5,5,mxConstants.DIRECTION_SOUTH,1,1),a.rect(2.5,b,5,5),a.fillAndStroke()),l=-1};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICHECKBOX_GROUP,mxShapeMockupiCheckboxGroup);function mxShapeMockupiComboBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiComboBox,mxShape);mxShapeMockupiComboBox.prototype.paintVertexShape=function(a,d,e,b,c){var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text")),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#666666").toString(),h=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8.5").toString();a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c);this.mainText(a,d,e,b,c,f,h,g)};
mxShapeMockupiComboBox.prototype.background=function(a,d,e,b,c){a.setFillColor("#ffffff");a.roundrect(0,0,b,c,2.5,2.5);a.fillAndStroke()};
mxShapeMockupiComboBox.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,b-30,0,30,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(b-15,0);a.lineTo(b-2.5,0);a.arcTo(2.5,2.5,0,0,1,b,2.5);a.lineTo(b,c-2.5);a.arcTo(2.5,2.5,0,0,1,b-2.5,c);a.lineTo(b-15,c);a.close();a.fillAndStroke();a.setFillColor("#ffffff");a.begin();a.moveTo(b-11,5);a.lineTo(b-
7.5,10);a.lineTo(b-4,5);a.fill()};mxShapeMockupiComboBox.prototype.mainText=function(a,d,e,b,c,f,g,h){a.begin();a.setFontSize(g);a.setFontColor(h);a.text(2.5,.5*c,0,0,f,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICOMBO_BOX,mxShapeMockupiComboBox);function mxShapeMockupiOnOffButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiOnOffButton,mxShape);
mxShapeMockupiOnOffButton.prototype.customProperties=[{name:"buttonState",dispName:"State",type:"enum",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];mxShapeMockupiOnOffButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,2*c);var f=mxUtils.getValue(this.style,mxMockupC.BUTTON_STATE,mxMockupC.STATE_ON);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f);this.mainText(a,d,e,b,c,f)};
mxShapeMockupiOnOffButton.prototype.background=function(a,d,e,b,c,f){f===mxMockupC.STATE_ON?(a.setGradient("#E2FFEB","#008215",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1),a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke()):f===mxMockupC.STATE_OFF&&(a.setGradient("#cc9999","#881100",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1),a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke())};
mxShapeMockupiOnOffButton.prototype.foreground=function(a,d,e,b,c,f){f===mxMockupC.STATE_ON?(a.setGradient("#ffffff","#888888",b-c,0,c,c,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(b-c,0,c,c)):(a.setGradient("#ffffff","#888888",0,0,c,c,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(0,0,c,c));a.fillAndStroke()};
mxShapeMockupiOnOffButton.prototype.mainText=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,"mainText",null);a.setFontColor("#ffffff");a.setFontSize(8.5);""!=d&&(f===mxMockupC.STATE_ON?a.text(.5*b-.4*c,.5*c,0,0,d||"ON",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):f===mxMockupC.STATE_OFF&&a.text(.5*b+.4*c,.5*c,0,0,d||"OFF",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0))};mxCellRenderer.registerShape(mxMockupC.SHAPE_ION_OFF_BUTTON,mxShapeMockupiOnOffButton);
function mxShapeMockupiAlertBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiAlertBox,mxShape);mxShapeMockupiAlertBox.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,15);c=Math.max(c,15);a.translate(d,e);rSize=7.5;this.background(a,d,e,b,c,rSize);a.setShadow(!1);this.foreground(a,d,e,b,c,rSize)};
mxShapeMockupiAlertBox.prototype.background=function(a,d,e,b,c,f){a.setGradient("#497198","#193168",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.8);a.setStrokeWidth(1);a.roundrect(0,0,b,c,f,f);a.fillAndStroke()};
mxShapeMockupiAlertBox.prototype.foreground=function(a,d,e,b,c,f){d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text").toString()).split(",");a.setStrokeColor("#497198");a.setGradient("#497198","#c5cee1",0,0,b,22.5,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.5);a.begin();a.moveTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,17.5);a.arcTo(1.67*b,2.5*c,0,0,1,0,17.5);a.lineTo(0,f);a.arcTo(f,f,0,0,1,f,0);a.close();a.fillAndStroke();a.setAlpha(.8);a.setStrokeColor("#ffffff");
a.setStrokeWidth(1);a.roundrect(0,0,b,c,f,f);a.stroke();a.setGradient("#497198","#c5cee1",5,c-50,b-20,20,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(5,c-25,b-10,20,2.5,2.5);a.fillAndStroke();a.setAlpha(.9);a.setFontSize(9.5);a.setFontColor("#ffffff");a.text(.5*b,.15*c,0,0,d[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(8);a.text(.5*b,.4*c,0,0,d[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.55*c,0,0,d[3],mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(8.5);a.text(.5*b,c-15,0,0,d[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IALERT_BOX,mxShapeMockupiAlertBox);function mxShapeMockupiDialogBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiDialogBox,mxShape);
mxShapeMockupiDialogBox.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,15);c=Math.max(c,15);a.translate(d,e);rSize=7.5;this.background(a,d,e,b,c,rSize);a.setShadow(!1);this.foreground(a,d,e,b,c,rSize)};mxShapeMockupiDialogBox.prototype.background=function(a,d,e,b,c,f){a.setGradient("#497198","#193168",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.8);a.setStrokeWidth(1);a.roundrect(0,0,b,c,f,f);a.fillAndStroke()};
mxShapeMockupiDialogBox.prototype.foreground=function(a,d,e,b,c,f){d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Main Text").toString()).split(",");a.setStrokeColor("#497198");a.setGradient("#497198","#c5cee1",0,0,b,22.5,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.5);a.begin();a.moveTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,17.5);a.arcTo(1.67*b,2.5*c,0,0,1,0,17.5);a.lineTo(0,f);a.arcTo(f,f,0,0,1,f,0);a.close();a.fillAndStroke();a.setAlpha(.8);a.setStrokeColor("#ffffff");
a.setStrokeWidth(1);a.roundrect(0,0,b,c,f,f);a.stroke();a.setGradient("#497198","#c5cee1",5,c-25,.5*b-10,20,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(5,c-25,.5*b-10,20,2.5,2.5);a.fillAndStroke();a.roundrect(.5*b+2.5,c-25,.5*b-10,20,2.5,2.5);a.fillAndStroke();a.setAlpha(.9);a.setFontSize(9.5);a.setFontColor("#ffffff");a.text(.5*b,.15*c,0,0,d[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(8);a.text(.5*b,.4*c,0,0,d[3],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.text(.5*b,.55*c,0,0,d[4],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(8.5);a.text(.25*b,c-15,0,0,d[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.75*b,c-15,0,0,d[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IDIALOG_BOX,mxShapeMockupiDialogBox);
function mxShapeMockupiLockButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiLockButton,mxShape);
mxShapeMockupiLockButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);a.setAlpha(.7);a.setGradient("#4A4F56","#70757B",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1);a.rect(0,0,b,c);a.fill();a.setAlpha(.8);a.setGradient("#18232D","#1F2933",10,10,154,30,mxConstants.DIRECTION_NORTH,1,1);a.roundrect(10,.5*c-15,b-20,30,7.5,7.5);a.fill();a.setAlpha(1);a.setGradient("#E9F3FD","#ADB7C1",12.5,12.5,40,25,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(12.5,.5*c-12.5,40,25,5,5);a.fill();
a.setAlpha(.8);a.setStrokeWidth(.5);a.setStrokeColor("#aabbbb");a.setGradient("#AEB7C1","#667079",20,17.5,25,15,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(20,.5*c-3.5);a.lineTo(35,.5*c-3.5);a.lineTo(35,.5*c-7.5);a.lineTo(45,.5*c);a.lineTo(35,.5*c+7.5);a.lineTo(35,.5*c+3.5);a.lineTo(20,.5*c+3.5);a.close();a.fillAndStroke();""!=mxUtils.getValue(this.style,"mainText",null)&&(a.setFontSize(12.5),a.setFontColor("#cccccc"),a.text(b/2+20.5,c/2,0,0,"slide to unlock",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0))};mxCellRenderer.registerShape(mxMockupC.SHAPE_ILOCK_BUTTON,mxShapeMockupiLockButton);function mxShapeMockupiArrowIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiArrowIcon,mxShape);
mxShapeMockupiArrowIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiArrowIcon.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiArrowIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(2.5);a.begin();a.moveTo(.4*b,.22*c);a.lineTo(.65*b,.5*c);a.lineTo(.4*b,.78*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IARROW_ICON,mxShapeMockupiArrowIcon);function mxShapeMockupiDeleteIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiDeleteIcon,mxShape);
mxShapeMockupiDeleteIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiDeleteIcon.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeMockupiDeleteIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(2.5);a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke()};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IDELETE_ICON,mxShapeMockupiDeleteIcon);function mxShapeMockupiAddIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiAddIcon,mxShape);
mxShapeMockupiAddIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString(),g=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString(),h=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(g,h,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeColor(f);a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiAddIcon.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(1.5);a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeMockupiAddIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(2.5);a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IADD_ICON,mxShapeMockupiAddIcon);
function mxShapeMockupiInfoIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiInfoIcon,mxShape);mxShapeMockupiInfoIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiInfoIcon.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiInfoIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(2.5);a.begin();a.setFillColor("#ffffff");a.moveTo(.47*b,.334*c);a.arcTo(.1*b,.15*c,60,0,1,.61*b,.42*c);a.lineTo(.51*b,.7*c);a.arcTo(.026*b,.03*c,30,0,0,.54*b,.74*c);a.lineTo(.608*b,.684*c);a.arcTo(.02*b,.015*c,0,0,1,.638*b,.706*c);a.arcTo(.45*b,.45*c,0,0,1,.42*b,.865*c);a.arcTo(.1*b,.08*c,-15,0,1,.325*b,.77*c);a.lineTo(.358*b,.66*c);a.lineTo(.435*b,.46*c);a.arcTo(.023*b,.03*c,0,0,0,.4*b,.43*c);a.lineTo(.338*b,.484*
c);a.arcTo(.01*b,.015*c,45,0,1,.31*b,.47*c);a.arcTo(.3*b,.3*c,0,0,1,.47*b,.334*c);a.fill();a.begin();a.moveTo(.5438*b,.141*c);a.arcTo(.0776*b,.0898*c,40,0,1,.6671*b,.2308*c);a.arcTo(.0776*b,.0898*c,40,0,1,.5438*b,.141*c);a.close();a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IINFO_ICON,mxShapeMockupiInfoIcon);function mxShapeMockupiSortFindIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiSortFindIcon,mxShape);
mxShapeMockupiSortFindIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiSortFindIcon.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.roundrect(0,0,b,c,.1*b,.1*c);a.fillAndStroke()};
mxShapeMockupiSortFindIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(Math.min(c,b)/20);a.begin();a.setFillColor("#ffffff");a.moveTo(.1*b,.25*c);a.lineTo(.9*b,.25*c);a.moveTo(.1*b,.4*c);a.lineTo(.9*b,.4*c);a.moveTo(.1*b,.55*c);a.lineTo(.6*b,.55*c);a.moveTo(.1*b,.7*c);a.lineTo(.5*b,.7*c);a.stroke();a.begin();a.ellipse(.6*b,.6*c,.2*b,.2*c);a.stroke();a.begin();a.moveTo(.77*b,.77*c);a.lineTo(.85*b,.85*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ISORT_FIND_ICON,mxShapeMockupiSortFindIcon);
function mxShapeMockupiCheckIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCheckIcon,mxShape);mxShapeMockupiCheckIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeMockupiCheckIcon.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiCheckIcon.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(2.5);a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.65*c);a.lineTo(.75*b,.25*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICHECK_ICON,mxShapeMockupiCheckIcon);function mxShapeMockupiKeybLetters(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiKeybLetters,mxShape);
mxShapeMockupiKeybLetters.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0);this.foreground(a,d,e,b,c)};mxShapeMockupiKeybLetters.prototype.background=function(a,d,e,b,c){a.setGradient("#8A97A7","#425163",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill()};
mxShapeMockupiKeybLetters.prototype.foreground=function(a,d,e,b,c,f){a.setGradient("#EEF3F9","#DBE2E9",.0086*b,.03*c,.0776*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);rSizeX=.0144*b;rSizeY=.025*c;a.setFontSize(10.5);a.setFontColor("#000000");a.roundrect(.0086*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0474*b,.125*c,0,0,"Q",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1092*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.148*b,.125*c,0,0,"W",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2098*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2486*b,.125*c,0,0,"E",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3103*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3491*b,.125*c,0,0,"R",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4109*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4497*b,.125*c,0,0,"T",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,
null,0,0,0);a.roundrect(.5115*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5503*b,.125*c,0,0,"Y",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6121*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6509*b,.125*c,0,0,"U",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7126*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7514*b,.125*c,0,0,"I",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8132*
b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.852*b,.125*c,0,0,"O",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.9138*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9526*b,.125*c,0,0,"P",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.0632*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.102*b,.375*c,0,0,"A",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1638*b,.28*c,.0776*b,.19*c,rSizeX,
rSizeY);a.fill();a.text(.2026*b,.375*c,0,0,"S",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2644*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3032*b,.375*c,0,0,"D",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3649*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4037*b,.375*c,0,0,"F",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4655*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5043*
b,.375*c,0,0,"G",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5661*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6049*b,.375*c,0,0,"H",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6667*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7055*b,.375*c,0,0,"J",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7672*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.806*b,.375*c,0,0,"K",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8678*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9066*b,.375*c,0,0,"L",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1638*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2026*b,.625*c,0,0,"Z",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2644*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3032*b,.625*c,0,0,"X",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,
null,0,0,0);a.roundrect(.3649*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4037*b,.625*c,0,0,"C",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4655*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5043*b,.625*c,0,0,"V",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5661*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6049*b,.625*c,0,0,"B",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6667*
b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7055*b,.625*c,0,0,"N",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7672*b,.53*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.806*b,.625*c,0,0,"M",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2644*b,.78*c,.4799*b,.19*c,rSizeX,rSizeY);a.fill();a.setFontColor("#666666");a.text(.5043*b,.875*c,0,0,"space",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontColor("#ffffff");
a.setGradient("#8B98A8","#677488",.0115*b,.53*c,.1207*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(.0115*b,.53*c,.1207*b,.19*c,rSizeX,rSizeY);a.fill();a.setGradient("#8B98A8","#677488",.8736*b,.53*c,.115*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(.8736*b,.53*c,.115*b,.19*c,rSizeX,rSizeY);a.fill();a.setGradient("#8B98A8","#677488",.0115*b,.78*c,.2299*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(.0115*b,.78*c,.2299*b,.19*c,rSizeX,rSizeY);a.fill();a.setGradient("#8B98A8","#677488",
.7672*b,.78*c,.2213*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(.7672*b,.78*c,.2213*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.1264*b,.875*c,0,0,".?123",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8779*b,.875*c,0,0,"return",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setShadow(!1);a.setLineJoin("round");a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.setStrokeWidth(1.5);a.begin();a.moveTo(.0402*b,.635*c);a.lineTo(.0718*b,.58*c);a.lineTo(.1034*
b,.635*c);a.lineTo(.0862*b,.635*c);a.lineTo(.0862*b,.67*c);a.lineTo(.0575*b,.67*c);a.lineTo(.0575*b,.635*c);a.close();a.stroke();a.begin();a.moveTo(.9109*b,.585*c);a.lineTo(.9655*b,.585*c);a.lineTo(.9655*b,.665*c);a.lineTo(.9109*b,.665*c);a.lineTo(.8879*b,.625*c);a.close();a.fillAndStroke();a.setStrokeColor("#677488");a.begin();a.moveTo(.9224*b,.605*c);a.lineTo(.9454*b,.645*c);a.moveTo(.9224*b,.645*c);a.lineTo(.9454*b,.605*c);a.stroke()};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IKEYB_LETTERS,mxShapeMockupiKeybLetters);function mxShapeMockupiKeybNumbers(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiKeybNumbers,mxShape);mxShapeMockupiKeybNumbers.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0);this.foreground(a,d,e,b,c)};
mxShapeMockupiKeybNumbers.prototype.background=function(a,d,e,b,c){a.setGradient("#8A97A7","#425163",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill()};
mxShapeMockupiKeybNumbers.prototype.foreground=function(a,d,e,b,c,f){a.setGradient("#EEF3F9","#DBE2E9",.0086*b,.03*c,.0776*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);rSizeX=.0144*b;rSizeY=.025*c;a.setFontSize(10.5);a.setFontColor("#000000");a.roundrect(.0086*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0474*b,.125*c,0,0,"1",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1092*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.148*b,.125*c,0,0,"2",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2098*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2486*b,.125*c,0,0,"3",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3103*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3491*b,.125*c,0,0,"4",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4109*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4497*b,.125*c,0,0,"5",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,
null,0,0,0);a.roundrect(.5115*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5503*b,.125*c,0,0,"6",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6121*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6509*b,.125*c,0,0,"7",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7126*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7514*b,.125*c,0,0,"8",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8132*
b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.852*b,.125*c,0,0,"9",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.9138*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9526*b,.125*c,0,0,"0",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.0086*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0474*b,.375*c,0,0,"-",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1092*b,.28*c,.0776*b,.19*c,rSizeX,
rSizeY);a.fill();a.text(.148*b,.375*c,0,0,"/",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2098*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2486*b,.375*c,0,0,":",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3103*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3491*b,.375*c,0,0,";",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4109*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4497*
b,.375*c,0,0,"(",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5115*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5503*b,.375*c,0,0,")",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6121*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6509*b,.375*c,0,0,"$",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7126*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7514*b,.375*c,0,0,"&",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8132*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.852*b,.375*c,0,0,"@",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.9138*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9526*b,.375*c,0,0,'"',mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1638*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2227*b,.625*c,0,0,".",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,
0,0,0);a.roundrect(.3046*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3635*b,.625*c,0,0,",",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4454*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5043*b,.625*c,0,0,"?",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5862*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6451*b,.625*c,0,0,"!",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.727*b,.53*
c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7859*b,.625*c,0,0,"'",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2644*b,.78*c,.4799*b,.19*c,rSizeX,rSizeY);a.fill();a.setFontColor("#666666");a.text(.5043*b,.875*c,0,0,"space",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setGradient("#8B98A8","#677488",.0115*b,.53*c,.1207*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);a.setFontColor("#ffffff");a.roundrect(.0115*b,.53*c,.1207*b,.19*c,rSizeX,rSizeY);a.fill();
a.roundrect(.8736*b,.53*c,.115*b,.19*c,rSizeX,rSizeY);a.fill();a.roundrect(.0115*b,.78*c,.2299*b,.19*c,rSizeX,rSizeY);a.fill();a.roundrect(.7672*b,.78*c,.2213*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0718*b,.625*c,0,0,"#+=",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1264*b,.875*c,0,0,"ABC",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8779*b,.875*c,0,0,"return",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setShadow(!1);a.setLineJoin("round");
a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.setStrokeWidth(1.5);a.begin();a.moveTo(.9109*b,.585*c);a.lineTo(.9655*b,.585*c);a.lineTo(.9655*b,.665*c);a.lineTo(.9109*b,.665*c);a.lineTo(.8879*b,.625*c);a.close();a.fillAndStroke();a.setStrokeColor("#677488");a.begin();a.moveTo(.9224*b,.605*c);a.lineTo(.9454*b,.645*c);a.moveTo(.9224*b,.645*c);a.lineTo(.9454*b,.605*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IKEYB_NUMBERS,mxShapeMockupiKeybNumbers);
function mxShapeMockupiKeybSymbols(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiKeybSymbols,mxShape);mxShapeMockupiKeybSymbols.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0);this.foreground(a,d,e,b,c)};
mxShapeMockupiKeybSymbols.prototype.background=function(a,d,e,b,c){a.setGradient("#8A97A7","#425163",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill()};
mxShapeMockupiKeybSymbols.prototype.foreground=function(a,d,e,b,c,f){a.setGradient("#EEF3F9","#DBE2E9",.0086*b,.03*c,.0776*b,.19*c,mxConstants.DIRECTION_SOUTH,1,1);rSizeX=.0144*b;rSizeY=.025*c;a.setFontSize(10.5);a.setFontColor("#000000");a.roundrect(.0086*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0474*b,.125*c,0,0,"[",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1092*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.148*b,.125*c,0,0,"]",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2098*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2486*b,.125*c,0,0,"{",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3103*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3491*b,.125*c,0,0,"}",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4109*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4497*b,.125*c,0,0,"#",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,
null,0,0,0);a.roundrect(.5115*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5503*b,.125*c,0,0,"%",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6121*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6509*b,.125*c,0,0,"^",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7126*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7514*b,.125*c,0,0,"*",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8132*
b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.852*b,.125*c,0,0,"+",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.9138*b,.03*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9526*b,.125*c,0,0,"=",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.0086*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0474*b,.375*c,0,0,"_",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1092*b,.28*c,.0776*b,.19*c,rSizeX,
rSizeY);a.fill();a.text(.148*b,.375*c,0,0,"\\",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2098*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.2486*b,.375*c,0,0,"|",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3103*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3491*b,.375*c,0,0,"~",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4109*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.4497*
b,.375*c,0,0,"<",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5115*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5503*b,.375*c,0,0,">",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.6121*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6509*b,.375*c,0,0,String.fromCharCode(128),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.7126*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7514*b,.375*
c,0,0,String.fromCharCode(163),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.8132*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.852*b,.375*c,0,0,String.fromCharCode(165),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.9138*b,.28*c,.0776*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.9526*b,.375*c,0,0,String.fromCharCode(149),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.1638*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);
a.fill();a.text(.2227*b,.625*c,0,0,".",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.3046*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.3635*b,.625*c,0,0,",",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.4454*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.5043*b,.625*c,0,0,"?",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.5862*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.6451*b,.625*
c,0,0,"!",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.727*b,.53*c,.1178*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.7859*b,.625*c,0,0,"'",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.roundrect(.2644*b,.78*c,.4799*b,.19*c,rSizeX,rSizeY);a.fill();a.setFontColor("#666666");a.text(.5043*b,.875*c,0,0,"space",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setGradient("#8B98A8","#677488",.0115*b,.53*c,.1207*b,.19*c,mxConstants.DIRECTION_SOUTH,
1,1);a.setFontColor("#ffffff");a.roundrect(.0115*b,.53*c,.1207*b,.19*c,rSizeX,rSizeY);a.fill();a.roundrect(.8736*b,.53*c,.115*b,.19*c,rSizeX,rSizeY);a.fill();a.roundrect(.0115*b,.78*c,.2299*b,.19*c,rSizeX,rSizeY);a.fill();a.roundrect(.7672*b,.78*c,.2213*b,.19*c,rSizeX,rSizeY);a.fill();a.text(.0718*b,.625*c,0,0,"123",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1264*b,.875*c,0,0,"ABC",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8779*b,.875*c,0,
0,"return",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setShadow(!1);a.setLineJoin("round");a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.setStrokeWidth(1.5);a.begin();a.moveTo(.9109*b,.585*c);a.lineTo(.9655*b,.585*c);a.lineTo(.9655*b,.665*c);a.lineTo(.9109*b,.665*c);a.lineTo(.8879*b,.625*c);a.close();a.fillAndStroke();a.setStrokeColor("#677488");a.begin();a.moveTo(.9224*b,.605*c);a.lineTo(.9454*b,.645*c);a.moveTo(.9224*b,.645*c);a.lineTo(.9454*b,.605*c);a.stroke()};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IKEYB_SYMBOLS,mxShapeMockupiKeybSymbols);function mxShapeMockupiDeleteApp(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiDeleteApp,mxShape);mxShapeMockupiDeleteApp.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"").toString();a.translate(d,e);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupiDeleteApp.prototype.background=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"").toString();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"").toString();a.setGradient(d,e,0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor(f);a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiDeleteApp.prototype.foreground=function(a,d,e,b,c){a.setStrokeWidth(2.5);a.begin();a.moveTo(.3*b,.3*c);a.lineTo(.7*b,.7*c);a.moveTo(.3*b,.7*c);a.lineTo(.7*b,.3*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IDELETE_APP,mxShapeMockupiDeleteApp);function mxShapeMockupiDirection(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiDirection,mxShape);
mxShapeMockupiDirection.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeMockupiDirection.prototype.background=function(a,d,e,b,c){a.setStrokeWidth(.5);a.setStrokeColor("#008cff");a.ellipse(0,0,b,c);a.stroke()};
mxShapeMockupiDirection.prototype.foreground=function(a,d,e,b,c){a.setAlpha(1);a.setGradient("#ffffff","#ffffff",.29*b,.2*c,.42*b,.3*c,mxConstants.DIRECTION_NORTH,1,0);a.begin();a.moveTo(.29*b,.2*c);a.lineTo(.5*b,.5*c);a.lineTo(.71*b,.2*c);a.fillAndStroke();a.setStrokeColor("#006cdf");a.setGradient("#ffffff","#007cef",.47*b,.47*c,.06*b,.06*c,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(1);a.ellipse(.47*b,.47*c,.06*b,.06*c);a.fillAndStroke();a.setFillColor("#ffffff");a.setAlpha(.8);a.ellipse(.4825*
b,.4825*c,.015*b,.015*c);a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IDIRECTION,mxShapeMockupiDirection);function mxShapeMockupiLocationBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiLocationBar,mxShape);
mxShapeMockupiLocationBar.prototype.customProperties=[{name:"buttonText",dispName:"Text",type:"string"},{name:"barPos",dispName:"Callout Position",type:"float",min:0,defVal:80},{name:"pointerPos",dispName:"Callout Orientation",type:"enum",enumList:[{val:"bottom",dispName:"Bottom"},{val:"top",dispName:"Top"}]}];mxShapeMockupiLocationBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupiLocationBar.prototype.background=function(a,d,e,b,c){e=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");e=Math.min(e,100);e=Math.max(e,0);d=mxUtils.getValue(this.style,mxMockupC.POINTER_POS,mxMockupC.POINTER_BOTTOM);e=10+(b-20)*e/100;a.setStrokeWidth(.5);a.setStrokeColor("#000000");a.setAlpha(.7);a.begin();d===mxMockupC.POINTER_BOTTOM?(a.setGradient("#000000","#888888",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1),a.moveTo(0,2.5),a.arcTo(2.5,2.5,0,0,1,2.5,0),a.lineTo(b-2.5,0),a.arcTo(2.5,
2.5,0,0,1,b,2.5),a.lineTo(b,c-2.5-7.5),a.arcTo(2.5,2.5,0,0,1,b-2.5,c-7.5),a.lineTo(e+7.5,c-7.5),a.lineTo(e,c),a.lineTo(e-7.5,c-7.5),a.lineTo(2.5,c-7.5),a.arcTo(2.5,2.5,0,0,1,0,c-2.5-7.5)):d===mxMockupC.POINTER_TOP&&(a.setGradient("#000000","#888888",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1),a.moveTo(0,10),a.arcTo(2.5,2.5,0,0,1,2.5,7.5),a.lineTo(e-7.5,7.5),a.lineTo(e,0),a.lineTo(e+7.5,7.5),a.lineTo(b-2.5,7.5),a.arcTo(2.5,2.5,0,0,1,b,10),a.lineTo(b,c-2.5),a.arcTo(2.5,2.5,0,0,1,b-2.5,c),a.lineTo(2.5,
c),a.arcTo(2.5,2.5,0,0,1,0,c-2.5));a.close();a.fillAndStroke()};
mxShapeMockupiLocationBar.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxMockupC.POINTER_POS,mxMockupC.POINTER_BOTTOM);e=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Some Location"));a.setAlpha(1);a.setFontColor("#ffffff");a.setFontSize(9.5);d===mxMockupC.POINTER_BOTTOM?(a.text(5,.5*(c-7.5),0,0,e,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),a.translate(b-20,.5*(c-7.5)-7.5)):(a.text(5,.5*(c+7.5),0,0,e,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0),a.translate(b-20,.5*(c+7.5)-7.5));c=b=15;a.setGradient("#8BbEff","#135Ec8",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeWidth(1.5);a.setStrokeColor("#ffffff");a.ellipse(0,0,b,c);a.fillAndStroke();a.setStrokeWidth(2.5);a.begin();a.moveTo(.4*b,.22*c);a.lineTo(.65*b,.5*c);a.lineTo(.4*b,.78*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ILOCATION_BAR,mxShapeMockupiLocationBar);
function mxShapeMockupiCallDialog(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCallDialog,mxShape);mxShapeMockupiCallDialog.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c,5);a.setShadow(!1);this.foreground(a,d,e,b,c,5)};
mxShapeMockupiCallDialog.prototype.background=function(a,d,e,b,c,f){a.setAlpha(.8);a.setStrokeColor("#888888");a.setStrokeWidth(1.5);a.setFillColor("#000000");a.roundrect(0,0,b,c,f,f);a.fillAndStroke()};
mxShapeMockupiCallDialog.prototype.foreground=function(a,d,e,b,c,f){a.begin();a.moveTo(.33*b,0);a.lineTo(.33*b,c);a.moveTo(.67*b,0);a.lineTo(.67*b,c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.setStrokeColor("#000000");a.setFillColor("#ffffff");a.setStrokeWidth(.5);a.roundrect(.1433*b,.104*c,.0417*b,.148*c,.02*b,.024*c);a.fill();a.begin();a.moveTo(.14*b,.188*c);a.lineTo(.14*b,.228*c);a.arcTo(.025*b,.03*c,0,0,0,.19*b,.228*c);a.lineTo(.19*b,.188*c);a.lineTo(.2*b,.188*c);a.lineTo(.2*b,.228*c);a.arcTo(.0367*
b,.044*c,0,0,1,.17*b,.27*c);a.lineTo(.17*b,.296*c);a.lineTo(.195*b,.296*c);a.lineTo(.195*b,.308*c);a.lineTo(.1367*b,.308*c);a.lineTo(.1367*b,.296*c);a.lineTo(.16*b,.296*c);a.lineTo(.16*b,.27*c);a.arcTo(.0367*b,.044*c,0,0,1,.13*b,.228*c);a.lineTo(.13*b,.188*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.1033*b,.108*c);a.lineTo(.24*b,.286*c);a.lineTo(.2317*b,.298*c);a.lineTo(.095*b,.12*c);a.close();a.fillAndStroke();a.rect(.44*b,.128*c,.033*b,.04*c);a.fill();a.rect(.485*b,.128*c,.033*b,.04*c);a.fill();
a.rect(.53*b,.128*c,.033*b,.04*c);a.fill();a.rect(.44*b,.186*c,.033*b,.04*c);a.fill();a.rect(.485*b,.186*c,.033*b,.04*c);a.fill();a.rect(.53*b,.186*c,.033*b,.04*c);a.fill();a.rect(.44*b,.244*c,.033*b,.04*c);a.fill();a.rect(.485*b,.244*c,.033*b,.04*c);a.fill();a.rect(.53*b,.244*c,.033*b,.04*c);a.fill();a.begin();a.moveTo(.7567*b,.18*c);a.lineTo(.785*b,.18*c);a.lineTo(.825*b,.128*c);a.lineTo(.825*b,.28*c);a.lineTo(.79*b,.234*c);a.lineTo(.7567*b,.234*c);a.close();a.fill();a.setStrokeWidth(1.5);a.setStrokeColor("#ffffff");
a.begin();a.moveTo(.8383*b,.16*c);a.arcTo(.0533*b,.064*c,0,0,1,.8383*b,.252*c);a.moveTo(.8583*b,.134*c);a.arcTo(.0817*b,.098*c,0,0,1,.8583*b,.276*c);a.moveTo(.8767*b,.11*c);a.arcTo(.1133*b,.136*c,0,0,1,.8767*b,.304*c);a.stroke();a.begin();a.moveTo(.1467*b,.62*c);a.lineTo(.1833*b,.62*c);a.lineTo(.1833*b,.676*c);a.lineTo(.2267*b,.676*c);a.lineTo(.2267*b,.724*c);a.lineTo(.1833*b,.724*c);a.lineTo(.1833*b,.78*c);a.lineTo(.1467*b,.78*c);a.lineTo(.1467*b,.724*c);a.lineTo(.105*b,.724*c);a.lineTo(.105*b,.676*
c);a.lineTo(.1467*b,.676*c);a.close();a.fill();a.rect(.4517*b,.624*c,.0333*b,.152*c);a.fill();a.rect(.5183*b,.624*c,.0333*b,.152*c);a.fill();a.begin();a.moveTo(.76*b,.752*c);a.arcTo(.1*b,.12*c,0,0,1,.8033*b,.728*c);a.arcTo(.0167*b,.02*c,0,0,0,.8167*b,.712*c);a.lineTo(.8175*b,.7*c);a.arcTo(.0267*b,.06*c,0,0,1,.8067*b,.644*c);a.arcTo(.0287*b,.0344*c,0,0,1,.8633*b,.644*c);a.arcTo(.0267*b,.06*c,0,0,1,.855*b,.7*c);a.arcTo(.05*b,.724*c,0,0,1,.8633*b,.724*c);a.arcTo(.1667*b,.75*c,0,0,1,.9083*b,.75*c);a.lineTo(.9083*
b,.78*c);a.lineTo(.76*b,.78*c);a.close();a.fill();a.setFontColor("#ffffff");a.setFontSize(8.5);a.text(.1667*b,.35*c,0,0,"mute",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.35*c,0,0,"keypad",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.35*c,0,0,"speaker",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.85*c,0,0,"add",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.85*c,0,0,
"pause",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.85*c,0,0,"contacts",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setGradient("#808080","#ffffff",0,0,b,.308*c,mxConstants.DIRECTION_NORTH,1,1);a.setAlpha(.4);a.begin();a.moveTo(0,.308*c);a.lineTo(0,f);a.arcTo(f,f,0,0,1,f,0);a.lineTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,.308*c);a.arcTo(1.5*b,1.8*c,0,0,1,0,.308*c);a.close();a.fill()};
mxCellRenderer.registerShape(mxMockupC.SHAPE_ICALL_DIALOG,mxShapeMockupiCallDialog);function mxShapeMockupiCallButtons(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCallButtons,mxShape);mxShapeMockupiCallButtons.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupiCallButtons.prototype.background=function(a,d,e,b,c){a.setStrokeWidth(.5);a.setStrokeColor("#008cff");a.setGradient("#0F1B2B","#4F5B6B",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1);a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeMockupiCallButtons.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(0,.1667*c);a.lineTo(b,.1667*c);a.moveTo(0,.3333*c);a.lineTo(b,.3333*c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(0,.6667*c);a.lineTo(b,.6667*c);a.moveTo(0,.8333*c);a.lineTo(b,.8333*c);a.moveTo(.3333*b,.1667*c);a.lineTo(.3333*b,c);a.moveTo(.6667*b,.1667*c);a.lineTo(.6667*b,c);a.stroke();a.setFontSize(15.5);a.setFontColor("#ffffff");a.setFontStyle(mxConstants.FONT_BOLD);a.text(.5*b,.0834*c,0,0,"(123) 456-7890",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.22*c,0,0,"1",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.22*c,0,0,"2",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.22*c,0,0,"3",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.3867*c,0,0,"3",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.3867*c,0,0,"4",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);
a.text(.8333*b,.3867*c,0,0,"5",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.5534*c,0,0,"6",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.5534*c,0,0,"7",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.5534*c,0,0,"8",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(27.5);a.text(.1667*b,.76*c,0,0,"*",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontSize(15.5);
a.text(.5*b,.72*c,0,0,"0",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.75*c,0,0,"#",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setGradient("#E2FFEB","#008215",.3333*b,.8333*c,.3333*b,.1667*c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(.3333*b,.8333*c,.3333*b,.1667*c);a.fillAndStroke();a.text(.5*b,.9168*c,0,0,"Call",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontStyle(0);a.setFontSize(8);a.setFontColor("#bbbbbb");a.text(.5*
b,.28*c,0,0,"ABC",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.28*c,0,0,"DEF",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.4467*c,0,0,"GHI",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.4467*c,0,0,"JKL",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.4467*c,0,0,"MNO",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.1667*b,.6134*c,0,0,"PQRS",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.6134*c,0,0,"TUV",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.8333*b,.6134*c,0,0,"WXYZ",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.78*c,0,0,"+",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFillColor("#ffffff");a.begin();a.moveTo(.1028*b,.9464*c);a.arcTo(.0862*b,.0652*c,0,0,1,.1402*b,.9333*c);a.arcTo(.0144*b,.0109*c,0,0,0,.1517*b,.9246*c);a.lineTo(.1524*b,.9181*c);
a.arcTo(.023*b,.0326*c,0,0,1,.143*b,.8877*c);a.arcTo(.0247*b,.0187*c,0,0,1,.1919*b,.8877*c);a.arcTo(.023*b,.0326*c,0,0,1,.1847*b,.9181*c);a.arcTo(.0431*b,.0174*c,0,0,0,.1919*b,.9311*c);a.arcTo(.1437*b,.1087*c,0,0,1,.2307*b,.9453*c);a.lineTo(.2307*b,.9616*c);a.lineTo(.1028*b,.9616*c);a.close();a.fill();a.setStrokeColor("#ffffff");a.setStrokeWidth(2.5);a.setLineJoin("round");a.begin();a.moveTo(.79*b,.89*c);a.lineTo(.9*b,.89*c);a.lineTo(.9*b,.95*c);a.lineTo(.79*b,.95*c);a.lineTo(.76*b,.92*c);a.close();
a.fillAndStroke();a.setStrokeColor("#0F1B2B");a.begin();a.moveTo(.82*b,.907*c);a.lineTo(.85*b,.933*c);a.moveTo(.82*b,.933*c);a.lineTo(.85*b,.907*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICALL_BUTTONS,mxShapeMockupiCallButtons);function mxShapeMockupiOption(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiOption,mxShape);
mxShapeMockupiOption.prototype.customProperties=[{name:"buttonText",dispName:"Text",type:"string"},{name:"barPos",dispName:"Callout Position",type:"float",min:0,defVal:80},{name:"pointerPos",dispName:"Callout Orientation",type:"enum",enumList:[{val:"bottom",dispName:"Bottom"},{val:"top",dispName:"Top"}]}];mxShapeMockupiOption.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeMockupiOption.prototype.background=function(a,d,e,b,c){e=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");e=Math.min(e,100);e=Math.max(e,0);d=mxUtils.getValue(this.style,mxMockupC.POINTER_POS,mxMockupC.POINTER_BOTTOM);e=10+(b-20)*e/100;a.setStrokeWidth(.5);a.setStrokeColor("#000000");a.setAlpha(.9);a.begin();d===mxMockupC.POINTER_BOTTOM?(a.setGradient("#000000","#888888",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1),a.moveTo(0,2.5),a.arcTo(2.5,2.5,0,0,1,2.5,0),a.lineTo(b-2.5,0),a.arcTo(2.5,2.5,
0,0,1,b,2.5),a.lineTo(b,c-2.5-7.5),a.arcTo(2.5,2.5,0,0,1,b-2.5,c-7.5),a.lineTo(e+7.5,c-7.5),a.lineTo(e,c),a.lineTo(e-7.5,c-7.5),a.lineTo(2.5,c-7.5),a.arcTo(2.5,2.5,0,0,1,0,c-2.5-7.5)):d===mxMockupC.POINTER_TOP&&(a.setGradient("#000000","#888888",0,0,b,c,mxConstants.DIRECTION_NORTH,1,1),a.moveTo(0,10),a.arcTo(2.5,2.5,0,0,1,2.5,7.5),a.lineTo(e-7.5,7.5),a.lineTo(e,0),a.lineTo(e+7.5,7.5),a.lineTo(b-2.5,7.5),a.arcTo(2.5,2.5,0,0,1,b,10),a.lineTo(b,c-2.5),a.arcTo(2.5,2.5,0,0,1,b-2.5,c),a.lineTo(2.5,c),a.arcTo(2.5,
2.5,0,0,1,0,c-2.5));a.close();a.fillAndStroke()};
mxShapeMockupiOption.prototype.foreground=function(a,d,e,b,c){d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"Some Location"));e=mxUtils.getValue(this.style,mxMockupC.POINTER_POS,mxMockupC.POINTER_BOTTOM);a.setAlpha(1);a.setFontColor("#ffffff");a.setFontSize(9.5);e===mxMockupC.POINTER_BOTTOM?a.text(.5*b,.5*(c-7.5),0,0,d,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):a.text(.5*b,.5*(c+7.5),0,0,d,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IOPTION,mxShapeMockupiOption);function mxShapeMockupiAlphaList(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiAlphaList,mxShape);
mxShapeMockupiAlphaList.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);d=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8");a.setFontColor("#999999");a.setFontSize(d);a.text(.5*b,.069*c,0,0,"A",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.1035*c,0,0,"B",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.138*c,0,0,"C",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.1725*
c,0,0,"D",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.207*c,0,0,"E",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.2415*c,0,0,"F",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.276*c,0,0,"G",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.3105*c,0,0,"H",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.345*c,0,0,"I",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.text(.5*b,.3795*c,0,0,"J",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.414*c,0,0,"K",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.4485*c,0,0,"L",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.483*c,0,0,"M",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.5175*c,0,0,"N",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.552*c,0,0,"O",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.5865*c,0,0,"P",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.621*c,0,0,"Q",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.6555*c,0,0,"R",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.69*c,0,0,"S",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.7245*c,0,0,"T",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*
b,.759*c,0,0,"U",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.7935*c,0,0,"V",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.828*c,0,0,"W",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.8625*c,0,0,"X",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.897*c,0,0,"Y",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.text(.5*b,.9315*c,0,0,"Z",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);a.text(.5*b,.966*c,0,0,"#",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor("#999999");a.ellipse(.5*b-2.25,.0345*c-3.5,4.5,4.5);a.stroke();a.begin();a.moveTo(.5*b-4.25,.0345*c+3);a.lineTo(.5*b-1.75,.0345*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IALPHA_LIST,mxShapeMockupiAlphaList);function mxShapeMockupiHorButtonBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiHorButtonBar,mxShape);mxShapeMockupiHorButtonBar.prototype.customProperties=[{name:"buttonText",dispName:"Labels",type:"string"},{name:"textColor",dispName:"Text Color",type:"color"},{name:"textColor2",dispName:"Text2 Color",type:"color"},{name:"strokeColor2",dispName:"Stroke2 Color",type:"color"}];
mxShapeMockupiHorButtonBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"+Button 1, Button 2, Button 3").toString()).split(","),g=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR,"#666666"),h=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR2,"#ffffff"),k=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8.5").toString(),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#666666"),m=mxUtils.getValue(this.style,
mxMockupC.STYLE_STROKECOLOR2,"#c4c4c4"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),p=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"#008cff"),q=f.length,t=Array(q),u=0,v=-1,r=0;r<q;r++){var w=f[r];w.charAt(0)===mxMockupC.SELECTED&&(w=f[r].substring(1),v=r);t[r]=mxUtils.getSizeForString(w,k,mxConstants.DEFAULT_FONTFAMILY).width;u+=t[r]}c=Math.max(c,1.5*k,10);u=5*q+u;b=Math.max(b,u);a.translate(d,e);this.background(a,b,c,2.5,q,t,2.5,u,l,m,n,p,v);a.setShadow(!1);for(r=
d=0;r<q;r++)r===v?a.setFontColor(h):a.setFontColor(g),d+=2.5,this.buttonText(a,d,c,f[r],t[r],k,u,b),d=d+t[r]+2.5};
mxShapeMockupiHorButtonBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n,p){a.begin();a.setStrokeColor(k);a.setFillColor(m);a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.fillAndStroke();a.setStrokeColor(l);a.begin();for(l=1;l<c;l++)if(l!==p&&l!==p+1){for(var q=n=0;q<l;q++)n+=f[q]+2*g;n=n*d/h;a.moveTo(n,0);a.lineTo(n,e)}a.stroke();n=0;a.setStrokeColor(mxConstants.NONE);
for(l=0;l<p;l++)n+=f[l]+2*g;n=n*d/h;f=(f[p]+2*g)*d/h;f+=n;0===p?(a.setGradient("#5D7585","#008cff",0,0,f,e,mxConstants.DIRECTION_SOUTH,1,1),a.begin(),a.moveTo(0,b),a.arcTo(b,b,0,0,1,b,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(b,e),a.arcTo(b,b,0,0,1,0,e-b),a.close(),a.fill()):p===c-1?(a.setGradient("#5D7585","#008cff",n,0,f-n,e,mxConstants.DIRECTION_SOUTH,1,1),a.begin(),a.moveTo(n,0),a.lineTo(f-b,0),a.arcTo(b,b,0,0,1,f,b),a.lineTo(f,e-b),a.arcTo(b,b,0,0,1,f-b,e),a.lineTo(n,e),a.close(),a.fill()):-1!==
p&&(a.setGradient("#5D7585","#008cff",n,0,f-n,e,mxConstants.DIRECTION_SOUTH,1,1),a.begin(),a.moveTo(n,0),a.lineTo(f,0),a.lineTo(f,e),a.lineTo(n,e),a.close(),a.fill());a.setStrokeColor(k);a.setFillColor(m);a.begin();a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(b,e);a.arcTo(b,b,0,0,1,0,e-b);a.close();a.stroke()};
mxShapeMockupiHorButtonBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxMockupC.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IHOR_BUTTON_BAR,mxShapeMockupiHorButtonBar);function mxShapeMockupiPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiPin,mxShape);
mxShapeMockupiPin.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"fillColor3",dispName:"Fill3 Color",type:"color"}];
mxShapeMockupiPin.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"#000000"),g=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR3,"#000000"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setShadow(!1);a.translate(d,e);a.setStrokeWidth(1.5);a.setStrokeColor("#666666");a.begin();a.moveTo(.5*b,.4*c);a.lineTo(.5*b,c);a.stroke();a.setStrokeWidth(1);a.setStrokeColor(h);a.setGradient(f,g,0,0,b,.4*c,mxConstants.DIRECTION_SOUTH,
1,1);a.setAlpha(.9);a.ellipse(0,0,b,.4*c);a.fillAndStroke();a.setFillColor("#ffffff");a.setAlpha(.5);a.ellipse(.2*b,.08*c,.3*b,.12*c);a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IPIN,mxShapeMockupiPin);function mxShapeMockupiVideoControls(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiVideoControls,mxShape);
mxShapeMockupiVideoControls.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:20}];mxShapeMockupiVideoControls.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setStrokeWidth(1);a.setFillColor("#000000");a.setStrokeColor("#bbbbbb");a.setAlpha(.7);a.roundrect(0,0,b,c,5,5);a.fillAndStroke();a.setShadow(!1);this.foreground(a,b,c,5)};
mxShapeMockupiVideoControls.prototype.foreground=function(a,d,e,b){a.setGradient("#ffffff","#ffffff",0,0,d,.5*e,mxConstants.DIRECTION_SOUTH,.8,.1);a.begin();a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,.5*e);a.lineTo(0,.5*e);a.close();a.fill();a.setAlpha(1);a.setFillColor("#ffffff");a.setStrokeColor("#ffffff");var c=.1*d,f=.35*e;a.begin();a.moveTo(c-7.5,f-2.5);a.arcTo(6,6,0,0,1,c,f-2.5);a.arcTo(6,6,0,0,1,c+7.5,f-2.5);a.lineTo(c+7.5,f+4);a.arcTo(6,6,0,0,0,
c,f+4);a.arcTo(6,6,0,0,0,c-7.5,f+4);a.close();a.stroke();a.begin();a.moveTo(c,f-2.5);a.lineTo(c,f+4);a.stroke();c=.3*d;a.rect(c-7.5,f-5,1,10);a.fill();a.begin();a.moveTo(c-6.5,f);a.lineTo(c+.5,f-5);a.lineTo(c+.5,f+5);a.close();a.fill();a.begin();a.moveTo(c+.5,f);a.lineTo(c+7.5,f-5);a.lineTo(c+7.5,f+5);a.close();a.fill();c=.5*d;a.begin();a.moveTo(c-6,f-5);a.lineTo(c+6,f);a.lineTo(c-6,f+5);a.close();a.fill();c=.7*d;a.begin();a.moveTo(c-7.5,f-5);a.lineTo(c-.5,f);a.lineTo(c-7.5,f+5);a.close();a.fill();
a.begin();a.moveTo(c-.5,f-5);a.lineTo(c+6.5,f);a.lineTo(c-.5,f+5);a.close();a.fill();a.rect(c+6.5,f-5,1,10);a.fill();c=.9*d;a.rect(c-7.5,f-4,15,8);a.stroke();a.setStrokeWidth(.5);a.begin();a.moveTo(c-7.5,f-4);a.lineTo(c,f+1.5);a.lineTo(c+7.5,f-4);a.stroke();a.begin();a.moveTo(c-7.5,f+4);a.lineTo(c-2,f);a.stroke();a.begin();a.moveTo(c+7.5,f+4);a.lineTo(c+2,f);a.stroke();a.setGradient("#444444","#ffffff",.1*d,.75*e-2.5,.8*d,5,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(.1*d,.75*e-2.5,.8*d,5,2.5,2.5);
a.fill();c=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");c=Math.min(c,100);c=Math.max(c,0);f=.1*d;c=f+(d-2*f)*c/100;a.setGradient("#96D1FF","#003377",.1*d,.75*e-5,c-.1*d,10,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(c,.75*e-2.5);a.lineTo(c,.75*e+2.5);a.lineTo(.1*d+2.5,.75*e+2.5);a.arcTo(2.5,2.5,0,0,1,.1*d+2.5,.75*e-2.5);a.close();a.fill();a.setStrokeColor("#999999");a.setGradient("#444444","#ffffff",c-5,.75*e-5,10,10,mxConstants.DIRECTION_NORTH,1,1);a.ellipse(c-5,.75*e-5,10,10);a.fillAndStroke();
a.setStrokeColor("#dddddd");a.roundrect(0,0,d,e,b,b);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IVIDEO_CONTROLS,mxShapeMockupiVideoControls);
Graph.handleFactory[mxMockupC.SHAPE_IVIDEO_CONTROLS]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",40))));return new mxPoint(d.x+.1*d.width+e*d.width*.8/100,d.y+.75*d.height)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-.1*d.width-d.x)/(.8*d.width))))/100})]};
function mxShapeMockupiURLBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiURLBar,mxShape);mxShapeMockupiURLBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setGradient("#cccccc","#003377",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill();a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupiURLBar.prototype.foreground=function(a,d,e){a.setStrokeWidth(.5);a.setFillColor("#ffffff");a.setStrokeColor("#008cff");a.roundrect(.0287*d,.625*e-6.25,.7184*d,12.5,6.25,6.25);a.fillAndStroke();a.setGradient("#cccccc","#001144",.7816*d,.625*e-6.25,.1868*d,12.5,mxConstants.DIRECTION_SOUTH,1,1);a.setStrokeColor("#000000");a.roundrect(.7816*d,.625*e-6.25,.1868*d,12.5,2.5,2.5);a.fillAndStroke();a.setFillColor("#bbbbbb");a.ellipse(.7471*d-11.5,.625*e-5,10,10);a.fill();a.setStrokeColor("#ffffff");
a.setStrokeWidth(1.5);a.begin();a.moveTo(.7471*d-8.5,.625*e-2.5);a.lineTo(.7471*d-3.5,.625*e+2.5);a.moveTo(.7471*d-8.5,.625*e+2.5);a.lineTo(.7471*d-3.5,.625*e-2.5);a.stroke();var b=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,"").toString()).split(",");a.setFontColor("#425664");a.setFontStyle(mxConstants.FONT_BOLD);a.setFontSize(8);a.text(.5*d,.2*e,0,0,b[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontColor("#000000");a.text(.06*d,.625*e,0,0,b[1],
mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFontColor("#ffffff");a.text(.875*d,.625*e,0,0,b[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_IURL_BAR,mxShapeMockupiURLBar);function mxShapeMockupiSlider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiSlider,mxShape);
mxShapeMockupiSlider.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:20}];mxShapeMockupiSlider.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupiSlider.prototype.foreground=function(a,d,e){a.setStrokeWidth(.5);a.setGradient("#444444","#ffffff",0,.5*e-2.5,d,5,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(0,.5*e-2.5,d,5,2.5,2.5);a.fill();var b=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");b=Math.min(b,100);b=Math.max(b,0);d=(d-0)*b/100;a.setGradient("#96D1FF","#003377",2.5,.5*e-2.5,d-2.5,5,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(d,.5*e-2.5);a.lineTo(d,.5*e+2.5);a.lineTo(2.5,.5*e+2.5);a.arcTo(2.5,2.5,0,0,1,2.5,
.5*e-2.5);a.close();a.fill();a.setStrokeColor("#999999");a.setGradient("#444444","#ffffff",d-5,.5*e-5,10,10,mxConstants.DIRECTION_NORTH,1,1);a.ellipse(d-5,.5*e-5,10,10);a.fillAndStroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ISLIDER,mxShapeMockupiSlider);
Graph.handleFactory[mxMockupC.SHAPE_ISLIDER]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};function mxShapeMockupiProgressBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeMockupiProgressBar,mxShape);mxShapeMockupiProgressBar.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:40}];mxShapeMockupiProgressBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupiProgressBar.prototype.foreground=function(a,d,e){a.setStrokeWidth(.5);a.setGradient("#444444","#ffffff",0,.5*e-2.5,d,5,mxConstants.DIRECTION_SOUTH,1,1);a.roundrect(0,.5*e-2.5,d,5,2.5,2.5);a.fill();var b=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");b=Math.min(b,100);b=Math.max(b,0);d=(d-0)*b/100;a.setGradient("#96D1FF","#003377",2.5,.5*e-2.5,d-2.5,5,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(d,.5*e-2.5);a.arcTo(2.5,2.5,0,0,1,d,.5*e+2.5);a.lineTo(2.5,.5*e+2.5);a.arcTo(2.5,
2.5,0,0,1,2.5,.5*e-2.5);a.close();a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IPROGRESS_BAR,mxShapeMockupiProgressBar);Graph.handleFactory[mxMockupC.SHAPE_IPROGRESS_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeMockupiCloudProgressBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCloudProgressBar,mxShape);mxShapeMockupiCloudProgressBar.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:20}];mxShapeMockupiCloudProgressBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupiCloudProgressBar.prototype.foreground=function(a,d,e){a.setStrokeWidth(.5);a.setFillColor("#5C6E86");a.rect(0,.5*e-2.5,d,5);a.fill();var b=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");b=Math.min(b,100);b=Math.max(b,0);d=(d-0)*b/100;a.setFillColor("#8AD155");a.rect(0,.5*e-2.5,d,5);a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICLOUD_PROGRESS_BAR,mxShapeMockupiCloudProgressBar);
Graph.handleFactory[mxMockupC.SHAPE_ICLOUD_PROGRESS_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeMockupiDownloadBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiDownloadBar,mxShape);mxShapeMockupiDownloadBar.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:30}];
mxShapeMockupiDownloadBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setGradient("#00ccff","#0066cc",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.rect(0,0,b,c);a.fill();a.setShadow(!1);this.foreground(a,b,c)};
mxShapeMockupiDownloadBar.prototype.foreground=function(a,d,e){var b=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,""));a.setFontColor("#ffffff");a.setFontStyle(mxConstants.FONT_BOLD);a.setFontSize(8);a.text(.5*d,.2*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);var c=mxUtils.getValue(this.style,mxMockupC.BAR_POS,"80");c=Math.min(c,100);c=Math.max(c,0);b=.1*d;c=b+(d-2*b)*c/100;a.setStrokeWidth(.5);a.setGradient("#96D1FF","#003377",b,.65*e-2.5,d-2*b,
5,mxConstants.DIRECTION_NORTH,1,1);a.roundrect(b,.65*e-2.5,d-2*b,5,2.5,2.5);a.fill();a.setGradient("#aaaaaa","#ffffff",b+2.5,.65*e-2.5,c-b-2.5,5,mxConstants.DIRECTION_NORTH,1,1);a.begin();a.moveTo(c,.65*e-2.5);a.arcTo(2.5,2.5,0,0,1,c,.65*e+2.5);a.lineTo(b+2.5,.65*e+2.5);a.arcTo(2.5,2.5,0,0,1,b+2.5,.65*e-2.5);a.close();a.fill()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IDOWNLOAD_BAR,mxShapeMockupiDownloadBar);
Graph.handleFactory[mxMockupC.SHAPE_IDOWNLOAD_BAR]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",40))));return new mxPoint(d.x+.1*d.width+e*d.width*.8/100,d.y+.65*d.height)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-.1*d.width-d.x)/(.8*d.width))))/100})]};
function mxShapeMockupiScreenNameBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiScreenNameBar,mxShape);mxShapeMockupiScreenNameBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setStrokeWidth(.5);d=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"#00ff00");a.setFillColor(d);a.rect(0,0,b,c);a.fill();a.setShadow(!1);this.foreground(a,b,c,5)};
mxShapeMockupiScreenNameBar.prototype.foreground=function(a,d,e,b){b=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR3,"#00ff00");a.setGradient(b,b,0,0,d,.5*e,mxConstants.DIRECTION_SOUTH,.8,.1);a.rect(0,0,d,.5*e);a.fill();b=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,""));var c=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR,"#00ff00");a.setFontColor(c);a.setFontSize(9.5);a.text(.5*d,.45*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxMockupC.SHAPE_ISCREEN_NAME_BAR,mxShapeMockupiScreenNameBar);function mxShapeMockupiIconGrid(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiIconGrid,mxShape);mxShapeMockupiIconGrid.prototype.customProperties=[{name:"gridSize",dispName:"Grid Size",type:"string"}];
mxShapeMockupiIconGrid.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.GRID_SIZE,"3,3").toString()).split(",");this.background(a,b,c,d);a.setShadow(!1);this.foreground(a,b,c,d)};
mxShapeMockupiIconGrid.prototype.background=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#00ff00"),f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#00ff00");a.setStrokeColor(f);a.setFillColor(c);d/=parseInt(b[0],10)+.5*(b[0]-1);e/=parseInt(b[1],10)+.5*(b[1]-1);for(c=0;c<b[0];c++)for(f=0;f<b[1];f++)a.rect(1.5*d*c,1.5*e*f,d,e),a.fillAndStroke()};
mxShapeMockupiIconGrid.prototype.foreground=function(a,d,e,b){d/=parseInt(b[0],10)+.5*(b[0]-1);e/=parseInt(b[1],10)+.5*(b[1]-1);for(var c=0;c<b[0];c++)for(var f=0;f<b[1];f++)a.begin(),a.moveTo(1.5*d*c,1.5*e*f),a.lineTo(1.5*d*c+d,1.5*e*f+e),a.moveTo(1.5*d*c+d,1.5*e*f),a.lineTo(1.5*d*c,1.5*e*f+e),a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IICON_GRID,mxShapeMockupiIconGrid);
function mxShapeMockupiCopy(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCopy,mxShape);mxShapeMockupiCopy.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c,5);a.setShadow(!1);this.foreground(a,b,c,5)};
mxShapeMockupiCopy.prototype.background=function(a,d,e,b){a.begin();a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b-7.5);a.arcTo(b,b,0,0,1,d-b,e-7.5);a.lineTo(.5*d+7.5,e-7.5);a.lineTo(.5*d,e);a.lineTo(.5*d-7.5,e-7.5);a.lineTo(b,e-7.5);a.arcTo(b,b,0,0,1,0,e-b-7.5);a.close();a.fillAndStroke()};
mxShapeMockupiCopy.prototype.foreground=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR3,"#00ff00");a.setGradient(c,c,0,0,d,.5*e,mxConstants.DIRECTION_SOUTH,.8,.1);a.begin();a.moveTo(0,b);a.arcTo(b,b,0,0,1,b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,.5*(e-7.5));a.lineTo(0,.5*(e-7.5));a.close();a.fill();b=decodeURIComponent(mxUtils.getValue(this.style,mxMockupC.BUTTON_TEXT,""));c=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR,"#00ff00");a.setFontColor(c);
a.setFontSize(8.5);a.text(.5*d,.45*(e-7.5),0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICOPY,mxShapeMockupiCopy);function mxShapeMockupiCopyArea(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiCopyArea,mxShape);
mxShapeMockupiCopyArea.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c,5);a.setShadow(!1);this.foreground(a,b,c,5)};
mxShapeMockupiCopyArea.prototype.background=function(a,d,e,b){a.begin();a.moveTo(.5*d-20,0+b);a.arcTo(b,b,0,0,1,.5*d-20+b,0);a.lineTo(.5*d+20-b,0);a.arcTo(b,b,0,0,1,.5*d+20,b);a.lineTo(.5*d+20,20-b);a.arcTo(b,b,0,0,1,.5*d+20-b,20);a.lineTo(.5*d+7.5,20);a.lineTo(.5*d,27.5);a.lineTo(.5*d-7.5,20);a.lineTo(.5*d-20+b,20);a.arcTo(b,b,0,0,1,.5*d-20,20-b);a.close();a.fillAndStroke()};
mxShapeMockupiCopyArea.prototype.foreground=function(a,d,e,b){a.setAlpha(.3);a.setFillColor("#2266ff");a.rect(2.5,27.5,d-5,e-30);a.fill();a.setAlpha(1);27.5<e&&(a.setStrokeColor("#ffffff"),a.setGradient("#88ddff","#2266ff",.5*d-2.5,25,5,5,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(.5*d-2.5,25,5,5),a.fillAndStroke(),a.setGradient("#88ddff","#2266ff",.5*d-2.5,e-5,5,5,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(.5*d-2.5,e-5,5,5),a.fillAndStroke(),a.setGradient("#88ddff","#2266ff",0,.5*e+10,5,5,mxConstants.DIRECTION_SOUTH,
1,1),a.ellipse(0,.5*e+10,5,5),a.fillAndStroke(),a.setGradient("#88ddff","#2266ff",d-5,.5*e+10,5,5,mxConstants.DIRECTION_SOUTH,1,1),a.ellipse(d-5,.5*e+10,5,5),a.fillAndStroke());e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR2,"#00ff00");var c=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#00ff00");a.setFillColor(e);a.setStrokeColor(c);a.begin();a.moveTo(.5*d-20,0+b);a.arcTo(b,b,0,0,1,.5*d-20+b,0);a.lineTo(.5*d+20-b,0);a.arcTo(b,b,0,0,1,.5*d+20,b);a.lineTo(.5*d+20,20-b);a.arcTo(b,
b,0,0,1,.5*d+20-b,20);a.lineTo(.5*d+7.5,20);a.lineTo(.5*d,27.5);a.lineTo(.5*d-7.5,20);a.lineTo(.5*d-20+b,20);a.arcTo(b,b,0,0,1,.5*d-20,20-b);a.close();a.fillAndStroke();e=mxUtils.getValue(this.style,mxMockupC.STYLE_FILLCOLOR3,"#00ff00");a.setGradient(e,e,.5*d-20,0,40,10,mxConstants.DIRECTION_SOUTH,.8,.1);a.begin();a.moveTo(.5*d-20,b);a.arcTo(b,b,0,0,1,.5*d-20+b,0);a.lineTo(.5*d+20-b,0);a.arcTo(b,b,0,0,1,.5*d+20,b);a.lineTo(.5*d+20,10);a.lineTo(.5*d-20,10);a.close();a.fill();b=decodeURIComponent(mxUtils.getValue(this.style,
mxMockupC.BUTTON_TEXT,""));e=mxUtils.getValue(this.style,mxMockupC.STYLE_TEXTCOLOR,"#00ff00");a.setFontColor(e);a.setFontSize(8.5);a.text(.5*d,8.75,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxMockupC.SHAPE_ICOPY_AREA,mxShapeMockupiCopyArea);function mxShapeMockupiHomePageControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiHomePageControl,mxShape);
mxShapeMockupiHomePageControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setStrokeColor(e);a.setFillColor(d);d=Math.min(.5*c,.05*b);a.ellipse(.35*b-d,.5*c-d,2*d,2*d);a.fill();a.ellipse(.65*b-d,.5*c-d,2*d,2*d);a.fill();a.ellipse(b-2*d,.5*c-d,2*d,2*d);a.fill();a.ellipse(.2*d,.5*c-.8*d,1.2*d,1.2*d);a.stroke();a.begin();a.moveTo(1.15*d,.5*c+
.25*d);a.lineTo(1.6*d,.5*c+.8*d);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IHOME_PAGE_CONTROL,mxShapeMockupiHomePageControl);function mxShapeMockupiPageControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiPageControl,mxShape);
mxShapeMockupiPageControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");var f=Math.min(.5*c,.05*b);a.setFillColor(e);a.ellipse(0,.5*c-f,2*f,2*f);a.fill();a.setFillColor(d);a.ellipse(.35*b-f,.5*c-f,2*f,2*f);a.fill();a.ellipse(.65*b-f,.5*c-f,2*f,2*f);a.fill();a.ellipse(b-2*f,.5*c-f,2*f,2*f);a.fill()};
mxCellRenderer.registerShape(mxMockupC.SHAPE_IPAGE_CONTROL,mxShapeMockupiPageControl);function mxShapeMockupiPad(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupiPad,mxShape);
mxShapeMockupiPad.prototype.customProperties=[{name:"bgStyle",dispName:"Background",type:"enum",enumList:[{val:"bgGreen",dispName:"Green"},{val:"bgWhite",dispName:"White"},{val:"bgGray",dispName:"Gray"},{val:"bgFlat",dispName:"Flat"},{val:"bgMap",dispName:"Map"},{val:"bgStriped",dispName:"Striped"}]}];mxShapeMockupiPad.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c,25);a.setShadow(!1);this.foreground(a,d,e,b,c,25)};
mxShapeMockupiPad.prototype.background=function(a,d,e,b,c,f){a.setFillColor("#000000");a.setStrokeColor("#000000");a.roundrect(0,0,b,c,f,f);a.fillAndStroke()};
mxShapeMockupiPad.prototype.foreground=function(a,d,e,b,c,f){a.setStrokeWidth(1.5);a.setStrokeColor("#999999");a.begin();a.setStrokeColor("none");a.setFillColor("#808080");a.setGradient("#808080","#000000",.325*b,0,.675*b,.5*c,mxConstants.DIRECTION_SOUTH,1,1);a.moveTo(.325*b,0);a.lineTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,.5*c);a.lineTo(.7*b,.5*c);a.close();a.fillAndStroke();a.begin();a.setFillColor("#1f2923");a.setStrokeColor("#18211b");a.setStrokeWidth(1);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,
"");e=mxUtils.getValue(this.style,mxMockupC.BG_STYLE,mxMockupC.BG_FLAT_GREEN);a.setStrokeWidth(1);if(e===mxMockupC.BG_FLAT_WHITE)a.setFillColor("#ffffff"),a.rect(.0928*b,.08*c,.8144*b,.816*c),a.fill();else if(e===mxMockupC.BG_FLAT_GREEN)a.setFillColor("#1f2923"),a.rect(.0928*b,.08*c,.8144*b,.816*c),a.fill();else if(e===mxMockupC.BG_FLAT_GRAY)a.setFillColor("#dddddd"),a.rect(.0928*b,.08*c,.8144*b,.816*c),a.fill();else if(e===mxMockupC.BG_FLAT_CUSTOM)a.setFillColor(d),a.rect(.0928*b,.08*c,.8144*b,.816*
c),a.fill();else if(e===mxMockupC.BG_STRIPED){d=b;e=c;a.translate(.0928*b,.08*c);b*=.8144;c*=.816;a.setFillColor("#5D7585");a.rect(0,0,b,c);a.fillAndStroke();a.setStrokeColor("#657E8F");var g=7;for(a.begin();g<b;)a.moveTo(g,0),a.lineTo(g,c),g+=7;a.stroke();a.setStrokeColor("#18211b");a.begin();a.rect(0,0,b,c);a.stroke();b=d;c=e;a.translate(.0928*-b,.08*-c)}else e===mxMockupC.BG_MAP&&(d=b,e=c,a.translate(.0928*b,.08*c),b*=.8144,c*=.816,a.setFillColor("#ffffff"),a.rect(0,0,b,c),a.fillAndStroke(),a.setFillColor("#96D1FF"),
a.setStrokeColor("#008cff"),a.setStrokeWidth(.5),a.begin(),a.moveTo(0,0),a.lineTo(.1171*b,0),a.lineTo(.1136*b,.0438*c),a.lineTo(.0993*b,.054*c),a.lineTo(0,.0446*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.1993*b,0),a.lineTo(.1914*b,.03884*c),a.lineTo(.1536*b,.0362*c),a.lineTo(.1586*b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.24*b,0),a.lineTo(.2257*b,.054*c),a.lineTo(.2414*b,.0674*c),a.lineTo(.4707*b,.0835*c),a.lineTo(.5264*b,.0906*c),a.lineTo(.6429*b,.0929*c),a.arcTo(.0857*b,.0536*
c,0,0,0,.7193*b,.0621*c),a.arcTo(.48*b,.2143*c,0,0,0,.7286*b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8*b,0),a.lineTo(.7886*b,.04554*c),a.arcTo(.0857*b,.0536*c,0,0,0,.8164*b,.0875*c),a.arcTo(.1429*b,.0893*c,0,0,0,.88*b,.1036*c),a.lineTo(b,.1112*c),a.lineTo(b,0),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.0933*c),a.lineTo(.08*b,.1036*c),a.lineTo(.1021*b,.1246*c),a.lineTo(.1007*b,.1768*c),a.lineTo(.0471*b,.2241*c),a.lineTo(0,.2527*c),a.close(),a.fillAndStroke(),a.ellipse(.1214*b,.0603*
c,.0843*b,.0576*c),a.fillAndStroke(),a.begin(),a.moveTo(.1293*b,.1924*c),a.lineTo(.1729*b,.142*c),a.lineTo(.1407*b,.1411*c),a.lineTo(.14*b,.1777*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4586*b,.1241*c),a.lineTo(.455*b,.1835*c),a.lineTo(.3893*b,.2246*c),a.lineTo(.2171*b,.1362*c),a.lineTo(.2171*b,.1308*c),a.lineTo(.2293*b,.1214*c),a.lineTo(.2857*b,.1174*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.5079*b,.1134*c),a.lineTo(.7307*b,.1223*c),a.lineTo(.7279*b,.1625*c),a.lineTo(.715*b,.1772*
c),a.lineTo(.6929*b,.1688*c),a.lineTo(.625*b,.1795*c),a.lineTo(.4779*b,.2835*c),a.lineTo(.395*b,.2299*c),a.lineTo(.4657*b,.1826*c),a.lineTo(.4707*b,.1223*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.1362*c),a.lineTo(.7643*b,.1237*c),a.lineTo(.7543*b,.1562*c),a.lineTo(.7643*b,.1585*c),a.lineTo(.9186*b,.2366*c),a.lineTo(b,.1732*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2079*b,.1545*c),a.lineTo(.3886*b,.2536*c),a.lineTo(.3414*b,.2933*c),a.lineTo(.1743*b,.1969*c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(.1579*b,.2134*c),a.lineTo(.3221*b,.3067*c),a.lineTo(.2957*b,.3237*c),a.lineTo(.1157*b,.2424*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.405*b,.2656*c),a.lineTo(.31*b,.3353*c),a.lineTo(.3693*b,.3661*c),a.lineTo(.4571*b,.2982*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.7121*b,.1848*c),a.lineTo(.6879*b,.1754*c),a.lineTo(.6329*b,.1844*c),a.lineTo(.61*b,.2018*c),a.lineTo(.6207*b,.2085*c),a.lineTo(.4986*b,.2982*c),a.lineTo(.535*b,.3237*c),a.close(),a.fillAndStroke(),a.begin(),
a.moveTo(.5557*b,.3379*c),a.lineTo(.7464*b,.1826*c),a.lineTo(.8036*b,.2076*c),a.lineTo(.595*b,.3616*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8293*b,.2188*c),a.lineTo(.8979*b,.2509*c),a.lineTo(.6936*b,.4125*c),a.lineTo(.6171*b,.3737*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.2138*c),a.lineTo(.6821*b,.4603*c),a.lineTo(.815*b,.5277*c),a.lineTo(b,.4*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.317*c),a.lineTo(.0971*b,.2554*c),a.lineTo(.4121*b,.4143*c),a.lineTo(.3736*b,.4415*
c),a.lineTo(.315*b,.4076*c),a.lineTo(.3093*b,.4116*c),a.lineTo(.3686*b,.4455*c),a.lineTo(.285*b,.5045*c),a.lineTo(.1114*b,.4134*c),a.lineTo(.025*b,.4603*c),a.lineTo(.0371*b,.4723*c),a.lineTo(.1114*b,.4371*c),a.lineTo(.2871*b,.5312*c),a.lineTo(.1929*b,.6058*c),a.lineTo(.2271*b,.6705*c),a.lineTo(.17*b,.7147*c),a.lineTo(.0314*b,.6321*c),a.lineTo(0,.6246*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.48*b,.3121*c),a.lineTo(.5157*b,.3375*c),a.lineTo(.4314*b,.3982*c),a.lineTo(.3929*b,.3786*c),a.close(),
a.fillAndStroke(),a.begin(),a.moveTo(.3086*b,.5179*c),a.lineTo(.53*b,.3518*c),a.lineTo(.5757*b,.3745*c),a.lineTo(.3479*b,.5411*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.5964*b,.3884*c),a.lineTo(.6736*b,.4277*c),a.lineTo(.445*b,.5991*c),a.lineTo(.3664*b,.5531*c),a.lineTo(.5057*b,.4545*c),a.lineTo(.5507*b,.4754*c),a.lineTo(.5571*b,.4723*c),a.lineTo(.5114*b,.4504*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4793*b,.6161*c),a.lineTo(.6771*b,.4643*c),a.lineTo(.8086*b,.5326*c),a.lineTo(.7471*
b,.5817*c),a.lineTo(.7214*b,.567*c),a.lineTo(.715*b,.571*c),a.lineTo(.7421*b,.5871*c),a.lineTo(.6014*b,.6933*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.4371*c),a.lineTo(.8443*b,.546*c),a.lineTo(.9071*b,.5701*c),a.lineTo(b,.5022*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8407*b,.5504*c),a.lineTo(.8993*b,.5759*c),a.lineTo(.6757*b,.7416*c),a.lineTo(.6286*b,.7139*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.5321*c),a.lineTo(.6979*b,.7549*c),a.lineTo(.7457*b,.7781*c),a.lineTo(.9814*
b,.6094*c),a.lineTo(b,.6067*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(b,.6254*c),a.lineTo(.7664*b,.792*c),a.lineTo(.9586*b,.9062*c),a.lineTo(b,.8786*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.3093*b,.5464*c),a.lineTo(.4271*b,.6152*c),a.lineTo(.245*b,.7643*c),a.lineTo(.185*b,.7228*c),a.lineTo(.2493*b,.6728*c),a.lineTo(.2214*b,.6143*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.65*c),a.lineTo(.2179*b,.7826*c),a.lineTo(.1136*b,.8424*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,
.7272*c),a.lineTo(.0821*b,.859*c),a.lineTo(0,.9085*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4529*b,.6366*c),a.lineTo(.575*b,.7143*c),a.lineTo(.39*b,.8621*c),a.lineTo(.2657*b,.7902*c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(0,.9415*c),a.lineTo(.1036*b,.8821*c),a.lineTo(.2343*b,.959*c),a.lineTo(.1721*b,c),a.lineTo(0,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2586*b,.7951*c),a.lineTo(.3829*b,.8674*c),a.lineTo(.2543*b,.9451*c),a.lineTo(.1279*b,.8692*c),a.close(),a.fillAndStroke(),
a.begin(),a.moveTo(.2836*b,.9639*c),a.lineTo(.4207*b,.8772*c),a.lineTo(.605*b,.7321*c),a.lineTo(.6521*b,.7634*c),a.lineTo(.3486*b,c),a.lineTo(.3393*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.3879*b,c),a.lineTo(.6721*b,.7759*c),a.lineTo(.7171*b,.7982*c),a.lineTo(.4564*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.4986*b,c),a.lineTo(.7386*b,.8125*c),a.lineTo(.9307*b,.925*c),a.lineTo(.8264*b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.8671*b,c),a.lineTo(.9464*b,.9491*c),a.lineTo(b,
.975*c),a.lineTo(b,c),a.close(),a.fillAndStroke(),a.begin(),a.moveTo(.2295*b,c),a.lineTo(.2648*b,.9792*c),a.lineTo(.2981*b,c),a.close(),a.fillAndStroke(),b=d,c=e,a.translate(.0928*-b,.08*-c));a.setStrokeWidth(1);a.setStrokeColor("#18211b");a.rect(.0928*b,.08*c,.8144*b,.816*c);a.stroke();a.setStrokeWidth(1.5);a.setAlpha(.8);a.setStrokeColor("#dddddd");a.begin();a.moveTo(0,f);a.arcTo(f,f,0,0,1,f,0);a.lineTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,c-f);a.arcTo(f,f,0,0,1,b-f,c);a.lineTo(f,c);a.arcTo(f,
f,0,0,1,0,c-f);a.close();a.stroke();f=22.5;a.begin();a.setStrokeColor("#666666");a.begin();a.moveTo(2.5,2.5+f);a.arcTo(f,f,0,0,1,2.5+f,2.5);a.lineTo(b-f-5,2.5);a.arcTo(f,f,0,0,1,b-2.5,f+2.5);a.lineTo(b-2.5,c-f-2.5);a.arcTo(f,f,0,0,1,b-f-2.5,c-2.5);a.lineTo(f+2.5,c-2.5);a.arcTo(f,f,0,0,1,2.5,c-f-2.5);a.close();a.stroke();a.setAlpha(1);a.ellipse(.4948*b,.0444*c,.0103*b,.008*c);a.setStrokeWidth(2.5);a.setStrokeColor("#000000");a.setFillColor("#000099");a.fillAndStroke();a.setGradient("#bbbbbb","#000000",
.4588*b,.912*c,.0825*b,.064*c,mxConstants.DIRECTION_SOUTH,1,1);a.ellipse(.4588*b,.912*c,.0825*b,.064*c);a.fill();a.setAlpha(.5);a.ellipse(.4588*b,.912*c,.0825*b,.064*c);a.stroke();a.begin();a.setAlpha(.85);a.setFillColor("#000000");a.moveTo(.4598*b,.944*c);a.arcTo(.0402*b,.0296*c,0,0,1,.5402*b,.944*c);a.arcTo(.0825*b,.064*c,0,0,1,.4598*b,.944*c);a.close();a.fillAndStroke();a.begin();a.setAlpha(.7);a.setStrokeWidth(1.5);a.setStrokeColor("#dddddd");a.roundrect(.4814*b,.9296*c,.0371*b,.0288*c,.00515*
c,.004*c);a.stroke()};mxCellRenderer.registerShape(mxMockupC.SHAPE_IPAD,mxShapeMockupiPad);function mxShapeMockupRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupRRect,mxShape);mxShapeMockupRRect.prototype.cst={RRECT:"mxgraph.ios.rrect",R_SIZE:"rSize"};mxShapeMockupRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}];
mxShapeMockupRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeMockupRRect.prototype.cst.RRECT,mxShapeMockupRRect);function mxShapeIosTopButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIosTopButton,mxShape);
mxShapeIosTopButton.prototype.cst={TOP_BUTTON:"mxgraph.ios.topButton",R_SIZE:"rSize"};mxShapeIosTopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}];mxShapeIosTopButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIosTopButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeIosTopButton.prototype.cst.TOP_BUTTON,mxShapeIosTopButton);function mxShapeIosBottomButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIosBottomButton,mxShape);mxShapeIosBottomButton.prototype.cst={BOTTOM_BUTTON:"mxgraph.ios.bottomButton",R_SIZE:"rSize"};mxShapeIosBottomButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}];
mxShapeIosBottomButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeIosBottomButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeIosBottomButton.prototype.cst.BOTTOM_BUTTON,mxShapeIosBottomButton);function mxShapeIosAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}
mxUtils.extend(mxShapeIosAnchor,mxShape);mxShapeIosAnchor.prototype.cst={ANCHOR:"mxgraph.ios.anchor"};mxShapeIosAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeIosAnchor.prototype.cst.ANCHOR,mxShapeIosAnchor);function mxShapeIosCheckbox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIosCheckbox,mxShape);mxShapeIosCheckbox.prototype.cst={CHECKBOX:"mxgraph.ios.checkbox"};
mxShapeIosCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeIosCheckbox.prototype.cst.CHECKBOX,mxShapeIosCheckbox);function mxShapeMockupFancyRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeMockupFancyRRect,mxShape);
mxShapeMockupFancyRRect.prototype.cst={FANCY_RRECT:"mxgraph.ios.fancyRRect",R_SIZE:"rSize"};mxShapeMockupFancyRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:8}];
mxShapeMockupFancyRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeMockupFancyRRect.prototype.cst.R_SIZE,"10"));e=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.roundrect(0,0,b,c,d);a.fillAndStroke();a.setShadow(!1);a.setStrokeColor(e);a.setGradient(e,"#ffffff",0,0,b,22.5,mxConstants.DIRECTION_SOUTH,1,1);a.setAlpha(.3);a.begin();a.moveTo(b-
d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,17.5);a.arcTo(1.67*b,2.5*c,0,0,1,0,17.5);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke();a.setAlpha(.8);a.setStrokeColor(f);a.setStrokeWidth(1);a.roundrect(0,0,b,c,d,d);a.stroke()};mxCellRenderer.registerShape(mxShapeMockupFancyRRect.prototype.cst.FANCY_RRECT,mxShapeMockupFancyRRect);function mxShapeAws3dArrowNE(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeAws3dArrowNE,mxShape);mxShapeAws3dArrowNE.prototype.cst={ARROW_NE:"mxgraph.aws3d.arrowNE"};mxShapeAws3dArrowNE.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(b-17,8);a.lineTo(b-21,5.5);a.lineTo(b,0);a.lineTo(b-9.7,12.2);a.lineTo(b-13.9,9.8);a.lineTo(9.7,c-3.5);a.arcTo(6,3,0,0,1,9,c-.4);a.arcTo(5.2,3,0,0,1,1,c-1.4);a.arcTo(6,2.8,0,0,1,3,c-5.4);a.arcTo(5,3,0,0,1,6.7,c-5.2);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAws3dArrowNE.prototype.cst.ARROW_NE,mxShapeAws3dArrowNE);function mxShapeAws3dArrowSE(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dArrowSE,mxShape);mxShapeAws3dArrowSE.prototype.cst={ARROW_SE:"mxgraph.aws3d.arrowSE"};
mxShapeAws3dArrowSE.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(b-17,c-8);a.lineTo(b-21,c-5.5);a.lineTo(b,c);a.lineTo(b-9.7,c-12.2);a.lineTo(b-13.9,c-9.8);a.lineTo(9.7,3.5);a.arcTo(6,3,0,0,0,9,.4);a.arcTo(5.2,3,0,0,0,1,1.4);a.arcTo(6,2.8,0,0,0,3,5.4);a.arcTo(5,3,0,0,0,6.7,5.2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dArrowSE.prototype.cst.ARROW_SE,mxShapeAws3dArrowSE);
function mxShapeAws3dArrowSW(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dArrowSW,mxShape);mxShapeAws3dArrowSW.prototype.cst={ARROW_SW:"mxgraph.aws3d.arrowSW"};
mxShapeAws3dArrowSW.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(17,c-8);a.lineTo(21,c-5.5);a.lineTo(0,c);a.lineTo(9.7,c-12.2);a.lineTo(13.9,c-9.8);a.lineTo(b-9.7,3.5);a.arcTo(6,3,0,0,1,b-9,.4);a.arcTo(5.2,3,0,0,1,b-1,1.4);a.arcTo(6,2.8,0,0,1,b-3,5.4);a.arcTo(5,3,0,0,1,b-6.7,5.2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dArrowSW.prototype.cst.ARROW_SW,mxShapeAws3dArrowSW);
function mxShapeAws3dArrowNW(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dArrowNW,mxShape);mxShapeAws3dArrowNW.prototype.cst={ARROW_NW:"mxgraph.aws3d.arrowNW"};
mxShapeAws3dArrowNW.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(17,8);a.lineTo(21,5.5);a.lineTo(0,0);a.lineTo(9.7,12.2);a.lineTo(13.9,9.8);a.lineTo(b-9.7,c-3.5);a.arcTo(6,3,0,0,0,b-9,c-.4);a.arcTo(5.2,3,0,0,0,b-1,c-1.4);a.arcTo(6,2.8,0,0,0,b-3,c-5.4);a.arcTo(5,3,0,0,0,b-6.7,c-5.2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dArrowNW.prototype.cst.ARROW_NW,mxShapeAws3dArrowNW);
function mxShapeAws3dArrowlessNE(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dArrowlessNE,mxShape);mxShapeAws3dArrowlessNE.prototype.cst={ARROWLESS_NE:"mxgraph.aws3d.arrowlessNE"};
mxShapeAws3dArrowlessNE.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(b-3.1,0);a.lineTo(b,1.8);a.lineTo(9.7,c-3.5);a.arcTo(6,3,0,0,1,9,c-.4);a.arcTo(5.2,3,0,0,1,1,c-1.4);a.arcTo(6,2.8,0,0,1,3,c-5.4);a.arcTo(5,3,0,0,1,6.7,c-5.2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dArrowlessNE.prototype.cst.ARROWLESS_NE,mxShapeAws3dArrowlessNE);
function mxShapeAws3dDashedEdgeDouble(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDashedEdgeDouble,mxShape);mxShapeAws3dDashedEdgeDouble.prototype.cst={DASHED_EDGE_DOUBLE:"mxgraph.aws3d.dashedEdgeDouble"};
mxShapeAws3dDashedEdgeDouble.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setFillColor("#2D6195");a.save();a.setStrokeColor("none");a.begin();a.moveTo(21,5.5);a.lineTo(0,0);a.lineTo(9.7,12.2);a.fillAndStroke();a.begin();a.moveTo(b-21,c-5.5);a.lineTo(b,c);a.lineTo(b-9.7,c-12.2);a.fillAndStroke();a.restore();a.setStrokeColor("#2D6195");a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(7.675,4.425);a.lineTo(b-7.675,c-4.425);a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dDashedEdgeDouble.prototype.cst.DASHED_EDGE_DOUBLE,mxShapeAws3dDashedEdgeDouble);function mxShapeAws3dDashedEdgeDouble2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDashedEdgeDouble2,mxShape);mxShapeAws3dDashedEdgeDouble2.prototype.cst={DASHED_EDGE_DOUBLE2:"mxgraph.aws3d.dashedEdgeDouble2"};
mxShapeAws3dDashedEdgeDouble2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"strokeColor","#000000");a.save();a.setStrokeColor("none");a.setFillColor(d);a.begin();a.moveTo(21,5.5);a.lineTo(0,0);a.lineTo(9.7,12.2);a.fillAndStroke();a.begin();a.moveTo(b-21,c-5.5);a.lineTo(b,c);a.lineTo(b-9.7,c-12.2);a.fillAndStroke();a.restore();a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(7.675,4.425);a.lineTo(b-7.675,c-4.425);a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dDashedEdgeDouble2.prototype.cst.DASHED_EDGE_DOUBLE2,mxShapeAws3dDashedEdgeDouble2);function mxShapeAws3dDashedArrowlessEdge(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDashedArrowlessEdge,mxShape);mxShapeAws3dDashedArrowlessEdge.prototype.cst={DASHED_ARROWLESS_EDGE:"mxgraph.aws3d.dashedArrowlessEdge"};
mxShapeAws3dDashedArrowlessEdge.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setStrokeColor("#2D6195");a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(0,0);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDashedArrowlessEdge.prototype.cst.DASHED_ARROWLESS_EDGE,mxShapeAws3dDashedArrowlessEdge);
function mxShapeAws3dDashedArrowlessEdge2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDashedArrowlessEdge2,mxShape);mxShapeAws3dDashedArrowlessEdge2.prototype.cst={DASHED_ARROWLESS_EDGE2:"mxgraph.aws3d.dashedArrowlessEdge2"};
mxShapeAws3dDashedArrowlessEdge2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(0,0);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDashedArrowlessEdge2.prototype.cst.DASHED_ARROWLESS_EDGE2,mxShapeAws3dDashedArrowlessEdge2);function mxShapeAws3dDashedEdge(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeAws3dDashedEdge,mxShape);mxShapeAws3dDashedEdge.prototype.cst={DASHED_EDGE:"mxgraph.aws3d.dashedEdge"};
mxShapeAws3dDashedEdge.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setFillColor("#2D6195");a.save();a.setStrokeColor("none");a.begin();a.moveTo(b-21,5.5);a.lineTo(b,0);a.lineTo(b-9.7,12.2);a.fillAndStroke();a.restore();a.setStrokeColor("#2D6195");a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(b-7.675,4.425);a.lineTo(0,c);a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDashedEdge.prototype.cst.DASHED_EDGE,mxShapeAws3dDashedEdge);
function mxShapeAws3dDashedEdge2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDashedEdge2,mxShape);mxShapeAws3dDashedEdge2.prototype.cst={DASHED_EDGE2:"mxgraph.aws3d.dashedEdge2"};
mxShapeAws3dDashedEdge2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"strokeColor","#000000");a.save();a.setStrokeColor("none");a.setFillColor(d);a.begin();a.moveTo(b-21,5.5);a.lineTo(b,0);a.lineTo(b-9.7,12.2);a.fillAndStroke();a.restore();a.setStrokeWidth("4");a.setDashed("true");a.setLineCap("round");a.begin();a.moveTo(b-7.675,4.425);a.lineTo(0,c);a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDashedEdge2.prototype.cst.DASHED_EDGE2,mxShapeAws3dDashedEdge2);
function mxShapeAws3dFlatEdge(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dFlatEdge,mxShape);mxShapeAws3dFlatEdge.prototype.cst={FLAT_EDGE:"mxgraph.aws3d.flatEdge"};
mxShapeAws3dFlatEdge.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setFillColor("#F4B934");a.setStrokeColor("none");a.begin();a.moveTo(b-46,8.8);a.lineTo(b-61.2,0);a.lineTo(b,0);a.lineTo(b,35.5);a.lineTo(b-15.4,26.5);a.lineTo(30.7,c);a.lineTo(0,c-17.7);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dFlatEdge.prototype.cst.FLAT_EDGE,mxShapeAws3dFlatEdge);
function mxShapeAws3dFlatEdge2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dFlatEdge2,mxShape);mxShapeAws3dFlatEdge2.prototype.cst={FLAT_EDGE2:"mxgraph.aws3d.flatEdge2"};mxShapeAws3dFlatEdge2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(b-46,8.8);a.lineTo(b-61.2,0);a.lineTo(b,0);a.lineTo(b,35.5);a.lineTo(b-15.4,26.5);a.lineTo(30.7,c);a.lineTo(0,c-17.7);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAws3dFlatEdge2.prototype.cst.FLAT_EDGE2,mxShapeAws3dFlatEdge2);function mxShapeAws3dFlatDoubleEdge(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dFlatDoubleEdge,mxShape);mxShapeAws3dFlatDoubleEdge.prototype.cst={FLAT_DOUBLE_EDGE:"mxgraph.aws3d.flatDoubleEdge"};
mxShapeAws3dFlatDoubleEdge.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setFillColor("#F4B934");a.setStrokeColor("none");a.begin();a.moveTo(15.3,61.9);a.lineTo(30.8,53.2);a.lineTo(15.4,44.2);a.lineTo(0,53.2);a.lineTo(15.4,8.8);a.lineTo(92.1,0);a.lineTo(76.5,8.8);a.lineTo(92.1,17.7);a.lineTo(107.4,8.8);a.lineTo(b-15.3,c-61.9);a.lineTo(b-30.8,c-53.2);a.lineTo(b-15.4,c-44.2);a.lineTo(b,c-53.2);a.lineTo(b-15.4,c-8.8);a.lineTo(b-92.1,c);a.lineTo(b-76.5,c-8.8);a.lineTo(b-92.1,c-17.7);
a.lineTo(b-107.4,c-8.8);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAws3dFlatDoubleEdge.prototype.cst.FLAT_DOUBLE_EDGE,mxShapeAws3dFlatDoubleEdge);function mxShapeAws3dFlatDoubleEdge2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dFlatDoubleEdge2,mxShape);mxShapeAws3dFlatDoubleEdge2.prototype.cst={FLAT_DOUBLE_EDGE2:"mxgraph.aws3d.flatDoubleEdge2"};
mxShapeAws3dFlatDoubleEdge2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(15.3,61.9);a.lineTo(30.8,53.2);a.lineTo(15.4,44.2);a.lineTo(0,53.2);a.lineTo(15.4,8.8);a.lineTo(92.1,0);a.lineTo(76.5,8.8);a.lineTo(92.1,17.7);a.lineTo(107.4,8.8);a.lineTo(b-15.3,c-61.9);a.lineTo(b-30.8,c-53.2);a.lineTo(b-15.4,c-44.2);a.lineTo(b,c-53.2);a.lineTo(b-15.4,c-8.8);a.lineTo(b-92.1,c);a.lineTo(b-76.5,c-8.8);a.lineTo(b-92.1,c-17.7);a.lineTo(b-107.4,c-8.8);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAws3dFlatDoubleEdge2.prototype.cst.FLAT_DOUBLE_EDGE2,mxShapeAws3dFlatDoubleEdge2);function mxShapeAws3dAMI(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dAMI,mxShape);mxShapeAws3dAMI.prototype.cst={AMI:"mxgraph.aws3d.ami",SHADING_COLORS:"shadingCols"};
mxShapeAws3dAMI.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(d*b/92,d*c/60);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==e&&a.setShadow(!0);a.begin();a.moveTo(0,.6483*c);a.lineTo(.0684*b,.4133*c);a.lineTo(.5326*b,0);a.lineTo(.6685*b,0);a.lineTo(.9359*b,.2367*
c);a.lineTo(b,.465*c);a.lineTo(.4*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dAMI.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.65*c);a.lineTo(.0652*b,.5*c);a.lineTo(.3326*b,.7667*c);a.lineTo(.4663*b,.7667*c);a.lineTo(.4*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();
a.moveTo(.4*b,c);a.lineTo(.4641*b,.77*c);a.lineTo(.9326*b,.355*c);a.lineTo(.9347*b,.24*c);a.lineTo(b,.4667*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.65*c);a.lineTo(.0652*b,.5*c);a.lineTo(.3326*b,.7667*c);a.lineTo(.4663*b,.7667*c);a.lineTo(.4*b,c);a.close();a.stroke();a.begin();a.moveTo(.4*b,c);a.lineTo(.4641*b,.77*c);a.lineTo(.9326*b,.355*c);a.lineTo(.9347*b,.24*c);a.lineTo(b,.4667*c);a.close();a.stroke();a.begin();a.moveTo(.0652*b,.42*c);a.lineTo(.0652*b,.5*c);
a.moveTo(.3337*b,.7667*c);a.lineTo(.4*b,c);a.moveTo(.9348*b,.355*c);a.lineTo(b,.4733*c);a.stroke();a.setLineJoin("miter");e=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(e);a.begin();a.moveTo(.1935*b,.42*c);a.lineTo(.5543*b,.0967*c);a.lineTo(.6652*b,.1967*c);a.lineTo(.3*b,.5133*c);a.close();a.moveTo(.2967*b,.4633*c);a.lineTo(.3837*b,.3883*c);a.lineTo(.3326*b,.3417*c);a.lineTo(.2467*b,.42*c);a.close();a.moveTo(.362*b,.32*c);a.lineTo(.412*b,.3633*c);a.lineTo(.5054*b,.2867*
c);a.lineTo(.4522*b,.24*c);a.close();a.moveTo(.5293*b,.26*c);a.lineTo(.6109*b,.1933*c);a.lineTo(.5511*b,.145*c);a.lineTo(.4739*b,.2133*c);a.close();a.moveTo(.3528*b,.557*c);a.lineTo(.7137*b,.2337*c);a.lineTo(.8246*b,.3337*c);a.lineTo(.4593*b,.6503*c);a.close();a.moveTo(.4561*b,.6003*c);a.lineTo(.543*b,.5253*c);a.lineTo(.492*b,.4787*c);a.lineTo(.4061*b,.557*c);a.close();a.moveTo(.5213*b,.457*c);a.lineTo(.5713*b,.5003*c);a.lineTo(.6648*b,.4237*c);a.lineTo(.6115*b,.377*c);a.close();a.moveTo(.6887*b,
.397*c);a.lineTo(.7702*b,.3303*c);a.lineTo(.7104*b,.282*c);a.lineTo(.6333*b,.3503*c);a.close();a.fill();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6483*c);a.lineTo(.0684*b,.4133*c);a.lineTo(.5326*b,0);a.lineTo(.6685*b,0);a.lineTo(.9359*b,.2367*c);a.lineTo(b,.465*c);a.lineTo(.4*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dAMI.prototype.cst.AMI,mxShapeAws3dAMI);
function mxShapeAws3dSnapshot(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSnapshot,mxShape);mxShapeAws3dSnapshot.prototype.cst={SNAPSHOT:"mxgraph.aws3d.snapshot",SHADING_COLORS:"shadingCols"};
mxShapeAws3dSnapshot.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/92;d=d*c/60;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(b,.6483*c);a.lineTo(.9316*b,.4133*c);a.lineTo(.4674*b,0);a.lineTo(.3315*b,0);a.lineTo(.0641*
b,.2367*c);a.lineTo(0,.465*c);a.lineTo(.6*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dSnapshot.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(b,.65*c);a.lineTo(.9348*b,.52*c);a.lineTo(.6674*b,.7667*c);a.lineTo(.5337*b,.7667*c);a.lineTo(.6*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);
a.begin();a.moveTo(.6*b,c);a.lineTo(.5359*b,.77*c);a.lineTo(.0674*b,.355*c);a.lineTo(.0653*b,.24*c);a.lineTo(0,.4667*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(b,.65*c);a.lineTo(.9348*b,.52*c);a.lineTo(.6674*b,.7667*c);a.lineTo(.5337*b,.7667*c);a.lineTo(.6*b,c);a.close();a.stroke();a.begin();a.moveTo(.6*b,c);a.lineTo(.5359*b,.77*c);a.lineTo(.0674*b,.355*c);a.lineTo(.0653*b,.24*c);a.lineTo(0,.4667*c);a.close();a.stroke();a.begin();a.moveTo(.9348*b,.42*c);a.lineTo(.9348*
b,.52*c);a.moveTo(.6663*b,.7667*c);a.lineTo(.6*b,c);a.moveTo(.0652*b,.355*c);a.lineTo(0,.4733*c);a.stroke();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(b,.6483*c);a.lineTo(.9316*b,.4133*c);a.lineTo(.4674*b,0);a.lineTo(.3315*b,0);a.lineTo(.0641*b,.2367*c);a.lineTo(0,.465*c);a.lineTo(.6*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dSnapshot.prototype.cst.SNAPSHOT,mxShapeAws3dSnapshot);
function mxShapeAws3dApplication(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dApplication,mxShape);mxShapeAws3dApplication.prototype.cst={APPLICATION:"mxgraph.aws3d.application",SHADING_COLORS:"shadingCols"};
mxShapeAws3dApplication.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/62;d=d*c/68.8;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.2544*c);a.lineTo(.5*b,0);a.lineTo(b,.2544*c);a.lineTo(b,.7485*c);a.lineTo(.5*
b,c);a.lineTo(0,.7485*c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dApplication.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.2544*c);a.lineTo(.5*b,.5015*c);a.lineTo(.5*b,c);a.lineTo(0,.7485*c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.5*b,.5015*c);a.lineTo(b,.2544*
c);a.lineTo(b,.7485*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.2544*c);a.lineTo(.5*b,.5015*c);a.lineTo(.5*b,c);a.lineTo(0,.7485*c);a.close();a.stroke();a.begin();a.moveTo(.5*b,.5015*c);a.lineTo(b,.2544*c);a.lineTo(b,.7485*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineJoin("miter");e=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(e);a.begin();a.moveTo(.6694*b,.0872*c);a.lineTo(.7629*b,.1337*c);a.lineTo(.2661*b,.3882*
c);a.lineTo(.2661*b,.5407*c);a.lineTo(.1742*b,.4953*c);a.lineTo(.1742*b,.3459*c);a.close();a.moveTo(.8629*b,.1846*c);a.lineTo(.379*b,.4331*c);a.lineTo(.379*b,.5945*c);a.lineTo(.2855*b,.5494*c);a.lineTo(.2855*b,.3953*c);a.lineTo(.7839*b,.1439*c);a.close();a.fill();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.2544*c);a.lineTo(.5*b,0);a.lineTo(b,.2544*c);a.lineTo(b,.7485*c);a.lineTo(.5*b,c);a.lineTo(0,.7485*c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dApplication.prototype.cst.APPLICATION,mxShapeAws3dApplication);function mxShapeAws3dApplicationServer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dApplicationServer,mxShape);mxShapeAws3dApplicationServer.prototype.cst={APPLICATION_SERVER:"mxgraph.aws3d.application_server",SHADING_COLORS:"shadingCols"};
mxShapeAws3dApplicationServer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/124);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dApplicationServer.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7236*c);a.lineTo(0,.2863*c);a.lineTo(.5*b,0);a.lineTo(b,.2863*c);a.lineTo(b,.7236*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dApplicationServer.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dApplicationServer.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.2863*c);a.lineTo(.5*b,.5726*c);a.lineTo(.5*b,c);a.lineTo(0,.7177*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();
a.moveTo(b,.2863*c);a.lineTo(.5*b,.5726*c);a.lineTo(.5*b,c);a.lineTo(b,.7177*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.2863*c);a.lineTo(.5*b,.5726*c);a.lineTo(.5*b,c);a.lineTo(0,.7177*c);a.close();a.stroke();a.begin();a.moveTo(b,.2863*c);a.lineTo(.5*b,.5726*c);a.lineTo(.5*b,c);a.lineTo(b,.7177*c);a.close();a.stroke();a.setLineJoin("miter");d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.374*b,.4435*
c);a.arcTo(.0325*b,.0202*c,0,0,1,.374*b,.4153*c);a.lineTo(.4797*b,.3548*c);a.arcTo(.0325*b,.0161*c,0,0,1,.5203*b,.3548*c);a.lineTo(.626*b,.4153*c);a.arcTo(.0325*b,.0202*c,0,0,1,.626*b,.4411*c);a.lineTo(.5203*b,.5016*c);a.arcTo(.0325*b,.0161*c,0,0,1,.4797*b,.5016*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7236*c);a.lineTo(0,.2863*c);a.lineTo(.5*b,0);a.lineTo(b,.2863*c);a.lineTo(b,.7236*c);a.lineTo(.5*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dApplicationServer.prototype.cst.APPLICATION_SERVER,mxShapeAws3dApplicationServer);function mxShapeAws3dCloudFront(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dCloudFront,mxShape);mxShapeAws3dCloudFront.prototype.cst={CLOUDFRONT:"mxgraph.aws3d.cloudfront",SHADING_COLORS:"shadingCols"};
mxShapeAws3dCloudFront.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/103.8;d=d*c/169.8;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.7915*c);a.lineTo(0,.7491*c);a.lineTo(.0588*b,.7279*c);a.lineTo(.0588*b,
.1036*c);a.lineTo(.3526*b,0);a.lineTo(.9422*b,.2073*c);a.lineTo(.9422*b,.8316*c);a.lineTo(b,.8539*c);a.lineTo(b,.894*c);a.lineTo(.7013*b,c);a.lineTo(.5877*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dCloudFront.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(.0588*b,.106*c);a.lineTo(.6474*b,.3121*c);a.lineTo(.6474*
b,.9352*c);a.lineTo(.7052*b,c);a.lineTo(.5915*b,c);a.lineTo(0,.7915*c);a.lineTo(0,.7491*c);a.lineTo(.0588*b,.7279*c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.6474*b,.3121*c);a.lineTo(.9422*b,.2073*c);a.lineTo(.9422*b,.8363*c);a.lineTo(b,.8539*c);a.lineTo(b,.894*c);a.lineTo(.7013*b,c);a.lineTo(.6474*b,.9305*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.7915*c);a.lineTo(.0559*b,.7291*c);a.lineTo(.6474*b,.9364*c);a.lineTo(.5896*
b,c);a.moveTo(.6493*b,.9364*c);a.lineTo(.9412*b,.8333*c);a.lineTo(b,.894*c);a.stroke();a.begin();a.moveTo(.0588*b,.106*c);a.lineTo(.6474*b,.3121*c);a.lineTo(.6474*b,.9352*c);a.lineTo(.7052*b,c);a.lineTo(.5915*b,c);a.lineTo(0,.7915*c);a.lineTo(0,.7491*c);a.lineTo(.0588*b,.7279*c);a.close();a.stroke();a.begin();a.moveTo(.6474*b,.3121*c);a.lineTo(.9422*b,.2073*c);a.lineTo(.9422*b,.8363*c);a.lineTo(b,.8539*c);a.lineTo(b,.894*c);a.lineTo(.7013*b,c);a.lineTo(.6474*b,.9305*c);a.close();a.stroke();e=mxUtils.getValue(this.state.style,
"strokeColor","#000000");a.setFillColor(e);a.begin();a.moveTo(.3333*b,.6643*c);a.arcTo(.3372*b,.2061*c,0,0,1,.2351*b,.6042*c);a.arcTo(.4528*b,.2768*c,0,0,1,.1724*b,.523*c);a.lineTo(.2428*b,.5677*c);a.lineTo(.2427*b,.5895*c);a.lineTo(.2765*b,.5995*c);a.close();a.moveTo(.1599*b,.4935*c);a.arcTo(.3372*b,.2061*c,0,0,1,.1522*b,.4146*c);a.arcTo(.1156*b,.0883*c,0,0,1,.2071*b,.3486*c);a.lineTo(.2013*b,.4187*c);a.lineTo(.1859*b,.4146*c);a.lineTo(.1859*b,.4464*c);a.lineTo(.1907*b,.4493*c);a.close();a.moveTo(.2235*
b,.3445*c);a.arcTo(.1927*b,.1767*c,0,0,1,.368*b,.361*c);a.arcTo(.3854*b,.2356*c,0,0,1,.468*b,.4299*c);a.lineTo(.368*b,.4034*c);a.lineTo(.368*b,.394*c);a.lineTo(.3256*b,.3799*c);a.lineTo(.3256*b,.3887*c);a.close();a.moveTo(.4855*b,.4499*c);a.arcTo(.3854*b,.2356*c,0,0,1,.5337*b,.5395*c);a.arcTo(.3854*b,.2356*c,0,0,1,.5328*b,.6302*c);a.lineTo(.4952*b,.5589*c);a.lineTo(.5019*b,.5595*c);a.lineTo(.5019*b,.5265*c);a.lineTo(.4855*b,.5194*c);a.close();a.moveTo(.5241*b,.6455*c);a.arcTo(.0963*b,.0589*c,0,0,
1,.4663*b,.682*c);a.arcTo(.1445*b,.0883*c,0,0,1,.3642*b,.6761*c);a.lineTo(.4239*b,.6525*c);a.lineTo(.4566*b,.6643*c);a.lineTo(.4566*b,.6413*c);a.close();a.moveTo(.3507*b,.6667*c);a.lineTo(.2871*b,.5919*c);a.lineTo(.4123*b,.6366*c);a.close();a.moveTo(.2563*b,.5595*c);a.lineTo(.1753*b,.5088*c);a.lineTo(.2052*b,.4594*c);a.close();a.moveTo(.2139*b,.4229*c);a.lineTo(.2197*b,.3528*c);a.lineTo(.3256*b,.4028*c);a.lineTo(.2283*b,.4252*c);a.close();a.moveTo(.2264*b,.4417*c);a.lineTo(.3218*b,.4146*c);a.lineTo(.3353*
b,.4181*c);a.lineTo(.3353*b,.4971*c);a.lineTo(.3208*b,.4912*c);a.lineTo(.3208*b,.4965*c);a.lineTo(.2264*b,.4482*c);a.close();a.moveTo(.2697*b,.5618*c);a.lineTo(.2245*b,.4635*c);a.lineTo(.2331*b,.4588*c);a.lineTo(.3256*b,.5112*c);a.lineTo(.3237*b,.5241*c);a.close();a.moveTo(.2852*b,.576*c);a.lineTo(.2852*b,.5654*c);a.lineTo(.3391*b,.53*c);a.lineTo(.3516*b,.5347*c);a.lineTo(.4133*b,.6213*c);a.close();a.moveTo(.368*b,.5141*c);a.lineTo(.368*b,.5088*c);a.lineTo(.3526*b,.5029*c);a.lineTo(.3526*b,.4234*
c);a.lineTo(.3622*b,.4276*c);a.lineTo(.4547*b,.5177*c);a.lineTo(.4557*b,.5277*c);a.close();a.moveTo(.3671*b,.417*c);a.lineTo(.4692*b,.4411*c);a.lineTo(.4721*b,.52*c);a.close();a.moveTo(.368*b,.5253*c);a.lineTo(.4566*b,.5359*c);a.lineTo(.4566*b,.5453*c);a.lineTo(.4663*b,.5465*c);a.lineTo(.4335*b,.6201*c);a.lineTo(.422*b,.616*c);a.lineTo(.368*b,.5389*c);a.close();a.moveTo(.4798*b,.5583*c);a.lineTo(.5183*b,.629*c);a.lineTo(.4557*b,.6313*c);a.lineTo(.4557*b,.6237*c);a.lineTo(.447*b,.6225*c);a.close();
a.fill();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7915*c);a.lineTo(0,.7491*c);a.lineTo(.0588*b,.7279*c);a.lineTo(.0588*b,.1036*c);a.lineTo(.3526*b,0);a.lineTo(.9422*b,.2073*c);a.lineTo(.9422*b,.8316*c);a.lineTo(b,.8539*c);a.lineTo(b,.894*c);a.lineTo(.7013*b,c);a.lineTo(.5877*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dCloudFront.prototype.cst.CLOUDFRONT,mxShapeAws3dCloudFront);
function mxShapeAws3dDataCenter(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDataCenter,mxShape);mxShapeAws3dDataCenter.prototype.cst={DATA_CENTER:"mxgraph.aws3d.dataCenter",SHADING_COLORS:"shadingCols"};
mxShapeAws3dDataCenter.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/123;d=d*c/142;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.7465*c);a.lineTo(0,.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7465*
c);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dDataCenter.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.7465*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(b,.7465*c);a.lineTo(b,.25*c);a.lineTo(.5*
b,.5*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.7465*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.stroke();a.begin();a.moveTo(b,.7465*c);a.lineTo(b,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineCap("round");a.setStrokeWidth(3*d);a.begin();a.moveTo(.0894*b,.3838*c);a.lineTo(.4187*b,.5493*c);a.moveTo(.0894*b,.4331*c);a.lineTo(.4187*b,.5986*c);a.moveTo(.0894*b,.4824*c);a.lineTo(.4187*b,.6479*c);
a.moveTo(.5854*b,.5493*c);a.lineTo(.9146*b,.3838*c);a.moveTo(.5854*b,.5986*c);a.lineTo(.9146*b,.4331*c);a.moveTo(.5854*b,.6479*c);a.lineTo(.9146*b,.4824*c);a.stroke();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7465*c);a.lineTo(0,.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7465*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDataCenter.prototype.cst.DATA_CENTER,mxShapeAws3dDataCenter);
function mxShapeAws3dDataServer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDataServer,mxShape);mxShapeAws3dDataServer.prototype.cst={DATA_SERVER:"mxgraph.aws3d.dataServer",SHADING_COLORS:"shadingCols"};
mxShapeAws3dDataServer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/123;d=d*c/106;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,0);a.lineTo(b,.3349*c);a.lineTo(b,
.6651*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dDataServer.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,.6698*c);a.lineTo(.5*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(b,.6651*c);a.lineTo(b,.3349*c);
a.lineTo(.5*b,.6698*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,.6698*c);a.lineTo(.5*b,c);a.close();a.stroke();a.begin();a.moveTo(b,.6651*c);a.lineTo(b,.3349*c);a.lineTo(.5*b,.6698*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineCap("round");a.setStrokeWidth(3*d);a.begin();a.moveTo(.0878*b,.4858*c);a.lineTo(.4187*b,.7094*c);a.moveTo(.587*b,.7094*c);a.lineTo(.9187*b,.4858*c);a.stroke();a.setStrokeWidth(2*
d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,0);a.lineTo(b,.3349*c);a.lineTo(b,.6651*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dDataServer.prototype.cst.DATA_SERVER,mxShapeAws3dDataServer);function mxShapeAws3dElasticLoadBalancing(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dElasticLoadBalancing,mxShape);
mxShapeAws3dElasticLoadBalancing.prototype.cst={ELASTIC_LOAD_BALANCING:"mxgraph.aws3d.elasticLoadBalancing",SHADING_COLORS:"shadingCols"};
mxShapeAws3dElasticLoadBalancing.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);e=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));var f=e*b/92;e=e*c/88.17;d=mxUtils.getValue(this.state.style,"strokeColor","#000000");var g=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));e=Math.min(f,e);a.setShadow(!1);a.setStrokeWidth(e);a.save();a.save();a.save();a.save();a.setStrokeWidth(2*e);a.setStrokeColor("#292929");a.setLineJoin("round");1==g&&a.setShadow(!0);a.begin();
a.moveTo(0,.7996*c);a.lineTo(0,.1985*c);a.lineTo(.3315*b,0);a.lineTo(.6685*b,0);a.lineTo(b,.1985*c);a.lineTo(b,.7996*c);a.lineTo(.6685*b,c);a.lineTo(.3315*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");f=mxUtils.getValue(this.state.style,mxShapeAws3dElasticLoadBalancing.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");g=mxUtils.getValue(this.state.style,"flipH","0");"0"==g?a.setAlpha(f[0]):a.setAlpha(f[1]);a.begin();a.moveTo(0,.4026*c);a.lineTo(.3315*b,.6011*c);
a.lineTo(.6685*b,.6011*c);a.lineTo(.6685*b,c);a.lineTo(.3315*b,c);a.lineTo(0,.7996*c);a.close();a.fill();"0"==g?a.setAlpha(f[1]):a.setAlpha(f[0]);a.begin();a.moveTo(.6685*b,.6011*c);a.lineTo(b,.4026*c);a.lineTo(b,.7996*c);a.lineTo(.6685*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.4026*c);a.lineTo(.3315*b,.6011*c);a.lineTo(.6685*b,.6011*c);a.lineTo(.6685*b,c);a.lineTo(.3315*b,c);a.lineTo(0,.7996*c);a.close();a.stroke();a.begin();a.moveTo(.6685*b,.6011*c);a.lineTo(b,
.4026*c);a.lineTo(b,.7996*c);a.lineTo(.6685*b,c);a.close();a.moveTo(.3315*b,.6011*c);a.lineTo(.3315*b,c);a.stroke();a.restore();a.setFillColor(d);a.begin();a.moveTo(.337*b,.1395*c);a.arcTo(.3043*b,.1928*c,0,0,1,.5*b,.1191*c);a.arcTo(.3043*b,.1928*c,0,0,1,.6739*b,.1645*c);a.arcTo(.3261*b,.2155*c,0,0,1,.8152*b,.3176*c);a.arcTo(.3261*b,.1701*c,0,0,1,.75*b,.4367*c);a.arcTo(.3261*b,.3403*c,0,0,1,.6033*b,.4854*c);a.arcTo(.3261*b,.2268*c,0,0,1,.4348*b,.4741*c);a.arcTo(.3261*b,.2268*c,0,0,1,.2848*b,.4094*
c);a.arcTo(.3261*b,.2268*c,0,0,1,.2065*b,.3062*c);a.arcTo(.3261*b,.1701*c,0,0,1,.2446*b,.1928*c);a.arcTo(.2717*b,.1701*c,0,0,1,.337*b,.1395*c);a.fill();a.restore();a.begin();a.moveTo(.2826*b,.372*c);a.lineTo(.362*b,.3232*c);a.lineTo(.4054*b,.3482*c);a.lineTo(.4457*b,.2654*c);a.lineTo(.4185*b,.2643*c);a.lineTo(.4728*b,.2132*c);a.lineTo(.4348*b,.1928*c);a.lineTo(.5141*b,.144*c);a.lineTo(.5837*b,.1883*c);a.lineTo(.5043*b,.2348*c);a.lineTo(.4848*b,.2223*c);a.lineTo(.4967*b,.2688*c);a.lineTo(.463*b,.2665*
c);a.lineTo(.4304*b,.3346*c);a.lineTo(.4946*b,.2949*c);a.lineTo(.4761*b,.2858*c);a.lineTo(.5511*b,.2631*c);a.lineTo(.5261*b,.2472*c);a.lineTo(.6043*b,.1996*c);a.lineTo(.6761*b,.2404*c);a.lineTo(.5978*b,.2892*c);a.lineTo(.5652*b,.2699*c);a.lineTo(.5293*b,.3198*c);a.lineTo(.5087*b,.3051*c);a.lineTo(.4543*b,.3391*c);a.lineTo(.563*b,.3221*c);a.lineTo(.5598*b,.3017*c);a.lineTo(.6326*b,.3096*c);a.lineTo(.6163*b,.2994*c);a.lineTo(.6957*b,.2529*c);a.lineTo(.7674*b,.2938*c);a.lineTo(.687*b,.3425*c);a.lineTo(.6489*
b,.321*c);a.lineTo(.5707*b,.3539*c);a.lineTo(.5674*b,.3369*c);a.lineTo(.4293*b,.3618*c);a.lineTo(.4641*b,.3834*c);a.lineTo(.3859*b,.4299*c);a.close();a.fill();a.setStrokeWidth(2*e);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7996*c);a.lineTo(0,.1985*c);a.lineTo(.3315*b,0);a.lineTo(.6685*b,0);a.lineTo(b,.1985*c);a.lineTo(b,.7996*c);a.lineTo(.6685*b,c);a.lineTo(.3315*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dElasticLoadBalancing.prototype.cst.ELASTIC_LOAD_BALANCING,mxShapeAws3dElasticLoadBalancing);function mxShapeAws3dInstance(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dInstance,mxShape);mxShapeAws3dInstance.prototype.cst={INSTANCE:"mxgraph.aws3d.instance",SHADING_COLORS:"shadingCols"};
mxShapeAws3dInstance.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/97);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dInstance.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.634*c);a.lineTo(0,.2732*c);a.lineTo(.374*b,0);a.lineTo(.622*b,0);a.lineTo(b,.2732*c);a.lineTo(b,.634*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dInstance.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dInstance.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.2732*c);a.lineTo(.5*b,.6392*c);a.lineTo(.5*b,c);a.lineTo(0,.634*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*b,.6392*
c);a.lineTo(b,.2732*c);a.lineTo(b,.6392*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.2732*c);a.lineTo(.5*b,.6392*c);a.lineTo(.5*b,c);a.lineTo(0,.634*c);a.close();a.stroke();a.begin();a.moveTo(.5*b,.6392*c);a.lineTo(b,.2732*c);a.lineTo(b,.6392*c);a.lineTo(.5*b,c);a.close();a.stroke();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.374*b,.4742*c);a.arcTo(.0325*b,.0258*c,0,0,1,.374*b,
.4381*c);a.lineTo(.4797*b,.3608*c);a.arcTo(.0325*b,.0206*c,0,0,1,.5203*b,.3608*c);a.lineTo(.626*b,.4381*c);a.arcTo(.0325*b,.0258*c,0,0,1,.626*b,.4711*c);a.lineTo(.5203*b,.5485*c);a.arcTo(.0325*b,.0206*c,0,0,1,.4797*b,.5485*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.634*c);a.lineTo(0,.2732*c);a.lineTo(.374*b,0);a.lineTo(.622*b,0);a.lineTo(b,.2732*c);a.lineTo(b,.634*c);a.lineTo(.5*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dInstance.prototype.cst.INSTANCE,mxShapeAws3dInstance);function mxShapeAws3dInternetGateway(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dInternetGateway,mxShape);mxShapeAws3dInternetGateway.prototype.cst={INTERNET_GATEWAY:"mxgraph.aws3d.internetGateway",SHADING_COLORS:"shadingCols"};
mxShapeAws3dInternetGateway.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/116.7,d*c/102.8);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dInternetGateway.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.8946*b,0);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6812*b,.7247*c);a.close();a.fillAndStroke();a.restore();a.save();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dInternetGateway.prototype.cst.SHADING_COLORS,
"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.6838*b,.2072*c);a.lineTo(.6838*b,.7247*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.6838*b,.2072*c);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6838*b,.7247*c);a.close();a.fill();a.restore();a.setShadow(!1);a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*
c);a.lineTo(.6838*b,.2072*c);a.lineTo(.6838*b,.7247*c);a.close();a.stroke();a.restore();a.setLineJoin("round");a.setShadow(!1);a.begin();a.moveTo(.6838*b,.2072*c);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6838*b,.7247*c);a.close();a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.8946*b,0);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6812*b,.7247*c);a.close();a.stroke();a.restore();a.setStrokeWidth(2*f);
a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.3171*b,.1031*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.lineTo(.1054*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dInternetGateway.prototype.foreground=function(a,d,e,b,c,f){a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dInternetGateway.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var g=mxUtils.getValue(this.state.style,"flipH","0");"0"==g?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.1054*b,.6537*
c);a.lineTo(.1054*b,c);a.close();a.fill();"0"==g?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.1054*b,c);a.lineTo(.1054*b,.6537*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.1054*b,.6537*c);a.lineTo(.1054*b,c);a.close();a.stroke();a.begin();a.moveTo(.1054*b,c);a.lineTo(.1054*b,.6537*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.close();a.stroke();
a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.3171*b,.1031*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.lineTo(.1054*b,c);a.close();a.stroke();a.setFillColor(d);a.begin();a.moveTo(.7849*b,.5039*c);a.arcTo(.0343*b,.0632*c,0,0,1,.7481*b,.4796*c);a.arcTo(.0857*b,.0973*c,0,0,1,.7661*b,.3911*c);a.arcTo(.06*b,.0681*c,0,0,1,.7712*b,.3356*c);a.arcTo(.0257*b,.0292*c,0,0,1,.7952*b,.32*c);a.arcTo(.1285*b,.1459*
c,0,0,1,.8166*b,.2461*c);a.arcTo(.06*b,.0973*c,0,0,1,.8595*b,.2238*c);a.arcTo(.0514*b,.0973*c,0,0,1,.8937*b,.2743*c);a.arcTo(.0428*b,.0778*c,0,0,1,.9323*b,.3093*c);a.arcTo(.0686*b,.0778*c,0,0,1,.928*b,.3716*c);a.arcTo(.0857*b,.0973*c,0,0,1,.8972*b,.4125*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeAws3dInternetGateway.prototype.cst.INTERNET_GATEWAY,mxShapeAws3dInternetGateway);
function mxShapeAws3dOracleDataCenter(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dOracleDataCenter,mxShape);mxShapeAws3dOracleDataCenter.prototype.cst={ORACLE_DATA_CENTER:"mxgraph.aws3d.oracleDataCenter"};
mxShapeAws3dOracleDataCenter.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/142);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dOracleDataCenter.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dOracleDataCenter.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");a.setAlpha("0.1");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.fill();a.setAlpha("0.3");a.begin();a.moveTo(.5*b,.5*c);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#ff0000");a.begin();a.moveTo(0,.5866*c);a.lineTo(.5*b,.8359*c);a.lineTo(b,
.5866*c);a.lineTo(b,.6986*c);a.lineTo(.5*b,.9486*c);a.lineTo(0,.6986*c);a.fill();a.setStrokeWidth(.5*f);a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.begin();a.moveTo(0,.5866*c);a.lineTo(.5*b,.8359*c);a.lineTo(b,.5866*c);a.moveTo(b,.6986*c);a.lineTo(.5*b,.9486*c);a.lineTo(0,.6986*c);a.stroke();a.begin();a.moveTo(.0813*b,.7113*c);a.arcTo(.0569*b,.0493*c,0,0,1,.065*b,.6831*c);a.arcTo(.065*b,.0563*c,0,0,1,.065*b,.6613*c);a.arcTo(.0163*b,.0141*c,0,0,1,.0797*b,.6549*c);a.lineTo(.122*b,.6754*
c);a.arcTo(.065*b,.0563*c,0,0,1,.1358*b,.6937*c);a.arcTo(.065*b,.0563*c,0,0,1,.139*b,.7232*c);a.arcTo(.0179*b,.0155*c,0,0,1,.1187*b,.7296*c);a.close();a.moveTo(.1163*b,.7183*c);a.arcTo(.0089*b,.0077*c,0,0,0,.1285*b,.7148*c);a.arcTo(.0407*b,.0352*c,0,0,0,.1293*b,.7021*c);a.arcTo(.0407*b,.0352*c,0,0,0,.1179*b,.6831*c);a.lineTo(.087*b,.6676*c);a.arcTo(.0081*b,.007*c,0,0,0,.0764*b,.6697*c);a.arcTo(.0325*b,.0352*c,0,0,0,.078*b,.6937*c);a.arcTo(.0407*b,.0352*c,0,0,0,.087*b,.7035*c);a.close();a.moveTo(.1439*
b,.743*c);a.lineTo(.1439*b,.6866*c);a.lineTo(.1846*b,.707*c);a.arcTo(.0407*b,.0352*c,0,0,1,.1967*b,.7183*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2*b,.738*c);a.arcTo(.0138*b,.0155*c,0,0,1,.1813*b,.743*c);a.lineTo(.1992*b,.769*c);a.lineTo(.187*b,.7641*c);a.lineTo(.1577*b,.7218*c);a.lineTo(.1854*b,.7345*c);a.arcTo(.0041*b,.0035*c,0,0,0,.1911*b,.7317*c);a.arcTo(.0163*b,.0141*c,0,0,0,.1894*b,.7225*c);a.arcTo(.0325*b,.0282*c,0,0,0,.1821*b,.7155*c);a.lineTo(.1528*b,.7007*c);a.lineTo(.1528*b,.7472*c);a.close();
a.moveTo(.2008*b,.7711*c);a.lineTo(.2293*b,.7338*c);a.arcTo(.0065*b,.0056*c,0,0,1,.2382*b,.7324*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2431*b,.7415*c);a.lineTo(.2699*b,.8035*c);a.lineTo(.2602*b,.8007*c);a.lineTo(.252*b,.7859*c);a.lineTo(.2293*b,.7754*c);a.lineTo(.2244*b,.7634*c);a.lineTo(.248*b,.7739*c);a.lineTo(.235*b,.7444*c);a.lineTo(.2122*b,.7768*c);a.close();a.moveTo(.3244*b,.8225*c);a.lineTo(.3171*b,.8289*c);a.lineTo(.2854*b,.8127*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2724*b,.7986*c);a.arcTo(.0569*b,
.0493*c,0,0,1,.265*b,.7746*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2683*b,.762*c);a.arcTo(.0163*b,.0141*c,0,0,1,.2829*b,.757*c);a.lineTo(.3228*b,.7761*c);a.lineTo(.3179*b,.7831*c);a.lineTo(.2878*b,.7683*c);a.arcTo(.0081*b,.007*c,0,0,0,.2789*b,.7697*c);a.arcTo(.0244*b,.0211*c,0,0,0,.2748*b,.7831*c);a.arcTo(.0407*b,.0352*c,0,0,0,.2878*b,.8042*c);a.close();a.moveTo(.3276*b,.7789*c);a.lineTo(.3366*b,.7831*c);a.lineTo(.3366*b,.8289*c);a.lineTo(.3805*b,.8507*c);a.lineTo(.3748*b,.857*c);a.lineTo(.3317*b,.8359*
c);a.arcTo(.0163*b,.0141*c,0,0,1,.3276*b,.8275*c);a.close();a.moveTo(.435*b,.8775*c);a.lineTo(.4325*b,.8866*c);a.lineTo(.3959*b,.8683*c);a.arcTo(.0407*b,.0352*c,0,0,1,.3862*b,.8563*c);a.arcTo(.0528*b,.0458*c,0,0,1,.3805*b,.8183*c);a.arcTo(.0163*b,.0141*c,0,0,1,.3951*b,.8134*c);a.lineTo(.435*b,.8324*c);a.lineTo(.4285*b,.838*c);a.lineTo(.4008*b,.8246*c);a.arcTo(.0098*b,.0085*c,0,0,0,.3878*b,.831*c);a.lineTo(.4333*b,.8542*c);a.lineTo(.426*b,.8606*c);a.lineTo(.3878*b,.8415*c);a.arcTo(.0325*b,.0282*c,
0,0,0,.3976*b,.8585*c);a.close();a.moveTo(.6171*b,.8063*c);a.arcTo(.0163*b,.0141*c,0,0,1,.6366*b,.8092*c);a.arcTo(.0325*b,.0282*c,0,0,1,.639*b,.8303*c);a.arcTo(.065*b,.0563*c,0,0,1,.6211*b,.8592*c);a.lineTo(.5894*b,.8761*c);a.arcTo(.0203*b,.0176*c,0,0,1,.565*b,.8732*c);a.arcTo(.0407*b,.0352*c,0,0,1,.5659*b,.8458*c);a.arcTo(.0488*b,.0422*c,0,0,1,.5805*b,.8246*c);a.close();a.moveTo(.5886*b,.8296*c);a.arcTo(.0325*b,.0282*c,0,0,0,.5748*b,.8472*c);a.arcTo(.0325*b,.0282*c,0,0,0,.574*b,.862*c);a.arcTo(.0098*
b,.0085*c,0,0,0,.587*b,.8676*c);a.lineTo(.6163*b,.8528*c);a.arcTo(.0407*b,.0352*c,0,0,0,.6285*b,.8359*c);a.arcTo(.0244*b,.0211*c,0,0,0,.6293*b,.8225*c);a.arcTo(.0098*b,.0085*c,0,0,0,.6163*b,.8155*c);a.close();a.moveTo(.64*b,.85*c);a.lineTo(.64*b,.793*c);a.lineTo(.6854*b,.7718*c);a.arcTo(.0106*b,.0092*c,0,0,1,.7008*b,.7782*c);a.arcTo(.0407*b,.0352*c,0,0,1,.6959*b,.8*c);a.arcTo(.0407*b,.0352*c,0,0,1,.6805*b,.8127*c);a.lineTo(.6992*b,.8218*c);a.lineTo(.6854*b,.8282*c);a.lineTo(.6569*b,.8141*c);a.lineTo(.6805*
b,.8021*c);a.arcTo(.0203*b,.0176*c,0,0,0,.6894*b,.7923*c);a.arcTo(.0244*b,.0211*c,0,0,0,.6894*b,.7845*c);a.arcTo(.0041*b,.0035*c,0,0,0,.6837*b,.7831*c);a.lineTo(.6528*b,.7979*c);a.lineTo(.6528*b,.8437*c);a.close();a.moveTo(.7*b,.8204*c);a.lineTo(.7301*b,.7507*c);a.arcTo(.0098*b,.0085*c,0,0,1,.7358*b,.7444*c);a.arcTo(.0098*b,.0085*c,0,0,1,.7415*b,.7486*c);a.lineTo(.7699*b,.7852*c);a.lineTo(.7602*b,.7908*c);a.lineTo(.7537*b,.7838*c);a.lineTo(.7276*b,.7958*c);a.lineTo(.7228*b,.788*c);a.lineTo(.748*b,
.7768*c);a.lineTo(.7358*b,.7585*c);a.lineTo(.7114*b,.8155*c);a.close();a.moveTo(.8244*b,.7486*c);a.lineTo(.8171*b,.762*c);a.lineTo(.7894*b,.7761*c);a.arcTo(.0244*b,.0211*c,0,0,1,.7683*b,.7746*c);a.arcTo(.0407*b,.0352*c,0,0,1,.7667*b,.7507*c);a.arcTo(.0488*b,.0423*c,0,0,1,.7937*b,.7162*c);a.lineTo(.822*b,.7035*c);a.lineTo(.8171*b,.7155*c);a.lineTo(.7902*b,.7296*c);a.arcTo(.0325*b,.0282*c,0,0,0,.778*b,.743*c);a.arcTo(.0407*b,.0352*c,0,0,0,.7756*b,.7606*c);a.arcTo(.0077*b,.0067*c,0,0,0,.787*b,.767*c);
a.close();a.moveTo(.8366*b,.6949*c);a.lineTo(.8366*b,.7423*c);a.lineTo(.878*b,.7231*c);a.lineTo(.874*b,.7338*c);a.lineTo(.8333*b,.7535*c);a.arcTo(.0041*b,.0035*c,0,0,1,.8268*b,.75*c);a.lineTo(.8268*b,.7007*c);a.close();a.moveTo(.9342*b,.6472*c);a.lineTo(.9293*b,.6599*c);a.lineTo(.9033*b,.6725*c);a.arcTo(.0325*b,.0282*c,0,0,0,.8927*b,.6817*c);a.arcTo(.0406*b,.0352*c,0,0,0,.887*b,.6937*c);a.lineTo(.9309*b,.6725*c);a.lineTo(.9268*b,.6845*c);a.lineTo(.887*b,.7035*c);a.arcTo(.0089*b,.0077*c,0,0,0,.8992*
b,.7106*c);a.lineTo(.935*b,.693*c);a.lineTo(.9285*b,.7063*c);a.lineTo(.9008*b,.7197*c);a.arcTo(.0163*b,.0141*c,0,0,1,.8829*b,.7204*c);a.arcTo(.0407*b,.0352*c,0,0,1,.8764*b,.7028*c);a.arcTo(.065*b,.0563*c,0,0,1,.8959*b,.6669*c);a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.stroke();a.begin();a.moveTo(.5*b,.5*c);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setStrokeWidth(2*
f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.stroke();a.restore();a.setShadow(!1);a.setStrokeWidth(3*f);a.setLineCap("round");a.begin();a.moveTo(.0894*b,.3838*c);a.lineTo(.4187*b,.5493*c);a.moveTo(.0894*b,.4331*c);a.lineTo(.4187*b,.5986*c);a.moveTo(.0894*b,.4824*c);a.lineTo(.4187*b,.6479*c);a.moveTo(.5854*b,.5492*c);a.lineTo(.9146*b,.3838*c);a.moveTo(.5854*b,
.5986*c);a.lineTo(.9146*b,.4331*c);a.moveTo(.5854*b,.6479*c);a.lineTo(.9146*b,.4824*c);a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dOracleDataCenter.prototype.cst.ORACLE_DATA_CENTER,mxShapeAws3dOracleDataCenter);function mxShapeAws3dOracleDatabaseServer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dOracleDatabaseServer,mxShape);mxShapeAws3dOracleDatabaseServer.prototype.cst={ORACLE_DB_SERVER:"mxgraph.aws3d.oracleDbServer"};
mxShapeAws3dOracleDatabaseServer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/142);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dOracleDatabaseServer.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dOracleDatabaseServer.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");a.setAlpha("0.1");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();a.moveTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();a.setAlpha("0.3");a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*
b,.267*c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#ff0000");a.begin();a.moveTo(0,.5586*c);a.lineTo(.5*b,.8248*c);a.lineTo(b,.5586*c);a.lineTo(b,.6782*c);a.lineTo(.5*b,.9453*c);a.lineTo(0,.6782*c);a.fill();a.setStrokeWidth(.5*f);a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.begin();a.moveTo(0,.5586*c);a.lineTo(.5*b,.8248*c);a.lineTo(b,.5586*c);a.moveTo(b,.6782*c);a.lineTo(.5*b,.9453*c);a.lineTo(0,.6782*
c);a.stroke();a.begin();a.moveTo(.0813*b,.6918*c);a.arcTo(.0569*b,.0526*c,0,0,1,.065*b,.6616*c);a.arcTo(.065*b,.0601*c,0,0,1,.065*b,.6384*c);a.arcTo(.0163*b,.0151*c,0,0,1,.0797*b,.6315*c);a.lineTo(.122*b,.6534*c);a.arcTo(.065*b,.0601*c,0,0,1,.1358*b,.673*c);a.arcTo(.065*b,.0601*c,0,0,1,.139*b,.7045*c);a.arcTo(.0179*b,.0165*c,0,0,1,.1187*b,.7113*c);a.close();a.moveTo(.1163*b,.6992*c);a.arcTo(.0089*b,.0082*c,0,0,0,.1285*b,.6955*c);a.arcTo(.0407*b,.0376*c,0,0,0,.1293*b,.6819*c);a.arcTo(.0407*b,.0376*
c,0,0,0,.1179*b,.6616*c);a.lineTo(.087*b,.6451*c);a.arcTo(.0081*b,.0075*c,0,0,0,.0764*b,.6473*c);a.arcTo(.0325*b,.0376*c,0,0,0,.078*b,.673*c);a.arcTo(.0407*b,.0376*c,0,0,0,.087*b,.6834*c);a.close();a.moveTo(.1439*b,.7256*c);a.lineTo(.1439*b,.6654*c);a.lineTo(.1846*b,.6872*c);a.arcTo(.0407*b,.0376*c,0,0,1,.1967*b,.6992*c);a.arcTo(.0407*b,.0376*c,0,0,1,.2*b,.7203*c);a.arcTo(.0138*b,.0165*c,0,0,1,.1813*b,.7256*c);a.lineTo(.1992*b,.7534*c);a.lineTo(.187*b,.7481*c);a.lineTo(.1577*b,.7029*c);a.lineTo(.1854*
b,.7165*c);a.arcTo(.0041*b,.0037*c,0,0,0,.1911*b,.7135*c);a.arcTo(.0163*b,.0151*c,0,0,0,.1894*b,.7037*c);a.arcTo(.0325*b,.0301*c,0,0,0,.1821*b,.6962*c);a.lineTo(.1528*b,.6804*c);a.lineTo(.1528*b,.7301*c);a.close();a.moveTo(.2008*b,.7556*c);a.lineTo(.2293*b,.7158*c);a.arcTo(.0065*b,.006*c,0,0,1,.2382*b,.7143*c);a.arcTo(.0407*b,.0376*c,0,0,1,.2431*b,.724*c);a.lineTo(.2699*b,.7902*c);a.lineTo(.2602*b,.7872*c);a.lineTo(.252*b,.7714*c);a.lineTo(.2293*b,.7602*c);a.lineTo(.2244*b,.7474*c);a.lineTo(.248*
b,.7586*c);a.lineTo(.235*b,.7271*c);a.lineTo(.2122*b,.7617*c);a.close();a.moveTo(.3244*b,.8105*c);a.lineTo(.3171*b,.8173*c);a.lineTo(.2854*b,.8*c);a.arcTo(.0407*b,.0376*c,0,0,1,.2724*b,.785*c);a.arcTo(.0569*b,.0526*c,0,0,1,.265*b,.7593*c);a.arcTo(.0407*b,.0376*c,0,0,1,.2683*b,.7459*c);a.arcTo(.0163*b,.0151*c,0,0,1,.2829*b,.7405*c);a.lineTo(.3228*b,.7609*c);a.lineTo(.3179*b,.7684*c);a.lineTo(.2878*b,.7526*c);a.arcTo(.0081*b,.0075*c,0,0,0,.2789*b,.7541*c);a.arcTo(.0244*b,.0225*c,0,0,0,.2748*b,.7684*
c);a.arcTo(.0407*b,.0376*c,0,0,0,.2878*b,.7909*c);a.close();a.moveTo(.3276*b,.7639*c);a.lineTo(.3366*b,.7684*c);a.lineTo(.3366*b,.8173*c);a.lineTo(.3805*b,.8406*c);a.lineTo(.3748*b,.8473*c);a.lineTo(.3317*b,.8248*c);a.arcTo(.0163*b,.0151*c,0,0,1,.3276*b,.8158*c);a.close();a.moveTo(.435*b,.8692*c);a.lineTo(.4325*b,.8789*c);a.lineTo(.3959*b,.8594*c);a.arcTo(.0407*b,.0376*c,0,0,1,.3862*b,.8466*c);a.arcTo(.0528*b,.0489*c,0,0,1,.3805*b,.806*c);a.arcTo(.0163*b,.0151*c,0,0,1,.3951*b,.8008*c);a.lineTo(.435*
b,.821*c);a.lineTo(.4285*b,.827*c);a.lineTo(.4008*b,.8127*c);a.arcTo(.0098*b,.0091*c,0,0,0,.3878*b,.8196*c);a.lineTo(.4333*b,.8443*c);a.lineTo(.426*b,.8512*c);a.lineTo(.3878*b,.8308*c);a.arcTo(.0325*b,.0301*c,0,0,0,.3976*b,.8489*c);a.close();a.moveTo(.6171*b,.7932*c);a.arcTo(.0163*b,.0151*c,0,0,1,.6366*b,.7963*c);a.arcTo(.0325*b,.0301*c,0,0,1,.639*b,.8188*c);a.arcTo(.065*b,.0601*c,0,0,1,.6211*b,.8497*c);a.lineTo(.5894*b,.8677*c);a.arcTo(.0203*b,.0188*c,0,0,1,.565*b,.8646*c);a.arcTo(.0407*b,.0376*
c,0,0,1,.5659*b,.8354*c);a.arcTo(.0488*b,.0451*c,0,0,1,.5805*b,.8127*c);a.close();a.moveTo(.5886*b,.8181*c);a.arcTo(.0325*b,.0301*c,0,0,0,.5748*b,.8368*c);a.arcTo(.0325*b,.0301*c,0,0,0,.574*b,.8527*c);a.arcTo(.0098*b,.0091*c,0,0,0,.587*b,.8586*c);a.lineTo(.6163*b,.8428*c);a.arcTo(.0407*b,.0376*c,0,0,0,.6285*b,.8248*c);a.arcTo(.0244*b,.0225*c,0,0,0,.6293*b,.8105*c);a.arcTo(.0098*b,.0091*c,0,0,0,.6163*b,.803*c);a.close();a.moveTo(.64*b,.8398*c);a.lineTo(.64*b,.779*c);a.lineTo(.6854*b,.7563*c);a.arcTo(.0106*
b,.0098*c,0,0,1,.7008*b,.7632*c);a.arcTo(.0407*b,.0376*c,0,0,1,.6959*b,.7865*c);a.arcTo(.0407*b,.0376*c,0,0,1,.6805*b,.8*c);a.lineTo(.6992*b,.8097*c);a.lineTo(.6854*b,.8166*c);a.lineTo(.6569*b,.8015*c);a.lineTo(.6805*b,.7887*c);a.arcTo(.0203*b,.0188*c,0,0,0,.6894*b,.7782*c);a.arcTo(.0244*b,.0225*c,0,0,0,.6894*b,.7699*c);a.arcTo(.0041*b,.0037*c,0,0,0,.6837*b,.7684*c);a.lineTo(.6528*b,.7842*c);a.lineTo(.6528*b,.8331*c);a.close();a.moveTo(.7*b,.8082*c);a.lineTo(.7301*b,.7338*c);a.arcTo(.0098*b,.0091*
c,0,0,1,.7358*b,.7271*c);a.arcTo(.0098*b,.0091*c,0,0,1,.7415*b,.7316*c);a.lineTo(.7699*b,.7707*c);a.lineTo(.7602*b,.7766*c);a.lineTo(.7537*b,.7692*c);a.lineTo(.7276*b,.782*c);a.lineTo(.7228*b,.7736*c);a.lineTo(.748*b,.7617*c);a.lineTo(.7358*b,.7421*c);a.lineTo(.7114*b,.803*c);a.close();a.moveTo(.8244*b,.7316*c);a.lineTo(.8171*b,.7459*c);a.lineTo(.7894*b,.7609*c);a.arcTo(.0244*b,.0225*c,0,0,1,.7683*b,.7593*c);a.arcTo(.0407*b,.0376*c,0,0,1,.7667*b,.7338*c);a.arcTo(.0488*b,.0452*c,0,0,1,.7937*b,.697*
c);a.lineTo(.822*b,.6834*c);a.lineTo(.8171*b,.6962*c);a.lineTo(.7902*b,.7113*c);a.arcTo(.0325*b,.0301*c,0,0,0,.778*b,.7256*c);a.arcTo(.0407*b,.0376*c,0,0,0,.7756*b,.7444*c);a.arcTo(.0077*b,.0072*c,0,0,0,.787*b,.7512*c);a.close();a.moveTo(.8366*b,.6742*c);a.lineTo(.8366*b,.7248*c);a.lineTo(.878*b,.7043*c);a.lineTo(.874*b,.7158*c);a.lineTo(.8333*b,.7368*c);a.arcTo(.0041*b,.0037*c,0,0,1,.8268*b,.7324*c);a.lineTo(.8268*b,.6804*c);a.close();a.moveTo(.9342*b,.6233*c);a.lineTo(.9293*b,.6369*c);a.lineTo(.9033*
b,.6503*c);a.arcTo(.0325*b,.0301*c,0,0,0,.8927*b,.6601*c);a.arcTo(.0406*b,.0376*c,0,0,0,.887*b,.6729*c);a.lineTo(.9309*b,.6503*c);a.lineTo(.9268*b,.6631*c);a.lineTo(.887*b,.6834*c);a.arcTo(.0089*b,.0082*c,0,0,0,.8992*b,.691*c);a.lineTo(.935*b,.6722*c);a.lineTo(.9285*b,.6864*c);a.lineTo(.9008*b,.7007*c);a.arcTo(.0163*b,.0151*c,0,0,1,.8829*b,.7015*c);a.arcTo(.0407*b,.0376*c,0,0,1,.8764*b,.6827*c);a.arcTo(.065*b,.0601*c,0,0,1,.8959*b,.6443*c);a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");
a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*c);a.moveTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*
b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dOracleDatabaseServer.prototype.cst.ORACLE_DB_SERVER,mxShapeAws3dOracleDatabaseServer);function mxShapeAws3dRdsMaster(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dRdsMaster,mxShape);
mxShapeAws3dRdsMaster.prototype.cst={RDS_MASTER:"mxgraph.aws3d.rdsMaster",SHADING_COLORS:"shadingCols"};mxShapeAws3dRdsMaster.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dRdsMaster.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dRdsMaster.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dRdsMaster.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();
a.moveTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.setShadow(!1);a.begin();a.moveTo(.1878*b,.1932*c);a.lineTo(.4854*b,.0414*c);a.lineTo(.5886*b,.094*c);a.lineTo(.4455*b,.2308*c);a.lineTo(.7122*
b,.1579*c);a.lineTo(.8171*b,.2098*c);a.lineTo(.5187*b,.3617*c);a.lineTo(.4537*b,.3293*c);a.lineTo(.7016*b,.2053*c);a.lineTo(.3854*b,.2947*c);a.lineTo(.3187*b,.2602*c);a.lineTo(.4959*b,.0992*c);a.lineTo(.2504*b,.2256*c);a.close();a.fill();a.setLineJoin("round");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*c);a.moveTo(.5*b,.6015*
c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dRdsMaster.prototype.cst.RDS_MASTER,mxShapeAws3dRdsMaster);
function mxShapeAws3dRds(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dRds,mxShape);mxShapeAws3dRds.prototype.cst={RDS:"mxgraph.aws3d.rds",SHADING_COLORS:"shadingCols"};
mxShapeAws3dRds.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dRds.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dRds.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dRds.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();a.moveTo(.874*
b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();a.setFillColor("#ffffff");a.setShadow(!1);a.begin();a.moveTo(0,.6053*c);a.lineTo(.5*b,.8722*c);a.lineTo(b,.6053*c);a.lineTo(b,.6278*c);a.lineTo(.5*b,.8947*c);a.lineTo(0,.6278*c);a.close();a.fill();a.setLineJoin("round");a.begin();
a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*c);a.moveTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);
a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dRds.prototype.cst.RDS,mxShapeAws3dRds);function mxShapeAws3dRoute53(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dRoute53,mxShape);mxShapeAws3dRoute53.prototype.cst={ROUTE_53:"mxgraph.aws3d.route53",SHADING_COLORS:"shadingCols"};
mxShapeAws3dRoute53.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/117,d*c/134.4);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dRoute53.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6994*c);a.lineTo(0,.2009*c);a.lineTo(.0427*b,.0781*c);a.lineTo(.7974*b,0);a.lineTo(b,.1004*c);a.lineTo(b,.5915*c);a.lineTo(.8376*b,.9784*c);a.lineTo(.5983*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dRoute53.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dRoute53.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.2009*c);a.lineTo(.6009*b,.5007*c);a.lineTo(.8376*b,.4799*c);a.lineTo(.8376*b,.9784*c);a.lineTo(.5966*b,c);a.lineTo(0,.6979*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):
a.setAlpha(d[0]);a.begin();a.moveTo(.8348*b,.4861*c);a.lineTo(.9985*b,.0992*c);a.lineTo(b,.5952*c);a.lineTo(.8404*b,.9747*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.5855*b,.1079*c);a.arcTo(.094*b,.0744*c,0,0,0,.6863*b,.1548*c);a.arcTo(.0855*b,.0446*c,0,0,0,.7761*b,.2031*c);a.lineTo(.7726*b,.2455*c);a.arcTo(.0769*b,.0298*c,0,0,0,.694*b,.2693*c);a.arcTo(.0684*b,.0446*c,0,
0,1,.5897*b,.3051*c);a.arcTo(.4274*b,.372*c,0,0,0,.4573*b,.2753*c);a.arcTo(.0855*b,.0744*c,0,0,0,.4188*b,.2344*c);a.lineTo(.3846*b,.2083*c);a.arcTo(.0769*b,.0372*c,0,0,1,.4103*b,.1525*c);a.arcTo(.0855*b,.0409*c,0,0,0,.4906*b,.1079*c);a.close();a.fill();a.begin();a.moveTo(0,.2009*c);a.lineTo(.6009*b,.5007*c);a.lineTo(.8376*b,.4799*c);a.lineTo(.8376*b,.9784*c);a.lineTo(.5966*b,c);a.lineTo(0,.6979*c);a.close();a.moveTo(.8348*b,.4861*c);a.lineTo(.9985*b,.0992*c);a.lineTo(b,.5952*c);a.lineTo(.8404*b,.9747*
c);a.close();a.moveTo(.6009*b,.5007*c);a.lineTo(.6009*b,c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.6994*c);a.lineTo(0,.2009*c);a.lineTo(.0427*b,.0781*c);a.lineTo(.7974*b,0);a.lineTo(b,.1004*c);a.lineTo(b,.5915*c);a.lineTo(.8376*b,.9784*c);a.lineTo(.5983*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dRoute53.prototype.cst.ROUTE_53,mxShapeAws3dRoute53);
function mxShapeAws3dS3Bucket(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dS3Bucket,mxShape);mxShapeAws3dS3Bucket.prototype.cst={S3_BUCKET:"mxgraph.aws3d.s3Bucket",SHADING_COLORS:"shadingCols"};
mxShapeAws3dS3Bucket.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/61.5;d=d*c/63.8;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.2774*c);a.lineTo(.5*b,0);a.lineTo(b,.2774*c);a.lineTo(.7967*b,.8307*c);a.lineTo(.5*
b,c);a.lineTo(.1951*b,.8307*c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dS3Bucket.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.2774*c);a.lineTo(.5*b,.5564*c);a.lineTo(.5*b,c);a.lineTo(.1984*b,.8307*c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.5*b,.5533*c);a.lineTo(b,
.2774*c);a.lineTo(.7967*b,.8307*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.2774*c);a.lineTo(.5*b,.5564*c);a.lineTo(b,.2774*c);a.stroke();a.begin();a.moveTo(.5*b,.5564*c);a.lineTo(.5*b,c);a.stroke();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.2774*c);a.lineTo(.5008*b,0);a.lineTo(b,.2774*c);a.lineTo(.7967*b,.8307*c);a.lineTo(.5008*b,c);a.lineTo(.1951*b,.8307*c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dS3Bucket.prototype.cst.S3_BUCKET,mxShapeAws3dS3Bucket);function mxShapeAws3dS3(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dS3,mxShape);mxShapeAws3dS3.prototype.cst={S3:"mxgraph.aws3d.s3",SHADING_COLORS:"shadingCols"};
mxShapeAws3dS3.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/231.5,d*c/239);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dS3.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7782*c);a.lineTo(0,.3406*c);a.lineTo(.5974*b,0);a.lineTo(b,.2218*c);a.lineTo(b,.6674*c);a.lineTo(.3991*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dS3.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dS3.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.3406*c);a.lineTo(.3991*b,.5548*c);a.lineTo(.3991*b,c);a.lineTo(0,.7782*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.3991*b,.5548*
c);a.lineTo(b,.2218*c);a.lineTo(b,.6661*c);a.lineTo(.3991*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.3406*c);a.lineTo(.3991*b,.5548*c);a.lineTo(b,.2218*c);a.moveTo(.3991*b,.5548*c);a.lineTo(.3991*b,c);a.moveTo(.3991*b,.3335*c);a.lineTo(.2009*b,.448*c);a.lineTo(.2009*b,.8891*c);a.moveTo(.5983*b,.2209*c);a.lineTo(.7948*b,.1109*c);a.moveTo(.2022*b,.2218*c);a.lineTo(.5991*b,.4448*c);a.lineTo(.5991*b,.8891*c);a.moveTo(.4004*b,.1117*c);a.lineTo(.7978*
b,.3335*c);a.lineTo(.7978*b,.7791*c);a.stroke();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.4773*b,.2155*c);a.arcTo(.0086*b,.0046*c,0,0,1,.4903*b,.2096*c);a.arcTo(.2808*b,.272*c,0,0,1,.6004*b,.2619*c);a.arcTo(.108*b,.105*c,0,0,1,.6177*b,.277*c);a.arcTo(.0065*b,.0063*c,0,0,1,.6099*b,.2879*c);a.arcTo(.1944*b,.1883*c,0,0,1,.5378*b,.2607*c);a.arcTo(.216*b,.2092*c,0,0,1,.4773*b,.2155*c);a.close();a.fill();a.begin();a.moveTo(.4687*b,.2138*c);a.arcTo(.1512*
b,.1464*c,0,0,0,.4838*b,.2343*c);a.arcTo(.2376*b,.2301*c,0,0,0,.5529*b,.2774*c);a.arcTo(.1728*b,.1674*c,0,0,0,.6091*b,.2954*c);a.lineTo(.4946*b,.3339*c);a.arcTo(.1944*b,.1883*c,0,0,1,.4549*b,.3205*c);a.arcTo(.1944*b,.1883*c,0,0,1,.419*b,.3004*c);a.arcTo(.1944*b,.1883*c,0,0,1,.3965*b,.2795*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7782*c);a.lineTo(0,.3406*c);a.lineTo(.5974*b,0);a.lineTo(b,.2218*c);a.lineTo(b,.6674*c);a.lineTo(.3991*
b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dS3.prototype.cst.S3,mxShapeAws3dS3);function mxShapeAws3dSimpleDB(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSimpleDB,mxShape);mxShapeAws3dSimpleDB.prototype.cst={SIMPLE_DB:"mxgraph.aws3d.simpleDb",SHADING_COLORS:"shadingCols"};
mxShapeAws3dSimpleDB.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSimpleDB.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dSimpleDB.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dSimpleDB.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();
a.moveTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.setShadow(!1);a.begin();a.moveTo(.1821*b,.182*c);a.lineTo(.4659*b,.0308*c);a.lineTo(.822*b,.2218*c);a.lineTo(.539*b,.3714*c);a.close();
a.fill();a.setLineJoin("round");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*c);a.moveTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.restore();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"fillColor","#ffffff");a.setStrokeColor(d);
a.setStrokeWidth(2.2*f);a.begin();a.moveTo(.2382*b,.2218*c);a.lineTo(.5415*b,.0602*c);a.moveTo(.3821*b,.0564*c);a.lineTo(.7737*b,.2656*c);a.moveTo(.2967*b,.0915*c);a.lineTo(.7114*b,.312*c);a.moveTo(.2209*b,.1316*c);a.lineTo(.6179*b,.3434*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();
a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dSimpleDB.prototype.cst.SIMPLE_DB,mxShapeAws3dSimpleDB);function mxShapeAws3dSqs(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSqs,mxShape);mxShapeAws3dSqs.prototype.cst={SQS:"mxgraph.aws3d.sqs",SHADING_COLORS:"shadingCols"};
mxShapeAws3dSqs.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/184,d*c/212.75);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSqs.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7485*c);a.lineTo(0,.584*c);a.lineTo(.1658*b,.1666*c);a.lineTo(.5*b,0);a.lineTo(.8337*b,.1666*c);a.lineTo(b,.584*c);a.lineTo(b,.7485*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dSqs.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dSqs.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.1658*b,.1671*c);a.lineTo(.5*b,.334*c);a.lineTo(.5*b,c);a.lineTo(0,.7485*c);a.lineTo(0,.584*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();
a.moveTo(.5*b,.3344*c);a.lineTo(.8332*b,.1671*c);a.lineTo(b,.584*c);a.lineTo(b,.7509*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(.6674*b,.0844*c);a.lineTo(.3337*b,.2512*c);a.lineTo(.25*b,.7109*c);a.lineTo(.25*b,.8736*c);a.moveTo(.3326*b,.0839*c);a.lineTo(.6674*b,.2512*c);a.lineTo(.75*b,.7053*c);a.lineTo(.75*b,.874*c);a.moveTo(0,.584*c);a.lineTo(.5*b,.8331*c);a.lineTo(b,.584*c);a.moveTo(.1658*b,.1671*c);a.lineTo(.5*b,.334*c);a.lineTo(.8332*
b,.1671*c);a.moveTo(.5*b,.334*c);a.lineTo(.5*b,c);a.stroke();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.3337*b,.1511*c);a.lineTo(.4668*b,.0848*c);a.lineTo(.6663*b,.184*c);a.lineTo(.5337*b,.2503*c);a.close();a.fill();d=mxUtils.getValue(this.state.style,"fillColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.3902*b,.153*c);a.lineTo(.4701*b,.113*c);a.lineTo(.4701*b,.153*c);a.close();a.moveTo(.4402*b,.1784*c);a.lineTo(.5196*b,.1384*c);a.lineTo(.5196*
b,.1784*c);a.close();a.moveTo(.4908*b,.2033*c);a.lineTo(.5701*b,.1633*c);a.lineTo(.5701*b,.2033*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7485*c);a.lineTo(0,.584*c);a.lineTo(.1658*b,.1666*c);a.lineTo(.5*b,0);a.lineTo(.8337*b,.1666*c);a.lineTo(b,.584*c);a.lineTo(b,.7485*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dSqs.prototype.cst.SQS,mxShapeAws3dSqs);
function mxShapeAws3dVpcGateway(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dVpcGateway,mxShape);mxShapeAws3dVpcGateway.prototype.cst={VPC_GATEWAY:"mxgraph.aws3d.vpcGateway",SHADING_COLORS:"shadingCols"};
mxShapeAws3dVpcGateway.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/116.7,d*c/102.8);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dVpcGateway.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(.5801*b,.5447*c);a.lineTo(.5801*b,.035*c);a.lineTo(.1054*b,0);a.lineTo(0,.0691*c);a.lineTo(0,.4134*c);a.lineTo(.3188*b,.7247*c);a.close();a.fillAndStroke();a.restore();a.save();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dVpcGateway.prototype.cst.SHADING_COLORS,
"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5801*b,.5447*c);a.lineTo(.5801*b,.035*c);a.lineTo(.3162*b,.2072*c);a.lineTo(.3162*b,.7247*c);a.close();a.fill();"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.3162*b,.2072*c);a.lineTo(0,.0691*c);a.lineTo(0,.4134*c);a.lineTo(.3162*b,.7247*c);a.close();a.fill();a.restore();a.setShadow(!1);a.begin();a.moveTo(.5801*b,.5447*c);a.lineTo(.5801*b,.035*
c);a.lineTo(.3162*b,.2072*c);a.lineTo(.3162*b,.7247*c);a.close();a.stroke();a.restore();a.setLineJoin("round");a.setShadow(!1);a.begin();a.moveTo(.3162*b,.2072*c);a.lineTo(0,.0691*c);a.lineTo(0,.4134*c);a.lineTo(.3162*b,.7247*c);a.close();a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(.5801*b,.5447*c);a.lineTo(.5801*b,.035*c);a.lineTo(.1054*b,0);a.lineTo(0,.0691*c);a.lineTo(0,.4134*c);a.lineTo(.3188*b,.7247*c);a.close();a.stroke();a.restore();a.setStrokeWidth(2*f);
a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(b,.929*c);a.lineTo(b,.5866*c);a.lineTo(.6829*b,.1031*c);a.lineTo(.4216*b,.2753*c);a.lineTo(.4216*b,.7928*c);a.lineTo(.8946*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dVpcGateway.prototype.foreground=function(a,d,e,b,c,f){a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dVpcGateway.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var g=mxUtils.getValue(this.state.style,"flipH","0");"0"==g?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(b,.929*c);a.lineTo(b,.5866*c);a.lineTo(.8946*b,.6537*c);a.lineTo(.8946*
b,c);a.close();a.fill();"0"==g?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(.8946*b,c);a.lineTo(.8946*b,.6537*c);a.lineTo(.4216*b,.2753*c);a.lineTo(.4216*b,.7928*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(b,.929*c);a.lineTo(b,.5866*c);a.lineTo(.8946*b,.6537*c);a.lineTo(.8946*b,c);a.close();a.stroke();a.begin();a.moveTo(.8946*b,c);a.lineTo(.8946*b,.6537*c);a.lineTo(.4216*b,.2753*c);a.lineTo(.4216*b,.7928*c);a.close();a.stroke();a.setStrokeWidth(2*
f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(b,.929*c);a.lineTo(b,.5866*c);a.lineTo(.6829*b,.1031*c);a.lineTo(.4216*b,.2753*c);a.lineTo(.4216*b,.7928*c);a.lineTo(.8946*b,c);a.close();a.stroke();a.setFillColor(d);a.begin();a.moveTo(.5587*b,.7743*c);a.lineTo(.5587*b,.6274*c);a.lineTo(.5775*b,.6342*c);a.lineTo(.5775*b,.57*c);a.arcTo(.0428*b,.0486*c,0,0,1,.6058*b,.5253*c);a.arcTo(.0686*b,.0778*c,0,0,1,.6564*b,.5447*c);a.arcTo(.0857*b,.0973*c,0,0,1,.6847*b,.607*c);a.lineTo(.6847*
b,.6877*c);a.lineTo(.7001*b,.6946*c);a.lineTo(.7001*b,.8405*c);a.close();a.moveTo(.6564*b,.6741*c);a.lineTo(.6564*b,.6177*c);a.arcTo(.06*b,.0681*c,0,0,0,.6392*b,.57*c);a.arcTo(.0343*b,.0389*c,0,0,0,.6195*b,.5574*c);a.arcTo(.0111*b,.0126*c,0,0,0,.6058*b,.5691*c);a.lineTo(.6058*b,.6498*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeAws3dVpcGateway.prototype.cst.VPC_GATEWAY,mxShapeAws3dVpcGateway);
function mxShapeAws3dWebServer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dWebServer,mxShape);mxShapeAws3dWebServer.prototype.cst={WEB_SERVER:"mxgraph.aws3d.webServer",SHADING_COLORS:"shadingCols"};
mxShapeAws3dWebServer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/106);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dWebServer.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,0);a.lineTo(b,.3349*c);a.lineTo(b,.6651*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dWebServer.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dWebServer.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.3349*c);a.lineTo(.5*b,.6651*c);a.lineTo(.5*b,c);a.lineTo(0,.6651*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*
b,.6651*c);a.lineTo(b,.3349*c);a.lineTo(b,.6651*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.3349*c);a.lineTo(.5*b,.6651*c);a.lineTo(.5*b,c);a.lineTo(0,.6651*c);a.close();a.stroke();a.begin();a.moveTo(.5*b,.6651*c);a.lineTo(b,.3349*c);a.lineTo(b,.6651*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineJoin("miter");d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.374*b,.5189*c);a.arcTo(.0325*
b,.0236*c,0,0,1,.374*b,.4858*c);a.lineTo(.4797*b,.4151*c);a.arcTo(.0325*b,.0236*c,0,0,1,.5203*b,.4151*c);a.lineTo(.626*b,.4858*c);a.arcTo(.0325*b,.0236*c,0,0,1,.626*b,.516*c);a.lineTo(.5203*b,.5868*c);a.arcTo(.0325*b,.0236*c,0,0,1,.4797*b,.5868*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6651*c);a.lineTo(0,.3349*c);a.lineTo(.5*b,0);a.lineTo(b,.3349*c);a.lineTo(b,.6651*c);a.lineTo(.5*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dWebServer.prototype.cst.WEB_SERVER,mxShapeAws3dWebServer);function mxShapeAws3dDynamoDB(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDynamoDB,mxShape);mxShapeAws3dDynamoDB.prototype.cst={DYNAMO_DB:"mxgraph.aws3d.dynamoDb",SHADING_COLORS:"shadingCols"};
mxShapeAws3dDynamoDB.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/181.5,d*c/210);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dDynamoDB.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8333*c);a.lineTo(0,.1667*c);a.lineTo(.3333*b,.0014*c);a.lineTo(.4986*b,.1667*c);a.lineTo(.6639*b,0);a.lineTo(b,.169*c);a.lineTo(b,.8333*c);a.lineTo(.6667*b,c);a.lineTo(.5014*b,.9162*c);a.lineTo(.3333*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dDynamoDB.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dDynamoDB.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.168*b,.3333*c);a.lineTo(0,.3333*c);a.lineTo(.3333*b,.5*c);a.lineTo(.3333*b,c);a.lineTo(0,.8333*c);a.lineTo(0,.1714*c);a.close();a.moveTo(.4986*b,.1667*c);
a.lineTo(.6667*b,0);a.lineTo(b,.169*c);a.lineTo(.832*b,.3348*c);a.lineTo(b,.3333*c);a.lineTo(.6667*b,.5*c);a.lineTo(.5014*b,.5*c);a.lineTo(.832*b,.3348*c);a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.3333*b,.5*c);a.lineTo(.4986*b,.5*c);a.lineTo(.4986*b,.9162*c);a.lineTo(.3333*b,c);a.close();a.moveTo(.6667*b,c);a.lineTo(.6667*b,.5*c);a.lineTo(b,.3333*c);a.lineTo(.832*b,.3348*c);a.lineTo(b,.169*c);a.lineTo(b,.831*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");
a.begin();a.moveTo(.168*b,.3333*c);a.lineTo(0,.3333*c);a.lineTo(.3333*b,.5*c);a.lineTo(.3333*b,c);a.lineTo(0,.8333*c);a.lineTo(0,.1714*c);a.close();a.moveTo(.4986*b,.1667*c);a.lineTo(.6667*b,0);a.lineTo(b,.169*c);a.lineTo(.832*b,.3348*c);a.lineTo(b,.3333*c);a.lineTo(.6667*b,.5*c);a.lineTo(.5014*b,.5*c);a.lineTo(.832*b,.3348*c);a.close();a.moveTo(.3333*b,.5*c);a.lineTo(.4986*b,.5*c);a.lineTo(.4986*b,.9162*c);a.lineTo(.3333*b,c);a.close();a.moveTo(.6667*b,c);a.lineTo(.6667*b,.5*c);a.lineTo(b,.3333*
c);a.lineTo(b,.831*c);a.close();a.moveTo(.168*b,.3333*c);a.lineTo(.5*b,.1667*c);a.moveTo(.168*b,.3333*c);a.lineTo(.5014*b,.5*c);a.stroke();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.4876*b,.2262*c);a.arcTo(.303*b,.2619*c,0,0,1,.5647*b,.25*c);a.arcTo(.4407*b,.381*c,0,0,1,.6419*b,.2905*c);a.arcTo(.303*b,.2619*c,0,0,1,.6799*b,.32*c);a.arcTo(.0132*b,.0076*c,0,0,1,.6634*b,.3314*c);a.arcTo(.303*b,.2619*c,0,0,1,.5978*b,.3119*c);a.arcTo(.4408*b,.381*
c,0,0,1,.508*b,.2667*c);a.arcTo(.303*b,.2619*c,0,0,1,.4711*b,.2343*c);a.arcTo(.0132*b,.0076*c,0,0,1,.4876*b,.2262*c);a.close();a.fill();a.begin();a.moveTo(.5124*b,.4143*c);a.arcTo(.1102*b,.0952*c,0,0,1,.4683*b,.4095*c);a.arcTo(.4408*b,.381*c,0,0,1,.3829*b,.3757*c);a.arcTo(.4408*b,.381*c,0,0,1,.3196*b,.3371*c);a.arcTo(.0661*b,.0357*c,0,0,1,.3058*b,.3081*c);a.lineTo(.4612*b,.2333*c);a.arcTo(.0661*b,.0476*c,0,0,0,.4744*b,.2548*c);a.arcTo(.3306*b,.2857*c,0,0,0,.53*b,.2905*c);a.arcTo(.4408*b,.381*c,0,
0,0,.6198*b,.3295*c);a.arcTo(.1102*b,.0952*c,0,0,0,.665*b,.3367*c);a.close();a.moveTo(.5052*b,.3714*c);a.arcTo(.0275*b,.019*c,0,0,1,.5135*b,.3581*c);a.arcTo(.0275*b,.0238*c,0,0,1,.5344*b,.3571*c);a.lineTo(.5405*b,.3471*c);a.arcTo(.0275*b,.0143*c,0,0,1,.5278*b,.3381*c);a.arcTo(.022*b,.0119*c,0,0,1,.5372*b,.3271*c);a.lineTo(.5306*b,.3186*c);a.arcTo(.0331*b,.0286*c,0,0,1,.5041*b,.3143*c);a.arcTo(.0275*b,.0143*c,0,0,1,.4975*b,.3029*c);a.lineTo(.4777*b,.2995*c);a.arcTo(.0331*b,.0286*c,0,0,1,.4628*b,.3033*
c);a.arcTo(.0331*b,.0286*c,0,0,1,.4408*b,.2967*c);a.lineTo(.4187*b,.3*c);a.arcTo(.011*b,.0081*c,0,0,1,.4132*b,.3124*c);a.arcTo(.0386*b,.0333*c,0,0,1,.395*b,.3129*c);a.lineTo(.3873*b,.3224*c);a.arcTo(.0165*b,.0143*c,0,0,1,.3994*b,.3333*c);a.arcTo(.0138*b,.0119*c,0,0,1,.3901*b,.3433*c);a.lineTo(.3994*b,.3514*c);a.arcTo(.0331*b,.0286*c,0,0,1,.4215*b,.3548*c);a.arcTo(.0165*b,.0119*c,0,0,1,.4298*b,.3667*c);a.lineTo(.449*b,.3714*c);a.arcTo(.0331*b,.0286*c,0,0,1,.4711*b,.3657*c);a.arcTo(.0331*b,.0286*c,
0,0,1,.4887*b,.3724*c);a.close();a.moveTo(.4986*b,.351*c);a.arcTo(.0441*b,.0381*c,0,0,1,.4804*b,.3552*c);a.arcTo(.1102*b,.0952*c,0,0,1,.443*b,.349*c);a.lineTo(.4413*b,.3529*c);a.lineTo(.4242*b,.3371*c);a.arcTo(.1102*b,.0952*c,0,0,0,.4545*b,.3462*c);a.arcTo(.1102*b,.0952*c,0,0,0,.4793*b,.3476*c);a.arcTo(.0441*b,.0381*c,0,0,0,.4986*b,.3448*c);a.close();a.moveTo(.503*b,.3349*c);a.arcTo(.1102*b,.0952*c,0,0,0,.4766*b,.3233*c);a.arcTo(.0826*b,.0714*c,0,0,0,.4529*b,.32*c);a.arcTo(.0551*b,.0476*c,0,0,0,.4325*
b,.3238*c);a.lineTo(.427*b,.3195*c);a.arcTo(.0826*b,.0714*c,0,0,1,.4556*b,.3157*c);a.arcTo(.0826*b,.0714*c,0,0,1,.4851*b,.3232*c);a.lineTo(.4876*b,.3181*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8333*c);a.lineTo(0,.1667*c);a.lineTo(.3333*b,.0014*c);a.lineTo(.4986*b,.1667*c);a.lineTo(.6639*b,0);a.lineTo(b,.169*c);a.lineTo(b,.8333*c);a.lineTo(.6667*b,c);a.lineTo(.5014*b,.9162*c);a.lineTo(.3333*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dDynamoDB.prototype.cst.DYNAMO_DB,mxShapeAws3dDynamoDB);function mxShapeAws3dElasticMapReduce(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dElasticMapReduce,mxShape);mxShapeAws3dElasticMapReduce.prototype.cst={ELASTIC_MAP_REDUCE:"mxgraph.aws3d.elasticMapReduce",SHADING_COLORS:"shadingCols"};
mxShapeAws3dElasticMapReduce.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dElasticMapReduce.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dElasticMapReduce.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dDynamoDB.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();
a.moveTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.setShadow(!1);a.begin();a.moveTo(.3336*b,.1789*c);a.arcTo(.0328*b,.0301*c,0,0,1,.359*b,.1789*c);a.lineTo(.4001*b,.2015*c);a.arcTo(.0074*
b,.0068*c,0,0,1,.4008*b,.2135*c);a.lineTo(.3574*b,.2368*c);a.arcTo(.0328*b,.0301*c,0,0,1,.3352*b,.2368*c);a.lineTo(.2934*b,.2143*c);a.arcTo(.0074*b,.0068*c,0,0,1,.2934*b,.2015*c);a.close();a.moveTo(.3705*b,.1729*c);a.arcTo(.0074*b,.0068*c,0,0,1,.3705*b,.1602*c);a.lineTo(.4139*b,.1368*c);a.arcTo(.0328*b,.0301*c,0,0,1,.4336*b,.1368*c);a.lineTo(.4811*b,.1617*c);a.arcTo(.0074*b,.0068*c,0,0,1,.4811*b,.1708*c);a.lineTo(.4328*b,.1955*c);a.arcTo(.0328*b,.0301*c,0,0,1,.4156*b,.1955*c);a.close();a.moveTo(.4467*
b,.1308*c);a.arcTo(.0074*b,.0068*c,0,0,1,.4467*b,.1203*c);a.lineTo(.491*b,.0962*c);a.arcTo(.0328*b,.0301*c,0,0,1,.5123*b,.0962*c);a.lineTo(.559*b,.1203*c);a.arcTo(.0074*b,.0068*c,0,0,1,.559*b,.1293*c);a.lineTo(.5123*b,.1549*c);a.arcTo(.0328*b,.0301*c,0,0,1,.4918*b,.1549*c);a.close();a.moveTo(.568*b,.1383*c);a.arcTo(.0328*b,.0301*c,0,0,1,.5918*b,.1383*c);a.lineTo(.6361*b,.1624*c);a.arcTo(.0074*b,.0068*c,0,0,1,.6366*b,.1714*c);a.lineTo(.5885*b,.1955*c);a.arcTo(.0328*b,.0301*c,0,0,1,.568*b,.1955*c);
a.lineTo(.523*b,.1714*c);a.arcTo(.0074*b,.0068*c,0,0,1,.523*b,.1616*c);a.close();a.moveTo(.6451*b,.1789*c);a.arcTo(.0328*b,.0301*c,0,0,1,.6697*b,.1789*c);a.lineTo(.7123*b,.2023*c);a.arcTo(.0074*b,.0068*c,0,0,1,.7123*b,.2128*c);a.lineTo(.6664*b,.2376*c);a.arcTo(.0328*b,.0301*c,0,0,1,.6492*b,.2376*c);a.lineTo(.6016*b,.2135*c);a.arcTo(.0074*b,.0068*c,0,0,1,.6016*b,.2023*c);a.close();a.moveTo(.6369*b,.2451*c);a.arcTo(.0074*b,.0068*c,0,0,1,.6369*b,.2526*c);a.lineTo(.5172*b,.3173*c);a.arcTo(.0328*b,.0301*
c,0,0,1,.4893*b,.3173*c);a.lineTo(.3697*b,.2541*c);a.arcTo(.0074*b,.0068*c,0,0,1,.3697*b,.2436*c);a.lineTo(.4918*b,.1782*c);a.arcTo(.0328*b,.0301*c,0,0,1,.5131*b,.1782*c);a.close();a.fill();a.moveTo(0*b,0*c);a.lineTo(0*b,0*c);a.arcTo(0*b,0*c,0,0,1,0*b,0*c);a.setLineJoin("round");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*
c);a.moveTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dElasticMapReduce.prototype.cst.ELASTIC_MAP_REDUCE,mxShapeAws3dElasticMapReduce);function mxShapeAws3dRdsSlave(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dRdsSlave,mxShape);mxShapeAws3dRdsSlave.prototype.cst={RDS_SLAVE:"mxgraph.aws3d.rdsSlave"};
mxShapeAws3dRdsSlave.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dRdsSlave.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dRdsSlave.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");a.setAlpha("0.1");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.lineTo(0,.7331*c);a.lineTo(0,.3346*c);a.close();a.moveTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3308*c);a.fill();a.setAlpha("0.3");a.begin();a.moveTo(.5*b,c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*
c);a.lineTo(b,.3308*c);a.lineTo(b,.7331*c);a.close();a.fill();a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.setShadow(!1);a.begin();a.moveTo(.2457*b,.2137*c);a.lineTo(.5393*b,.0593*c);a.lineTo(.6875*b,.1377*c);a.arcTo(.0871*b,.0799*c,0,0,1,.7137*b,.1625*c);a.arcTo(.0348*b,.032*c,0,0,1,.7076*b,.1968*c);a.arcTo(.1743*b,.1599*c,0,0,1,.6597*b,.2249*c);a.arcTo(.1307*b,.1199*c,0,0,1,.5943*b,.232*c);a.arcTo(.1307*b,.1199*c,0,0,1,.5542*b,.2225*c);a.arcTo(.0871*
b,.0799*c,0,0,1,.5673*b,.2353*c);a.arcTo(.0261*b,.024*c,0,0,1,.5611*b,.2729*c);a.lineTo(.4889*b,.316*c);a.arcTo(.0261*b,.024*c,0,0,0,.4766*b,.3352*c);a.lineTo(.4052*b,.2992*c);a.arcTo(.0173*b,.0159*c,0,0,1,.4121*b,.2841*c);a.lineTo(.4914*b,.2368*c);a.arcTo(.0218*b,.02*c,0,0,0,.4897*b,.2129*c);a.lineTo(.4409*b,.1857*c);a.lineTo(.3145*b,.2529*c);a.close();a.moveTo(.4801*b,.1633*c);a.lineTo(.5263*b,.1865*c);a.arcTo(.0871*b,.0799*c,0,0,0,.583*b,.1905*c);a.arcTo(.1307*b,.1199*c,0,0,0,.6196*b,.1721*c);
a.arcTo(.0261*b,.024*c,0,0,0,.6117*b,.1441*c);a.lineTo(.5655*b,.1193*c);a.fill();a.setLineJoin("round");a.begin();a.moveTo(.126*b,.1316*c);a.lineTo(.126*b,.267*c);a.lineTo(.378*b,.4023*c);a.lineTo(.5*b,.6015*c);a.lineTo(.622*b,.4023*c);a.lineTo(.874*b,.267*c);a.lineTo(.874*b,.1316*c);a.moveTo(0,.3346*c);a.lineTo(.126*b,.267*c);a.moveTo(.5*b,.6015*c);a.lineTo(.5*b,c);a.moveTo(b,.3346*c);a.lineTo(.87*b,.267*c);a.moveTo(.378*b,.4023*c);a.lineTo(.622*b,.4023*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");
a.begin();a.moveTo(0,.7331*c);a.lineTo(0,.3346*c);a.lineTo(.126*b,.1316*c);a.lineTo(.374*b,0);a.lineTo(.626*b,0);a.lineTo(.874*b,.1316*c);a.lineTo(b,.3346*c);a.lineTo(b,.7331*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dRdsSlave.prototype.cst.RDS_SLAVE,mxShapeAws3dRdsSlave);function mxShapeAws3dAMI2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dAMI2,mxShape);
mxShapeAws3dAMI2.prototype.cst={AMI_2:"mxgraph.aws3d.ami2",SHADING_COLORS:"shadingCols"};
mxShapeAws3dAMI2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(d*b/92,d*c/60);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==e&&a.setShadow(!0);a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*c);
a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dAMI2.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):
a.setAlpha(e[0]);a.begin();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.moveTo(0,.572*c);a.lineTo(.0892*b,.422*c);a.moveTo(.5027*b,c);a.lineTo(.4189*
b,.708*c);a.moveTo(.9176*b,.43*c);a.lineTo(.9176*b,.29*c);a.stroke();a.setStrokeWidth(2*d);a.setLineJoin("round");a.begin();a.moveTo(.2095*b,.376*c);a.lineTo(.527*b,.104*c);a.lineTo(.6338*b,.194*c);a.lineTo(.3149*b,.468*c);a.close();a.moveTo(.3716*b,.518*c);a.lineTo(.6892*b,.246*c);a.lineTo(.796*b,.336*c);a.lineTo(.477*b,.61*c);a.close();a.moveTo(.3108*b,.282*c);a.lineTo(.4257*b,.38*c);a.moveTo(.4189*b,.194*c);a.lineTo(.5297*b,.288*c);a.moveTo(.5838*b,.338*c);a.lineTo(.6892*b,.426*c);a.moveTo(.4757*
b,.426*c);a.lineTo(.5838*b,.518*c);a.stroke();a.setStrokeColor("#292929");a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*c);a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dAMI2.prototype.cst.AMI_2,mxShapeAws3dAMI2);function mxShapeAws3dEbs(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dEbs,mxShape);
mxShapeAws3dEbs.prototype.cst={EBS:"mxgraph.aws3d.ebs",SHADING_COLORS:"shadingCols"};
mxShapeAws3dEbs.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/92;d=d*c/60;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.5276*c);a.lineTo(0,.4188*c);a.lineTo(.071*b,.2898*c);a.lineTo(.4033*b,0);a.lineTo(.9301*
b,.464*c);a.lineTo(b,.5863*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dEbs.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(.071*b,.2948*c);a.lineTo(.6011*b,.7621*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.lineTo(0,.5276*c);a.lineTo(0,.4137*c);
a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.6011*b,.7655*c);a.lineTo(.9344*b,.4724*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(.071*b,.2948*c);a.lineTo(.6011*b,.7621*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.lineTo(0,.5276*c);a.lineTo(0,.4137*c);a.close();a.moveTo(.6011*b,.7655*c);a.lineTo(.9344*b,.4724*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.close();a.moveTo(.0033*b,.5276*c);a.lineTo(.071*
b,.2898*c);a.moveTo(.5325*b,.9976*c);a.lineTo(.603*b,.7593*c);a.stroke();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.5276*c);a.lineTo(0,.4188*c);a.lineTo(.071*b,.2898*c);a.lineTo(.4033*b,0);a.lineTo(.9301*b,.464*c);a.lineTo(b,.5863*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dEbs.prototype.cst.EBS,mxShapeAws3dEbs);
function mxShapeAws3dOracleServer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dOracleServer,mxShape);mxShapeAws3dOracleServer.prototype.cst={ORACLE_SERVER:"mxgraph.aws3d.oracleServer"};
mxShapeAws3dOracleServer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/123,d*c/133);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dOracleServer.prototype.background=function(a,d,e,b,c,f){a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dOracleServer.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");a.setAlpha("0.1");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.fill();a.setAlpha("0.3");a.begin();a.moveTo(.5*b,.5*c);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#ff0000");a.begin();a.moveTo(0,.5866*c);a.lineTo(.5*b,.8359*c);a.lineTo(b,
.5866*c);a.lineTo(b,.6986*c);a.lineTo(.5*b,.9486*c);a.lineTo(0,.6986*c);a.fill();a.setStrokeWidth(.5*f);a.setStrokeColor("#ffffff");a.setFillColor("#ffffff");a.begin();a.moveTo(0,.5866*c);a.lineTo(.5*b,.8359*c);a.lineTo(b,.5866*c);a.moveTo(b,.6986*c);a.lineTo(.5*b,.9486*c);a.lineTo(0,.6986*c);a.stroke();a.begin();a.moveTo(.0813*b,.7113*c);a.arcTo(.0569*b,.0493*c,0,0,1,.065*b,.6831*c);a.arcTo(.065*b,.0563*c,0,0,1,.065*b,.6613*c);a.arcTo(.0163*b,.0141*c,0,0,1,.0797*b,.6549*c);a.lineTo(.122*b,.6754*
c);a.arcTo(.065*b,.0563*c,0,0,1,.1358*b,.6937*c);a.arcTo(.065*b,.0563*c,0,0,1,.139*b,.7232*c);a.arcTo(.0179*b,.0155*c,0,0,1,.1187*b,.7296*c);a.close();a.moveTo(.1163*b,.7183*c);a.arcTo(.0089*b,.0077*c,0,0,0,.1285*b,.7148*c);a.arcTo(.0407*b,.0352*c,0,0,0,.1293*b,.7021*c);a.arcTo(.0407*b,.0352*c,0,0,0,.1179*b,.6831*c);a.lineTo(.087*b,.6676*c);a.arcTo(.0081*b,.007*c,0,0,0,.0764*b,.6697*c);a.arcTo(.0325*b,.0352*c,0,0,0,.078*b,.6937*c);a.arcTo(.0407*b,.0352*c,0,0,0,.087*b,.7035*c);a.close();a.moveTo(.1439*
b,.743*c);a.lineTo(.1439*b,.6866*c);a.lineTo(.1846*b,.707*c);a.arcTo(.0407*b,.0352*c,0,0,1,.1967*b,.7183*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2*b,.738*c);a.arcTo(.0138*b,.0155*c,0,0,1,.1813*b,.743*c);a.lineTo(.1992*b,.769*c);a.lineTo(.187*b,.7641*c);a.lineTo(.1577*b,.7218*c);a.lineTo(.1854*b,.7345*c);a.arcTo(.0041*b,.0035*c,0,0,0,.1911*b,.7317*c);a.arcTo(.0163*b,.0141*c,0,0,0,.1894*b,.7225*c);a.arcTo(.0325*b,.0282*c,0,0,0,.1821*b,.7155*c);a.lineTo(.1528*b,.7007*c);a.lineTo(.1528*b,.7472*c);a.close();
a.moveTo(.2008*b,.7711*c);a.lineTo(.2293*b,.7338*c);a.arcTo(.0065*b,.0056*c,0,0,1,.2382*b,.7324*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2431*b,.7415*c);a.lineTo(.2699*b,.8035*c);a.lineTo(.2602*b,.8007*c);a.lineTo(.252*b,.7859*c);a.lineTo(.2293*b,.7754*c);a.lineTo(.2244*b,.7634*c);a.lineTo(.248*b,.7739*c);a.lineTo(.235*b,.7444*c);a.lineTo(.2122*b,.7768*c);a.close();a.moveTo(.3244*b,.8225*c);a.lineTo(.3171*b,.8289*c);a.lineTo(.2854*b,.8127*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2724*b,.7986*c);a.arcTo(.0569*b,
.0493*c,0,0,1,.265*b,.7746*c);a.arcTo(.0407*b,.0352*c,0,0,1,.2683*b,.762*c);a.arcTo(.0163*b,.0141*c,0,0,1,.2829*b,.757*c);a.lineTo(.3228*b,.7761*c);a.lineTo(.3179*b,.7831*c);a.lineTo(.2878*b,.7683*c);a.arcTo(.0081*b,.007*c,0,0,0,.2789*b,.7697*c);a.arcTo(.0244*b,.0211*c,0,0,0,.2748*b,.7831*c);a.arcTo(.0407*b,.0352*c,0,0,0,.2878*b,.8042*c);a.close();a.moveTo(.3276*b,.7789*c);a.lineTo(.3366*b,.7831*c);a.lineTo(.3366*b,.8289*c);a.lineTo(.3805*b,.8507*c);a.lineTo(.3748*b,.857*c);a.lineTo(.3317*b,.8359*
c);a.arcTo(.0163*b,.0141*c,0,0,1,.3276*b,.8275*c);a.close();a.moveTo(.435*b,.8775*c);a.lineTo(.4325*b,.8866*c);a.lineTo(.3959*b,.8683*c);a.arcTo(.0407*b,.0352*c,0,0,1,.3862*b,.8563*c);a.arcTo(.0528*b,.0458*c,0,0,1,.3805*b,.8183*c);a.arcTo(.0163*b,.0141*c,0,0,1,.3951*b,.8134*c);a.lineTo(.435*b,.8324*c);a.lineTo(.4285*b,.838*c);a.lineTo(.4008*b,.8246*c);a.arcTo(.0098*b,.0085*c,0,0,0,.3878*b,.831*c);a.lineTo(.4333*b,.8542*c);a.lineTo(.426*b,.8606*c);a.lineTo(.3878*b,.8415*c);a.arcTo(.0325*b,.0282*c,
0,0,0,.3976*b,.8585*c);a.close();a.moveTo(.6171*b,.8063*c);a.arcTo(.0163*b,.0141*c,0,0,1,.6366*b,.8092*c);a.arcTo(.0325*b,.0282*c,0,0,1,.639*b,.8303*c);a.arcTo(.065*b,.0563*c,0,0,1,.6211*b,.8592*c);a.lineTo(.5894*b,.8761*c);a.arcTo(.0203*b,.0176*c,0,0,1,.565*b,.8732*c);a.arcTo(.0407*b,.0352*c,0,0,1,.5659*b,.8458*c);a.arcTo(.0488*b,.0422*c,0,0,1,.5805*b,.8246*c);a.close();a.moveTo(.5886*b,.8296*c);a.arcTo(.0325*b,.0282*c,0,0,0,.5748*b,.8472*c);a.arcTo(.0325*b,.0282*c,0,0,0,.574*b,.862*c);a.arcTo(.0098*
b,.0085*c,0,0,0,.587*b,.8676*c);a.lineTo(.6163*b,.8528*c);a.arcTo(.0407*b,.0352*c,0,0,0,.6285*b,.8359*c);a.arcTo(.0244*b,.0211*c,0,0,0,.6293*b,.8225*c);a.arcTo(.0098*b,.0085*c,0,0,0,.6163*b,.8155*c);a.close();a.moveTo(.64*b,.85*c);a.lineTo(.64*b,.793*c);a.lineTo(.6854*b,.7718*c);a.arcTo(.0106*b,.0092*c,0,0,1,.7008*b,.7782*c);a.arcTo(.0407*b,.0352*c,0,0,1,.6959*b,.8*c);a.arcTo(.0407*b,.0352*c,0,0,1,.6805*b,.8127*c);a.lineTo(.6992*b,.8218*c);a.lineTo(.6854*b,.8282*c);a.lineTo(.6569*b,.8141*c);a.lineTo(.6805*
b,.8021*c);a.arcTo(.0203*b,.0176*c,0,0,0,.6894*b,.7923*c);a.arcTo(.0244*b,.0211*c,0,0,0,.6894*b,.7845*c);a.arcTo(.0041*b,.0035*c,0,0,0,.6837*b,.7831*c);a.lineTo(.6528*b,.7979*c);a.lineTo(.6528*b,.8437*c);a.close();a.moveTo(.7*b,.8204*c);a.lineTo(.7301*b,.7507*c);a.arcTo(.0098*b,.0085*c,0,0,1,.7358*b,.7444*c);a.arcTo(.0098*b,.0085*c,0,0,1,.7415*b,.7486*c);a.lineTo(.7699*b,.7852*c);a.lineTo(.7602*b,.7908*c);a.lineTo(.7537*b,.7838*c);a.lineTo(.7276*b,.7958*c);a.lineTo(.7228*b,.788*c);a.lineTo(.748*b,
.7768*c);a.lineTo(.7358*b,.7585*c);a.lineTo(.7114*b,.8155*c);a.close();a.moveTo(.8244*b,.7486*c);a.lineTo(.8171*b,.762*c);a.lineTo(.7894*b,.7761*c);a.arcTo(.0244*b,.0211*c,0,0,1,.7683*b,.7746*c);a.arcTo(.0407*b,.0352*c,0,0,1,.7667*b,.7507*c);a.arcTo(.0488*b,.0423*c,0,0,1,.7937*b,.7162*c);a.lineTo(.822*b,.7035*c);a.lineTo(.8171*b,.7155*c);a.lineTo(.7902*b,.7296*c);a.arcTo(.0325*b,.0282*c,0,0,0,.778*b,.743*c);a.arcTo(.0407*b,.0352*c,0,0,0,.7756*b,.7606*c);a.arcTo(.0077*b,.0067*c,0,0,0,.787*b,.767*c);
a.close();a.moveTo(.8366*b,.6949*c);a.lineTo(.8366*b,.7423*c);a.lineTo(.878*b,.7231*c);a.lineTo(.874*b,.7338*c);a.lineTo(.8333*b,.7535*c);a.arcTo(.0041*b,.0035*c,0,0,1,.8268*b,.75*c);a.lineTo(.8268*b,.7007*c);a.close();a.moveTo(.9342*b,.6472*c);a.lineTo(.9293*b,.6599*c);a.lineTo(.9033*b,.6725*c);a.arcTo(.0325*b,.0282*c,0,0,0,.8927*b,.6817*c);a.arcTo(.0406*b,.0352*c,0,0,0,.887*b,.6937*c);a.lineTo(.9309*b,.6725*c);a.lineTo(.9268*b,.6845*c);a.lineTo(.887*b,.7035*c);a.arcTo(.0089*b,.0077*c,0,0,0,.8992*
b,.7106*c);a.lineTo(.935*b,.693*c);a.lineTo(.9285*b,.7063*c);a.lineTo(.9008*b,.7197*c);a.arcTo(.0163*b,.0141*c,0,0,1,.8829*b,.7204*c);a.arcTo(.0407*b,.0352*c,0,0,1,.8764*b,.7028*c);a.arcTo(.065*b,.0563*c,0,0,1,.8959*b,.6669*c);a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,.25*c);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,c);a.close();a.moveTo(.5*b,.5*c);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineJoin("miter");
d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.374*b,.3873*c);a.arcTo(.0325*b,.01764*c,0,0,1,.374*b,.3626*c);a.lineTo(.4797*b,.3098*c);a.arcTo(.0325*b,.0141*c,0,0,1,.5203*b,.3098*c);a.lineTo(.626*b,.3626*c);a.arcTo(.0325*b,.01764*c,0,0,1,.626*b,.3852*c);a.lineTo(.5203*b,.438*c);a.arcTo(.0325*b,.0141*c,0,0,1,.4797*b,.438*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7464*c);a.lineTo(0,
.25*c);a.lineTo(.5*b,0);a.lineTo(b,.25*c);a.lineTo(b,.7464*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dOracleServer.prototype.cst.ORACLE_SERVER,mxShapeAws3dOracleServer);function mxShapeAws3dSecureConnection(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSecureConnection,mxShape);mxShapeAws3dSecureConnection.prototype.cst={SECURE_CONNECTION:"mxgraph.aws3d.secureConnection"};
mxShapeAws3dSecureConnection.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/57,d*c/34);a.setStrokeWidth(d);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSecureConnection.prototype.background=function(a,d,e,b,c,f){a.begin();a.moveTo(.0058*b,.3889*c);a.arcTo(.2096*b,.3536*c,0,0,1,.0774*b,.1856*c);a.arcTo(.5241*b,.8839*c,0,0,1,.308*b,.0262*c);a.arcTo(.8735*b,1.4732*c,0,0,1,.6417*b,.056*c);a.arcTo(.6988*b,1.1786*c,0,0,1,.9106*b,.277*c);a.arcTo(.2621*b,.442*c,0,0,1,b,.5451*c);a.arcTo(.2096*b,.3536*c,0,0,1,.9474*b,.7808*c);a.arcTo(.4368*b,.7366*c,0,0,1,.7186*b,.9605*c);a.arcTo(.8735*b,1.4732*c,0,0,1,.3045*b,.9104*c);a.arcTo(.6115*b,1.0312*c,
0,0,1,.0687*b,.6747*c);a.arcTo(.2096*b,.3536*c,0,0,1,.0058*b,.3889*c);a.close();a.fill()};
mxShapeAws3dSecureConnection.prototype.foreground=function(a,d,e,b,c,f){d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.2661*b,.5068*c);a.lineTo(.5002*b,.7336*c);a.lineTo(.6626*b,.5775*c);a.lineTo(.6469*b,.5539*c);a.lineTo(.6958*b,.5097*c);a.arcTo(.0874*b,.1473*c,0,0,0,.7325*b,.4066*c);a.arcTo(.0874*b,.1473*c,0,0,0,.6889*b,.3153*c);a.arcTo(.1747*b,.2946*c,0,0,0,.5928*b,.2622*c);a.arcTo(.1398*b,.2357*c,0,0,0,.5107*b,.3005*c);a.lineTo(.446*b,.3654*
c);a.lineTo(.4268*b,.3477*c);a.close();a.moveTo(.4949*b,.4184*c);a.lineTo(.5491*b,.3624*c);a.arcTo(.1222*b,.2062*c,0,0,1,.6277*b,.3536*c);a.arcTo(.0874*b,.1179*c,0,0,1,.6679*b,.3978*c);a.arcTo(.0175*b,.0295*c,0,0,1,.6626*b,.439*c);a.lineTo(.5928*b,.5068*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeAws3dSecureConnection.prototype.cst.SECURE_CONNECTION,mxShapeAws3dSecureConnection);
function mxShapeAws3dEmailService(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dEmailService,mxShape);mxShapeAws3dEmailService.prototype.cst={EMAIL_SERVICE:"mxgraph.aws3d.email_service",SHADING_COLORS:"shadingCols"};
mxShapeAws3dEmailService.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/151,d*c/192);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dEmailService.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8182*c);a.lineTo(0,.1818*c);a.lineTo(.4007*b,0);a.lineTo(.606*b,0);a.lineTo(b,.1792*c);a.lineTo(b,.8182*c);a.lineTo(.5993*b,c);a.lineTo(.4007*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dEmailService.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dEmailService.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.2727*c);a.lineTo(.4007*b,.4546*c);a.lineTo(.5993*b,.4546*c);a.lineTo(.5993*b,c);a.lineTo(.4007*b,c);a.lineTo(0,.8182*c);a.close();a.fill();"0"==
e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5993*b,.4546*c);a.lineTo(b,.2727*c);a.lineTo(.8013*b,.1792*c);a.lineTo(.8013*b,.0883*c);a.lineTo(b,.1792*c);a.lineTo(b,.8182*c);a.lineTo(.5993*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.2727*c);a.lineTo(.4007*b,.4546*c);a.lineTo(.5993*b,.4546*c);a.lineTo(.5993*b,c);a.lineTo(.4007*b,c);a.lineTo(0,.8182*c);a.close();a.stroke();a.begin();a.moveTo(.5993*b,.4546*c);a.lineTo(b,.2727*c);a.lineTo(.8013*
b,.1792*c);a.lineTo(.8013*b,.0883*c);a.lineTo(b,.1792*c);a.lineTo(b,.8182*c);a.lineTo(.5993*b,c);a.close();a.stroke();a.begin();a.moveTo(.202*b,.0883*c);a.lineTo(.202*b,.1818*c);a.lineTo(.4007*b,.2727*c);a.lineTo(.5993*b,.2727*c);a.lineTo(.798*b,.1818*c);a.moveTo(.2053*b,.1818*c);a.lineTo(.0033*b,.2714*c);a.moveTo(.4007*b,.2727*c);a.lineTo(.4007*b,.9961*c);a.moveTo(.5993*b,.2727*c);a.lineTo(.5993*b,.4546*c);a.stroke();a.setLineJoin("miter");d=mxUtils.getValue(this.state.style,"strokeColor","#000000");
a.setFillColor(d);a.begin();a.moveTo(.4437*b,.0779*c);a.arcTo(.0662*b,.0519*c,0,0,1,.404*b,.0706*c);a.arcTo(.0464*b,.0364*c,0,0,1,.3815*b,.0421*c);a.arcTo(.053*b,.026*c,0,0,1,.4205*b,.0187*c);a.arcTo(.1987*b,.1558*c,0,0,1,.4768*b,.0203*c);a.arcTo(.0795*b,.0364*c,0,0,1,.5199*b,.0494*c);a.arcTo(.0265*b,.0208*c,0,0,1,.5099*b,.0649*c);a.arcTo(.0795*b,.0623*c,0,0,1,.4536*b,.0727*c);a.arcTo(.0199*b,.0156*c,0,0,1,.4404*b,.0597*c);a.arcTo(.0265*b,.0208*c,0,0,1,.4219*b,.0566*c);a.arcTo(.0199*b,.0114*c,0,0,
1,.4172*b,.0431*c);a.arcTo(.0265*b,.0208*c,0,0,1,.4483*b,.0416*c);a.arcTo(.0132*b,.0104*c,0,0,1,.457*b,.053*c);a.arcTo(.0132*b,.0104*c,0,0,0,.4669*b,.0431*c);a.arcTo(.0166*b,.0166*c,0,0,0,.4464*b,.0358*c);a.lineTo(.4437*b,.0338*c);a.arcTo(.0199*b,.0156*c,0,0,1,.4603*b,.0322*c);a.arcTo(.0397*b,.0156*c,0,0,1,.4755*b,.0462*c);a.arcTo(.0199*b,.0156*c,0,0,1,.4669*b,.0545*c);a.arcTo(.053*b,.0416*c,0,0,1,.453*b,.0608*c);a.arcTo(.0099*b,.0078*c,0,0,0,.4636*b,.0675*c);a.arcTo(.0662*b,.0519*c,0,0,0,.498*b,
.0623*c);a.arcTo(.0185*b,.0145*c,0,0,0,.5079*b,.0457*c);a.arcTo(.053*b,.0416*c,0,0,0,.4848*b,.0296*c);a.arcTo(.0993*b,.0779*c,0,0,0,.455*b,.0234*c);a.arcTo(.1325*b,.1039*c,0,0,0,.4172*b,.026*c);a.arcTo(.0397*b,.0312*c,0,0,0,.3927*b,.039*c);a.arcTo(.0265*b,.0208*c,0,0,0,.3974*b,.0571*c);a.arcTo(.053*b,.0416*c,0,0,0,.4205*b,.0701*c);a.arcTo(.0331*b,.026*c,0,0,0,.4404*b,.0722*c);a.moveTo(.42*b,.049*c);a.arcTo(.02*b,.02*c,0,0,0,.435*b,.055*c);a.arcTo(.02*b,.02*c,0,0,0,.45*b,.049*c);a.arcTo(.02*b,.02*
c,0,0,0,.435*b,.043*c);a.arcTo(.02*b,.02*c,0,0,0,.42*b,.049*c);a.close();a.moveTo(.4669*b,.0894*c);a.arcTo(.1325*b,.1039*c,0,0,0,.5099*b,.0831*c);a.lineTo(.6689*b,.1543*c);a.lineTo(.4887*b,.1371*c);a.close();a.moveTo(.3887*b,.0769*c);a.arcTo(.0662*b,.0519*c,0,0,0,.4205*b,.0888*c);a.arcTo(.0662*b,.026*c,0,0,0,.447*b,.0894*c);a.lineTo(.4735*b,.1512*c);a.lineTo(.6689*b,.1688*c);a.lineTo(.5199*b,.2364*c);a.lineTo(.2815*b,.1273*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");
a.begin();a.moveTo(0,.8182*c);a.lineTo(0,.1818*c);a.lineTo(.4007*b,0);a.lineTo(.606*b,0);a.lineTo(b,.1792*c);a.lineTo(b,.8182*c);a.lineTo(.5993*b,c);a.lineTo(.4007*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dEmailService.prototype.cst.EMAIL_SERVICE,mxShapeAws3dEmailService);function mxShapeAws3dWorker(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dWorker,mxShape);
mxShapeAws3dWorker.prototype.cst={WORKER:"mxgraph.aws3d.worker",SHADING_COLORS:"shadingCols"};
mxShapeAws3dWorker.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(d*b/74,d*c/50);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==e&&a.setShadow(!0);a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*
c);a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dWorker.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):
a.setAlpha(e[0]);a.begin();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.moveTo(0,.572*c);a.lineTo(.0892*b,.422*c);a.moveTo(.5027*b,c);a.lineTo(.4189*
b,.708*c);a.moveTo(.9176*b,.43*c);a.lineTo(.9176*b,.29*c);a.stroke();e=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(e);a.setLineJoin("round");a.begin();a.moveTo(.2892*b,.2104*c);a.lineTo(.3595*b,.1503*c);a.lineTo(.3973*b,.1844*c);a.arcTo(.2703*b,.4008*c,0,0,1,.4486*b,.1703*c);a.lineTo(.4486*b,.1242*c);a.lineTo(.5527*b,.1242*c);a.lineTo(.5527*b,.1703*c);a.arcTo(.2703*b,.4008*c,0,0,1,.6149*b,.1924*c);a.lineTo(.6527*b,.1603*c);a.lineTo(.7257*b,.2224*c);a.lineTo(.6892*b,.2545*
c);a.arcTo(.2027*b,.3006*c,0,0,1,.7162*b,.3106*c);a.lineTo(.7676*b,.3106*c);a.lineTo(.7676*b,.3988*c);a.lineTo(.7162*b,.3988*c);a.arcTo(.2027*b,.3006*c,0,0,1,.6973*b,.4409*c);a.lineTo(.7378*b,.475*c);a.lineTo(.6635*b,.5371*c);a.lineTo(.6297*b,.505*c);a.arcTo(.2703*b,.4008*c,0,0,1,.5527*b,.5351*c);a.lineTo(.5527*b,.5812*c);a.lineTo(.45*b,.5812*c);a.lineTo(.45*b,.5351*c);a.arcTo(.2703*b,.4008*c,0,0,1,.3878*b,.513*c);a.lineTo(.3514*b,.5431*c);a.lineTo(.2784*b,.481*c);a.lineTo(.3149*b,.4509*c);a.arcTo(.2027*
b,.3006*c,0,0,1,.2865*b,.3968*c);a.lineTo(.2351*b,.3968*c);a.lineTo(.2351*b,.3086*c);a.lineTo(.2865*b,.3086*c);a.arcTo(.2027*b,.3006*c,0,0,1,.3203*b,.2425*c);a.close();a.moveTo(.4054*b,.2445*c);a.arcTo(.1351*b,.2004*c,0,0,0,.3554*b,.2986*c);a.arcTo(.0676*b,.1002*c,0,0,0,.3432*b,.3567*c);a.arcTo(.0811*b,.1202*c,0,0,0,.3635*b,.4208*c);a.arcTo(.1351*b,.2004*c,0,0,0,.4122*b,.4649*c);a.arcTo(.2027*b,.3006*c,0,0,0,.4122*b,.4649*c);a.arcTo(.2027*b,.3006*c,0,0,0,.5676*b,.4749*c);a.arcTo(.1351*b,.2004*c,0,
0,0,.6351*b,.4228*c);a.arcTo(.0676*b,.1002*c,0,0,0,.6595*b,.3467*c);a.arcTo(.0811*b,.1202*c,0,0,0,.6149*b,.2605*c);a.arcTo(.2027*b,.3006*c,0,0,0,.5419*b,.2204*c);a.arcTo(.3378*b,.501*c,0,0,0,.4649*b,.2184*c);a.arcTo(.2027*b,.3006*c,0,0,0,.4054*b,.2445*c);a.close();a.moveTo(.473*b,.2806*c);a.arcTo(.2027*b,.3006*c,0,0,1,.55*b,.2866*c);a.arcTo(.0676*b,.1002*c,0,0,1,.5892*b,.3307*c);a.arcTo(.0338*b,.0501*c,0,0,1,.5824*b,.3888*c);a.arcTo(.0946*b,.1403*c,0,0,1,.5216*b,.4269*c);a.arcTo(.1622*b,.2405*c,0,
0,1,.4432*b,.4128*c);a.arcTo(.0541*b,.0802*c,0,0,1,.4108*b,.3527*c);a.arcTo(.0541*b,.0802*c,0,0,1,.4351*b,.2986*c);a.arcTo(.0811*b,.1202*c,0,0,1,.473*b,.2806*c);a.close();a.fill();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*c);a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dWorker.prototype.cst.WORKER,mxShapeAws3dWorker);
function mxShapeAws3dApplication2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dApplication2,mxShape);mxShapeAws3dApplication2.prototype.cst={APPLICATION2:"mxgraph.aws3d.application2",SHADING_COLORS:"shadingCols"};
mxShapeAws3dApplication2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/62;d=d*c/53.5;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.6766*c);a.lineTo(0,.3271*c);a.lineTo(.5*b,0);a.lineTo(b,.3271*c);a.lineTo(b,
.6766*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dApplication2.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.3271*c);a.lineTo(.5*b,.6449*c);a.lineTo(.5*b,c);a.lineTo(0,.6766*c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.5*b,.6449*c);a.lineTo(b,.3271*
c);a.lineTo(b,.6766*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.3271*c);a.lineTo(.5*b,.6449*c);a.lineTo(.5*b,c);a.lineTo(0,.6766*c);a.close();a.stroke();a.begin();a.moveTo(.5*b,.6449*c);a.lineTo(b,.3271*c);a.lineTo(b,.6766*c);a.lineTo(.5*b,c);a.close();a.stroke();a.setLineJoin("miter");e=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(e);a.begin();a.moveTo(.1742*b,.6355*c);a.lineTo(.1742*b,.4393*c);a.lineTo(.6726*b,.1121*
c);a.lineTo(.7661*b,.1738*c);a.lineTo(.2661*b,.4991*c);a.lineTo(.2661*b,.6916*c);a.close();a.moveTo(.2871*b,.7084*c);a.lineTo(.2871*b,.514*c);a.lineTo(.7823*b,.1869*c);a.lineTo(.8629*b,.2374*c);a.lineTo(.379*b,.5626*c);a.lineTo(.379*b,.7607*c);a.close();a.fill();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6766*c);a.lineTo(0,.3271*c);a.lineTo(.5*b,0);a.lineTo(b,.3271*c);a.lineTo(b,.6766*c);a.lineTo(.5*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dApplication2.prototype.cst.APPLICATION2,mxShapeAws3dApplication2);function mxShapeAws3dElasticBeanstalk(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dElasticBeanstalk,mxShape);mxShapeAws3dElasticBeanstalk.prototype.cst={ELASTIC_BEANSTALK:"mxgraph.aws3d.elasticBeanstalk",SHADING_COLORS:"shadingCols"};
mxShapeAws3dElasticBeanstalk.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/181.5;d=d*c/140;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setShadow(!1);a.setStrokeWidth(d);a.save();a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.6239*c);a.lineTo(0,.3754*c);a.lineTo(.5*b,0);a.lineTo(b,.3754*
c);a.lineTo(b,.6239*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dElasticBeanstalk.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.3754*c);a.lineTo(.5*b,.7514*c);a.lineTo(.5*b,c);a.lineTo(0,.6239*c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.5*b,.7514*
c);a.lineTo(b,.3754*c);a.lineTo(b,.6239*c);a.lineTo(.5*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.3754*c);a.lineTo(.5*b,.7514*c);a.lineTo(.5*b,c);a.lineTo(0,.6239*c);a.close();a.moveTo(.5*b,.7514*c);a.lineTo(b,.3754*c);a.lineTo(b,.6239*c);a.lineTo(.5*b,c);a.close();a.moveTo(.2485*b,.187*c);a.lineTo(.7493*b,.5623*c);a.lineTo(.7493*b,.8123*c);a.stroke();a.setLineJoin("miter");e=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(e);a.begin();
a.moveTo(.7763*b,.2063*c);a.lineTo(.2749*b,.5817*c);a.lineTo(.2749*b,.8309*c);a.lineTo(.2204*b,.7894*c);a.lineTo(.2204*b,.5394*c);a.lineTo(.7185*b,.1619*c);a.close();a.fill();a.restore();a.begin();a.moveTo(.1713*b,.543*c);a.arcTo(.1653*b,.2149*c,0,0,1,.2028*b,.5723*c);a.arcTo(.1653*b,.2149*c,0,0,1,.2281*b,.6096*c);a.arcTo(.1102*b,.1433*c,0,0,1,.2402*b,.644*c);a.arcTo(.1102*b,.1433*c,0,0,1,.2424*b,.6848*c);a.arcTo(.1653*b,.2149*c,0,0,1,.216*b,.6612*c);a.arcTo(.1653*b,.2149*c,0,0,1,.1895*b,.6239*c);
a.arcTo(.1102*b,.1433*c,0,0,1,.1719*b,.5824*c);a.arcTo(.0826*b,.1074*c,0,0,1,.1713*b,.543*c);a.close();a.moveTo(.2507*b,.7794*c);a.arcTo(.1653*b,.2149*c,0,0,1,.254*b,.7421*c);a.arcTo(.022*b,.0287*c,0,0,1,.27*b,.7264*c);a.arcTo(.0551*b,.0716*c,0,0,1,.2986*b,.73*c);a.arcTo(.1653*b,.2149*c,0,0,1,.3234*b,.7457*c);a.arcTo(.1653*b,.2149*c,0,0,1,.3218*b,.7815*c);a.arcTo(.022*b,.0287*c,0,0,1,.3019*b,.7987*c);a.arcTo(.0826*b,.1074*c,0,0,1,.27*b,.7923*c);a.arcTo(.1653*b,.2149*c,0,0,1,.2507*b,.7794*c);a.close();
a.moveTo(.2799*b,.5265*c);a.arcTo(.1102*b,.1433*c,0,0,1,.3003*b,.515*c);a.arcTo(.0826*b,.1074*c,0,0,1,.3317*b,.515*c);a.arcTo(.1653*b,.2149*c,0,0,1,.3774*b,.5315*c);a.arcTo(.1653*b,.2149*c,0,0,1,.4033*b,.5487*c);a.arcTo(.0826*b,.1074*c,0,0,1,.3906*b,.5595*c);a.arcTo(.0826*b,.1074*c,0,0,1,.3493*b,.5616*c);a.arcTo(.1653*b,.2149*c,0,0,1,.3069*b,.5444*c);a.arcTo(.1653*b,.2149*c,0,0,1,.2799*b,.5265*c);a.close();a.moveTo(.2887*b,.3933*c);a.arcTo(.1653*b,.2149*c,0,0,1,.314*b,.414*c);a.arcTo(.1653*b,.2149*
c,0,0,1,.3322*b,.4391*c);a.arcTo(.0193*b,.0251*c,0,0,1,.3344*b,.4699*c);a.arcTo(.0551*b,.0716*c,0,0,1,.3196*b,.485*c);a.arcTo(.1653*b,.2149*c,0,0,1,.2887*b,.4592*c);a.arcTo(.1102*b,.1433*c,0,0,1,.27*b,.4269*c);a.arcTo(.0165*b,.0215*c,0,0,1,.2727*b,.4054*c);a.arcTo(.0551*b,.0716*c,0,0,1,.2887*b,.3933*c);a.close();a.moveTo(.4613*b,.262*c);a.arcTo(.1653*b,.2149*c,0,0,1,.4867*b,.2827*c);a.arcTo(.1653*b,.2149*c,0,0,1,.5049*b,.3078*c);a.arcTo(.0193*b,.0251*c,0,0,1,.5071*b,.3386*c);a.arcTo(.0551*b,.0716*
c,0,0,1,.4922*b,.3537*c);a.arcTo(.1653*b,.2149*c,0,0,1,.4613*b,.3279*c);a.arcTo(.1102*b,.1433*c,0,0,1,.4426*b,.2956*c);a.arcTo(.0165*b,.0215*c,0,0,1,.4453*b,.2741*c);a.arcTo(.0551*b,.0716*c,0,0,1,.4613*b,.262*c);a.close();a.moveTo(.4525*b,.3952*c);a.arcTo(.1102*b,.1433*c,0,0,1,.4729*b,.3837*c);a.arcTo(.0826*b,.1074*c,0,0,1,.5043*b,.3837*c);a.arcTo(.1653*b,.2149*c,0,0,1,.55*b,.4002*c);a.arcTo(.1653*b,.2149*c,0,0,1,.5759*b,.4174*c);a.arcTo(.0826*b,.1074*c,0,0,1,.5633*b,.4282*c);a.arcTo(.0826*b,.1074*
c,0,0,1,.5219*b,.4303*c);a.arcTo(.1653*b,.1074*c,0,0,1,.4795*b,.4131*c);a.arcTo(.1653*b,.2149*c,0,0,1,.4525*b,.3952*c);a.close();a.moveTo(.6217*b,.1426*c);a.arcTo(.1653*b,.2149*c,0,0,1,.6471*b,.1633*c);a.arcTo(.1653*b,.2149*c,0,0,1,.6652*b,.1884*c);a.arcTo(.0193*b,.0251*c,0,0,1,.6674*b,.2192*c);a.arcTo(.0551*b,.0716*c,0,0,1,.6526*b,.2342*c);a.arcTo(.1653*b,.2149*c,0,0,1,.6217*b,.2085*c);a.arcTo(.1102*b,.1433*c,0,0,1,.603*b,.1762*c);a.arcTo(.0165*b,.0215*c,0,0,1,.6057*b,.1547*c);a.arcTo(.0551*b,.0716*
c,0,0,1,.6217*b,.1426*c);a.close();a.moveTo(.6129*b,.2758*c);a.arcTo(.1102*b,.1433*c,0,0,1,.6333*b,.2643*c);a.arcTo(.0826*b,.1433*c,0,0,1,.6647*b,.2643*c);a.arcTo(.1653*b,.2149*c,0,0,1,.7104*b,.2808*c);a.arcTo(.1653*b,.2149*c,0,0,1,.7363*b,.298*c);a.arcTo(.0826*b,.2149*c,0,0,1,.7363*b,.298*c);a.arcTo(.0826*b,.1074*c,0,0,1,.6823*b,.3109*c);a.arcTo(.1653*b,.2149*c,0,0,1,.6399*b,.2937*c);a.arcTo(.1653*b,.2149*c,0,0,1,.6129*b,.2758*c);a.close();a.fillAndStroke();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");
a.setLineJoin("round");a.begin();a.moveTo(0,.6239*c);a.lineTo(0,.3754*c);a.lineTo(.5*b,0);a.lineTo(b,.3754*c);a.lineTo(b,.6239*c);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dElasticBeanstalk.prototype.cst.ELASTIC_BEANSTALK,mxShapeAws3dElasticBeanstalk);function mxShapeAws3dSimpleDB2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSimpleDB2,mxShape);
mxShapeAws3dSimpleDB2.prototype.cst={SIMPLE_DB_2:"mxgraph.aws3d.simpleDb2",SHADING_COLORS:"shadingCols"};mxShapeAws3dSimpleDB2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/181.5,d*c/210);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSimpleDB2.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8183*c);a.lineTo(0,.1848*c);a.lineTo(.3366*b,0);a.lineTo(.6293*b,.0021*c);a.lineTo(b,.1833*c);a.lineTo(b,.8183*c);a.lineTo(.6694*b,c);a.lineTo(.4986*b,.9091*c);a.lineTo(.3333*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dSimpleDB2.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dSimpleDB2.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.1848*c);a.lineTo(.168*b,.1833*c);a.lineTo(0,.365*c);a.lineTo(.3333*b,.5467*c);a.lineTo(.3333*b,c);a.lineTo(0,.8183*c);a.close();a.moveTo(.4986*b,.9078*
c);a.lineTo(.4986*b,.3655*c);a.lineTo(.6667*b,.5457*c);a.lineTo(.6667*b,c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.3333*b,.5467*c);a.lineTo(.4986*b,.3655*c);a.lineTo(.4986*b,.9076*c);a.lineTo(.3333*b,c);a.close();a.moveTo(.8292*b,.1822*c);a.lineTo(b,.1848*c);a.lineTo(b,.8183*c);a.lineTo(.6667*b,c);a.lineTo(.6667*b,.5441*c);a.lineTo(b,.3666*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.1848*c);a.lineTo(.168*b,
.1833*c);a.lineTo(0,.365*c);a.lineTo(.3333*b,.5467*c);a.lineTo(.3333*b,c);a.lineTo(0,.8183*c);a.close();a.moveTo(.4986*b,.9078*c);a.lineTo(.4986*b,.3655*c);a.lineTo(.6667*b,.5457*c);a.lineTo(.6667*b,c);a.close();a.moveTo(.3333*b,.5467*c);a.lineTo(.4986*b,.3655*c);a.lineTo(.4986*b,.9076*c);a.lineTo(.3333*b,c);a.close();a.moveTo(.8292*b,.1822*c);a.lineTo(b,.1848*c);a.lineTo(b,.8183*c);a.lineTo(.6667*b,c);a.lineTo(.6667*b,.5441*c);a.lineTo(b,.3666*c);a.close();a.moveTo(.1669*b,.1828*c);a.lineTo(.4986*
b,.3655*c);a.lineTo(.8314*b,.1833*c);a.lineTo(.4986*b,.0031*c);a.close();a.stroke();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.2634*b,.1833*c);a.lineTo(.5003*b,.0535*c);a.lineTo(.7394*b,.1833*c);a.lineTo(.5003*b,.3136*c);a.close();a.fill();d=mxUtils.getValue(this.state.style,"fillColor","#000000");a.restore();a.setShadow(!1);a.setStrokeWidth(3*f);a.setStrokeColor(d);a.begin();a.moveTo(.3003*b,.2108*c);a.lineTo(.5642*b,.068*c);a.moveTo(.4429*
b,.0693*c);a.lineTo(.7059*b,.2121*c);a.moveTo(.6667*b,.2458*c);a.lineTo(.3974*b,.0992*c);a.moveTo(.3499*b,.1277*c);a.lineTo(.6088*b,.2698*c);a.moveTo(.3009*b,.1556*c);a.lineTo(.5496*b,.2913*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8183*c);a.lineTo(0,.1848*c);a.lineTo(.3366*b,0);a.lineTo(.6293*b,.0021*c);a.lineTo(b,.1833*c);a.lineTo(b,.8183*c);a.lineTo(.6694*b,c);a.lineTo(.4986*b,.9091*c);a.lineTo(.3333*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dSimpleDB2.prototype.cst.SIMPLE_DB_2,mxShapeAws3dSimpleDB2);function mxShapeAws3dWorkflowService(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dWorkflowService,mxShape);mxShapeAws3dWorkflowService.prototype.cst={WORKFLOW_SERVICE:"mxgraph.aws3d.workflowService",SHADING_COLORS:"shadingCols"};
mxShapeAws3dWorkflowService.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/181.5,d*c/210);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dWorkflowService.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6456*c);a.lineTo(.2481*b,0);a.lineTo(.7497*b,0);a.lineTo(b,.6456*c);a.lineTo(.4984*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dWorkflowService.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dWorkflowService.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.6456*c);a.lineTo(.2486*b,0);a.lineTo(.2486*b,.3531*c);a.lineTo(.4984*b,c);a.close();a.moveTo(.7497*b,.3531*c);a.lineTo(.7497*b,0);a.lineTo(b,
.6456*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.4984*b,c);a.lineTo(.7486*b,.3531*c);a.lineTo(b,.6456*c);a.lineTo(.4967*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(.7497*b,.3531*c);a.lineTo(.7497*b,0);a.lineTo(b,.6456*c);a.close();a.moveTo(0,.6456*c);a.lineTo(.2486*b,0);a.lineTo(.2486*b,.3531*c);a.lineTo(.4984*b,c);a.lineTo(.7486*b,.3531*c);a.lineTo(b,.6456*c);a.lineTo(.4967*b,c);a.close();a.moveTo(.2486*b,.3531*
c);a.lineTo(.7508*b,.3531*c);a.moveTo(.2488*b,.353*c);a.lineTo(0,.6486*c);a.stroke();a.restore();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.setStrokeWidth(2*f);a.begin();a.ellipse(.2925*b,.031*c,.4116*b,.2925*c);a.fill();d=mxUtils.getValue(this.state.style,"fillColor","#ffffff");a.setStrokeColor(d);a.begin();a.moveTo(.5252*b,.0465*c);a.lineTo(.5873*b,.0903*c);a.lineTo(.5483*b,.1173*c);a.lineTo(.4874*b,.0728*c);a.close();a.moveTo(.4896*b,.1132*
c);a.lineTo(.5005*b,.1705*c);a.lineTo(.4182*b,.1631*c);a.lineTo(.4122*b,.1058*c);a.close();a.moveTo(.3584*b,.1631*c);a.lineTo(.4204*b,.2062*c);a.lineTo(.3825*b,.2332*c);a.lineTo(.32*b,.19*c);a.close();a.moveTo(.4594*b,.2338*c);a.lineTo(.5214*b,.2783*c);a.lineTo(.4835*b,.3053*c);a.lineTo(.4215*b,.2608*c);a.close();a.moveTo(.5187*b,.0943*c);a.lineTo(.4879*b,.1152*c);a.moveTo(.421*b,.1624*c);a.lineTo(.3895*b,.1846*c);a.moveTo(.5*b,.1698*c);a.lineTo(.5554*b,.2089*c);a.lineTo(.4885*b,.2567*c);a.stroke();
a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6456*c);a.lineTo(.2481*b,0);a.lineTo(.7497*b,0);a.lineTo(b,.6456*c);a.lineTo(.4984*b,c);a.close();a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dWorkflowService.prototype.cst.WORKFLOW_SERVICE,mxShapeAws3dWorkflowService);function mxShapeAws3dDecider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dDecider,mxShape);
mxShapeAws3dDecider.prototype.cst={DECIDER:"mxgraph.aws3d.decider",SHADING_COLORS:"shadingCols"};
mxShapeAws3dDecider.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(d*b/74,d*c/50);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==e&&a.setShadow(!0);a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*
c);a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dDecider.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.fill();"0"==f?a.setAlpha(e[1]):
a.setAlpha(e[0]);a.begin();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(0,.566*c);a.lineTo(.0892*b,.282*c);a.lineTo(.0878*b,.426*c);a.lineTo(.4216*b,.712*c);a.lineTo(.5865*b,.712*c);a.lineTo(.5027*b,c);a.close();a.moveTo(.5027*b,c);a.lineTo(.5865*b,.712*c);a.lineTo(.9176*b,.43*c);a.lineTo(b,.566*c);a.close();a.moveTo(0,.572*c);a.lineTo(.0892*b,.422*c);a.moveTo(.5027*b,c);a.lineTo(.4189*
b,.708*c);a.moveTo(.9176*b,.43*c);a.lineTo(.9176*b,.29*c);a.stroke();a.setStrokeWidth(1.6*d);a.setLineJoin("square");a.begin();a.moveTo(.4973*b,.1523*c);a.lineTo(.5608*b,.0982*c);a.lineTo(.6581*b,.1844*c);a.lineTo(.5986*b,.2365*c);a.close();a.moveTo(.3784*b,.2164*c);a.lineTo(.5054*b,.2305*c);a.lineTo(.5203*b,.3407*c);a.lineTo(.3892*b,.3246*c);a.close();a.moveTo(.2932*b,.3246*c);a.lineTo(.3919*b,.4128*c);a.lineTo(.3334*b,.4647*c);a.lineTo(.2357*b,.38*c);a.close();a.moveTo(.4568*b,.4649*c);a.lineTo(.5554*
b,.5511*c);a.lineTo(.4932*b,.6032*c);a.lineTo(.3946*b,.517*c);a.close();a.moveTo(.5473*b,.1924*c);a.lineTo(.5027*b,.2365*c);a.moveTo(.4*b,.3186*c);a.lineTo(.3446*b,.3667*c);a.moveTo(.5189*b,.3387*c);a.lineTo(.6081*b,.4148*c);a.lineTo(.5068*b,.501*c);a.stroke();a.setStrokeColor("#292929");a.begin();a.moveTo(0,.572*c);a.lineTo(.0865*b,.284*c);a.lineTo(.4203*b,0);a.lineTo(.5865*b,0);a.lineTo(.919*b,.286*c);a.lineTo(b,.566*c);a.lineTo(.5027*b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dDecider.prototype.cst.DECIDER,mxShapeAws3dDecider);function mxShapeAws3dSearchEngine(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSearchEngine,mxShape);mxShapeAws3dSearchEngine.prototype.cst={SEARCH_ENGINE:"mxgraph.aws3d.searchEngine",SHADING_COLORS:"shadingCols"};
mxShapeAws3dSearchEngine.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/180,d*c/192);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSearchEngine.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7281*c);a.lineTo(.1667*b,.5444*c);a.lineTo(.1667*b,.1832*c);a.lineTo(.5011*b,0);a.lineTo(.8333*b,.1832*c);a.lineTo(.8333*b,.5446*c);a.lineTo(b,.7281*c);a.lineTo(.7486*b,.7735*c);a.lineTo(.5819*b,.8617*c);a.lineTo(.5011*b,c);a.lineTo(.4169*b,.8653*c);a.lineTo(.2475*b,.7704*c);a.close();a.fillAndStroke()};
mxShapeAws3dSearchEngine.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dSearchEngine.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.1672*b,.1837*c);a.lineTo(.4989*b,.3638*c);a.lineTo(.4989*b,.7291*c);a.lineTo(.5825*b,.8633*c);a.lineTo(.4989*b,c);a.lineTo(.4164*b,.8622*c);a.lineTo(.2458*
b,.7719*c);a.lineTo(0,.7276*c);a.lineTo(.1661*b,.5454*c);a.close();a.moveTo(.7486*b,.7714*c);a.lineTo(.8317*b,.5459*c);a.lineTo(b,.727*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.4989*b,.3643*c);a.lineTo(.8317*b,.1827*c);a.lineTo(.8317*b,.5465*c);a.lineTo(.7508*b,.7714*c);a.lineTo(.5836*b,.8633*c);a.lineTo(.4989*b,.727*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(.1672*b,.1837*c);a.lineTo(.4989*b,.3638*c);a.lineTo(.4989*
b,.7291*c);a.lineTo(.5825*b,.8633*c);a.lineTo(.4989*b,c);a.lineTo(.4164*b,.8622*c);a.lineTo(.2458*b,.7719*c);a.lineTo(0,.7276*c);a.lineTo(.1661*b,.5454*c);a.close();a.moveTo(.7486*b,.7714*c);a.lineTo(.8317*b,.5459*c);a.lineTo(b,.727*c);a.close();a.moveTo(.4989*b,.3643*c);a.lineTo(.8317*b,.1827*c);a.lineTo(.8317*b,.5465*c);a.lineTo(.7508*b,.7714*c);a.lineTo(.5836*b,.8633*c);a.lineTo(.4989*b,.727*c);a.close();a.moveTo(.1667*b,.5459*c);a.lineTo(.2486*b,.7704*c);a.moveTo(.4164*b,.8633*c);a.lineTo(.4989*
b,.727*c);a.lineTo(.4989*b,c);a.stroke();a.restore();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.3427*b,.179*c);a.arcTo(.0277*b,.0261*c,0,0,1,.3267*b,.1487*c);a.arcTo(.0664*b,.0365*c,0,0,1,.3621*b,.1227*c);a.arcTo(.1052*b,.0992*c,0,0,1,.4247*b,.1195*c);a.arcTo(.1274*b,.12*c,0,0,1,.4884*b,.1018*c);a.arcTo(.1329*b,.1253*c,0,0,1,.5548*b,.1112*c);a.arcTo(.0377*b,.0344*c,0,0,1,.572*b,.166*c);a.arcTo(.0388*b,.0365*c,0,0,1,.6047*b,.1775*
c);a.arcTo(.021*b,.0198*c,0,0,1,.5936*b,.2046*c);a.arcTo(.0332*b,.0313*c,0,0,1,.6008*b,.2416*c);a.arcTo(.072*b,.0678*c,0,0,1,.5437*b,.2677*c);a.arcTo(.1052*b,.0939*c,0,0,1,.4828*b,.2563*c);a.close();a.moveTo(.448*b,.2156*c);a.arcTo(.0111*b,.0104*c,0,0,0,.459*b,.2255*c);a.arcTo(.0138*b,.013*c,0,0,0,.4729*b,.2182*c);a.lineTo(.4773*b,.1874*c);a.arcTo(.0664*b,.0626*c,0,0,0,.5116*b,.1759*c);a.arcTo(.0277*b,.0626*c,0,0,0,.5233*b,.1503*c);a.arcTo(.0554*b,.0261*c,0,0,0,.5022*b,.1336*c);a.arcTo(.0886*b,.0835*
c,0,0,0,.4607*b,.1305*c);a.arcTo(.0664*b,.0626*c,0,0,0,.4313*b,.142*c);a.arcTo(.0332*b,.0313*c,0,0,0,.4175*b,.1597*c);a.arcTo(.0249*b,.0235*c,0,0,0,.4313*b,.1822*c);a.arcTo(.0443*b,.0418*c,0,0,0,.4535*b,.1884*c);a.close();a.moveTo(.4718*b,.1764*c);a.arcTo(.0443*b,.0418*c,0,0,1,.4496*b,.1754*c);a.arcTo(.0221*b,.0157*c,0,0,1,.4369*b,.1634*c);a.arcTo(.0221*b,.0183*c,0,0,1,.4496*b,.1467*c);a.arcTo(.0609*b,.0574*c,0,0,1,.4759*b,.1414*c);a.arcTo(.0388*b,.0365*c,0,0,1,.5033*b,.1514*c);a.arcTo(.0443*b,.0209*
c,0,0,1,.495*b,.1701*c);a.arcTo(.0388*b,.0365*c,0,0,1,.4718*b,.1764*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7281*c);a.lineTo(.1667*b,.5444*c);a.lineTo(.1667*b,.1832*c);a.lineTo(.5011*b,0);a.lineTo(.8333*b,.1832*c);a.lineTo(.8333*b,.5446*c);a.lineTo(b,.7281*c);a.lineTo(.7486*b,.7735*c);a.lineTo(.5819*b,.8617*c);a.lineTo(.5011*b,c);a.lineTo(.4169*b,.8653*c);a.lineTo(.2475*b,.7704*c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeAws3dSearchEngine.prototype.cst.SEARCH_ENGINE,mxShapeAws3dSearchEngine);function mxShapeAws3dSecurityTokenService(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dSecurityTokenService,mxShape);mxShapeAws3dSecurityTokenService.prototype.cst={SECURITY_TOKEN_SERVICE:"mxgraph.aws3d.securityTokenService",SHADING_COLORS:"shadingCols"};
mxShapeAws3dSecurityTokenService.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/180,d*c/192);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dSecurityTokenService.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.7281*c);a.lineTo(.1667*b,.5444*c);a.lineTo(.1667*b,.1832*c);a.lineTo(.5011*b,0);a.lineTo(.8333*b,.1832*c);a.lineTo(.8333*b,.5446*c);a.lineTo(b,.7281*c);a.lineTo(.7486*b,.7735*c);a.lineTo(.5819*b,.8617*c);a.lineTo(.5011*b,c);a.lineTo(.4169*b,.8653*c);a.lineTo(.2475*b,.7704*c);a.close();
a.fillAndStroke()};
mxShapeAws3dSecurityTokenService.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dSecurityTokenService.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.1672*b,.1837*c);a.lineTo(.4989*b,.3638*c);a.lineTo(.4989*b,.7291*c);a.lineTo(.5825*b,.8633*c);a.lineTo(.4989*b,c);a.lineTo(.4164*b,
.8622*c);a.lineTo(.2458*b,.7719*c);a.lineTo(0,.7276*c);a.lineTo(.1661*b,.5454*c);a.close();a.moveTo(.7486*b,.7714*c);a.lineTo(.8317*b,.5459*c);a.lineTo(b,.727*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.4989*b,.3643*c);a.lineTo(.8317*b,.1827*c);a.lineTo(.8317*b,.5465*c);a.lineTo(.7508*b,.7714*c);a.lineTo(.5836*b,.8633*c);a.lineTo(.4989*b,.727*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(.1672*b,.1837*c);a.lineTo(.4989*
b,.3638*c);a.lineTo(.4989*b,.7291*c);a.lineTo(.5825*b,.8633*c);a.lineTo(.4989*b,c);a.lineTo(.4164*b,.8622*c);a.lineTo(.2458*b,.7719*c);a.lineTo(0,.7276*c);a.lineTo(.1661*b,.5454*c);a.close();a.moveTo(.7486*b,.7714*c);a.lineTo(.8317*b,.5459*c);a.lineTo(b,.727*c);a.close();a.moveTo(.4989*b,.3643*c);a.lineTo(.8317*b,.1827*c);a.lineTo(.8317*b,.5465*c);a.lineTo(.7508*b,.7714*c);a.lineTo(.5836*b,.8633*c);a.lineTo(.4989*b,.727*c);a.close();a.moveTo(.1667*b,.5459*c);a.lineTo(.2486*b,.7704*c);a.moveTo(.4164*
b,.8633*c);a.lineTo(.4989*b,.727*c);a.lineTo(.4989*b,c);a.stroke();a.restore();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.4773*b,.1915*c);a.arcTo(.1274*b,.12*c,0,0,1,.4358*b,.1968*c);a.arcTo(.1107*b,.1044*c,0,0,1,.3937*b,.1905*c);a.arcTo(.0554*b,.0522*c,0,0,1,.3682*b,.1707*c);a.arcTo(.0332*b,.0313*c,0,0,1,.3699*b,.1414*c);a.arcTo(.0775*b,.0731*c,0,0,1,.4009*b,.118*c);a.arcTo(.1107*b,.1044*c,0,0,1,.4524*b,.1059*c);a.arcTo(.1107*
b,.1044*c,0,0,1,.5028*b,.1112*c);a.arcTo(.0664*b,.0626*c,0,0,1,.531*b,.1315*c);a.arcTo(.0332*b,.0313*c,0,0,1,.531*b,.1597*c);a.lineTo(.5615*b,.1754*c);a.lineTo(.5526*b,.1905*c);a.lineTo(.5759*b,.1999*c);a.lineTo(.5753*b,.2109*c);a.lineTo(.5792*b,.2161*c);a.lineTo(.6135*b,.2182*c);a.lineTo(.6113*b,.2416*c);a.lineTo(.5819*b,.2474*c);a.close();a.moveTo(.4756*b,.1816*c);a.arcTo(.0554*b,.0522*c,0,0,0,.5*b,.1691*c);a.arcTo(.0332*b,.0313*c,0,0,0,.5144*b,.1435*c);a.arcTo(.0277*b,.0261*c,0,0,0,.4967*b,.1247*
c);a.arcTo(.0554*b,.0522*c,0,0,0,.4729*b,.1174*c);a.arcTo(.1107*b,.1044*c,0,0,0,.4452*b,.1169*c);a.arcTo(.0831*b,.0783*c,0,0,0,.4197*b,.1232*c);a.arcTo(.0554*b,.0522*c,0,0,0,.397*b,.1357*c);a.arcTo(.0388*b,.0365*c,0,0,0,.3859*b,.1555*c);a.arcTo(.0305*b,.0287*c,0,0,0,.4053*b,.178*c);a.arcTo(.072*b,.0678*c,0,0,0,.4385*b,.1863*c);a.arcTo(.0831*b,.0783*c,0,0,0,.4596*b,.1848*c);a.arcTo(.0664*b,.0626*c,0,0,0,.4756*b,.1816*c);a.fill();a.setStrokeWidth(1.5*f);a.setLineJoin("round");a.setLineCap("round");
a.begin();a.moveTo(.4939*b,.1326*c);a.lineTo(.4474*b,.1508*c);a.lineTo(.4812*b,.1576*c);a.moveTo(.4889*b,.1733*c);a.lineTo(.4939*b,.1775*c);a.moveTo(.5061*b,.1576*c);a.lineTo(.5199*b,.1597*c);a.moveTo(.5094*b,.1394*c);a.lineTo(.5244*b,.1378*c);a.moveTo(.4945*b,.1247*c);a.lineTo(.4994*b,.1185*c);a.moveTo(.4679*b,.1175*c);a.lineTo(.4707*b,.1117*c);a.moveTo(.4396*b,.1195*c);a.lineTo(.4374*b,.1138*c);a.moveTo(.412*b,.1284*c);a.lineTo(.4059*b,.1232*c);a.moveTo(.3948*b,.1441*c);a.lineTo(.3804*b,.1425*c);
a.moveTo(.3931*b,.1608*c);a.lineTo(.3804*b,.1649*c);a.moveTo(.4059*b,.1754*c);a.lineTo(.3998*b,.1801*c);a.moveTo(.4308*b,.1822*c);a.lineTo(.4286*b,.1884*c);a.moveTo(.4618*b,.1827*c);a.lineTo(.4635*b,.1868*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.7281*c);a.lineTo(.1667*b,.5444*c);a.lineTo(.1667*b,.1832*c);a.lineTo(.5011*b,0);a.lineTo(.8333*b,.1832*c);a.lineTo(.8333*b,.5446*c);a.lineTo(b,.7281*c);a.lineTo(.7486*b,.7735*c);a.lineTo(.5819*b,.8617*c);a.lineTo(.5011*
b,c);a.lineTo(.4169*b,.8653*c);a.lineTo(.2475*b,.7704*c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dSecurityTokenService.prototype.cst.SECURITY_TOKEN_SERVICE,mxShapeAws3dSecurityTokenService);function mxShapeAws3dGlacier(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dGlacier,mxShape);mxShapeAws3dGlacier.prototype.cst={GLACIER:"mxgraph.aws3d.glacier",SHADING_COLORS:"shadingCols"};
mxShapeAws3dGlacier.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/180,d*c/192);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dGlacier.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.8177*c);a.lineTo(0,.5448*c);a.lineTo(.168*b,.1792*c);a.lineTo(.5008*b,0);a.lineTo(.8309*b,.1812*c);a.lineTo(b,.5469*c);a.lineTo(b,.8188*c);a.lineTo(.6661*b,c);a.lineTo(.3333*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dGlacier.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dGlacier.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.1658*b,.1802*c);a.lineTo(.5008*b,.3651*c);a.lineTo(.6661*b,.9089*c);a.lineTo(.6661*b,c);a.lineTo(.3339*b,c);a.lineTo(0,.8177*c);a.lineTo(0,.5427*c);a.close();
a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.5008*b,.362*c);a.lineTo(.8314*b,.1823*c);a.lineTo(b,.5469*c);a.lineTo(b,.8177*c);a.lineTo(.6661*b,c);a.lineTo(.6661*b,.9089*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(.1658*b,.1802*c);a.lineTo(.5008*b,.3651*c);a.lineTo(.6661*b,.9089*c);a.lineTo(.6661*b,c);a.lineTo(.3339*b,c);a.lineTo(0,.8177*c);a.lineTo(0,.5427*c);a.close();a.moveTo(.5008*b,.362*c);a.lineTo(.8314*b,.1823*c);a.lineTo(b,
.5469*c);a.lineTo(b,.8177*c);a.lineTo(.6661*b,c);a.lineTo(.6661*b,.9089*c);a.close();a.moveTo(.1675*b,.1797*c);a.lineTo(0,.7281*c);a.lineTo(.3284*b,.9089*c);a.lineTo(.6661*b,.9089*c);a.lineTo(b,.7266*c);a.lineTo(.8309*b,.1823*c);a.moveTo(.5003*b,.362*c);a.lineTo(.3311*b,.9089*c);a.lineTo(.3311*b,c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.8177*c);a.lineTo(0,.5448*c);a.lineTo(.168*b,.1792*c);a.lineTo(.5008*b,0);a.lineTo(.8309*b,.1812*c);a.lineTo(b,.5469*c);
a.lineTo(b,.8188*c);a.lineTo(.6661*b,c);a.lineTo(.3333*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dGlacier.prototype.cst.GLACIER,mxShapeAws3dGlacier);function mxShapeAws3dCustomerGateway(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dCustomerGateway,mxShape);mxShapeAws3dCustomerGateway.prototype.cst={CUSTOMER_GATEWAY:"mxgraph.aws3d.customerGateway",SHADING_COLORS:"shadingCols"};
mxShapeAws3dCustomerGateway.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/116.7,d*c/102.8);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dCustomerGateway.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.8946*b,0);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6812*b,.7247*c);a.close();a.fillAndStroke();a.restore();a.save();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dCustomerGateway.prototype.cst.SHADING_COLORS,
"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.6838*b,.2072*c);a.lineTo(.6838*b,.7247*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.6838*b,.2072*c);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6838*b,.7247*c);a.close();a.fill();a.restore();a.setShadow(!1);a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*
c);a.lineTo(.6838*b,.2072*c);a.lineTo(.6838*b,.7247*c);a.close();a.stroke();a.restore();a.setLineJoin("round");a.setShadow(!1);a.begin();a.moveTo(.6838*b,.2072*c);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6838*b,.7247*c);a.close();a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(.4199*b,.5447*c);a.lineTo(.4199*b,.035*c);a.lineTo(.8946*b,0);a.lineTo(b,.0691*c);a.lineTo(b,.4134*c);a.lineTo(.6812*b,.7247*c);a.close();a.stroke();a.restore();a.setStrokeWidth(2*f);
a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.3171*b,.1031*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.lineTo(.1054*b,c);a.close();a.fillAndStroke()};
mxShapeAws3dCustomerGateway.prototype.foreground=function(a,d,e,b,c,f){a.restore();d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setShadow(!1);a.setLineJoin("round");a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dCustomerGateway.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");var g=mxUtils.getValue(this.state.style,"flipH","0");"0"==g?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.1054*b,.6537*
c);a.lineTo(.1054*b,c);a.close();a.fill();"0"==g?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.1054*b,c);a.lineTo(.1054*b,.6537*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.1054*b,.6537*c);a.lineTo(.1054*b,c);a.close();a.stroke();a.begin();a.moveTo(.1054*b,c);a.lineTo(.1054*b,.6537*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.close();a.stroke();
a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.929*c);a.lineTo(0,.5866*c);a.lineTo(.3171*b,.1031*c);a.lineTo(.5784*b,.2753*c);a.lineTo(.5784*b,.7928*c);a.lineTo(.1054*b,c);a.close();a.stroke();a.setFillColor(d);a.begin();a.moveTo(.7575*b,.3969*c);a.arcTo(.2142*b,.2432*c,0,0,1,.7686*b,.3259*c);a.arcTo(.2142*b,.2432*c,0,0,1,.8055*b,.2481*c);a.arcTo(.2142*b,.2432*c,0,0,1,.8406*b,.2091*c);a.lineTo(.8269*b,.2665*c);a.lineTo(.8372*b,.2607*c);a.lineTo(.8372*
b,.3444*c);a.lineTo(.7832*b,.3804*c);a.lineTo(.7832*b,.3658*c);a.close();a.moveTo(.8466*b,.2082*c);a.arcTo(.0514*b,.0584*c,0,0,1,.8766*b,.1955*c);a.arcTo(.0514*b,.0584*c,0,0,1,.9186*b,.2286*c);a.arcTo(.12*b,.1362*c,0,0,1,.9297*b,.2821*c);a.lineTo(.9006*b,.2831*c);a.lineTo(.9006*b,.3016*c);a.lineTo(.85*b,.3366*c);a.lineTo(.85*b,.251*c);a.lineTo(.8586*b,.2471*c);a.close();a.moveTo(.9297*b,.2967*c);a.arcTo(.2142*b,.2432*c,0,0,1,.9195*b,.3667*c);a.arcTo(.2571*b,.2918*c,0,0,1,.8869*b,.4436*c);a.arcTo(.1714*
b,.1946*c,0,0,1,.8466*b,.4903*c);a.lineTo(.8595*b,.4358*c);a.lineTo(.8492*b,.4416*c);a.lineTo(.8492*b,.357*c);a.lineTo(.9006*b,.32004*c);a.lineTo(.9006*b,.3346*c);a.close();a.moveTo(.838*b,.4942*c);a.arcTo(.0857*b,.0973*c,0,0,1,.8072*b,.5049*c);a.arcTo(.0514*b,.0584*c,0,0,1,.7712*b,.4815*c);a.arcTo(.1714*b,.1946*c,0,0,1,.7566*b,.4163*c);a.lineTo(.7832*b,.4173*c);a.lineTo(.7832*b,.4008*c);a.lineTo(.8372*b,.3638*c);a.lineTo(.8372*b,.4494*c);a.lineTo(.8278*b,.4562*c);a.close();a.fill()};
mxCellRenderer.registerShape(mxShapeAws3dCustomerGateway.prototype.cst.CUSTOMER_GATEWAY,mxShapeAws3dCustomerGateway);function mxShapeAws3dRedshift(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dRedshift,mxShape);mxShapeAws3dRedshift.prototype.cst={REDSHIFT:"mxgraph.aws3d.redshift",SHADING_COLORS:"shadingCols"};
mxShapeAws3dRedshift.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/149.5,d*c/187.5);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dRedshift.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.6517*c);a.lineTo(0,.0912*c);a.lineTo(.0368*b,.0155*c);a.lineTo(.2047*b,0);a.lineTo(.3378*b,.0619*c);a.lineTo(.3378*b,.0912*c);a.lineTo(.3819*b,.0693*c);a.lineTo(.6154*b,.0693*c);a.lineTo(.8502*b,.1776*c);a.lineTo(.8502*b,.3083*c);a.lineTo(.8682*b,.3061*c);a.lineTo(b,.3664*c);a.lineTo(b,.9099*c);
a.lineTo(.9672*b,.9861*c);a.lineTo(.7926*b,c);a.lineTo(.6629*b,.9392*c);a.lineTo(.6629*b,.9099*c);a.lineTo(.6167*b,.9317*c);a.lineTo(.3813*b,.9317*c);a.lineTo(.1478*b,.8219*c);a.lineTo(.1478*b,.7093*c);a.lineTo(.1365*b,.7163*c);a.close();a.fillAndStroke()};
mxShapeAws3dRedshift.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dRedshift.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.6541*c);a.lineTo(0,.0933*c);a.lineTo(.1371*b,.1573*c);a.lineTo(.1371*b,.7157*c);a.close();a.moveTo(.1485*b,.8219*c);a.lineTo(.1485*b,.2864*c);a.lineTo(.3846*
b,.3941*c);a.lineTo(.3846*b,.9317*c);a.close();a.moveTo(.6642*b,.9392*c);a.lineTo(.6642*b,.4011*c);a.lineTo(.796*b,.4597*c);a.lineTo(.796*b,c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.1371*b,.7157*c);a.lineTo(.1371*b,.1568*c);a.lineTo(.2027*b,.1525*c);a.lineTo(.1498*b,.1771*c);a.lineTo(.1498*b,.7061*c);a.close();a.moveTo(.3846*b,.3941*c);a.lineTo(.614*b,.3941*c);a.lineTo(.6809*b,.3632*c);a.lineTo(.6642*b,.4*c);a.lineTo(.6642*b,.9067*c);a.lineTo(.6191*b,.9317*
c);a.lineTo(.3833*b,.9317*c);a.close();a.moveTo(.796*b,.4608*c);a.lineTo(.9639*b,.4469*c);a.lineTo(b,.3691*c);a.lineTo(b,.9077*c);a.lineTo(.9686*b,.9856*c);a.lineTo(.796*b,c);a.close();a.moveTo(.3378*b,.0608*c);a.lineTo(.3378*b,.0907*c);a.lineTo(.3197*b,.1008*c);a.close();a.moveTo(.8502*b,.2843*c);a.lineTo(.8502*b,.3083*c);a.lineTo(.794*b,.3136*c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.6541*c);a.lineTo(0,.0933*c);a.lineTo(.1371*b,.1573*c);a.lineTo(.1371*
b,.7157*c);a.close();a.moveTo(.1485*b,.8219*c);a.lineTo(.1485*b,.2864*c);a.lineTo(.3846*b,.3941*c);a.lineTo(.3846*b,.9317*c);a.close();a.moveTo(.6642*b,.9392*c);a.lineTo(.6642*b,.4011*c);a.lineTo(.796*b,.4597*c);a.lineTo(.796*b,c);a.close();a.moveTo(.1371*b,.7157*c);a.lineTo(.1371*b,.1568*c);a.lineTo(.2027*b,.1525*c);a.lineTo(.1498*b,.1771*c);a.lineTo(.1498*b,.7061*c);a.close();a.moveTo(.3846*b,.3941*c);a.lineTo(.614*b,.3941*c);a.lineTo(.6809*b,.3632*c);a.lineTo(.6642*b,.4*c);a.lineTo(.6642*b,.9067*
c);a.lineTo(.6191*b,.9317*c);a.lineTo(.3833*b,.9317*c);a.close();a.moveTo(.796*b,.4608*c);a.lineTo(.9639*b,.4469*c);a.lineTo(b,.3691*c);a.lineTo(b,.9077*c);a.lineTo(.9686*b,.9856*c);a.lineTo(.796*b,c);a.close();a.moveTo(.3378*b,.0608*c);a.lineTo(.3378*b,.0907*c);a.lineTo(.3197*b,.1008*c);a.close();a.moveTo(.8502*b,.2843*c);a.lineTo(.8502*b,.3083*c);a.lineTo(.794*b,.3136*c);a.close();a.moveTo(.6167*b,.3941*c);a.lineTo(.6167*b,.9317*c);a.moveTo(.9652*b,.4448*c);a.lineTo(.9652*b,.9851*c);a.stroke();
a.restore();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(d);a.begin();a.moveTo(.4903*b,.1259*c);a.arcTo(.01*b,.008*c,0,0,1,.5023*b,.1189*c);a.arcTo(.2007*b,.16*c,0,0,1,.5639*b,.1333*c);a.arcTo(.602*b,.48*c,0,0,1,.7157*b,.2005*c);a.arcTo(.2006*b,.16*c,0,0,1,.7565*b,.2315*c);a.arcTo(.01*b,.008*c,0,0,1,.7445*b,.2421*c);a.arcTo(.2676*b,.2133*c,0,0,1,.6742*b,.2251*c);a.arcTo(.602*b,.48*c,0,0,1,.5204*b,.1541*c);a.arcTo(.1338*b,.1067*c,0,0,1,.4903*b,.1259*c);
a.close();a.moveTo(.4789*b,.1275*c);a.arcTo(.0334*b,.0267*c,0,0,0,.487*b,.1461*c);a.arcTo(.1672*b,.1333*c,0,0,0,.5237*b,.1728*c);a.arcTo(.6689*b,.5333*c,0,0,0,.6609*b,.2352*c);a.arcTo(.2676*b,.2133*c,0,0,0,.7244*b,.2501*c);a.arcTo(.0201*b,.016*c,0,0,0,.7411*b,.2475*c);a.lineTo(.5385*b,.3408*c);a.arcTo(.0669*b,.05333*c,0,0,1,.512*b,.3397*c);a.arcTo(.2676*b,.2133*c,0,0,1,.4548*b,.3248*c);a.arcTo(.6689*b,.5333*c,0,0,1,.3084*b,.2565*c);a.arcTo(.1672*b,.1333*c,0,0,1,.2776*b,.2304*c);a.arcTo(.01*b,.008*
c,0,0,1,.2776*b,.2197*c);a.close();a.fill();d=mxUtils.getValue(this.state.style,"fillColor","#ffffff");a.setFillColor(d);a.setLineJoin("round");a.setLineCap("round");a.begin();a.moveTo(.3398*b,.2421*c);a.lineTo(.4769*b,.1797*c);a.lineTo(.6341*b,.2512*c);a.lineTo(.4936*b,.3147*c);a.fill();a.begin();a.moveTo(.4334*b,.1941*c);a.lineTo(.6207*b,.2811*c);a.moveTo(.5338*b,.1995*c);a.lineTo(.3866*b,.2688*c);a.moveTo(.5873*b,.2235*c);a.lineTo(.4334*b,.2955*c);a.stroke();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");
a.begin();a.moveTo(0,.6517*c);a.lineTo(0,.0912*c);a.lineTo(.0368*b,.0155*c);a.lineTo(.2047*b,0);a.lineTo(.3378*b,.0619*c);a.lineTo(.3378*b,.0912*c);a.lineTo(.3819*b,.0693*c);a.lineTo(.6154*b,.0693*c);a.lineTo(.8502*b,.1776*c);a.lineTo(.8502*b,.3083*c);a.lineTo(.8682*b,.3061*c);a.lineTo(b,.3664*c);a.lineTo(b,.9099*c);a.lineTo(.9672*b,.9861*c);a.lineTo(.7926*b,c);a.lineTo(.6629*b,.9392*c);a.lineTo(.6629*b,.9099*c);a.lineTo(.6167*b,.9317*c);a.lineTo(.3813*b,.9317*c);a.lineTo(.1478*b,.8219*c);a.lineTo(.1478*
b,.7093*c);a.lineTo(.1365*b,.7163*c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dRedshift.prototype.cst.REDSHIFT,mxShapeAws3dRedshift);function mxShapeAws3dLambda(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dLambda,mxShape);mxShapeAws3dLambda.prototype.cst={LAMBDA:"mxgraph.aws3d.lambda",SHADING_COLORS:"shadingCols"};
mxShapeAws3dLambda.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));d=Math.min(d*b/92,d*c/109.5);this.background(a,0,0,b,c,d);a.setShadow(!1);this.foreground(a,0,0,b,c,d)};
mxShapeAws3dLambda.prototype.background=function(a,d,e,b,c,f){a.setStrokeWidth(f);a.save();a.save();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.1671*c);a.lineTo(.3424*b,0);a.lineTo(.663*b,0);a.lineTo(b,.1671*c);a.lineTo(b,.8365*c);a.lineTo(.663*b,c);a.lineTo(.3424*b,c);a.lineTo(0,.8365*c);a.close();a.fillAndStroke()};
mxShapeAws3dLambda.prototype.foreground=function(a,d,e,b,c,f){a.restore();a.setShadow(!1);a.setFillColor("#000000");d=mxUtils.getValue(this.state.style,mxShapeAws3dLambda.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");e=mxUtils.getValue(this.state.style,"flipH","0");"0"==e?a.setAlpha(d[0]):a.setAlpha(d[1]);a.begin();a.moveTo(0,.3242*c);a.lineTo(.3424*b,.4895*c);a.lineTo(.663*b,.4895*c);a.lineTo(.663*b,c);a.lineTo(.3424*b,c);a.lineTo(0,.8365*c);a.close();a.moveTo(0*b,0*c);a.lineTo(0*
b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.close();a.moveTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.lineTo(0*b,0*c);a.close();a.fill();"0"==e?a.setAlpha(d[1]):a.setAlpha(d[0]);a.begin();a.moveTo(.663*b,.4895*c);a.lineTo(b,.3242*c);a.lineTo(b,.8365*c);a.lineTo(.663*b,c);a.close();a.fill();a.restore();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,.3242*c);a.lineTo(.3424*b,.4895*c);a.lineTo(.663*b,.4895*c);
a.lineTo(b,.3242*c);a.moveTo(.3424*b,.4895*c);a.lineTo(.3424*b,c);a.moveTo(.663*b,.4895*c);a.lineTo(.663*b,c);a.stroke();a.setFillColor("#5E5E5E");a.begin();a.moveTo(.3804*b,.1169*c);a.arcTo(.5435*b,.4566*c,0,0,1,.6087*b,.1123*c);a.arcTo(.33804*b,.3196*c,0,0,1,.725*b,.1553*c);a.arcTo(.1304*b,.1096*c,0,0,1,.7924*b,.2402*c);a.arcTo(.1522*b,.1279*c,0,0,1,.725*b,.3333*c);a.arcTo(.4416*b,.274*c,0,0,1,.6087*b,.3772*c);a.arcTo(.5435*b,.4566*c,0,0,1,.3804*b,.3708*c);a.arcTo(.3804*b,.3196*c,0,0,1,.2772*b,
.3324*c);a.arcTo(.1522*b,.1279*c,0,0,1,.2163*b,.2539*c);a.arcTo(.1522*b,.1279*c,0,0,1,.2663*b,.1644*c);a.arcTo(.3804*b,.3196*c,0,0,1,.3804*b,.1169*c);a.fill();a.setFillColor("#ffffff");a.begin();a.moveTo(.5565*b,.2174*c);a.arcTo(.0652*b,.0548*c,0,0,0,.5837*b,.1945*c);a.arcTo(.0326*b,.0274*c,0,0,0,.5793*b,.1671*c);a.arcTo(.0652*b,.0548*c,0,0,0,.525*b,.1598*c);a.arcTo(.0652*b,.0548*c,0,0,1,.5543*b,.1443*c);a.arcTo(.0761*b,.0639*c,0,0,1,.6163*b,.1662*c);a.arcTo(.0598*b,.0502*c,0,0,1,.6087*b,.2091*c);
a.lineTo(.5*b,.3032*c);a.arcTo(.0978*b,.0822*c,0,0,0,.4728*b,.3379*c);a.arcTo(.0272*b,.0228*c,0,0,0,.4924*b,.3571*c);a.arcTo(.0326*b,.0274*c,0,0,1,.4489*b,.3571*c);a.arcTo(.038*b,.032*c,0,0,1,.437*b,.3242*c);a.arcTo(.1087*b,.0913*c,0,0,1,.4674*b,.2886*c);a.lineTo(.5141*b,.2557*c);a.lineTo(.3185*b,.2895*c);a.lineTo(.2641*b,.2648*c);a.close();a.fill();a.setStrokeWidth(2*f);a.setStrokeColor("#292929");a.begin();a.moveTo(0,.1671*c);a.lineTo(.3424*b,0);a.lineTo(.663*b,0);a.lineTo(b,.1671*c);a.lineTo(b,
.8365*c);a.lineTo(.663*b,c);a.lineTo(.3424*b,c);a.lineTo(0,.8365*c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dLambda.prototype.cst.LAMBDA,mxShapeAws3dLambda);function mxShapeAws3dEbs2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws3dEbs2,mxShape);mxShapeAws3dEbs2.prototype.cst={EBS2:"mxgraph.aws3d.ebs2",SHADING_COLORS:"shadingCols"};
mxShapeAws3dEbs2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.state.style,"strokeWidth","1"));e=d*b/92;d=d*c/60;var f=parseFloat(mxUtils.getValue(this.state.style,"shadow","0"));d=Math.min(e,d);a.setStrokeWidth(d);a.setShadow(!1);a.save();a.save();a.setStrokeWidth(2*d);a.setStrokeColor("#292929");a.setLineJoin("round");1==f&&a.setShadow(!0);a.begin();a.moveTo(0,.5276*c);a.lineTo(0,.4188*c);a.lineTo(.071*b,.2898*c);a.lineTo(.4033*b,0);a.lineTo(.9301*
b,.464*c);a.lineTo(b,.5863*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.close();a.fillAndStroke();a.restore();a.setFillColor("#000000");e=mxUtils.getValue(this.state.style,mxShapeAws3dEbs2.prototype.cst.SHADING_COLORS,"0.1,0.3").toString().split(",");f=mxUtils.getValue(this.state.style,"flipH","0");"0"==f?a.setAlpha(e[0]):a.setAlpha(e[1]);a.begin();a.moveTo(.071*b,.2948*c);a.lineTo(.6011*b,.7621*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.lineTo(0,.5276*c);a.lineTo(0,.4137*c);
a.close();a.fill();"0"==f?a.setAlpha(e[1]):a.setAlpha(e[0]);a.begin();a.moveTo(.6011*b,.7655*c);a.lineTo(.9344*b,.4724*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.close();a.fill();a.restore();a.setLineJoin("round");a.begin();a.moveTo(.071*b,.2948*c);a.lineTo(.6011*b,.7621*c);a.lineTo(.6667*b,c);a.lineTo(.5355*b,c);a.lineTo(0,.5276*c);a.lineTo(0,.4137*c);a.close();a.moveTo(.6011*b,.7655*c);a.lineTo(.9344*b,.4724*c);a.lineTo(b,.7035*c);a.lineTo(.6667*b,c);a.close();a.moveTo(.0033*b,.5276*c);a.lineTo(.071*
b,.2898*c);a.moveTo(.5325*b,.9976*c);a.lineTo(.603*b,.7593*c);a.stroke();a.setStrokeWidth(2*d);a.setLineCap("round");a.begin();a.moveTo(.3388*b,.3802*c);a.lineTo(.5027*b,.2345*c);a.lineTo(.6667*b,.3802*c);a.lineTo(.5027*b,.526*c);a.close();a.moveTo(.4426*b,.3802*c);a.lineTo(.5027*b,.3266*c);a.lineTo(.5628*b,.3802*c);a.lineTo(.5027*b,.4338*c);a.close();a.moveTo(.3867*b,.3284*c);a.lineTo(.3541*b,.2998*c);a.moveTo(.4436*b,.2748*c);a.lineTo(.4077*b,.2412*c);a.moveTo(.5704*b,.2803*c);a.lineTo(.5992*b,
.2513*c);a.moveTo(.6231*b,.3284*c);a.lineTo(.6503*b,.3032*c);a.moveTo(.622*b,.4338*c);a.lineTo(.6557*b,.4606*c);a.moveTo(.5667*b,.4845*c);a.lineTo(.5992*b,.5156*c);a.moveTo(.4414*b,.4874*c);a.lineTo(.412*b,.5159*c);a.moveTo(.3889*b,.4405*c);a.lineTo(.3607*b,.4657*c);a.stroke();a.setStrokeColor("#292929");a.setLineJoin("round");a.begin();a.moveTo(0,.5276*c);a.lineTo(0,.4188*c);a.lineTo(.071*b,.2898*c);a.lineTo(.4033*b,0);a.lineTo(.9301*b,.464*c);a.lineTo(b,.5863*c);a.lineTo(b,.7035*c);a.lineTo(.6667*
b,c);a.lineTo(.5355*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeAws3dEbs2.prototype.cst.EBS2,mxShapeAws3dEbs2);function mxShapeAws4ProductIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws4ProductIcon,mxShape);mxShapeAws4ProductIcon.prototype.cst={PRODUCT_ICON:"mxgraph.aws4.productIcon"};
mxShapeAws4ProductIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=e=d=parseFloat(mxUtils.getValue(this.style,"opacity","100"));"none"==g&&(e=0);"none"==h&&(f=0);d=mxUtils.getValue(this.state.style,"strokeColor","none");a.setFillColor(d);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fill();a.setShadow(!1);var g=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),h=mxUtils.getValue(this.state.style,"gradientColor",g),k=mxUtils.getValue(this.state.style,
"gradientDirection","south");a.setFillColor(g);a.setGradient(g,h,0,0,b,c,k,e,f);a.begin();a.moveTo(1,1);a.lineTo(b-1,1);a.lineTo(b-1,b-1);a.lineTo(1,b-1);a.close();a.fill();c=mxUtils.getValue(this.state.style,"prIcon","");c=mxStencilRegistry.getStencil(c);null!=c&&(a.setFillColor(d),a.setStrokeColor("none"),c.drawShape(a,this,1+.15*b,1+.15*b,.7*b-2,.7*b-2))};mxCellRenderer.registerShape(mxShapeAws4ProductIcon.prototype.cst.PRODUCT_ICON,mxShapeAws4ProductIcon);
function mxShapeAws4ResourceIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws4ResourceIcon,mxShape);mxShapeAws4ResourceIcon.prototype.cst={RESOURCE_ICON:"mxgraph.aws4.resourceIcon"};
mxShapeAws4ResourceIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fill();a.setShadow(!1);d=mxUtils.getValue(this.state.style,"resIcon","");d=mxStencilRegistry.getStencil(d);null!=d&&(e=mxUtils.getValue(this.state.style,"strokeColor","#000000"),a.setFillColor(e),a.setStrokeColor("none"),d.drawShape(a,this,.1*b,.1*c,.8*b,.8*c))};
mxCellRenderer.registerShape(mxShapeAws4ResourceIcon.prototype.cst.RESOURCE_ICON,mxShapeAws4ResourceIcon);function mxShapeAws4Group(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws4Group,mxShape);mxShapeAws4Group.prototype.cst={GROUP:"mxgraph.aws4.group"};
mxShapeAws4Group.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);e=mxUtils.getValue(this.state.style,"grStroke","1");d=25;null!=this.style&&"0"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")&&(a.pointerEvents=!1);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();"1"==e||this.outline?a.fillAndStroke():a.fill();a.pointerEvents=!0;a.setShadow(!1);b=mxUtils.getValue(this.state.style,"grIcon","");b=mxStencilRegistry.getStencil(b);null!=b&&(c=
mxUtils.getValue(this.state.style,"strokeColor","#000000"),d=mxUtils.getValue(this.state.style,"grIconSize",d),a.setFillAlpha(this.strokeOpacity/100),a.setFillColor(c),a.setStrokeColor("none"),b.drawShape(a,this,0,0,d,d))};mxCellRenderer.registerShape(mxShapeAws4Group.prototype.cst.GROUP,mxShapeAws4Group);function mxShapeAws4GroupCenter(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws4GroupCenter,mxShape);
mxShapeAws4GroupCenter.prototype.cst={GROUP_CENTER:"mxgraph.aws4.groupCenter"};
mxShapeAws4GroupCenter.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);e=mxUtils.getValue(this.state.style,"grStroke","1");d=25;a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();"1"==e||this.outline?a.fillAndStroke():a.fill();a.setShadow(!1);c=mxUtils.getValue(this.state.style,"grIcon","");c=mxStencilRegistry.getStencil(c);null!=c&&(e=mxUtils.getValue(this.state.style,"strokeColor","#000000"),d=mxUtils.getValue(this.state.style,"grIconSize",d),a.setFillAlpha(this.strokeOpacity/
100),a.setFillColor(e),a.setStrokeColor("none"),c.drawShape(a,this,.5*(b-d),0,d,d))};mxCellRenderer.registerShape(mxShapeAws4GroupCenter.prototype.cst.GROUP_CENTER,mxShapeAws4GroupCenter);function mxShapeAws4Group2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAws4Group2,mxShape);mxShapeAws4Group2.prototype.cst={GROUP2:"mxgraph.aws4.group2"};
mxShapeAws4Group2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=25;a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);b=mxUtils.getValue(this.state.style,"strokeColor","#000000");a.setFillColor(b);a.begin();a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,d);a.lineTo(0,d);a.close();a.fill();b=mxUtils.getValue(this.state.style,"grIcon","");b=mxStencilRegistry.getStencil(b);null!=b&&(d=mxUtils.getValue(this.state.style,"grIconSize",
d),a.setFillAlpha(this.strokeOpacity/100),a.setFillColor("#ffffff"),a.setStrokeColor("none"),b.drawShape(a,this,.1*d,.1*d,.8*d,.8*d))};mxCellRenderer.registerShape(mxShapeAws4Group2.prototype.cst.GROUP2,mxShapeAws4Group2);function mxShapeAndroidTabBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidTabBar,mxShape);
mxShapeAndroidTabBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_TAB_BAR:"mxgraph.android.tabBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"};
mxShapeAndroidTabBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.MAIN_TEXT,"+Tab 1, Tab 2, Tab 3").toString().split(","),g=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_COLOR,"none"),h=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_COLOR2,"none"),k=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_SIZE,"17").toString(),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
"none"),m=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.STROKE_COLOR2,"none"),n=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none"),p=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.FILL_COLOR2,"none"),q=f.length,t=Array(q),u=0,v=-1,r=0;r<q;r++){var w=f[r];w.charAt(0)===mxShapeAndroidTabBar.prototype.cst.SELECTED&&(w=f[r].substring(1),v=r);t[r]=mxUtils.getSizeForString(w,k,mxConstants.DEFAULT_FONTFAMILY).width;u+=t[r]}c=Math.max(c,1.5*k,7);u=10*q+u;b=Math.max(b,
u);a.translate(d,e);this.background(a,b,c,q,t,5,u,l,m,n,p,v);a.setShadow(!1);a.setFontStyle(mxConstants.FONT_BOLD);for(r=d=0;r<q;r++)r===v?a.setFontColor(h):a.setFontColor(g),d+=5,this.buttonText(a,d,c,f[r],t[r],k,u,b),d=d+t[r]+5};
mxShapeAndroidTabBar.prototype.background=function(a,d,e,b,c,f,g,h,k,l,m,n){a.begin();a.setStrokeColor(h);a.setFillColor(l);a.rect(0,0,d,e);a.fillAndStroke();a.setStrokeColor(k);a.begin();for(h=1;h<b;h++)if(h!==n&&h!==n+1){for(l=k=0;l<h;l++)k+=c[l]+2*f;k=k*d/g;a.moveTo(k,.2*e);a.lineTo(k,.8*e)}a.stroke();b=0;a.setFillColor(m);for(h=0;h<n;h++)b+=c[h]+2*f;b=b*d/g;d=(c[n]+2*f)*d/g;d+=b;a.rect(b,0,d-b,e);a.fill();a.setAlpha(1);a.setFillColor("#33b5e5");a.rect(b,.9*e,d-b,.1*e);a.fill()};
mxShapeAndroidTabBar.prototype.buttonText=function(a,d,e,b,c,f,g,h){b.charAt(0)===mxShapeAndroidTabBar.prototype.cst.SELECTED&&(b=b.substring(1));a.begin();a.setFontSize(f);a.text((d+.5*c)*h/g,.5*e,0,0,b,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeAndroidTabBar.prototype.cst.SHAPE_TAB_BAR,mxShapeAndroidTabBar);function mxShapeAndroidPhone(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeAndroidPhone,mxShape);mxShapeAndroidPhone.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b,c,25,25);a.fillAndStroke();a.setShadow(!1);this.foreground(a,d,e,b,c,25)};
mxShapeAndroidPhone.prototype.foreground=function(a,d,e,b,c,f){a.rect(.0625*b,.15*c,.875*b,.7*c);a.stroke();a.ellipse(.4875*b,.04125*c,.025*b,.0125*c);a.stroke();a.roundrect(.375*b,.075*c,.25*b,.01875*c,.02*b,.01*c);a.stroke();a.ellipse(.4*b,.875*c,.2*b,.1*c);a.stroke();a.roundrect(.4575*b,.905*c,.085*b,.04375*c,.00625*c,.00625*c);a.stroke()};mxCellRenderer.registerShape("mxgraph.android.phone",mxShapeAndroidPhone);
function mxShapeAndroidStatusBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidStatusBar,mxShape);mxShapeAndroidStatusBar.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeAndroidStatusBar.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fill()};
mxShapeAndroidStatusBar.prototype.foreground=function(a,d,e,b,c){a.rect(0,0,b,c);a.fill();a.setFontColor(mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#222222"));a.setFontSize(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"5"));a.text(b-30,.5*c+1,0,0,"12:00",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setFillColor("#444444");a.begin();a.moveTo(b-37,.5*c+6);a.lineTo(b-37,.5*c-5);a.lineTo(b-36,.5*c-5);a.lineTo(b-36,.5*c-6);a.lineTo(b-32,.5*c-6);a.lineTo(b-32,
.5*c-5);a.lineTo(b-31,.5*c-5);a.lineTo(b-31,.5*c+6);a.close();a.fill();a.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none"));a.ellipse(b-56,.5*c+2,2,2);a.fillAndStroke();a.setStrokeWidth(2);a.begin();a.moveTo(b-52,.5*c+1);a.arcTo(3.5,3.5,0,0,0,b-58,.5*c+1);a.stroke();a.begin();a.moveTo(b-50,.5*c-1);a.arcTo(6,6,0,0,0,b-60,.5*c-1);a.stroke();a.setStrokeWidth(1);a.rect(b-51,.5*c+5,2,1);a.fill();a.rect(b-48,.5*c+2,2,4);a.fill();a.rect(b-45,.5*c-1,2,7);a.fill();a.rect(b-42,
.5*c-4,2,10);a.fill();a.rect(b-37,.5*c-2,6,8);a.fill()};mxCellRenderer.registerShape("mxgraph.android.statusBar",mxShapeAndroidStatusBar);function mxShapeAndroidCheckboxGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidCheckboxGroup,mxShape);mxShapeAndroidCheckboxGroup.prototype.cst={STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",BUTTON_TEXT:"buttonText",SELECTED:"+"};
mxShapeAndroidCheckboxGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,mxConstants.STYLE_TEXTCOLOR,"#666666"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString();d=mxUtils.getValue(this.style,mxShapeAndroidCheckboxGroup.prototype.cst.BUTTON_TEXT,"Option 1").toString().split(",");var h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none");e=mxUtils.getValue(this.style,mxShapeAndroidCheckboxGroup.prototype.cst.STYLE_STROKECOLOR2,
"none");a.setStrokeColor(e);e=d.length;var k=Math.max(1.5*g,5),l=0,m=-1,n=e*k;c=Math.max(c,n);for(var p=0;p<e;p++){var q=d[p];q.charAt(0)===mxShapeAndroidCheckboxGroup.prototype.cst.SELECTED&&(q=d[p].substring(1),m=p);q=mxUtils.getSizeForString(q,g,mxConstants.DEFAULT_FONTFAMILY).width;q>l&&(l=q)}a.roundrect(0,0,Math.max(b,5+l+10),c,2.5,2.5);a.fillAndStroke();a.setShadow(!1);a.setFontSize(g);a.setFontColor(f);a.setStrokeColor(h);for(p=0;p<e;p++)b=(p*k+.5*k)*c/n,q=d[p],q.charAt(0)===mxShapeAndroidCheckboxGroup.prototype.cst.SELECTED&&
(q=d[p].substring(1),m=p),a.text(12.5,b,0,0,q,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),b-=2.5,m===p?(a.rect(2.5,b,5,5),a.fillAndStroke(),a.begin(),a.moveTo(3.75,b+2.5),a.lineTo(5,b+3.75),a.lineTo(6.25,b+1.25),a.stroke()):(a.rect(2.5,b,5,5),a.fillAndStroke()),m=-1};mxCellRenderer.registerShape("mxgraph.android.checkboxGroup",mxShapeAndroidCheckboxGroup);
function mxShapeAndroidRadioGroup(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidRadioGroup,mxShape);mxShapeAndroidRadioGroup.prototype.cst={STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",BUTTON_TEXT:"buttonText",SELECTED:"+"};
mxShapeAndroidRadioGroup.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,mxConstants.STYLE_TEXTCOLOR,"#666666"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString();d=mxUtils.getValue(this.style,mxShapeAndroidRadioGroup.prototype.cst.BUTTON_TEXT,"Option 1").toString().split(",");var h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none");e=mxUtils.getValue(this.style,mxShapeAndroidRadioGroup.prototype.cst.STYLE_STROKECOLOR2,
"none");a.setStrokeColor(e);e=d.length;var k=Math.max(1.5*g,5),l=0,m=-1,n=e*k;c=Math.max(c,n);for(var p=0;p<e;p++){var q=d[p];q.charAt(0)===mxShapeAndroidRadioGroup.prototype.cst.SELECTED&&(q=d[p].substring(1),m=p);q=mxUtils.getSizeForString(q,g,mxConstants.DEFAULT_FONTFAMILY).width;q>l&&(l=q)}a.roundrect(0,0,Math.max(b,5+l+10),c,2.5,2.5);a.fillAndStroke();a.setShadow(!1);a.setFontSize(g);a.setFontColor(f);a.setStrokeColor(h);a.setFillColor(h);for(p=0;p<e;p++)b=(p*k+.5*k)*c/n,q=d[p],q.charAt(0)===
mxShapeAndroidRadioGroup.prototype.cst.SELECTED&&(q=d[p].substring(1),m=p),a.text(12.5,b,0,0,q,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),b-=2.5,m===p?(a.ellipse(2.5,b,5,5),a.stroke(),a.ellipse(3.75,b+1.25,2.5,2.5),a.fillAndStroke()):(a.ellipse(2.5,b,5,5),a.stroke())};mxCellRenderer.registerShape("mxgraph.android.radioGroup",mxShapeAndroidRadioGroup);function mxShapeAndroidMenuBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeAndroidMenuBar,mxShape);mxShapeAndroidMenuBar.prototype.cst={MENU_TEXT:"menuText"};
mxShapeAndroidMenuBar.prototype.paintVertexShape=function(a,d,e,b,c){for(var f=mxUtils.getValue(this.style,mxShapeAndroidMenuBar.prototype.cst.MENU_TEXT,"Item 1, Item 2, Item 3").toString().split(","),g=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12"),h=f.length,k=0,l=0;l<h;l++){var m=mxUtils.getSizeForString(f[l],g,mxConstants.DEFAULT_FONTFAMILY).width;m>k&&(k=m)}g*=1.5;k=h*g;c=Math.max(c,k);a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();for(l=1;l<h;l++)d=
l*g*c/k,a.moveTo(0,d),a.lineTo(b,d);a.stroke();for(l=0;l<h;l++)m+=2.5,d=(l*g+.5*g)*c/k,a.text(10,d,0,0,f[l],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape("mxgraph.android.menuBar",mxShapeAndroidMenuBar);function mxShapeAndroidTextSelHandles(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidTextSelHandles,mxShape);
mxShapeAndroidTextSelHandles.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none");a.translate(d,e);d=Math.max(0,c-22.5);a.setAlpha(.5);a.rect(15,0,b-30,d);a.fill();a.begin();a.moveTo(0,c-15);a.lineTo(7.5,c-22.5);a.lineTo(15,c-15);a.close();a.moveTo(b-15,c-15);a.lineTo(b-7.5,c-22.5);a.lineTo(b,c-15);a.close();a.fill();a.setFillColor(f);a.rect(0,c-15,15,15);a.fill();a.rect(b-15,c-15,15,15);a.fill()};
mxCellRenderer.registerShape("mxgraph.android.textSelHandles",mxShapeAndroidTextSelHandles);function mxShapeAndroidIndeterminateSpinner(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidIndeterminateSpinner,mxShape);mxShapeAndroidIndeterminateSpinner.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeAndroidIndeterminateSpinner.prototype.background=function(a,d,e,b,c){a.setGradient("#aaaaaa","#dddddd",.325*b,0,.675*b,.5*c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(.5*b,.1*c);a.arcTo(.4*b,.4*c,0,0,0,.5*b,.9*c);a.lineTo(.5*b,c);a.arcTo(.5*b,.5*c,0,0,1,.5*b,0);a.close();a.fill();a.setGradient("#ffffff","#dddddd",.325*b,0,.675*b,.5*c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(.5*b,.1*c);a.arcTo(.4*b,.4*c,0,0,1,.5*b,.9*c);a.lineTo(.5*b,c);a.arcTo(.5*b,.5*c,0,0,0,.5*b,0);a.close();
a.fill()};mxCellRenderer.registerShape("mxgraph.android.indeterminateSpinner",mxShapeAndroidIndeterminateSpinner);function mxShapeAndroidAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}mxUtils.extend(mxShapeAndroidAnchor,mxShape);mxShapeAndroidAnchor.prototype.cst={ANCHOR:"mxgraph.android.anchor"};mxShapeAndroidAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeAndroidAnchor.prototype.cst.ANCHOR,mxShapeAndroidAnchor);
function mxShapeAndroidRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidRRect,mxShape);mxShapeAndroidRRect.prototype.cst={RRECT:"mxgraph.android.rrect",R_SIZE:"rSize"};mxShapeAndroidRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeAndroidRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAndroidRRect.prototype.cst.RRECT,mxShapeAndroidRRect);function mxShapeAndroidCheckbox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidCheckbox,mxShape);mxShapeAndroidCheckbox.prototype.cst={CHECKBOX:"mxgraph.android.checkbox"};
mxShapeAndroidCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeAndroidCheckbox.prototype.cst.CHECKBOX,mxShapeAndroidCheckbox);function mxShapeAndroidProgressBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=.8;this.dx2=.6}mxUtils.extend(mxShapeAndroidProgressBar,mxShape);
mxShapeAndroidProgressBar.prototype.customProperties=[{name:"dx1",dispName:"Middle Bar Length",type:"float",min:0,max:1,defVal:.8},{name:"dx2",dispName:"Left Bar Length",type:"float",min:0,max:1,defVal:.6}];mxShapeAndroidProgressBar.prototype.cst={PROGRESS_BAR:"mxgraph.android.progressBar"};
mxShapeAndroidProgressBar.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),g=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));a.translate(d,e);a.save();a.save();a.setStrokeColor("#444444");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.restore();a.setShadow(!1);a.begin();a.moveTo(0,.5*c);a.lineTo(f,.5*c);a.stroke();a.setStrokeColor("#000000");a.setAlpha("0.2");a.begin();
a.moveTo(0,.5*c);a.lineTo(f,.5*c);a.stroke();a.restore();a.setShadow(!1);a.begin();a.moveTo(0,.5*c);a.lineTo(g,.5*c);a.stroke()};mxCellRenderer.registerShape(mxShapeAndroidProgressBar.prototype.cst.PROGRESS_BAR,mxShapeAndroidProgressBar);mxShapeAndroidProgressBar.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidProgressBar.prototype.cst.PROGRESS_BAR]=function(a){var d=[Graph.createHandle(a,["dx1"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));return new mxPoint(e.x+b*e.width,e.y+e.height/2)},function(e,b){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(1,(b.x-e.x)/e.width)))/100})];a=Graph.createHandle(a,["dx2"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx1))));
return new mxPoint(e.x+b*e.width,e.y+e.height/2)},function(e,b){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(1,(b.x-e.x)/e.width)))/100});d.push(a);return d};function mxShapeAndroidProgressScrubberDisabled(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}mxUtils.extend(mxShapeAndroidProgressScrubberDisabled,mxShape);
mxShapeAndroidProgressScrubberDisabled.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}];mxShapeAndroidProgressScrubberDisabled.prototype.cst={PROGRESS_SCRUBBER_DISABLED:"mxgraph.android.progressScrubberDisabled"};
mxShapeAndroidProgressScrubberDisabled.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.save();a.save();a.setStrokeColor("#444444");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.restore();a.setShadow(!1);a.setAlpha("0.5");a.setFillColor("#666666");a.begin();d=Math.min(c,.1*b)/2;a.ellipse(f-d,.5*c-d,2*d,2*d);a.fill();a.restore();a.setShadow(!1);a.begin();d=Math.min(c,.1*b)/8;a.ellipse(f-
d,.5*c-d,2*d,2*d);a.fill()};mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberDisabled.prototype.cst.PROGRESS_SCRUBBER_DISABLED,mxShapeAndroidProgressScrubberDisabled);mxShapeAndroidProgressScrubberDisabled.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidProgressScrubberDisabled.prototype.cst.PROGRESS_SCRUBBER_DISABLED]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
function mxShapeAndroidProgressScrubberFocused(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}mxUtils.extend(mxShapeAndroidProgressScrubberFocused,mxShape);mxShapeAndroidProgressScrubberFocused.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}];mxShapeAndroidProgressScrubberFocused.prototype.cst={PROGRESS_SCRUBBER_FOCUSED:"mxgraph.android.progressScrubberFocused"};
mxShapeAndroidProgressScrubberFocused.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=mxUtils.getValue(this.style,"fillColor","#ffffff");a.translate(d,e);a.save();a.save();a.setStrokeColor("#444444");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.restore();a.setShadow(!1);a.setAlpha("0.75");a.begin();d=Math.min(c,.1*b)/2;a.ellipse(f-d,.5*c-d,2*d,2*d);a.fill();a.restore();a.setShadow(!1);a.setStrokeColor(g);
a.begin();a.moveTo(0,.5*c);a.lineTo(f,.5*c);a.stroke();a.begin();d=Math.min(c,.1*b)/8;a.ellipse(f-d,.5*c-d,2*d,2*d);a.fill()};mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberFocused.prototype.cst.PROGRESS_SCRUBBER_FOCUSED,mxShapeAndroidProgressScrubberFocused);mxShapeAndroidProgressScrubberFocused.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidProgressScrubberFocused.prototype.cst.PROGRESS_SCRUBBER_FOCUSED]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
function mxShapeAndroidProgressScrubberPressed(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}mxUtils.extend(mxShapeAndroidProgressScrubberPressed,mxShape);mxShapeAndroidProgressScrubberPressed.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}];mxShapeAndroidProgressScrubberPressed.prototype.cst={PROGRESS_SCRUBBER_PRESSED:"mxgraph.android.progressScrubberPressed"};
mxShapeAndroidProgressScrubberPressed.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=mxUtils.getValue(this.style,"fillColor","#ffffff");a.translate(d,e);a.save();a.save();a.setStrokeColor("#444444");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.restore();a.setShadow(!1);a.setStrokeColor(g);a.setAlpha("0.5");a.begin();d=Math.min(c,.1*b)/2;a.ellipse(f-d,.5*c-d,2*d,2*d);a.fillAndStroke();a.restore();a.setShadow(!1);
a.setStrokeColor(g);a.begin();a.moveTo(0,.5*c);a.lineTo(f,.5*c);a.stroke();a.begin();d=Math.min(c,.1*b)/8;a.ellipse(f-d,.5*c-d,2*d,2*d);a.fill()};mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberPressed.prototype.cst.PROGRESS_SCRUBBER_PRESSED,mxShapeAndroidProgressScrubberPressed);mxShapeAndroidProgressScrubberPressed.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidProgressScrubberPressed.prototype.cst.PROGRESS_SCRUBBER_PRESSED]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
function mxShapeAndroidQuickscroll2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeAndroidQuickscroll2,mxShape);mxShapeAndroidQuickscroll2.prototype.customProperties=[{name:"dy",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.5}];mxShapeAndroidQuickscroll2.prototype.cst={QUICKSCROLL:"mxgraph.android.quickscroll2"};
mxShapeAndroidQuickscroll2.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.min(c-20,Math.max(20,c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))))));mxUtils.getValue(this.style,"fillColor","#ffffff");a.translate(d,e);a.save();a.save();a.setStrokeColor("#cccccc");a.begin();a.moveTo(b-3,0);a.lineTo(b-3,c);a.stroke();a.restore();a.begin();a.roundrect(b-6,f-10,6,20,1,1);a.fillAndStroke();a.setFillColor("#cccccc");a.begin();a.rect(0,f-20,b-18,40);a.fill();a.setFillColor("#666666");
a.begin();a.moveTo(b-18,f-20);a.lineTo(b-6,f);a.lineTo(b-18,f+20);a.close();a.fill();a.setFontSize("12");a.text(.5*(b-18),f,0,0,"Aa",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeAndroidQuickscroll2.prototype.cst.QUICKSCROLL,mxShapeAndroidQuickscroll2);mxShapeAndroidQuickscroll2.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidQuickscroll2.prototype.cst.QUICKSCROLL]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+d.width-3,d.y+Math.min(d.height-20,Math.max(20,e*d.height)))},function(d,e){this.state.style.dy=Math.round(1E3*Math.max(0,Math.min(1,(e.y-d.y)/d.height)))/1E3})]};
function mxShapeAndroidQuickscroll3(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeAndroidQuickscroll3,mxShape);mxShapeAndroidQuickscroll3.prototype.customProperties=[{name:"dy",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.5}];mxShapeAndroidQuickscroll3.prototype.cst={QUICKSCROLL:"mxgraph.android.quickscroll3"};
mxShapeAndroidQuickscroll3.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.min(c-10,Math.max(10,c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))))));mxUtils.getValue(this.style,"fillColor","#ffffff");a.translate(d,e);a.save();a.setStrokeColor("#cccccc");a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,c);a.stroke();a.restore();a.begin();a.roundrect(.5*b-3,f-10,6,20,1,1);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAndroidQuickscroll3.prototype.cst.QUICKSCROLL,mxShapeAndroidQuickscroll3);mxShapeAndroidQuickscroll3.prototype.constraints=null;
Graph.handleFactory[mxShapeAndroidQuickscroll3.prototype.cst.QUICKSCROLL]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+.5*d.width,d.y+Math.min(d.height-10,Math.max(10,e*d.height)))},function(d,e){this.state.style.dy=Math.round(1E3*Math.max(0,Math.min(1,(e.y-d.y)/d.height)))/1E3})]};
function mxShapeAndroidScrollbars2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidScrollbars2,mxShape);mxShapeAndroidScrollbars2.prototype.cst={SCROLLBARS:"mxgraph.android.scrollbars2"};mxShapeAndroidScrollbars2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(b-5,0,5,c-7);a.fillAndStroke();a.begin();a.rect(0,c-5,b-7,5);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeAndroidScrollbars2.prototype.cst.SCROLLBARS,mxShapeAndroidScrollbars2);mxShapeAndroidScrollbars2.prototype.constraints=null;function mxShapeAndroidSpinner2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeAndroidSpinner2,mxShape);mxShapeAndroidSpinner2.prototype.cst={SPINNER:"mxgraph.android.spinner2"};
mxShapeAndroidSpinner2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(b,c);a.stroke();d=Math.min(b/10,c);a.begin();a.moveTo(b-d,c);a.lineTo(b,c-d);a.lineTo(b,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeAndroidSpinner2.prototype.cst.SPINNER,mxShapeAndroidSpinner2);mxShapeAndroidSpinner2.prototype.constraints=null;
function mxArchiMateLocation(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateLocation,mxShape);mxArchiMateLocation.prototype.cst={LOCATION:"mxgraph.archimate.location"};mxArchiMateLocation.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMateLocation.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxArchiMateLocation.prototype.foreground=function(a,d,e,b,c){a.setDashed(!1);a.translate(3,0);b-=6;a.begin();a.moveTo(.5*b,c);a.arcTo(.1775*b,.3*c,0,0,0,.345*b,.7*c);a.arcTo(.538*b,.364*c,0,0,1,.5*b,0);a.arcTo(.538*b,.364*c,0,0,1,.655*b,.7*c);a.arcTo(.1775*b,.3*c,0,0,0,.5*b,c);a.stroke()};mxCellRenderer.registerShape(mxArchiMateLocation.prototype.cst.LOCATION,mxArchiMateLocation);
mxArchiMateLocation.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateBusiness(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateBusiness,mxShape);mxArchiMateBusiness.prototype.cst={BUSINESS:"mxgraph.archimate.business",TYPE:"busType",PROCESS:"process",FUNCTION:"function",INTERACTION:"interaction",EVENT:"event",SERVICE:"service"};
mxArchiMateBusiness.prototype.customProperties=[{name:"busType",dispName:"Business Type",type:"enum",enumList:[{val:"process",dispName:"Process"},{val:"function",dispName:"Function"},{val:"interaction",dispName:"Interaction"},{val:"event",dispName:"Event"},{val:"service",dispName:"Service"}]}];mxArchiMateBusiness.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMateBusiness.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b,c,10,10);a.fillAndStroke()};
mxArchiMateBusiness.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxArchiMateBusiness.prototype.cst.TYPE,mxArchiMateBusiness.prototype.cst.PROCESS);a.setDashed(!1);d===mxArchiMateBusiness.prototype.cst.PROCESS?(a.translate(0,2),c-=4,a.begin(),a.moveTo(0,.15*c),a.lineTo(.65*b,.15*c),a.lineTo(.65*b,0),a.lineTo(b,.5*c),a.lineTo(.65*b,c),a.lineTo(.65*b,.85*c),a.lineTo(0,.85*c),a.close(),a.stroke()):d===mxArchiMateBusiness.prototype.cst.FUNCTION?(a.translate(2,0),b-=4,a.begin(),
a.moveTo(0,.15*c),a.lineTo(.5*b,0),a.lineTo(b,.15*c),a.lineTo(b,c),a.lineTo(.5*b,.85*c),a.lineTo(0,c),a.close(),a.stroke()):d===mxArchiMateBusiness.prototype.cst.INTERACTION?(a.begin(),a.moveTo(.55*b,0),a.arcTo(.45*b,.5*c,0,0,1,.55*b,c),a.close(),a.moveTo(.45*b,0),a.arcTo(.45*b,.5*c,0,0,0,.45*b,c),a.close(),a.stroke()):d===mxArchiMateBusiness.prototype.cst.EVENT?(a.translate(0,3),c-=6,a.begin(),a.moveTo(b-.5*c,0),a.arcTo(.5*c,.5*c,0,0,1,b-.5*c,c),a.lineTo(0,c),a.arcTo(.5*c,.5*c,0,0,0,0,0),a.close(),
a.stroke()):d===mxArchiMateBusiness.prototype.cst.SERVICE&&(a.translate(0,3),c-=6,a.begin(),a.moveTo(b-.5*c,0),a.arcTo(.5*c,.5*c,0,0,1,b-.5*c,c),a.lineTo(0,c),a.arcTo(.5*c,.5*c,0,0,1,0,0),a.close(),a.stroke())};mxCellRenderer.registerShape(mxArchiMateBusiness.prototype.cst.BUSINESS,mxArchiMateBusiness);
mxArchiMateBusiness.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));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,null,-2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateBusinessObject(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateBusinessObject,mxShape);mxArchiMateBusinessObject.prototype.cst={BUSINESS_OBJECT:"mxgraph.archimate.businessObject"};mxArchiMateBusinessObject.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};
mxArchiMateBusinessObject.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxArchiMateBusinessObject.prototype.foreground=function(a,d,e,b,c){15<=c&&(a.begin(),a.moveTo(0,15),a.lineTo(b,15),a.stroke())};mxCellRenderer.registerShape(mxArchiMateBusinessObject.prototype.cst.BUSINESS_OBJECT,mxArchiMateBusinessObject);
mxArchiMateBusinessObject.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));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,null,-2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateRepresentation(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateRepresentation,mxShape);mxArchiMateRepresentation.prototype.cst={REPRESENTATION:"mxgraph.archimate.representation"};mxArchiMateRepresentation.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c)};
mxArchiMateRepresentation.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMateRepresentation.prototype.cst.REPRESENTATION,mxArchiMateRepresentation);
mxArchiMateRepresentation.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1,null));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateProduct(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateProduct,mxShape);mxArchiMateProduct.prototype.cst={PRODUCT:"mxgraph.archimate.product"};mxArchiMateProduct.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxArchiMateProduct.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxArchiMateProduct.prototype.foreground=function(a,d,e,b,c){15<=c&&(a.begin(),a.moveTo(0,15),a.lineTo(.6*b,15),a.lineTo(.6*b,0),a.stroke())};mxCellRenderer.registerShape(mxArchiMateProduct.prototype.cst.PRODUCT,mxArchiMateProduct);function mxArchiMateApplication(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateApplication,mxShape);
mxArchiMateApplication.prototype.cst={APPLICATION:"mxgraph.archimate.application",TYPE:"appType",COMPONENT:"comp",INTERFACE:"interface",INTERFACE2:"interface2",FUNCTION:"function",INTERACTION:"interaction",SERVICE:"service",NODE:"node",NETWORK:"network",COMM_PATH:"commPath",SYS_SW:"sysSw",ARTIFACT:"artifact",ACTOR:"actor",ROLE:"role",COLLABORATION:"collab"};
mxArchiMateApplication.prototype.customProperties=[{name:"appType",dispName:"App Type",type:"enum",enumList:[{val:"comp",dispName:"Component"},{val:"interface",dispName:"Interface"},{val:"interface2",dispName:"Interface2"},{val:"function",dispName:"Function"},{val:"interaction",dispName:"Interaction"},{val:"service",dispName:"Service"},{val:"node",dispName:"Node"},{val:"network",dispName:"Network"},{val:"commPath",dispName:"Comm Path"},{val:"artifact",dispName:"Artifact"},{val:"sysSw",dispName:"System Sw"},
{val:"path",dispName:"Path"},{val:"actor",dispName:"Actor"},{val:"role",dispName:"Role"},{val:"collab",dispName:"Collaboration"}]}];mxArchiMateApplication.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};mxArchiMateApplication.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxArchiMateApplication.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxArchiMateApplication.prototype.cst.TYPE,mxArchiMateApplication.prototype.cst.COMPONENT);a.setDashed(!1);d===mxArchiMateApplication.prototype.cst.COMPONENT?(a.translate(1,0),b-=2,a.rect(.25*b,0,.75*b,c),a.stroke(),a.rect(0,.25*c,.5*b,.15*c),a.fillAndStroke(),a.rect(0,.6*c,.5*b,.15*c),a.fillAndStroke()):d===mxArchiMateApplication.prototype.cst.COLLABORATION?(a.translate(0,3),c-=6,a.ellipse(0,0,.6*b,c),a.stroke(),
a.ellipse(.4*b,0,.6*b,c),a.fillAndStroke()):d===mxArchiMateApplication.prototype.cst.INTERFACE?(a.translate(0,4),c-=8,a.ellipse(.5*b,0,.5*b,c),a.stroke(),a.begin(),a.moveTo(0,.5*c),a.lineTo(.5*b,.5*c),a.stroke()):d===mxArchiMateApplication.prototype.cst.INTERFACE2?(a.translate(0,1),c-=2,a.begin(),a.moveTo(0,.5*c),a.lineTo(.6*b,.5*c),a.moveTo(b,0),a.arcTo(.4*b,.5*c,0,0,0,b,c),a.stroke()):d===mxArchiMateApplication.prototype.cst.FUNCTION?(a.begin(),a.moveTo(.5*b,0),a.lineTo(b,.2*c),a.lineTo(b,c),a.lineTo(.5*
b,.8*c),a.lineTo(0,c),a.lineTo(0,.2*c),a.close(),a.stroke()):d===mxArchiMateApplication.prototype.cst.INTERACTION?(a.begin(),a.moveTo(.55*b,0),a.arcTo(.45*b,.5*c,0,0,1,.55*b,c),a.close(),a.moveTo(.45*b,0),a.arcTo(.45*b,.5*c,0,0,0,.45*b,c),a.close(),a.stroke()):d===mxArchiMateApplication.prototype.cst.SERVICE?(a.translate(0,3),c-=6,a.begin(),a.moveTo(b-.5*c,0),a.arcTo(.5*c,.5*c,0,0,1,b-.5*c,c),a.lineTo(0,c),a.arcTo(.5*c,.5*c,0,0,1,0,0),a.close(),a.stroke()):d===mxArchiMateApplication.prototype.cst.NODE?
(a.begin(),a.moveTo(0,.25*c),a.lineTo(.25*b,0),a.lineTo(b,0),a.lineTo(b,.75*c),a.lineTo(.75*b,c),a.lineTo(0,c),a.close(),a.moveTo(0,.25*c),a.lineTo(.75*b,.25*c),a.lineTo(.75*b,c),a.moveTo(b,0),a.lineTo(.75*b,.25*c),a.stroke()):d===mxArchiMateApplication.prototype.cst.NETWORK?(a.translate(0,2),c-=4,a.begin(),a.moveTo(.4*b,.2*c),a.lineTo(.85*b,.2*c),a.lineTo(.6*b,.8*c),a.lineTo(.15*b,.8*c),a.close(),a.stroke(),e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(e),
a.ellipse(.25*b,0,.3*b,.4*c),a.fill(),a.ellipse(.7*b,0,.3*b,.4*c),a.fill(),a.ellipse(0,.6*c,.3*b,.4*c),a.fill(),a.ellipse(.45*b,.6*c,.3*b,.4*c),a.fill()):d===mxArchiMateApplication.prototype.cst.COMM_PATH?(a.translate(0,5),c-=10,a.begin(),a.moveTo(.1*b,0),a.lineTo(0,.5*c),a.lineTo(.1*b,c),a.moveTo(.9*b,0),a.lineTo(b,.5*c),a.lineTo(.9*b,c),a.stroke(),a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxArchiMateApplication.prototype.cst.SYS_SW?(a.ellipse(.3*b,0,.7*b,.7*c),
a.stroke(),a.ellipse(0,.02*c,.98*b,.98*c),a.fillAndStroke()):d===mxArchiMateApplication.prototype.cst.ARTIFACT?(a.translate(2,0),b-=4,a.begin(),a.moveTo(0,0),a.lineTo(.7*b,0),a.lineTo(b,.22*c),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.moveTo(.7*b,0),a.lineTo(.7*b,.22*c),a.lineTo(b,.22*c),a.stroke()):d===mxArchiMateApplication.prototype.cst.ACTOR&&(a.translate(3,0),b-=6,a.ellipse(.2*b,0,.6*b,.3*c),a.stroke(),a.begin(),a.moveTo(.5*b,.3*c),a.lineTo(.5*b,.75*c),a.moveTo(0,.45*c),a.lineTo(b,.45*c),a.moveTo(0,
c),a.lineTo(.5*b,.75*c),a.lineTo(b,c),a.stroke());d===mxArchiMateApplication.prototype.cst.ROLE&&(a.translate(0,4),c-=8,a.begin(),a.moveTo(.8*b,0),a.lineTo(.2*b,0),a.arcTo(.2*b,.5*c,0,0,0,.2*b,c),a.lineTo(.8*b,c),a.stroke(),a.ellipse(.6*b,0,.4*b,c),a.stroke())};mxCellRenderer.registerShape(mxArchiMateApplication.prototype.cst.APPLICATION,mxArchiMateApplication);
mxArchiMateApplication.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateTech(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateTech,mxShape);mxArchiMateTech.prototype.cst={TECH:"mxgraph.archimate.tech",TYPE:"techType",DEVICE:"device",PLATEAU:"plateau"};mxArchiMateTech.prototype.customProperties=[{name:"techType",dispName:"Tech Type",type:"enum",enumList:[{val:"device",dispName:"Device"},{val:"plateau",dispName:"Plateau"}]}];
mxArchiMateTech.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-30,15);this.foreground(a,b-30,15,15,15)};mxArchiMateTech.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,10);a.lineTo(10,0);a.lineTo(b,0);a.lineTo(b,c-10);a.lineTo(b-10,c);a.lineTo(0,c);a.close();a.moveTo(0,10);a.lineTo(b-10,10);a.lineTo(b-10,c);a.moveTo(b,0);a.lineTo(b-10,10);a.fillAndStroke()};
mxArchiMateTech.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxArchiMateTech.prototype.cst.TYPE,mxArchiMateTech.prototype.cst.DEVICE);a.setDashed(!1);d===mxArchiMateTech.prototype.cst.DEVICE?(a.roundrect(0,0,b,.88*c,.05*b,.05*c),a.stroke(),a.begin(),a.moveTo(.1*b,.88*c),a.lineTo(0,c),a.lineTo(b,c),a.lineTo(.9*b,.88*c),a.stroke()):d===mxArchiMateTech.prototype.cst.PLATEAU&&(d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(d),a.rect(.4*
b,0,.6*b,.2*c),a.fill(),a.rect(.2*b,.4*c,.6*b,.2*c),a.fill(),a.rect(0,.8*c,.6*b,.2*c),a.fill())};mxCellRenderer.registerShape(mxArchiMateTech.prototype.cst.TECH,mxArchiMateTech);
mxArchiMateTech.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,10,0));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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-10));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};function mxArchiMateMotivational(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateMotivational,mxShape);mxArchiMateMotivational.prototype.cst={MOTIV:"mxgraph.archimate.motiv",TYPE:"motivType",STAKE:"stake",DRIVER:"driver",ASSESSMENT:"assess",GOAL:"goal",REQUIREMENT:"req",CONSTRAINT:"const",PRINCIPLE:"princ"};
mxArchiMateMotivational.prototype.customProperties=[{name:"motivType",dispName:"Motivational Type",type:"enum",enumList:[{val:"stake",dispName:"Stake"},{val:"driver",dispName:"Driver"},{val:"assess",dispName:"Assessment"},{val:"goal",dispName:"Goal"},{val:"req",dispName:"Requirement"},{val:"const",dispName:"Constraint"},{val:"princ",dispName:"Principle"}]}];
mxArchiMateMotivational.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};mxArchiMateMotivational.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(10,0);a.lineTo(b-10,0);a.lineTo(b,10);a.lineTo(b,c-10);a.lineTo(b-10,c);a.lineTo(10,c);a.lineTo(0,c-10);a.lineTo(0,10);a.close();a.fillAndStroke()};
mxArchiMateMotivational.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxArchiMateMotivational.prototype.cst.TYPE,mxArchiMateMotivational.prototype.cst.STAKE);a.setDashed(!1);d===mxArchiMateMotivational.prototype.cst.STAKE?(a.translate(0,4),c-=8,a.begin(),a.moveTo(.8*b,0),a.lineTo(.2*b,0),a.arcTo(.2*b,.5*c,0,0,0,.2*b,c),a.lineTo(.8*b,c),a.stroke(),a.ellipse(.6*b,0,.4*b,c),a.stroke()):d===mxArchiMateMotivational.prototype.cst.DRIVER?(a.ellipse(.1*b,.1*c,.8*b,.8*c),a.stroke(),
a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.moveTo(.5*b,0),a.lineTo(.5*b,c),a.moveTo(.145*b,.145*c),a.lineTo(.855*b,.855*c),a.moveTo(.145*b,.855*c),a.lineTo(.855*b,.145*c),a.stroke(),d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(d),a.ellipse(.35*b,.35*c,.3*b,.3*c),a.fillAndStroke()):d===mxArchiMateMotivational.prototype.cst.ASSESSMENT?(a.ellipse(.2*b,0,.8*b,.8*c),a.stroke(),a.begin(),a.moveTo(0,c),a.lineTo(.32*b,.68*c),a.stroke()):d===mxArchiMateMotivational.prototype.cst.GOAL?
(a.ellipse(0,0,b,c),a.stroke(),a.ellipse(.15*b,.15*c,.7*b,.7*c),a.stroke(),d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(d),a.ellipse(.3*b,.3*c,.4*b,.4*c),a.fillAndStroke()):d===mxArchiMateMotivational.prototype.cst.REQUIREMENT?(a.translate(0,4),c-=8,a.begin(),a.moveTo(.25*b,0),a.lineTo(b,0),a.lineTo(.75*b,c),a.lineTo(0,c),a.close(),a.stroke()):d===mxArchiMateMotivational.prototype.cst.CONSTRAINT?(a.translate(0,4),c-=8,a.begin(),a.moveTo(.25*b,0),a.lineTo(b,
0),a.lineTo(.75*b,c),a.lineTo(0,c),a.close(),a.moveTo(.45*b,0),a.lineTo(.2*b,c),a.stroke()):d===mxArchiMateMotivational.prototype.cst.PRINCIPLE&&(a.begin(),a.moveTo(.05*b,.05*c),a.arcTo(2.3*b,2.3*c,0,0,1,.95*b,.05*c),a.arcTo(2.3*b,2.3*c,0,0,1,.95*b,.95*c),a.arcTo(2.3*b,2.3*c,0,0,1,.05*b,.95*c),a.arcTo(2.3*b,2.3*c,0,0,1,.05*b,.05*c),a.close(),a.stroke(),d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(d),a.begin(),a.moveTo(.45*b,.7*c),a.lineTo(.42*b,.15*c),a.lineTo(.58*
b,.15*c),a.lineTo(.55*b,.7*c),a.close(),a.fill(),a.rect(.45*b,.75*c,.1*b,.1*c),a.fill())};mxCellRenderer.registerShape(mxArchiMateMotivational.prototype.cst.MOTIV,mxArchiMateMotivational);
mxArchiMateMotivational.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,5,5));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,null,-5,5));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-5,-5));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,5,-5));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMateGap(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMateGap,mxShape);mxArchiMateGap.prototype.cst={GAP:"mxgraph.archimate.gap"};mxArchiMateGap.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMateGap.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.fillAndStroke()};mxArchiMateGap.prototype.foreground=function(a,d,e,b,c){a.setDashed(!1);a.translate(0,2);c-=4;a.ellipse(.15*b,0,.7*b,c);a.stroke();a.begin();a.moveTo(0,.35*c);a.lineTo(b,.35*c);a.moveTo(0,.65*c);a.lineTo(b,.65*c);a.stroke()};
mxCellRenderer.registerShape(mxArchiMateGap.prototype.cst.GAP,mxArchiMateGap);
mxArchiMateGap.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1,null));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Application(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Application,mxShape);
mxArchiMate3Application.prototype.cst={APPLICATION:"mxgraph.archimate3.application",TYPE:"appType",COMPONENT:"comp",COLLABORATION:"collab",CONTRACT:"contract",INTERFACE:"interface",INTERFACE2:"interface2",LOCATION:"location",FACILITY:"facility",FUNCTION:"func",GAP:"gap",INTERACTION:"interaction",SERVICE:"serv",EQUIPMENT:"equipment",EVENT:"event",EVENT2:"event2",NODE:"node",GENERIC:"generic",NETWORK:"netw",COMM_PATH:"commPath",ACTOR:"actor",ASSESSMENT:"assess",GOAL:"goal",GROUPING:"grouping",OUTCOME:"outcome",
ROLE:"role",PASSIVE:"passive",PLATEAU:"plateau",PROCESS:"proc",PRODUCT:"product",DRIVER:"driver",DELIVERABLE:"deliverable",DEVICE:"device",PRINCIPLE:"principle",REQUIREMENT:"requirement",REPRESENTATION:"representation",CONSTRAINT:"constraint",RESOURCE:"resource",CAPABILITY:"capability",COURSE:"course",MATERIAL:"material",MEANING:"meaning",DISTRIBUTION:"distribution",SYS_SW:"sysSw",ARTIFACT:"artifact",PATH:"path",ARCHI_TYPE:"archiType",TYPE_SQUARE:"square",TYPE_ROUNDED:"rounded",TYPE_OCT:"oct",AMVALUE:"amValue",
VALUE_STREAM:"valueStream",WORK_PACKAGE:"workPackage"};
mxArchiMate3Application.prototype.customProperties=[{name:"archiType",dispName:"Type",type:"enum",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Rounded"},{val:"oct",dispName:"Octagonal"}]},{name:"appType",dispName:"App Type",type:"enum",enumList:[{val:"generic",dispName:"Generic"},{val:"comp",dispName:"Component"},{val:"collab",dispName:"Collaboration"},{val:"contract",dispName:"Contract"},{val:"interface",dispName:"Interface"},{val:"interface2",dispName:"Interface2"},{val:"facility",
dispName:"Facility"},{val:"func",dispName:"Function"},{val:"gap",dispName:"Gap"},{val:"interaction",dispName:"Interaction"},{val:"location",dispName:"Location"},{val:"serv",dispName:"Service"},{val:"equipment",dispName:"Equipment"},{val:"event",dispName:"Event"},{val:"event2",dispName:"Event2"},{val:"node",dispName:"Node"},{val:"netw",dispName:"Network"},{val:"commPath",dispName:"Comm Path"},{val:"actor",dispName:"Actor"},{val:"assess",dispName:"Assessment"},{val:"goal",dispName:"Goal"},{val:"grouping",
dispName:"Grouping"},{val:"outcome",dispName:"Outcome"},{val:"role",dispName:"Stakeholder"},{val:"passive",dispName:"Passive"},{val:"plateau",dispName:"Plateau"},{val:"proc",dispName:"Process"},{val:"product",dispName:"Product"},{val:"deliverable",dispName:"Deliverable"},{val:"device",dispName:"Device"},{val:"driver",dispName:"Driver"},{val:"principle",dispName:"Principle"},{val:"requirement",dispName:"Requirement"},{val:"representation",dispName:"Representation"},{val:"constraint",dispName:"Constraint"},
{val:"resource",dispName:"Resource"},{val:"capability",dispName:"Capability"},{val:"course",dispName:"Course"},{val:"material",dispName:"Material"},{val:"meaning",dispName:"Meaning"},{val:"distribution",dispName:"Distribution"},{val:"sysSw",dispName:"System Sw"},{val:"artifact",dispName:"Artifact"},{val:"path",dispName:"Path"},{val:"amValue",dispName:"Value"},{val:"valueStream",dispName:"Value Stream"},{val:"workPackage",dispName:"Work Package"}]}];
mxArchiMate3Application.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMate3Application.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxArchiMate3Application.prototype.cst.ARCHI_TYPE,"square");"rounded"===d?a.roundrect(0,0,b,c,10,10):"oct"===d&&20<=b&&20<=c?(a.begin(),a.moveTo(0,10),a.lineTo(10,0),a.lineTo(b-10,0),a.lineTo(b,10),a.lineTo(b,c-10),a.lineTo(b-10,c),a.lineTo(10,c),a.lineTo(0,c-10),a.close(),a.fillAndStroke()):a.rect(0,0,b,c);a.fillAndStroke()};
mxArchiMate3Application.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxArchiMate3Application.prototype.cst.TYPE,"");a.setDashed(!1);f===mxArchiMate3Application.prototype.cst.COMPONENT?(a.translate(1,0),mxArchiMate3Component.prototype.background(a,d,e,b-2,c)):f===mxArchiMate3Application.prototype.cst.COLLABORATION?(a.translate(0,3),mxArchiMate3Collaboration.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.INTERFACE?(a.translate(0,4),mxArchiMate3Interface.prototype.background(a,
d,e,b,c-8)):f===mxArchiMate3Application.prototype.cst.INTERFACE2?(a.translate(0,1),c-=2,a.begin(),a.moveTo(0,.5*c),a.lineTo(.6*b,.5*c),a.moveTo(b,0),a.arcTo(.4*b,.5*c,0,0,0,b,c),a.stroke()):f===mxArchiMate3Application.prototype.cst.FACILITY?mxArchiMate3Facility.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.FUNCTION?mxArchiMate3Function.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.GAP?mxArchiMate3GapIcon.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.INTERACTION?
mxArchiMate3Interaction.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.LOCATION?mxArchiMate3LocationIcon.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.SERVICE?(a.translate(0,3),mxArchiMate3Service.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.EQUIPMENT?mxArchiMate3Equipment.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.EVENT?(a.translate(0,3),mxArchiMate3Event.prototype.background(a,d,
e,b,c-6)):f===mxArchiMate3Application.prototype.cst.EVENT2?(a.translate(0,3),mxArchiMate3Event2.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.NODE?mxArchiMate3Node.prototype.background(a,d,e,b,c):f!==mxArchiMate3Application.prototype.cst.GENERIC&&(f===mxArchiMate3Application.prototype.cst.NETWORK?mxArchiMate3Network.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.COMM_PATH?(a.translate(0,5),c-=10,a.begin(),a.moveTo(.1*b,0),a.lineTo(0,.5*c),
a.lineTo(.1*b,c),a.moveTo(.9*b,0),a.lineTo(b,.5*c),a.lineTo(.9*b,c),a.stroke(),a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):f===mxArchiMate3Application.prototype.cst.ARTIFACT?(a.translate(2,0),b-=4,a.begin(),a.moveTo(0,0),a.lineTo(.7*b,0),a.lineTo(b,.22*c),a.lineTo(b,c),a.lineTo(0,c),a.close(),a.moveTo(.7*b,0),a.lineTo(.7*b,.22*c),a.lineTo(b,.22*c),a.stroke()):f===mxArchiMate3Application.prototype.cst.ACTOR?(a.translate(3,0),mxArchiMate3Actor.prototype.background(a,d,e,
b-6,c)):f===mxArchiMate3Application.prototype.cst.ROLE?(a.translate(0,3),mxArchiMate3Role.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.PASSIVE?(a.translate(0,3),mxArchiMate3Passive.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.PLATEAU?(a.translate(0,2),mxArchiMate3Plateau.prototype.background(a,d,e,b,c-4)):f===mxArchiMate3Application.prototype.cst.PRODUCT?(a.translate(0,3),mxArchiMate3ProductSmall.prototype.background(a,d,e,b,c-6)):f===
mxArchiMate3Application.prototype.cst.CONTRACT?(a.translate(0,3),mxArchiMate3ContractSmall.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.PROCESS?(a.translate(0,3),mxArchiMate3Process.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.DELIVERABLE?(a.translate(0,2),mxArchiMate3Deliverable.prototype.background(a,d,e,b,c-4)):f===mxArchiMate3Application.prototype.cst.DEVICE?mxArchiMate3Device.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.DRIVER?
mxArchiMate3Driver.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.ASSESSMENT?mxArchiMate3Assessment.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.GOAL?mxArchiMate3Goal.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.GROUPING?(a.translate(0,2),c-=4,a.setDashed(!0),mxArchiMate3Grouping.prototype.background(a,d,e,b,c)):f===mxArchiMate3Application.prototype.cst.OUTCOME?mxArchiMate3Outcome.prototype.background(a,d,e,b,c):
f===mxArchiMate3Application.prototype.cst.PRINCIPLE?mxArchiMate3Principle.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.REPRESENTATION?(a.translate(0,3),mxArchiMate3RepresentationSmall.prototype.background(a,d,e,b,c-6)):f===mxArchiMate3Application.prototype.cst.REQUIREMENT?(a.translate(0,4),mxArchiMate3Requirement.prototype.background(a,d,e,b,c-8)):f===mxArchiMate3Application.prototype.cst.CONSTRAINT?(a.translate(0,4),mxArchiMate3Constraint.prototype.background(a,d,e,b,
c-8)):f===mxArchiMate3Application.prototype.cst.MATERIAL?(a.translate(0,1),mxArchiMate3Material.prototype.background(a,d,e,b,c-2)):f===mxArchiMate3Application.prototype.cst.MEANING?(a.translate(0,2),c-=4,mxStencilRegistry.getStencil("mxgraph.basic.cloud_callout").drawShape(a,this,0,0,b,c)):f===mxArchiMate3Application.prototype.cst.DISTRIBUTION?(a.translate(0,4),mxArchiMate3Distribution.prototype.background(a,d,e,b,c-8)):f===mxArchiMate3Application.prototype.cst.RESOURCE?(a.translate(0,1),mxArchiMate3Resource.prototype.background(a,
d,e,b,c-2)):f===mxArchiMate3Application.prototype.cst.CAPABILITY?mxArchiMate3Capability.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.COURSE?mxArchiMate3Course.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.SYS_SW?mxArchiMate3SysSw.prototype.background(a,d,e,b,c):f===mxArchiMate3Application.prototype.cst.ARTIFACT?(a.translate(2,0),mxArchiMate3Artifact.prototype.background(a,d,e,b-4,c)):f===mxArchiMate3Application.prototype.cst.PATH?(a.translate(0,
5),mxArchiMate3Path.prototype.background(a,d,e,b,c-10)):f===mxArchiMate3Application.prototype.cst.AMVALUE?(a.translate(0,3),mxEllipse.prototype.paintVertexShape(a,0,0,b,c-6)):f===mxArchiMate3Application.prototype.cst.VALUE_STREAM?(a.translate(0,2),mxArchiMate3ValueStream.prototype.background(a,d,e,b,c-4)):f===mxArchiMate3Application.prototype.cst.WORK_PACKAGE&&(a.translate(0,1),mxArchiMate3WorkPackage.prototype.background(a,d,e,b,c-2)))};
mxCellRenderer.registerShape(mxArchiMate3Application.prototype.cst.APPLICATION,mxArchiMate3Application);
mxArchiMate3Application.prototype.getConstraints=function(a,d,e){a=[];var b=mxUtils.getValue(this.style,mxArchiMate3Application.prototype.cst.ARCHI_TYPE,"square");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,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),
!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));"rounded"===b?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9)),a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,-2.9,2.9)),
a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-2.9,-2.9)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,2.9,-2.9))):"oct"===b&&20<=d&&20<=e?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,5,5)),a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,-5,5)),a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-5,-5)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,5,-5))):(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1)),a.push(new mxConnectionConstraint(new mxPoint(1,1),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1)));return a};function mxArchiMate3Component(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Component,mxShape);mxArchiMate3Component.prototype.cst={COMPONENT:"mxgraph.archimate3.component"};mxArchiMate3Component.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Component.prototype.background=function(a,d,e,b,c){a.rect(.25*b,0,.75*b,c);a.fillAndStroke();a.rect(0,.25*c,.5*b,.15*c);a.fillAndStroke();a.rect(0,.6*c,.5*b,.15*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Component.prototype.cst.COMPONENT,mxArchiMate3Component);
mxArchiMate3Component.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.625,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.625,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.325),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.675),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));return a};function mxArchiMate3Collaboration(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Collaboration,mxShape);mxArchiMate3Collaboration.prototype.cst={COLLABORATION:"mxgraph.archimate3.collaboration"};mxArchiMate3Collaboration.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Collaboration.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,.6*b,c);a.fillAndStroke();a.ellipse(.4*b,0,.6*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Collaboration.prototype.cst.COLLABORATION,mxArchiMate3Collaboration);
mxArchiMate3Collaboration.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.11,.11),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.125),!1));a.push(new mxConnectionConstraint(new mxPoint(.89,.11),!1));a.push(new mxConnectionConstraint(new mxPoint(.11,.89),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.875),!1));a.push(new mxConnectionConstraint(new mxPoint(.89,.89),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.7,
0),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.7,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxArchiMate3Interface(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Interface,mxShape);mxArchiMate3Interface.prototype.cst={INTERFACE:"mxgraph.archimate3.interface"};
mxArchiMate3Interface.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3Interface.prototype.background=function(a,d,e,b,c){a.ellipse(.5*b,0,.5*b,c);a.fillAndStroke();a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,.5*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Interface.prototype.cst.INTERFACE,mxArchiMate3Interface);
mxArchiMate3Interface.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};function mxArchiMate3ContractSmall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3ContractSmall,mxShape);
mxArchiMate3ContractSmall.prototype.cst={CONTRACT_SMALL:"mxgraph.archimate3.contractSmall"};mxArchiMate3ContractSmall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3ContractSmall.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.moveTo(0,.2*c);a.lineTo(b,.2*c);a.moveTo(0,.8*c);a.lineTo(b,.8*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxArchiMate3ContractSmall.prototype.cst.CONTRACT_SMALL,mxArchiMate3ContractSmall);
mxArchiMate3ContractSmall.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3RepresentationSmall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3RepresentationSmall,mxShape);mxArchiMate3RepresentationSmall.prototype.cst={REPRESENTATION_SMALL:"mxgraph.archimate3.representationSmall"};
mxArchiMate3RepresentationSmall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3RepresentationSmall.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.moveTo(0,.2*c);a.lineTo(b,.2*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxArchiMate3RepresentationSmall.prototype.cst.REPRESENTATION_SMALL,mxArchiMate3RepresentationSmall);
mxArchiMate3RepresentationSmall.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Passive(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Passive,mxShape);mxArchiMate3Passive.prototype.cst={PASSIVE:"mxgraph.archimate3.passive"};mxArchiMate3Passive.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Passive.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.moveTo(0,.2*c);a.lineTo(b,.2*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Passive.prototype.cst.PASSIVE,mxArchiMate3Passive);
mxArchiMate3Passive.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Plateau(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Plateau,mxShape);mxArchiMate3Plateau.prototype.cst={PLATEAU:"mxgraph.archimate3.plateau"};mxArchiMate3Plateau.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Plateau.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.rect(.4*b,0,.6*b,.2*c);a.fill();a.rect(.2*b,.4*c,.6*b,.2*c);a.fill();a.rect(0,.8*c,.6*b,.2*c);a.fill()};mxCellRenderer.registerShape(mxArchiMate3Plateau.prototype.cst.PLATEAU,mxArchiMate3Plateau);
mxArchiMate3Plateau.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3ProductSmall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3ProductSmall,mxShape);mxArchiMate3ProductSmall.prototype.cst={PRODUCT_SMALL:"mxgraph.archimate3.productSmall"};
mxArchiMate3ProductSmall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3ProductSmall.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.moveTo(0,.2*c);a.lineTo(.5*b,.2*c);a.lineTo(.5*b,0);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3ProductSmall.prototype.cst.PRODUCT_SMALL,mxArchiMate3ProductSmall);
mxArchiMate3ProductSmall.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Process(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Process,mxShape);mxArchiMate3Process.prototype.cst={PROCESS:"mxgraph.archimate3.process"};mxArchiMate3Process.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Process.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.3*c);a.lineTo(.6*b,.3*c);a.lineTo(.6*b,0);a.lineTo(b,.5*c);a.lineTo(.6*b,c);a.lineTo(.6*b,.7*c);a.lineTo(0,.7*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Process.prototype.cst.PROCESS,mxArchiMate3Process);
mxArchiMate3Process.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Driver(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Driver,mxShape);mxArchiMate3Driver.prototype.cst={DRIVER:"mxgraph.archimate3.driver"};mxArchiMate3Driver.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Driver.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(.5*b,0);a.lineTo(.5*b,c);a.moveTo(.145*b,.145*c);a.lineTo(.855*b,.855*c);a.moveTo(.145*b,.855*c);a.lineTo(.855*b,.145*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(.35*b,.35*c,.3*b,.3*c);a.fillAndStroke();a.setStrokeWidth(2);a.ellipse(.1*b,.1*c,.8*b,.8*c);a.stroke()};
mxCellRenderer.registerShape(mxArchiMate3Driver.prototype.cst.DRIVER,mxArchiMate3Driver);
mxArchiMate3Driver.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Assessment(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Assessment,mxShape);mxArchiMate3Assessment.prototype.cst={ASSESSMENT:"mxgraph.archimate3.assess"};
mxArchiMate3Assessment.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3Assessment.prototype.background=function(a,d,e,b,c){a.ellipse(.2*b,0,.8*b,.8*c);a.fillAndStroke();a.begin();a.moveTo(0,c);a.lineTo(.32*b,.68*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Assessment.prototype.cst.ASSESSMENT,mxArchiMate3Assessment);
mxArchiMate3Assessment.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Goal(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Goal,mxShape);mxArchiMate3Goal.prototype.cst={GOAL:"mxgraph.archimate3.goal"};mxArchiMate3Goal.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Goal.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke();a.ellipse(.15*b,.15*c,.7*b,.7*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(.3*b,.3*c,.4*b,.4*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Goal.prototype.cst.GOAL,mxArchiMate3Goal);
mxArchiMate3Goal.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Outcome(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Outcome,mxShape);mxArchiMate3Outcome.prototype.cst={OUTCOME:"mxgraph.archimate3.outcome"};mxArchiMate3Outcome.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Outcome.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,1);a.ellipse(0,.2*b,.8*b,.8*c);a.fillAndStroke();a.ellipse(.15*b,.35*b,.5*b,.5*c);a.stroke();a.ellipse(.3*b,.5*b,.2*b,.2*c);a.stroke();a.setStrokeWidth(3*d);a.setLineCap("round");a.begin();a.moveTo(.4*b,.6*c);a.lineTo(.9*b,.1*c);a.moveTo(.42*b,.4*c);a.lineTo(.4*b,.6*c);a.lineTo(.6*b,.58*c);a.moveTo(.8*b,0);a.lineTo(.75*b,.25*c);a.lineTo(b,.2*c);a.stroke()};
mxCellRenderer.registerShape(mxArchiMate3Outcome.prototype.cst.OUTCOME,mxArchiMate3Outcome);
mxArchiMate3Outcome.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Principle(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Principle,mxShape);mxArchiMate3Principle.prototype.cst={PRINCIPLE:"mxgraph.archimate3.principle"};mxArchiMate3Principle.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Principle.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.05*b,.05*c);a.arcTo(2.3*b,2.3*c,0,0,1,.95*b,.05*c);a.arcTo(2.3*b,2.3*c,0,0,1,.95*b,.95*c);a.arcTo(2.3*b,2.3*c,0,0,1,.05*b,.95*c);a.arcTo(2.3*b,2.3*c,0,0,1,.05*b,.05*c);a.close();a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.45*b,.7*c);a.lineTo(.42*b,.15*c);a.lineTo(.58*b,.15*c);a.lineTo(.55*b,.7*c);a.close();a.fill();a.rect(.45*b,.75*c,
.1*b,.1*c);a.fill()};mxCellRenderer.registerShape(mxArchiMate3Principle.prototype.cst.PRINCIPLE,mxArchiMate3Principle);
mxArchiMate3Principle.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.3),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.6,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(.3,
.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.7),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Facility(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Facility,mxShape);mxArchiMate3Facility.prototype.cst={FACILITY:"mxgraph.archimate3.facility"};mxArchiMate3Facility.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Facility.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(.13*b,0);a.lineTo(.13*b,.7*c);a.lineTo(.42*b,.55*c);a.lineTo(.42*b,.7*c);a.lineTo(.71*b,.55*c);a.lineTo(.71*b,.7*c);a.lineTo(b,.55*c);a.lineTo(b,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Facility.prototype.cst.FACILITY,mxArchiMate3Facility);
mxArchiMate3Facility.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.2),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.6),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.8),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.6),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.2),!1));return a};function mxArchiMate3Function(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Function,mxShape);mxArchiMate3Function.prototype.cst={FUNCTION:"mxgraph.archimate3.function"};mxArchiMate3Function.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Function.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.5*b,0);a.lineTo(b,.2*c);a.lineTo(b,c);a.lineTo(.5*b,.8*c);a.lineTo(0,c);a.lineTo(0,.2*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Function.prototype.cst.FUNCTION,mxArchiMate3Function);
mxArchiMate3Function.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.2),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.6),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.8),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.6),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.2),!1));return a};function mxArchiMate3Grouping(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Grouping,mxShape);mxArchiMate3Grouping.prototype.cst={GROUPING:"mxgraph.archimate3.grouping"};mxArchiMate3Grouping.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Grouping.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.3*c);a.lineTo(b,.3*c);a.lineTo(b,c);a.lineTo(0,c);a.close();a.moveTo(0,.3*c);a.lineTo(0,0);a.lineTo(.75*b,0);a.lineTo(.75*b,.3*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Grouping.prototype.cst.GROUPING,mxArchiMate3Grouping);
mxArchiMate3Grouping.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.14),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,
.14),!1));return a};function mxArchiMate3Interaction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Interaction,mxShape);mxArchiMate3Interaction.prototype.cst={INTERACTION:"mxgraph.archimate3.interaction"};mxArchiMate3Interaction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Interaction.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.55*b,0);a.arcTo(.45*b,.5*c,0,0,1,.55*b,c);a.close();a.moveTo(.45*b,0);a.arcTo(.45*b,.5*c,0,0,0,.45*b,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Interaction.prototype.cst.INTERACTION,mxArchiMate3Interaction);
mxArchiMate3Interaction.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.14),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,
.14),!1));return a};function mxArchiMate3Material(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Material,mxShape);mxArchiMate3Material.prototype.cst={MATERIAL:"mxgraph.archimate3.material"};mxArchiMate3Material.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Material.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.5*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.75*b,c);a.lineTo(.25*b,c);a.close();a.moveTo(.15*b,.5*c);a.lineTo(.31*b,.2*c);a.moveTo(.69*b,.2*c);a.lineTo(.85*b,.5*c);a.moveTo(.68*b,.8*c);a.lineTo(.32*b,.8*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Material.prototype.cst.MATERIAL,mxArchiMate3Material);
mxArchiMate3Material.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.14),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,
.14),!1));return a};function mxArchiMate3LocationIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3LocationIcon,mxShape);mxArchiMate3LocationIcon.prototype.cst={LOCATION_ICON:"mxgraph.archimate3.locationIcon"};mxArchiMate3LocationIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3LocationIcon.prototype.background=function(a,d,e,b,c){a.translate(3,0);b-=6;a.begin();a.moveTo(.5*b,0);a.curveTo(.2842*b,0,0,.1006*c,0,.3001*c);a.curveTo(0,.4071*c,.0776*b,.4777*c,.1524*b,.5485*c);a.curveTo(.2901*b,.6788*c,.4275*b,.7993*c,.5*b,c);a.curveTo(.5725*b,.7993*c,.7099*b,.6788*c,.8476*b,.5485*c);a.curveTo(.9224*b,.4777*c,b,.4071*c,b,.3001*c);a.curveTo(b,.1006*c,.7158*b,0,.5*b,0);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxArchiMate3LocationIcon.prototype.cst.LOCATION_ICON,mxArchiMate3LocationIcon);
mxArchiMate3LocationIcon.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.14),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.86,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,.86),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.14,
.14),!1));return a};function mxArchiMate3Service(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Service,mxShape);mxArchiMate3Service.prototype.cst={SERVICE:"mxgraph.archimate3.service"};mxArchiMate3Service.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Service.prototype.background=function(a,d,e,b,c){d=Math.max(b-.5*c,.5*b);b=Math.min(.5*c,.5*b);a.begin();a.moveTo(d,0);a.arcTo(.5*c,.5*c,0,0,1,d,c);a.lineTo(b,c);a.arcTo(.5*c,.5*c,0,0,1,b,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Service.prototype.cst.SERVICE,mxArchiMate3Service);
mxArchiMate3Service.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(d-.5*e,.5*d);d=Math.min(.5*e,.5*d);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b+.355*e,.145*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.355*e,.855*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.355*e,.145*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.355*e,.855*e));return a};
function mxArchiMate3Requirement(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Requirement,mxShape);mxArchiMate3Requirement.prototype.cst={REQUIREMENT:"mxgraph.archimate3.requirement"};mxArchiMate3Requirement.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Requirement.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.25*b,0);a.lineTo(b,0);a.lineTo(.75*b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Requirement.prototype.cst.REQUIREMENT,mxArchiMate3Requirement);
mxArchiMate3Requirement.prototype.getConstraints=function(a,d,e){a=[];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(.9375,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.875,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.8125,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.0625,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.125,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.1875,.25),!1));return a};
function mxArchiMate3Constraint(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Constraint,mxShape);mxArchiMate3Constraint.prototype.cst={CONSTRAINT:"mxgraph.archimate3.constraint"};mxArchiMate3Constraint.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Constraint.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.25*b,0);a.lineTo(b,0);a.lineTo(.75*b,c);a.lineTo(0,c);a.close();a.moveTo(.45*b,0);a.lineTo(.2*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Constraint.prototype.cst.CONSTRAINT,mxArchiMate3Constraint);
mxArchiMate3Constraint.prototype.getConstraints=function(a,d,e){a=[];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(.9375,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.875,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.8125,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.0625,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.125,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.1875,.25),!1));return a};
function mxArchiMate3Equipment(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Equipment,mxShape);mxArchiMate3Equipment.prototype.cst={EQUIPMENT:"mxgraph.archimate3.equipment"};mxArchiMate3Equipment.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Equipment.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.72*b,.38*c);a.curveTo(.78*b,.38*b,.85*b,.34*c,.85*b,.26*c);a.curveTo(.85*b,.18*b,.78*b,.14*c,.73*b,.14*c);a.curveTo(.64*b,.14*b,.59*b,.2*c,.59*b,.26*c);a.curveTo(.59*b,.33*c,.65*b,.38*b,.72*b,.38*c);a.close();a.moveTo(.68*b,.52*c);a.lineTo(.67*b,.45*c);a.lineTo(.61*b,.43*c);a.lineTo(.56*b,.48*c);a.lineTo(.5*b,.42*c);a.lineTo(.54*b,.36*c);a.lineTo(.52*b,.31*c);a.lineTo(.45*b,.31*c);a.lineTo(.45*b,.22*c);a.lineTo(.52*
b,.21*c);a.lineTo(.54*b,.16*c);a.lineTo(.5*b,.11*c);a.lineTo(.56*b,.05*c);a.lineTo(.62*b,.09*c);a.lineTo(.67*b,.07*c);a.lineTo(.68*b,0);a.lineTo(.77*b,0);a.lineTo(.78*b,.07*c);a.lineTo(.83*b,.09*c);a.lineTo(.89*b,.05*c);a.lineTo(.95*b,.11*c);a.lineTo(.91*b,.16*c);a.lineTo(.93*b,.21*c);a.lineTo(b,.22*c);a.lineTo(b,.31*c);a.lineTo(.93*b,.31*c);a.lineTo(.91*b,.36*c);a.lineTo(.95*b,.41*c);a.lineTo(.89*b,.47*c);a.lineTo(.83*b,.43*c);a.lineTo(.78*b,.45*c);a.lineTo(.77*b,.52*c);a.lineTo(.68*b,.52*c);a.close();
a.moveTo(.36*b,.81*c);a.curveTo(.44*b,.81*c,.52*b,.75*c,.52*b,.67*c);a.curveTo(.52*b,.59*c,.45*b,.51*c,.35*b,.51*c);a.curveTo(.27*b,.51*c,.19*b,.58*c,.19*b,.67*c);a.curveTo(.19*b,.74*c,.27*b,.82*c,.36*b,.81*c);a.close();a.moveTo(.21*b,.98*c);a.lineTo(.22*b,.89*c);a.lineTo(.16*b,.85*c);a.lineTo(.08*b,.88*c);a.lineTo(.02*b,.79*c);a.lineTo(.09*b,.74*c);a.lineTo(.08*b,.67*c);a.lineTo(0,.63*c);a.lineTo(.03*b,.53*c);a.lineTo(.12*b,.54*c);a.lineTo(.16*b,.48*c);a.lineTo(.13*b,.4*c);a.lineTo(.22*b,.35*c);
a.lineTo(.28*b,.42*c);a.lineTo(.36*b,.41*c);a.lineTo(.39*b,.33*c);a.lineTo(.5*b,.36*c);a.lineTo(.49*b,.45*c);a.lineTo(.55*b,.49*c);a.lineTo(.63*b,.45*c);a.lineTo(.69*b,.54*c);a.lineTo(.62*b,.6*c);a.lineTo(.63*b,.67*c);a.lineTo(.71*b,.7*c);a.lineTo(.68*b,.8*c);a.lineTo(.59*b,.79*c);a.lineTo(.55*b,.85*c);a.lineTo(.59*b,.79*c);a.lineTo(.55*b,.85*c);a.lineTo(.59*b,.93*c);a.lineTo(.49*b,.98*c);a.lineTo(.43*b,.91*c);a.lineTo(.36*b,.92*c);a.lineTo(.32*b,c);a.lineTo(.21*b,.98*c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxArchiMate3Equipment.prototype.cst.EQUIPMENT,mxArchiMate3Equipment);
mxArchiMate3Equipment.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*e,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-.5*e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-.5*e),e));return a};function mxArchiMate3Event(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Event,mxShape);mxArchiMate3Event.prototype.cst={EVENT:"mxgraph.archimate3.event"};mxArchiMate3Event.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Event.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(b-.5*c,0);a.arcTo(.5*c,.5*c,0,0,1,b-.5*c,c);a.lineTo(0,c);a.lineTo(.5*c,.5*c);a.lineTo(0,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Event.prototype.cst.EVENT,mxArchiMate3Event);
mxArchiMate3Event.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*e,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*e,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-.5*e),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-.5*e),e));return a};function mxArchiMate3Event2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Event2,mxShape);mxArchiMate3Event2.prototype.cst={EVENT2:"mxgraph.archimate3.event2"};mxArchiMate3Event2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Event2.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(b-.5*c,0);a.arcTo(.5*c,.5*c,0,0,1,b-.5*c,c);a.lineTo(0,c);a.arcTo(.5*c,.5*c,0,0,0,0,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Event2.prototype.cst.EVENT2,mxArchiMate3Event2);function mxArchiMate3Actor(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Actor,mxShape);mxArchiMate3Actor.prototype.cst={ACTOR:"mxgraph.archimate3.actor"};
mxArchiMate3Actor.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3Actor.prototype.background=function(a,d,e,b,c){a.ellipse(.2*b,0,.6*b,.3*c);a.fillAndStroke();a.begin();a.moveTo(.5*b,.3*c);a.lineTo(.5*b,.75*c);a.moveTo(0,.45*c);a.lineTo(b,.45*c);a.moveTo(0,c);a.lineTo(.5*b,.75*c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Actor.prototype.cst.ACTOR,mxArchiMate3Actor);
mxArchiMate3Actor.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.2,.15),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.8,.15),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.45),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.45),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));return a};
function mxArchiMate3Role(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Role,mxShape);mxArchiMate3Role.prototype.cst={ROLE:"mxgraph.archimate3.role"};mxArchiMate3Role.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Role.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.8*b,0);a.lineTo(.2*b,0);a.arcTo(.2*b,.5*c,0,0,0,.2*b,c);a.lineTo(.8*b,c);a.fillAndStroke();a.ellipse(.6*b,0,.4*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Role.prototype.cst.ROLE,mxArchiMate3Role);
mxArchiMate3Role.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.2,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.8,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.8,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.2,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));return a};function mxArchiMate3BusinessObject(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3BusinessObject,mxShape);mxArchiMate3BusinessObject.prototype.cst={BUSINESS_OBJECT:"mxgraph.archimate3.businessObject"};mxArchiMate3BusinessObject.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};
mxArchiMate3BusinessObject.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxArchiMate3BusinessObject.prototype.foreground=function(a,d,e,b,c){15<=c&&(a.begin(),a.moveTo(0,15),a.lineTo(b,15),a.stroke())};mxCellRenderer.registerShape(mxArchiMate3BusinessObject.prototype.cst.BUSINESS_OBJECT,mxArchiMate3BusinessObject);
mxArchiMate3BusinessObject.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Contract(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Contract,mxShape);mxArchiMate3Contract.prototype.cst={CONTRACT:"mxgraph.archimate3.contract"};mxArchiMate3Contract.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxArchiMate3Contract.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxArchiMate3Contract.prototype.foreground=function(a,d,e,b,c){15<=c&&(a.begin(),a.moveTo(0,15),a.lineTo(b,15),a.stroke());30<=c&&(a.begin(),a.moveTo(0,c-15),a.lineTo(b,c-15),a.stroke())};mxCellRenderer.registerShape(mxArchiMate3Contract.prototype.cst.CONTRACT,mxArchiMate3Contract);
mxArchiMate3Contract.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Product(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Product,mxShape);mxArchiMate3Product.prototype.cst={PRODUCT:"mxgraph.archimate3.product"};mxArchiMate3Product.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxArchiMate3Product.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxArchiMate3Product.prototype.foreground=function(a,d,e,b,c){15<=c&&(a.begin(),a.moveTo(0,15),a.lineTo(.6*b,15),a.lineTo(.6*b,0),a.stroke())};mxCellRenderer.registerShape(mxArchiMate3Product.prototype.cst.PRODUCT,mxArchiMate3Product);
mxArchiMate3Product.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Representation(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Representation,mxShape);mxArchiMate3Representation.prototype.cst={REPRESENTATION:"mxgraph.archimate3.representation"};mxArchiMate3Representation.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c)};
mxArchiMate3Representation.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.fillAndStroke();20<=c&&a.begin();a.moveTo(0,15);a.lineTo(b,15);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Representation.prototype.cst.REPRESENTATION,mxArchiMate3Representation);
mxArchiMate3Representation.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Deliverable(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Deliverable,mxShape);mxArchiMate3Deliverable.prototype.cst={DELIVERABLE:"mxgraph.archimate3.deliverable"};mxArchiMate3Deliverable.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c)};
mxArchiMate3Deliverable.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Deliverable.prototype.cst.DELIVERABLE,mxArchiMate3Deliverable);
mxArchiMate3Deliverable.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Location(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Location,mxShape);mxArchiMate3Location.prototype.cst={LOCATION:"mxgraph.archimate3.location"};mxArchiMate3Location.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMate3Location.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxArchiMate3Location.prototype.foreground=function(a,d,e,b,c){a.setDashed(!1);a.translate(3,0);b-=6;a.begin();a.moveTo(.5*b,c);a.arcTo(.1775*b,.3*c,0,0,0,.345*b,.7*c);a.arcTo(.538*b,.364*c,0,0,1,.5*b,0);a.arcTo(.538*b,.364*c,0,0,1,.655*b,.7*c);a.arcTo(.1775*b,.3*c,0,0,0,.5*b,c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Location.prototype.cst.LOCATION,mxArchiMate3Location);
function mxArchiMate3Gap(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Gap,mxShape);mxArchiMate3Gap.prototype.cst={GAP:"mxgraph.archimate3.gap"};mxArchiMate3Gap.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-20,5);this.foreground(a,b-20,5,15,15)};
mxArchiMate3Gap.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,.85*c);a.arcTo(.35*b,.35*c,0,0,0,.5*b,.85*c);a.arcTo(.35*b,.35*c,0,0,1,0,.85*c);a.close();a.fillAndStroke()};mxArchiMate3Gap.prototype.foreground=function(a,d,e,b,c){a.setDashed(!1);a.translate(0,2);c-=4;a.ellipse(.15*b,0,.7*b,c);a.stroke();a.begin();a.moveTo(0,.35*c);a.lineTo(b,.35*c);a.moveTo(0,.65*c);a.lineTo(b,.65*c);a.stroke()};
mxCellRenderer.registerShape(mxArchiMate3Gap.prototype.cst.GAP,mxArchiMate3Gap);
mxArchiMate3Gap.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3GapIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3GapIcon,mxShape);mxArchiMate3GapIcon.prototype.cst={GAP_ICON:"mxgraph.archimate3.gapIcon"};mxArchiMate3GapIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c)};
mxArchiMate3GapIcon.prototype.background=function(a,d,e,b,c){a.setDashed(!1);a.translate(0,2);c-=4;a.ellipse(.15*b,0,.7*b,c);a.fillAndStroke();a.begin();a.moveTo(0,.35*c);a.lineTo(b,.35*c);a.moveTo(0,.65*c);a.lineTo(b,.65*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3GapIcon.prototype.cst.GAP_ICON,mxArchiMate3GapIcon);
mxArchiMate3GapIcon.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.745),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.955),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.85),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3Tech(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Tech,mxShape);mxArchiMate3Tech.prototype.cst={TECH:"mxgraph.archimate3.tech",TYPE:"techType",DEVICE:"device",PLATEAU:"plateau",FACILITY:"facility",EQUIPMENT:"equipment",SYS_SW:"sysSw"};
mxArchiMate3Tech.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);a.translate(b-30,15);this.foreground(a,b-30,15,15,15)};mxArchiMate3Tech.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,10);a.lineTo(10,0);a.lineTo(b,0);a.lineTo(b,c-10);a.lineTo(b-10,c);a.lineTo(0,c);a.close();a.moveTo(0,10);a.lineTo(b-10,10);a.lineTo(b-10,c);a.moveTo(b,0);a.lineTo(b-10,10);a.fillAndStroke()};
mxArchiMate3Tech.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxArchiMate3Tech.prototype.cst.TYPE,mxArchiMate3Tech.prototype.cst.DEVICE);a.setDashed(!1);f===mxArchiMate3Tech.prototype.cst.PLATEAU?(d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),a.setFillColor(d),a.rect(.4*b,0,.6*b,.2*c),a.fill(),a.rect(.2*b,.4*c,.6*b,.2*c),a.fill(),a.rect(0,.8*c,.6*b,.2*c),a.fill()):f===mxArchiMate3Tech.prototype.cst.FACILITY?(a.begin(),a.moveTo(0,c),a.lineTo(0,
0),a.lineTo(.13*b,0),a.lineTo(.13*b,.7*c),a.lineTo(.42*b,.55*c),a.lineTo(.42*b,.7*c),a.lineTo(.71*b,.55*c),a.lineTo(.71*b,.7*c),a.lineTo(b,.55*c),a.lineTo(b,c),a.close(),a.stroke()):f===mxArchiMate3Tech.prototype.cst.EQUIPMENT?(a.begin(),a.moveTo(.72*b,.38*c),a.curveTo(.78*b,.38*b,.85*b,.34*c,.85*b,.26*c),a.curveTo(.85*b,.18*b,.78*b,.14*c,.73*b,.14*c),a.curveTo(.64*b,.14*b,.59*b,.2*c,.59*b,.26*c),a.curveTo(.59*b,.33*c,.65*b,.38*b,.72*b,.38*c),a.close(),a.moveTo(.68*b,.52*c),a.lineTo(.67*b,.45*c),
a.lineTo(.61*b,.43*c),a.lineTo(.56*b,.48*c),a.lineTo(.5*b,.42*c),a.lineTo(.54*b,.36*c),a.lineTo(.52*b,.31*c),a.lineTo(.45*b,.31*c),a.lineTo(.45*b,.22*c),a.lineTo(.52*b,.21*c),a.lineTo(.54*b,.16*c),a.lineTo(.5*b,.11*c),a.lineTo(.56*b,.05*c),a.lineTo(.62*b,.09*c),a.lineTo(.67*b,.07*c),a.lineTo(.68*b,0),a.lineTo(.77*b,0),a.lineTo(.78*b,.07*c),a.lineTo(.83*b,.09*c),a.lineTo(.89*b,.05*c),a.lineTo(.95*b,.11*c),a.lineTo(.91*b,.16*c),a.lineTo(.93*b,.21*c),a.lineTo(b,.22*c),a.lineTo(b,.31*c),a.lineTo(.93*
b,.31*c),a.lineTo(.91*b,.36*c),a.lineTo(.95*b,.41*c),a.lineTo(.89*b,.47*c),a.lineTo(.83*b,.43*c),a.lineTo(.78*b,.45*c),a.lineTo(.77*b,.52*c),a.lineTo(.68*b,.52*c),a.close(),a.moveTo(.36*b,.81*c),a.curveTo(.44*b,.81*c,.52*b,.75*c,.52*b,.67*c),a.curveTo(.52*b,.59*c,.45*b,.51*c,.35*b,.51*c),a.curveTo(.27*b,.51*c,.19*b,.58*c,.19*b,.67*c),a.curveTo(.19*b,.74*c,.27*b,.82*c,.36*b,.81*c),a.close(),a.moveTo(.21*b,.98*c),a.lineTo(.22*b,.89*c),a.lineTo(.16*b,.85*c),a.lineTo(.08*b,.88*c),a.lineTo(.02*b,.79*c),
a.lineTo(.09*b,.74*c),a.lineTo(.08*b,.67*c),a.lineTo(0,.63*c),a.lineTo(.03*b,.53*c),a.lineTo(.12*b,.54*c),a.lineTo(.16*b,.48*c),a.lineTo(.13*b,.4*c),a.lineTo(.22*b,.35*c),a.lineTo(.28*b,.42*c),a.lineTo(.36*b,.41*c),a.lineTo(.39*b,.33*c),a.lineTo(.5*b,.36*c),a.lineTo(.49*b,.45*c),a.lineTo(.55*b,.49*c),a.lineTo(.63*b,.45*c),a.lineTo(.69*b,.54*c),a.lineTo(.62*b,.6*c),a.lineTo(.63*b,.67*c),a.lineTo(.71*b,.7*c),a.lineTo(.68*b,.8*c),a.lineTo(.59*b,.79*c),a.lineTo(.55*b,.85*c),a.lineTo(.59*b,.79*c),a.lineTo(.55*
b,.85*c),a.lineTo(.59*b,.93*c),a.lineTo(.49*b,.98*c),a.lineTo(.43*b,.91*c),a.lineTo(.36*b,.92*c),a.lineTo(.32*b,c),a.lineTo(.21*b,.98*c),a.close(),a.stroke()):f===mxArchiMate3Tech.prototype.cst.SYS_SW?mxArchiMate3SysSw.prototype.background(a,d,e,b,c):f===mxArchiMate3Tech.prototype.cst.DEVICE&&mxArchiMate3Device.prototype.background(a,d,e,b,c)};mxCellRenderer.registerShape(mxArchiMate3Tech.prototype.cst.TECH,mxArchiMate3Tech);
mxArchiMate3Tech.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,10,0));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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-10));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10));return a};function mxArchiMate3Distribution(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Distribution,mxShape);mxArchiMate3Distribution.prototype.cst={DISTRIBUTION:"mxgraph.archimate3.distribution"};mxArchiMate3Distribution.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Distribution.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.1*b,.25*c);a.lineTo(.9*b,.25*c);a.lineTo(b,.5*c);a.lineTo(.9*b,.75*c);a.lineTo(.1*b,.75*c);a.lineTo(0,.5*c);a.fillAndStroke();a.begin();a.moveTo(.2*b,0);a.lineTo(0,.5*c);a.lineTo(.2*b,c);a.moveTo(.8*b,0);a.lineTo(b,.5*c);a.lineTo(.8*b,c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Distribution.prototype.cst.DISTRIBUTION,mxArchiMate3Distribution);
mxArchiMate3Distribution.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.2,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.8,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.8,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.2,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxArchiMate3Resource(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Resource,mxShape);mxArchiMate3Resource.prototype.cst={RESOURCE:"mxgraph.archimate3.resource"};mxArchiMate3Resource.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Resource.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.51*b,.34*c);a.lineTo(.51*b,.65*c);a.moveTo(.35*b,.34*c);a.lineTo(.35*b,.65*c);a.moveTo(.19*b,.34*c);a.lineTo(.19*b,.65*c);a.moveTo(.91*b,.4*c);a.curveTo(.93*b,.39*c,.95*b,.39*c,.97*b,.4*c);a.curveTo(.99*b,.4*c,b,.41*c,b,.43*c);a.curveTo(b,.48*c,b,.52*c,b,.57*c);a.curveTo(b,.58*c,.99*b,.59*c,.98*b,.6*c);a.curveTo(.96*b,.6*c,.93*b,.6*c,.91*b,.6*c);a.moveTo(0,.73*c);a.curveTo(0,.6*c,0,.43*c,0,.27*c);a.curveTo(0,.24*c,.03*
b,.21*c,.08*b,.21*c);a.curveTo(.33*b,.2*c,.61*b,.2*c,.84*b,.21*c);a.curveTo(.88*b,.22*c,.89*b,.24*c,.9*b,.26*c);a.curveTo(.91*b,.41*c,.91*b,.57*c,.9*b,.72*c);a.curveTo(.9*b,.74*c,.88*b,.78*c,.83*b,.79*c);a.curveTo(.57*b,.79*c,.32*b,.79*c,.06*b,.79*c);a.curveTo(.02*b,.78*c,0,.76*c,0,.73*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Resource.prototype.cst.RESOURCE,mxArchiMate3Resource);
function mxArchiMate3Capability(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Capability,mxShape);mxArchiMate3Capability.prototype.cst={CAPABILITY:"mxgraph.archimate3.capability"};mxArchiMate3Capability.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Capability.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.lineTo(0,.67*c);a.lineTo(.33*b,.67*c);a.lineTo(.33*b,.33*c);a.lineTo(.67*b,.33*c);a.lineTo(.67*b,0);a.close();a.moveTo(.67*b,.33*c);a.lineTo(b,.33*c);a.moveTo(.33*b,.67*c);a.lineTo(b,.67*c);a.moveTo(.33*b,.67*c);a.lineTo(.33*b,c);a.moveTo(.67*b,.33*c);a.lineTo(.67*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Capability.prototype.cst.CAPABILITY,mxArchiMate3Capability);
function mxArchiMate3Course(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Course,mxShape);mxArchiMate3Course.prototype.cst={COURSE:"mxgraph.archimate3.course"};mxArchiMate3Course.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Course.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,1);a.ellipse(.4*b,0,.6*b,.6*c);a.fillAndStroke();a.ellipse(.5*b,.1*c,.4*b,.4*c);a.stroke();a.setStrokeWidth(3*d);a.setLineCap("round");a.begin();a.moveTo(0,c);a.arcTo(.7*b,.7*c,0,0,1,.41*b,.56*c);a.moveTo(.14*b,.54*c);a.lineTo(.41*b,.56*c);a.lineTo(.3*b,.78*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(.6*b,.2*c,
.2*b,.2*c);a.fill()};mxCellRenderer.registerShape(mxArchiMate3Course.prototype.cst.COURSE,mxArchiMate3Course);function mxArchiMate3Node(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Node,mxShape);mxArchiMate3Node.prototype.cst={NODE:"mxgraph.archimate3.node"};mxArchiMate3Node.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Node.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(b,0);a.lineTo(b,.75*c);a.lineTo(.75*b,c);a.lineTo(0,c);a.close();a.moveTo(0,.25*c);a.lineTo(.75*b,.25*c);a.lineTo(.75*b,c);a.moveTo(b,0);a.lineTo(.75*b,.25*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Node.prototype.cst.NODE,mxArchiMate3Node);
mxArchiMate3Node.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};function mxArchiMate3Network(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Network,mxShape);mxArchiMate3Network.prototype.cst={NETWORK:"mxgraph.archimate3.network"};mxArchiMate3Network.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Network.prototype.background=function(a,d,e,b,c){a.translate(0,2);c-=4;a.begin();a.moveTo(.4*b,.2*c);a.lineTo(.85*b,.2*c);a.lineTo(.6*b,.8*c);a.lineTo(.15*b,.8*c);a.close();a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(.25*b,0,.3*b,.4*c);a.fill();a.ellipse(.7*b,0,.3*b,.4*c);a.fill();a.ellipse(0,.6*c,.3*b,.4*c);a.fill();a.ellipse(.45*b,.6*c,.3*b,.4*c);a.fill()};
mxCellRenderer.registerShape(mxArchiMate3Network.prototype.cst.NETWORK,mxArchiMate3Network);
mxArchiMate3Network.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};function mxArchiMate3Device(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Device,mxShape);mxArchiMate3Device.prototype.cst={DEVICE:"mxgraph.archimate3.device"};mxArchiMate3Device.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Device.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b,.88*c,.1*b,.1*c);a.fillAndStroke();a.begin();a.moveTo(.1*b,.88*c);a.lineTo(0,c);a.lineTo(b,c);a.lineTo(.9*b,.88*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3Device.prototype.cst.DEVICE,mxArchiMate3Device);
mxArchiMate3Device.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.03,.03),!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(.97,.03),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3SysSw(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3SysSw,mxShape);mxArchiMate3SysSw.prototype.cst={SYS_SW:"mxgraph.archimate3.sysSw"};mxArchiMate3SysSw.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3SysSw.prototype.background=function(a,d,e,b,c){a.ellipse(.3*b,0,.7*b,.7*c);a.fillAndStroke();a.ellipse(0,.02*c,.98*b,.98*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxArchiMate3SysSw.prototype.cst.SYS_SW,mxArchiMate3SysSw);function mxArchiMate3Artifact(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Artifact,mxShape);mxArchiMate3Artifact.prototype.cst={ARTIFACT:"mxgraph.archimate3.artifact"};mxArchiMate3Artifact.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Artifact.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(.7*b,0);a.lineTo(b,.22*c);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.7*b,0);a.lineTo(.7*b,.22*c);a.lineTo(b,.22*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Artifact.prototype.cst.ARTIFACT,mxArchiMate3Artifact);
mxArchiMate3Artifact.prototype.getConstraints=function(a,d,e){a=[];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(.7,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.85,.11),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.22),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxArchiMate3CommNetw(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3CommNetw,mxShape);mxArchiMate3CommNetw.prototype.cst={COMM_NETW:"mxgraph.archimate3.commNetw"};mxArchiMate3CommNetw.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3CommNetw.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.2*b,c);a.lineTo(0,.5*c);a.lineTo(.2*b,0);a.moveTo(.8*b,c);a.lineTo(b,.5*c);a.lineTo(.8*b,0);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3CommNetw.prototype.cst.COMM_NETW,mxArchiMate3CommNetw);mxArchiMate3CommNetw.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
function mxArchiMate3Path(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3Path,mxShape);mxArchiMate3Path.prototype.cst={PATH:"mxgraph.archimate3.path"};mxArchiMate3Path.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3Path.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.2*b,c);a.lineTo(0,.5*c);a.lineTo(.2*b,0);a.moveTo(.8*b,c);a.lineTo(b,.5*c);a.lineTo(.8*b,0);a.stroke();a.setDashed(!0);a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke()};mxCellRenderer.registerShape(mxArchiMate3Path.prototype.cst.PATH,mxArchiMate3Path);
mxArchiMate3Path.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxArchiMate3ValueStream(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3ValueStream,mxShape);mxArchiMate3ValueStream.prototype.cst={VALUE_STREAM:"mxgraph.archimate3.valueStream"};
mxArchiMate3ValueStream.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};mxArchiMate3ValueStream.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.75*b,c);a.lineTo(0*b,c);a.lineTo(.25*b,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3ValueStream.prototype.cst.VALUE_STREAM,mxArchiMate3ValueStream);
mxArchiMate3ValueStream.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxArchiMate3WorkPackage(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxArchiMate3WorkPackage,mxShape);mxArchiMate3WorkPackage.prototype.cst={WORK_PACKAGE:"mxgraph.archimate3.workPackage"};
mxArchiMate3WorkPackage.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1)};
mxArchiMate3WorkPackage.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(.733*b,.7765*c);a.lineTo(.3308*b,.7765*c);a.curveTo(.1856*b,.7765*c,.034*b,.6281*c,.034*b,.3939*c);a.curveTo(.0314*b,.2015*c,.1742*b,.0381*c,.3308*b,.0381*c);a.curveTo(.5106*b,.0381*c,.6267*b,.2026*c,.6267*b,.3939*c);a.curveTo(.6267*b,.4924*c,.5785*b,.603*c,.4776*b,.6743*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.7247*b,.908*c);a.lineTo(.7247*
b,.6418*c);a.lineTo(.9147*b,.7749*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxArchiMate3WorkPackage.prototype.cst.WORK_PACKAGE,mxArchiMate3WorkPackage);mxArchiMate3WorkPackage.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
function mxShapeArrows2Arrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}mxUtils.extend(mxShapeArrows2Arrow,mxActor);
mxShapeArrows2Arrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"headCrossline",dispName:"Head Crossline",type:"bool",defVal:!1},{name:"tailCrossline",dispName:"Tail Crossline",type:"bool",defVal:!1}];mxShapeArrows2Arrow.prototype.cst={ARROW:"mxgraph.arrows2.arrow"};
mxShapeArrows2Arrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=mxUtils.getValue(this.style,"headCrossline",!1),h=mxUtils.getValue(this.style,"tailCrossline",!1);a.begin();a.moveTo(0,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,
.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(0,c-d);a.lineTo(f,.5*c);a.close();a.fillAndStroke();a.setShadow(!1);g&&(a.begin(),a.moveTo(b-e,d),a.lineTo(b-e,c-d),a.stroke());h&&(a.begin(),a.moveTo(f,d),a.lineTo(f,c-d),a.stroke())};
mxShapeArrows2Arrow.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=a.width,e=a.height,b=this.direction||mxConstants.DIRECTION_EAST;mxUtils.getValue(this.style,"flipH",!1)&&(b==mxConstants.DIRECTION_WEST?b=mxConstants.DIRECTION_EAST:b==mxConstants.DIRECTION_EAST&&(b=mxConstants.DIRECTION_WEST));mxUtils.getValue(this.style,"flipV",!1)&&(b==mxConstants.DIRECTION_NORTH?b=mxConstants.DIRECTION_SOUTH:b==mxConstants.DIRECTION_SOUTH&&(b=mxConstants.DIRECTION_NORTH));
if(b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH){var c=.5*d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))))}else c=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));return b==mxConstants.DIRECTION_EAST?new mxRectangle(a.x,a.y+c,d-f,e-2*c):b==mxConstants.DIRECTION_WEST?
new mxRectangle(a.x+f,a.y+c,d-f,e-2*c):b==mxConstants.DIRECTION_NORTH?new mxRectangle(a.x+c,a.y+f,d-2*c,e-f):new mxRectangle(a.x+c,a.y,d-2*c,e-f)}return a};mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW,mxShapeArrows2Arrow);
Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-b,e.y+c*e.height/2)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(e.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),
e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(b.y-e.y)/e.height*2)))/100})];a=Graph.createHandle(a,["notch"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(e.x+b,e.y+e.height/2)},function(e,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(e.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),b.x-e.x)))/100});d.push(a);return d};
mxShapeArrows2Arrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));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,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));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),e-b));return a};
function mxShapeArrows2TwoWayArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5}mxUtils.extend(mxShapeArrows2TwoWayArrow,mxActor);mxShapeArrows2TwoWayArrow.prototype.cst={TWO_WAY_ARROW:"mxgraph.arrows2.twoWayArrow"};mxShapeArrows2TwoWayArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:35},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6}];
mxShapeArrows2TwoWayArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(e,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(e,c-d);a.lineTo(e,c);a.lineTo(0,.5*c);a.lineTo(e,0);a.close();a.fillAndStroke()};
mxShapeArrows2TwoWayArrow.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=a.width,e=a.height,b=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH;if(b){var c=.5*d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))))}else c=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,
Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));return b?new mxRectangle(a.x+c,a.y+f,d-2*c,e-2*f):new mxRectangle(a.x+f,a.y+c,d-2*f,e-2*c)}return a};mxCellRenderer.registerShape(mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW,mxShapeArrows2TwoWayArrow);mxShapeArrows2TwoWayArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+d.width-e,d.y+b*d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width/2,d.x+d.width-e.x)))/100;this.state.style.dy=Math.round(100*
Math.max(0,Math.min(1,(e.y-d.y)/d.height*2)))/100})]};
mxShapeArrows2TwoWayArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));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,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,e-b));return a};
function mxShapeArrows2StylisedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.feather=.5}mxUtils.extend(mxShapeArrows2StylisedArrow,mxActor);
mxShapeArrows2StylisedArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"feather",dispName:"Feather",type:"float",min:0,max:1,defVal:.4}];mxShapeArrows2StylisedArrow.prototype.cst={STYLISED_ARROW:"mxgraph.arrows2.stylisedArrow"};
mxShapeArrows2StylisedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"feather",this.feather))));a.begin();a.moveTo(0,g);a.lineTo(b-e,d);a.lineTo(b-e-10,0);
a.lineTo(b,.5*c);a.lineTo(b-e-10,c);a.lineTo(b-e,c-d);a.lineTo(0,c-g);a.lineTo(f,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW,mxShapeArrows2StylisedArrow);mxShapeArrows2StylisedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){var c=Math.max(0,Math.min(b.width-10,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-c,b.y+f*b.height/2)},function(b,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(b.width-10,b.width-parseFloat(mxUtils.getValue(this.state.style,
"notch",this.notch)),b.x+b.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)),c.x-b.x)))/100});d.push(e);a=Graph.createHandle(a,["feather"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"feather",this.dy))));return new mxPoint(b.x,b.y+c*b.height/2)},function(b,c){this.state.style.feather=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height*2)))/100});d.push(a);return d};
mxShapeArrows2StylisedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"feather",this.feather))));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c-10,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c-10,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(b+g)));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e-.5*(b+g)));return a};function mxShapeArrows2SharpArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx2=this.dx1=this.dy1=.5;this.notch=0}mxUtils.extend(mxShapeArrows2SharpArrow,mxActor);mxShapeArrows2SharpArrow.prototype.cst={SHARP_ARROW:"mxgraph.arrows2.sharpArrow"};
mxShapeArrows2SharpArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Arrow Width",type:"float",min:0,defVal:18},{name:"dy1",dispName:"Arrow Arrow Width",type:"float",min:0,max:1,defVal:.67},{name:"dx2",dispName:"Arrowhead Angle",type:"float",min:0,defVal:18},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0}];
mxShapeArrows2SharpArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),
k=.5*c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),l=0;0!=c&&(l=h+f*k*2/c);a.begin();a.moveTo(0,d);a.lineTo(b-e,d);a.lineTo(b-l,0);a.lineTo(b-f,0);a.lineTo(b,.5*c);a.lineTo(b-f,c);a.lineTo(b-l,c);a.lineTo(b-e,c-d);a.lineTo(0,c-d);a.lineTo(g,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW,mxShapeArrows2SharpArrow);mxShapeArrows2SharpArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+b.width-c,b.y+f*b.height/2)},function(b,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",
this.notch)),b.x+b.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-b.x)))/100});d.push(e);a=Graph.createHandle(a,
["dx2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+b.width-c,b.y)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.x+b.width-c.x)))/100});d.push(a);return d};
mxShapeArrows2SharpArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),k=.5*e*
Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),l=0;0!=e&&(l=h+f*k*2/e);a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-l,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-l,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,e));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),e-b));return a};
function mxShapeArrows2SharpArrow2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx3=this.dy3=this.dx2=this.dx1=this.dy1=.5;this.notch=0}mxUtils.extend(mxShapeArrows2SharpArrow2,mxActor);
mxShapeArrows2SharpArrow2.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Arrow Width",type:"float",min:0,defVal:18},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.67},{name:"dx2",dispName:"Arrowhead Angle",type:"float",min:0,defVal:18},{name:"dx3",dispName:"Arrowhead Edge X",type:"float",min:0,defVal:27},{name:"dy3",dispName:"Arrowhead Edge Y",type:"float",min:0,max:1,defVal:.15},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0}];
mxShapeArrows2SharpArrow2.prototype.cst={SHARP_ARROW2:"mxgraph.arrows2.sharpArrow2"};
mxShapeArrows2SharpArrow2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy3",this.dy3)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx3",
this.dx3)))),k=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1));parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1));a.begin();a.moveTo(0,d);a.lineTo(b-e,d);a.lineTo(b-h,g);a.lineTo(b-f,0);a.lineTo(b,.5*c);a.lineTo(b-f,c);a.lineTo(b-h,c-g);a.lineTo(b-e,c-d);a.lineTo(0,c-d);a.lineTo(k,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2,mxShapeArrows2SharpArrow2);
mxShapeArrows2SharpArrow2.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+b.width-c,b.y+f*b.height/2)},function(b,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,
"notch",this.notch)),b.x+b.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height*2)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-b.x)))/100});d.push(e);e=Graph.createHandle(a,
["dx2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+b.width-c,b.y)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.x+b.width-c.x)))/100});d.push(e);a=Graph.createHandle(a,["dx3","dy3"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx3",this.dx3)))),f=Math.max(0,Math.min(1-
parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))/2,parseFloat(mxUtils.getValue(this.state.style,"dy3",this.dy3))));return new mxPoint(b.x+b.width-c,b.y+f*b.height/2)},function(b,c){this.state.style.dx3=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),Math.min(b.width,b.x+b.width-c.x)))/100;this.state.style.dy3=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),(c.y-b.y)/b.height*2)))/100});d.push(a);return d};
mxShapeArrows2SharpArrow2.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy3",this.dy3)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx3",this.dx3)))),k=Math.max(0,
Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1));parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,k,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-
h,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-h,e-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,e));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),e-b));return a};
function mxShapeArrows2CalloutArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutArrow,mxActor);
mxShapeArrows2CalloutArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rectangle Width",type:"float",min:0,defVal:60}];mxShapeArrows2CalloutArrow.prototype.cst={CALLOUT_ARROW:"mxgraph.arrows2.calloutArrow"};
mxShapeArrows2CalloutArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,.5*c-d);a.lineTo(b-
e,.5*c-d);a.lineTo(b-e,.5*c-d-g);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+g);a.lineTo(b-e,.5*c+d);a.lineTo(f,.5*c+d);a.lineTo(f,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW,mxShapeArrows2CalloutArrow);mxShapeArrows2CalloutArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){var c=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));c=Math.max(0,Math.min(b.height/2-c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-f,b.y+b.height/2-c)},function(b,
c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.x+b.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),b.y+b.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/
2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-b.x)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),g=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",
this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),b.y+b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-c.y)))/100});d.push(a);return d};
mxShapeArrows2CalloutArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(0,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*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,.5*(f+d-c),-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,.5*(f+d-c),b));return a};
function mxShapeArrows2BendArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.arrowHead=40}mxUtils.extend(mxShapeArrows2BendArrow,mxActor);
mxShapeArrows2BendArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55},{name:"rounded",dispName:"Rounded",type:"boolean",defVal:!1}];mxShapeArrows2BendArrow.prototype.cst={BEND_ARROW:"mxgraph.arrows2.bendArrow"};
mxShapeArrows2BendArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),h=mxUtils.getValue(this.style,"rounded","0");a.begin();a.moveTo(b-e,0);
a.lineTo(b,.5*g);a.lineTo(b-e,g);a.lineTo(b-e,g/2+d);"1"==h?(a.lineTo(2.2*d,g/2+d),a.arcTo(.2*d,.2*d,0,0,0,2*d,g/2+1.2*d)):a.lineTo(2*d,g/2+d);a.lineTo(2*d,c);a.lineTo(d,c-f);a.lineTo(0,c);"1"==h?(a.lineTo(0,g/2+d),a.arcTo(2*d,2*d,0,0,1,2*d,g/2-d)):a.lineTo(0,g/2-d);a.lineTo(b-e,g/2-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW,mxShapeArrows2BendArrow);mxShapeArrows2BendArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){var c=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-f,b.y+c/2-g)},function(b,c){this.state.style.dx=
Math.round(100*Math.max(0,Math.min(b.width-2.2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),b.x+b.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,b.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),
f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));c=Math.max(0,Math.min(b.height-c/2-f,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+f,b.y+b.height-c)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.height-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),b.y+b.height-c.y)))/100});d.push(e);a=Graph.createHandle(a,
["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+f)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(b.height,c.y-b.y)))/100});d.push(a);return d};
mxShapeArrows2BendArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),h=mxUtils.getValue(this.style,"rounded","0");a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c+2*b),g/2-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g/2-b));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*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+2*b),g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,2*b,.5*(e-g/2-b)+g/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-f));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-g/2-b)+g/2+b));"1"==h?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.586*b,g/2-.414*b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b+.0586*b,g/2+b+.0586*b))):(a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,g/2-b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b,g/2+b)));return a};function mxShapeArrows2BendDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0;this.arrowHead=40}mxUtils.extend(mxShapeArrows2BendDoubleArrow,mxActor);
mxShapeArrows2BendDoubleArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55},{name:"rounded",dispName:"Rounded",type:"boolean",defVal:!1}];mxShapeArrows2BendDoubleArrow.prototype.cst={BEND_DOUBLE_ARROW:"mxgraph.arrows2.bendDoubleArrow"};
mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),g=mxUtils.getValue(this.style,"rounded","0");a.begin();a.moveTo(b-e,0);a.lineTo(b,.5*f);a.lineTo(b-e,f);a.lineTo(b-e,f/2+d);"1"==g?(a.lineTo(f/2+1.2*
d,f/2+d),a.arcTo(.2*d,.2*d,0,0,0,f/2+d,f/2+1.2*d)):a.lineTo(f/2+d,f/2+d);a.lineTo(f/2+d,c-e);a.lineTo(f,c-e);a.lineTo(f/2,c);a.lineTo(0,c-e);a.lineTo(f/2-d,c-e);"1"==g?(a.lineTo(f/2-d,f/2+d),a.arcTo(2*d,2*d,0,0,1,f/2+d,f/2-d)):a.lineTo(f/2-d,f/2-d);a.lineTo(b-e,f/2-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW,mxShapeArrows2BendDoubleArrow);mxShapeArrows2BendDoubleArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(Math.min(e.height,e.width)-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(Math.min(e.width,e.height)-b,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,
"dy",this.dy))));return new mxPoint(e.x+e.width-c,e.y+b/2-f)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(Math.min(e.width,e.height)-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,e.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-b.y)))/100})];a=Graph.createHandle(a,
["arrowHead"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(Math.min(e.height,e.width)-b,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(e.x+e.width-b,e.y+c)},function(e,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(e.height,e.width)-parseFloat(mxUtils.getValue(this.state.style,"dx",
this.dx)),b.y-e.y)))/100});d.push(a);return d};
mxShapeArrows2BendDoubleArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),g=mxUtils.getValue(this.style,"rounded","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*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f/2+b+d-c),f/2+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f/2+b+d-c),f/2-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b,.5*(f/2+b+e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b,.5*(f/2+b+e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,f/2+b,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b,e-c));"1"==g?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-.414*b,f/2-.414*b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b+.0586*b,f/2+b+.0586*b))):(a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,f/2-b,f/2-b)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b,f/2+b)));return a};function mxShapeArrows2CalloutDoubleArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutDoubleArrow,mxActor);
mxShapeArrows2CalloutDoubleArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rect Size",type:"float",min:0,defVal:24}];mxShapeArrows2CalloutDoubleArrow.prototype.cst={CALLOUT_DOUBLE_ARROW:"mxgraph.arrows2.calloutDoubleArrow"};
mxShapeArrows2CalloutDoubleArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(b/2-f,0);a.lineTo(b/2+f,0);a.lineTo(b/2+f,
.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-g);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+g);a.lineTo(b-e,.5*c+d);a.lineTo(b/2+f,.5*c+d);a.lineTo(b/2+f,c);a.lineTo(b/2-f,c);a.lineTo(b/2-f,.5*c+d);a.lineTo(e,.5*c+d);a.lineTo(e,.5*c+d+g);a.lineTo(0,.5*c);a.lineTo(e,.5*c-d-g);a.lineTo(e,.5*c-d);a.lineTo(b/2-f,.5*c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBLE_ARROW,mxShapeArrows2CalloutDoubleArrow);
mxShapeArrows2CalloutDoubleArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBLE_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){var c=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));c=Math.max(0,Math.min(b.height/2-c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-f,b.y+b.height/
2-c)},function(b,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(b.width/2-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.x+b.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),b.y+b.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+
b.width/2+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width/2-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-b.x-b.width/2)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),g=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,
"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),b.y+b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-c.y)))/100});d.push(a);return d};
mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/2-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/2+f,0));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,d/2-f,0));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,d/2+f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+f),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+f),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-f),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-f),.5*e+b));return a};
function mxShapeArrows2CalloutQuadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2CalloutQuadArrow,mxActor);
mxShapeArrows2CalloutQuadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"notch",dispName:"Rect Size",type:"float",min:0,defVal:24},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10}];mxShapeArrows2CalloutQuadArrow.prototype.cst={CALLOUT_QUAD_ARROW:"mxgraph.arrows2.calloutQuadArrow"};
mxShapeArrows2CalloutQuadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+d,.5*c-f);a.lineTo(.5*b+f,.5*c-f);a.lineTo(.5*
b+f,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-g);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+g);a.lineTo(b-e,.5*c+d);a.lineTo(.5*b+f,.5*c+d);a.lineTo(.5*b+f,.5*c+f);a.lineTo(.5*b+d,.5*c+f);a.lineTo(.5*b+d,c-e);a.lineTo(.5*b+d+g,c-e);a.lineTo(.5*b,c);a.lineTo(.5*b-d-g,c-e);a.lineTo(.5*b-d,c-e);a.lineTo(.5*b-d,.5*c+f);a.lineTo(.5*b-f,.5*c+f);a.lineTo(.5*b-f,.5*c+d);a.lineTo(e,.5*c+d);a.lineTo(e,.5*c+d+g);a.lineTo(0,.5*c);a.lineTo(e,.5*c-d-g);a.lineTo(e,.5*c-d);a.lineTo(.5*b-f,.5*c-d);a.lineTo(.5*b-
f,.5*c-f);a.lineTo(.5*b-d,.5*c-f);a.lineTo(.5*b-d,e);a.lineTo(.5*b-d-g,e);a.lineTo(.5*b,0);a.lineTo(.5*b+d+g,e);a.lineTo(.5*b+d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_ARROW,mxShapeArrows2CalloutQuadArrow);mxShapeArrows2CalloutQuadArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead));var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f)},function(b,c){this.state.style.dx=Math.round(100*
Math.max(0,Math.min(Math.min(b.width,b.height)/2-Math.max(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))),b.x+b.width-c.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.y+b.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(b.width,
b.height),parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+b.width/2+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(Math.min(b.width,b.height)/2-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),c.x-b.x-b.width/2)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),g=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),b.y+b.height/2-c.y)))/100});d.push(a);return d};
mxShapeArrows2CalloutQuadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+f,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*d+f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-f,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-g,c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*d+b+g,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.5*(f-c),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.5*(f-c),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.75*e+.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.75*e+.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.5*(f-c),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*
d-.5*(f-c),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.25*e-.5*(f-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.25*e-.5*(f-c)));return a};function mxShapeArrows2CalloutDouble90Arrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=this.dy1=.5;this.arrowHead=this.dy2=this.dx2=0}mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow,mxActor);
mxShapeArrows2CalloutDouble90Arrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Callout Width",type:"float",min:0,defVal:70},{name:"dy2",dispName:"Callout Height",type:"float",min:0,defVal:70},{name:"arrowHead",dispName:"ArrowHead Width",type:"float",min:0,defVal:10}];mxShapeArrows2CalloutDouble90Arrow.prototype.cst={CALLOUT_DOUBLE_90_ARROW:"mxgraph.arrows2.calloutDouble90Arrow"};
mxShapeArrows2CalloutDouble90Arrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),h=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",
this.arrowHead))));a.begin();a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,.5*g-d);a.lineTo(b-e,.5*g-d);a.lineTo(b-e,.5*g-d-h);a.lineTo(b,.5*g);a.lineTo(b-e,.5*g+d+h);a.lineTo(b-e,.5*g+d);a.lineTo(f,.5*g+d);a.lineTo(f,g);a.lineTo(f/2+d,g);a.lineTo(f/2+d,c-e);a.lineTo(f/2+d+h,c-e);a.lineTo(f/2,c);a.lineTo(f/2-d-h,c-e);a.lineTo(f/2-d,c-e);a.lineTo(f/2-d,g);a.lineTo(0,g);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOUBLE_90_ARROW,mxShapeArrows2CalloutDouble90Arrow);
mxShapeArrows2CalloutDouble90Arrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOUBLE_90_ARROW]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(b){var c=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));c=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,
"dy2",this.dy2))/2-c,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+b.width-f,b.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-c)},function(b,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),b.height-parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2)),b.x+b.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,
"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),b.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-c.y)))/100})],e=Graph.createHandle(a,["dx2","dy2"],function(b){var c=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),parseFloat(mxUtils.getValue(this.state.style,"dx2",
this.dx2)))),f=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),Math.min(b.height-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(b.x+c,b.y+f)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,
"arrowHead",this.arrowHead)),Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-b.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),Math.min(b.height-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.y-b.y)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,
"dx1",this.dx1)))),f=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)))),g=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,
Math.min(parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),b.y+parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))-c.y)))/100});d.push(a);return d};
mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),h=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0));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+f),.5*g-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*g-b-h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*g+b+h));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c+f),.5*g+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f+b,.5*(e-c+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f-b,.5*(e-c+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2+b+h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f/2-b-h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,g));return a};function mxShapeArrows2QuadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2QuadArrow,mxActor);
mxShapeArrows2QuadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:10}];mxShapeArrows2QuadArrow.prototype.cst={QUAD_ARROW:"mxgraph.arrows2.quadArrow"};
mxShapeArrows2QuadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+d,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-f);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+f);a.lineTo(b-e,.5*c+d);a.lineTo(.5*b+d,
.5*c+d);a.lineTo(.5*b+d,c-e);a.lineTo(.5*b+d+f,c-e);a.lineTo(.5*b,c);a.lineTo(.5*b-d-f,c-e);a.lineTo(.5*b-d,c-e);a.lineTo(.5*b-d,.5*c+d);a.lineTo(e,.5*c+d);a.lineTo(e,.5*c+d+f);a.lineTo(0,.5*c);a.lineTo(e,.5*c-d-f);a.lineTo(e,.5*c-d);a.lineTo(.5*b-d,.5*c-d);a.lineTo(.5*b-d,e);a.lineTo(.5*b-d-f,e);a.lineTo(.5*b,0);a.lineTo(.5*b+d+f,e);a.lineTo(.5*b+d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW,mxShapeArrows2QuadArrow);
mxShapeArrows2QuadArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead));var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-b,e.y+e.height/2-c)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,
Math.min(Math.min(e.width,e.height)/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(e.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),e.y+e.height/2-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),
c=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),f=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(e.x+e.width-b,e.y+e.height/2-c-f)},function(e,b){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(e.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),e.y+e.height/2-b.y)))/100});d.push(a);return d};
mxShapeArrows2QuadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e-b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*e+b+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b-f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*d-b-f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b+f,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*(c-b)+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*(c-b)+.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*(b-c)+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*(b-c)+.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b)+.25*d,.5*e-b));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-b)+.25*d,.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c)+.75*d,.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-c)+.75*d,.5*e+b));return a};function mxShapeArrows2TriadArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=0}mxUtils.extend(mxShapeArrows2TriadArrow,mxActor);
mxShapeArrows2TriadArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:40}];mxShapeArrows2TriadArrow.prototype.cst={TRIAD_ARROW:"mxgraph.arrows2.triadArrow"};
mxShapeArrows2TriadArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(.5*b+.5*f-d,c-f+d);a.lineTo(b-e,c-f+d);a.lineTo(b-e,c-f);a.lineTo(b,c-.5*f);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(e,c-d);a.lineTo(e,
c);a.lineTo(0,c-.5*f);a.lineTo(e,c-f);a.lineTo(e,c-f+d);a.lineTo(.5*b-.5*f+d,c-f+d);a.lineTo(.5*b-.5*f+d,e);a.lineTo(.5*b-.5*f,e);a.lineTo(.5*b,0);a.lineTo(.5*b+.5*f,e);a.lineTo(.5*b+.5*f-d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW,mxShapeArrows2TriadArrow);mxShapeArrows2TriadArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));b=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-c,e.y+e.height-b)},function(e,b){this.state.style.dx=
Math.round(100*Math.max(0,Math.min(Math.min(e.height-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),e.width/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2),e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,e.y+e.height-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx))));parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));var c=Math.max(0,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(e.x+e.width-b,e.y+e.height-c)},function(e,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(e.height-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),e.width-2*parseFloat(mxUtils.getValue(this.state.style,"dx",
this.dx)),e.y+e.height-b.y)))/100});d.push(a);return d};
mxShapeArrows2TriadArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,.5*-f,c));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*d,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,.5*f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(1.5*d-c+.5*f-b),e-f+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-c+.5*f-b),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-.5*f+b),e-f+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(.5*d+c-.5*f+b),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-.5*f+b,.5*(c+e-f+b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+.5*f-b,.5*(c+e-f+b)));return a};
function mxShapeArrows2TailedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}mxUtils.extend(mxShapeArrows2TailedArrow,mxActor);
mxShapeArrows2TailedArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",min:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Tail Length",type:"float",min:0,defVal:25},{name:"dy2",dispName:"Tail Width",type:"float",min:0,defVal:30},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:0},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:20}];mxShapeArrows2TailedArrow.prototype.cst={TAILED_ARROW:"mxgraph.arrows2.tailedArrow"};
mxShapeArrows2TailedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),
k=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+f*(f-d)/f);a.begin();a.moveTo(0,.5*c-f);a.lineTo(g,.5*c-f);a.lineTo(l,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-k);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+k);a.lineTo(b-e,.5*c+d);a.lineTo(l,.5*c+d);a.lineTo(g,.5*c+f);a.lineTo(0,.5*c+f);a.lineTo(h,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW,mxShapeArrows2TailedArrow);
mxShapeArrows2TailedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(b){var c=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));c=Math.max(0,Math.min(b.height/2-c,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+b.width-f,b.y+b.height/2-c)},function(b,
c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),b.width-parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),b.x+b.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2)),b.y+b.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=
Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),c.x-b.x)))/100});d.push(e);e=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",
this.dx1)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)))),g=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),b.y+b.height/2-c.y)))/100});d.push(e);a=Graph.createHandle(a,["dx2","dy2"],function(b){var c=
Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(b.x+c,b.y+b.height/2-f)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch)),Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))-parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))+parseFloat(mxUtils.getValue(this.state.style,
"dy1",this.dy1))-1,c.x-b.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),Math.min(b.height/2,b.y+b.height/2-c.y)))/100});d.push(a);return d};
mxShapeArrows2TailedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),k=Math.max(0,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+f*(f-b)/f);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-k));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+k));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeArrows2TailedNotchedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=this.notch=0}
mxUtils.extend(mxShapeArrows2TailedNotchedArrow,mxActor);
mxShapeArrows2TailedNotchedArrow.prototype.customProperties=[{name:"dx1",dispName:"Arrowhead Length",type:"float",mix:0,defVal:20},{name:"dy1",dispName:"Arrow Width",type:"float",min:0,defVal:10},{name:"dx2",dispName:"Tail Length",type:"float",min:0,defVal:25},{name:"dy2",dispName:"Tail Width",type:"float",min:0,defVal:30},{name:"notch",dispName:"Notch",type:"float",min:0,defVal:20},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:20}];
mxShapeArrows2TailedNotchedArrow.prototype.cst={TAILED_NOTCHED_ARROW:"mxgraph.arrows2.tailedNotchedArrow"};
mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),
k=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+h*(f-d)/f);a.begin();a.moveTo(0,.5*c-f);a.lineTo(g,.5*c-f);a.lineTo(l,.5*c-d);a.lineTo(b-e,.5*c-d);a.lineTo(b-e,.5*c-d-k);a.lineTo(b,.5*c);a.lineTo(b-e,.5*c+d+k);a.lineTo(b-e,.5*c+d);a.lineTo(l,.5*c+d);a.lineTo(g,.5*c+f);a.lineTo(0,.5*c+f);a.lineTo(h,.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHED_ARROW,mxShapeArrows2TailedNotchedArrow);
mxShapeArrows2TailedNotchedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx1","dy1"],function(b){var c=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));c=Math.max(0,Math.min(b.height/2-c,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+b.width-f,b.y+b.height/
2-c)},function(b,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))-parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2)),b.x+b.width-c.x)))/100;this.state.style.dy1=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)),parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2)),b.y+b.height/2-c.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=
Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+c,b.y+b.height/2)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-b.x)))/100});d.push(e);e=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,
"dy1",this.dy1)))),g=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))));return new mxPoint(b.x+b.width-c,b.y+b.height/2-f-g)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(0,Math.min(b.height/2-parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),b.y+b.height/2-c.y)))/100});d.push(e);a=Graph.createHandle(a,["dx2","dy2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx2",
this.dx2)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy2",this.dy2))));return new mxPoint(b.x+c,b.y+b.height/2-f)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width-parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))-parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1)),c.x-b.x)))/100;this.state.style.dy2=Math.round(100*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1)),Math.min(b.height/2,
b.y+b.height/2-c.y)))/100});d.push(a);return d};
mxShapeArrows2TailedNotchedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),k=Math.max(0,
Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),l=0;0!=f&&(l=g+h*(f-b)/f);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e-b-k));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*e+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c+l),.5*e+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,.5*e+b+k));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeArrows2StripedArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.notch=0}
mxUtils.extend(mxShapeArrows2StripedArrow,mxActor);mxShapeArrows2StripedArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:40},{name:"dy",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.6},{name:"notch",dispName:"Stripes Length",type:"float",min:0,defVal:25}];mxShapeArrows2StripedArrow.prototype.cst={STRIPED_ARROW:"mxgraph.arrows2.stripedArrow"};
mxShapeArrows2StripedArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(f,d);a.lineTo(b-e,d);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.lineTo(b-e,c-d);a.lineTo(f,c-d);a.close();a.moveTo(0,c-d);a.lineTo(.16*
f,c-d);a.lineTo(.16*f,d);a.lineTo(0,d);a.close();a.moveTo(.32*f,c-d);a.lineTo(.8*f,c-d);a.lineTo(.8*f,d);a.lineTo(.32*f,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW,mxShapeArrows2StripedArrow);mxShapeArrows2StripedArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-b,e.y+c*e.height/2)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(e.width-parseFloat(mxUtils.getValue(this.state.style,"notch",
this.notch)),e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(b.y-e.y)/e.height*2)))/100})];a=Graph.createHandle(a,["notch"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(e.x+b,e.y+e.height/2)},function(e,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(e.width-parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)),b.x-e.x)))/100});d.push(a);return d};
mxShapeArrows2StripedArrow.prototype.getConstraints=function(a,d,e){a=[];var b=.5*e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));parseFloat(mxUtils.getValue(this.style,"notch",this.notch));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));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,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e));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),e-b));return a};
function mxShapeArrows2JumpInArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=40}mxUtils.extend(mxShapeArrows2JumpInArrow,mxActor);mxShapeArrows2JumpInArrow.prototype.customProperties=[{name:"dx",dispName:"Arrowhead Length",type:"float",min:0,defVal:38},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:15},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:55}];
mxShapeArrows2JumpInArrow.prototype.cst={JUMP_IN_ARROW:"mxgraph.arrows2.jumpInArrow"};
mxShapeArrows2JumpInArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.begin();a.moveTo(b-e,0);a.lineTo(b,.5*f);a.lineTo(b-e,f);a.lineTo(b-e,f/2+d);a.arcTo(b-e,c-f/2-d,0,0,0,0,c);a.arcTo(b-e,c-f/2+d,0,0,1,b-e,f/2-d);a.close();
a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW,mxShapeArrows2JumpInArrow);mxShapeArrows2JumpInArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),c=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-c,e.y+b/2-f)},function(e,b){this.state.style.dx=
Math.round(100*Math.max(0,Math.min(e.width,e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2,e.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-b.y)))/100})];a=Graph.createHandle(a,["arrowHead"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(e.height,parseFloat(mxUtils.getValue(this.state.style,
"arrowHead",this.arrowHead))));return new mxPoint(e.x+e.width-b,e.y+c)},function(e,b){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(e.height,b.y-e.y)))/100});d.push(a);return d};
mxShapeArrows2JumpInArrow.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dy",this.dy));var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-b,e));return a};function mxShapeArrows2UTurnArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.arrowHead=40}mxUtils.extend(mxShapeArrows2UTurnArrow,mxActor);mxShapeArrows2UTurnArrow.prototype.customProperties=[{name:"dx2",dispName:"Arrowhead Length",type:"float",min:0,defVal:25},{name:"dy",dispName:"Arrow Width",type:"float",min:0,defVal:11},{name:"arrowHead",dispName:"Arrowhead Width",type:"float",min:0,defVal:43}];
mxShapeArrows2UTurnArrow.prototype.cst={U_TURN_ARROW:"mxgraph.arrows2.uTurnArrow"};
mxShapeArrows2UTurnArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead))));var f=(c-e/2+d)/2,g=Math.max(0,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)));a.begin();a.moveTo(f,0);a.lineTo(f+g,.5*e);a.lineTo(f,e);a.lineTo(f,e/2+d);a.arcTo(f-2*d,f-2*d,0,0,0,f,c-2*d);a.lineTo(Math.max(b,f),c-2*d);a.lineTo(Math.max(b,
f),c);a.lineTo(f,c);a.arcTo(f,f,0,0,1,f,e/2-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW,mxShapeArrows2UTurnArrow);mxShapeArrows2UTurnArrow.prototype.constraints=null;
Graph.handleFactory[mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW]=function(a){var d=[Graph.createHandle(a,["dy"],function(b){var c=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+(b.height-c/2+f)/2,b.y+c/2-f)},function(b,c){this.state.style.dy=Math.round(100*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"arrowHead",
this.arrowHead))/2,b.y+parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead))/2-c.y)))/100})],e=Graph.createHandle(a,["dx2"],function(b){var c=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));f=(b.height-c/2+f)/2;var g=Math.max(0,Math.min(b.width-f,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+f+g,
b.y+c/2)},function(b,c){var f=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));f=(b.height-f/2+g)/2;this.state.style.dx2=Math.round(100*Math.max(0,Math.min(Math.max(b.width,f),c.x-b.x-f)))/100});d.push(e);a=Graph.createHandle(a,["arrowHead"],function(b){var c=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"arrowHead",this.arrowHead)))),
f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+(b.height-c/2+f)/2,b.y+c)},function(b,c){this.state.style.arrowHead=Math.round(100*Math.max(2*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)),Math.min(b.height/2,c.y-b.y)))/100});d.push(a);return d};
mxShapeArrows2UTurnArrow.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"arrowHead",this.arrowHead)))),f=(e-c/2+b)/2,g=Math.max(0,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f+g,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d),e-2*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e-2*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.max(d,f),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*(e+.5*c-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-2*b,.5*(e+.5*c-b)));return a};function mxShapeArrowsWedgeArrow(){mxArrow.call(this)}mxUtils.extend(mxShapeArrowsWedgeArrow,mxArrow);mxShapeArrowsWedgeArrow.prototype.useSvgBoundingBox=!0;mxShapeArrowsWedgeArrow.prototype.customProperties=[{name:"startWidth",dispName:"Wedge Width",type:"float",min:0,defVal:25}];
mxShapeArrowsWedgeArrow.prototype.paintEdgeShape=function(a,d){var e=Math.max(0,parseFloat(mxUtils.getValue(this.style,"startWidth",20))),b=d[0];d=d[d.length-1];var c=d.x-b.x,f=d.y-b.y,g=Math.sqrt(c*c+f*f);c=c*e/g;e=f*e/g;a.begin();a.moveTo(b.x+e,b.y-c);a.lineTo(b.x-e,b.y+c);a.lineTo(d.x,d.y);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.arrows2.wedgeArrow",mxShapeArrowsWedgeArrow);function mxShapeArrowsWedgeArrowDashed(){mxArrowConnector.call(this)}
mxUtils.extend(mxShapeArrowsWedgeArrowDashed,mxArrow);mxShapeArrowsWedgeArrowDashed.prototype.useSvgBoundingBox=!0;mxShapeArrowsWedgeArrowDashed.prototype.customProperties=[{name:"startWidth",dispName:"Wedge Width",type:"float",min:0,defVal:25}];
mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape=function(a,d){var e=Math.max(0,parseFloat(mxUtils.getValue(this.style,"startWidth",20))),b=d[0],c=d[d.length-1];d=c.x-b.x;c=c.y-b.y;var f=Math.sqrt(d*d+c*c),g=d*e/f;e=c*e/f;f=b.x;var h=b.y;a.begin();for(var k=0;8>=k;k++){b=g*(8-k)/8;var l=e*(8-k)/8;8==k&&(b=g*(8-.98*k)/8,l=e*(8-.98*k)/8);var m=f-l,n=h+b;a.moveTo(f+l,h-b);a.lineTo(m,n);f+=d/8;h+=c/8}a.stroke()};mxCellRenderer.registerShape("mxgraph.arrows2.wedgeArrowDashed",mxShapeArrowsWedgeArrowDashed);
function mxShapeArrowsWedgeArrowDashed2(){mxArrowConnector.call(this)}mxUtils.extend(mxShapeArrowsWedgeArrowDashed2,mxArrow);mxShapeArrowsWedgeArrowDashed2.prototype.useSvgBoundingBox=!0;mxShapeArrowsWedgeArrowDashed2.prototype.customProperties=[{name:"startWidth",dispName:"Wedge Width",type:"float",min:0,defVal:25},{name:"stepSize",dispName:"Step Size",type:"float",min:0,defVal:25}];
mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape=function(a,d){var e=Math.max(0,parseFloat(mxUtils.getValue(this.style,"startWidth",20))),b=Math.max(0,parseFloat(mxUtils.getValue(this.style,"stepSize",10))),c=d[0],f=d[d.length-1];d=f.x-c.x;f=f.y-c.y;var g=Math.sqrt(d*d+f*f),h=d*e/g;e=f*e/g;var k=c.x;c=c.y;var l=Math.floor(g/b);a.begin();for(var m=0;m<=l;m++){b=h*(l-m)/l;g=e*(l-m)/l;m==l&&(b=h*(l-.98*m)/l,g=e*(l-.98*m)/l);var n=k-g,p=c+b;a.moveTo(k+g,c-b);a.lineTo(n,p);k+=d/l;c+=f/l}a.stroke()};
mxCellRenderer.registerShape("mxgraph.arrows2.wedgeArrowDashed2",mxShapeArrowsWedgeArrowDashed2);function mxAtlassianJiraIssue(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxAtlassianJiraIssue,mxRectangleShape);
mxAtlassianJiraIssue.prototype.customProperties=[{name:"issueType",dispName:"Issue Type",type:"enum",enumList:[{val:"story",dispName:"Story"},{val:"task",dispName:"Task"},{val:"subTask",dispName:"Sub-Task"},{val:"feature",dispName:"Feature"},{val:"bug",dispName:"Bug"},{val:"techTask",dispName:"Tech Task"},{val:"epic",dispName:"Epic"},{val:"improvement",dispName:"Improvement"},{val:"fault",dispName:"Fault"},{val:"change",dispName:"Change"},{val:"access",dispName:"Access"},{val:"purchase",dispName:"Purchase"},
{val:"itHelp",dispName:"IT Help"}]},{name:"issuePriority",dispName:"Issue Priority",type:"enum",enumList:[{val:"blocker",dispName:"Blocker"},{val:"critical",dispName:"Critical"},{val:"major",dispName:"Major"},{val:"minor",dispName:"Minor"},{val:"trivial",dispName:"Trivial"}]},{name:"issueStatus",dispName:"Issue Status",type:"enum",enumList:[{val:"todo",dispName:"TODO"},{val:"inProgress",dispName:"In Progress"},{val:"inReview",dispName:"In Review"},{val:"done",dispName:"Done"}]}];
mxAtlassianJiraIssue.prototype.cst={ISSUE:"mxgraph.atlassian.issue"};
mxAtlassianJiraIssue.prototype.paintForeground=function(a,d,e,b,c){a.translate(d,e);c=mxUtils.getValue(this.style,"issueType","task");e=mxUtils.getValue(this.style,"issuePriority","minor");d=mxUtils.getValue(this.style,"issueStatus","todo");a.setStrokeColor("none");switch(c){case "story":c=mxStencilRegistry.getStencil("mxgraph.atlassian.story");null!=c&&(a.setFillColor("#61B659"),c.drawShape(a,this,5,5,10,10));break;case "task":c=mxStencilRegistry.getStencil("mxgraph.atlassian.task");null!=c&&(a.setFillColor("#5EA3E4"),
c.drawShape(a,this,5,5,10,10));break;case "subTask":c=mxStencilRegistry.getStencil("mxgraph.atlassian.subtask");null!=c&&(a.setFillColor("#5EA3E4"),c.drawShape(a,this,5,5,10,10));break;case "feature":c=mxStencilRegistry.getStencil("mxgraph.atlassian.new_feature");null!=c&&(a.setFillColor("#61B659"),c.drawShape(a,this,5,5,10,10));break;case "bug":c=mxStencilRegistry.getStencil("mxgraph.atlassian.bug");null!=c&&(a.setFillColor("#CE0000"),c.drawShape(a,this,5,5,10,10));break;case "techTask":c=mxStencilRegistry.getStencil("mxgraph.atlassian.tech_task");
null!=c&&(a.setFillColor("#999C95"),c.drawShape(a,this,5,5,10,10));break;case "epic":c=mxStencilRegistry.getStencil("mxgraph.atlassian.epic");null!=c&&(a.setFillColor("#9E4ADD"),c.drawShape(a,this,5,5,10,10));break;case "improvement":c=mxStencilRegistry.getStencil("mxgraph.atlassian.improvement");null!=c&&(a.setFillColor("#61B659"),c.drawShape(a,this,5,5,10,10));break;case "fault":c=mxStencilRegistry.getStencil("mxgraph.atlassian.fault");null!=c&&(a.setFillColor("#F8902F"),c.drawShape(a,this,5,5,
10,10));break;case "change":c=mxStencilRegistry.getStencil("mxgraph.atlassian.change");null!=c&&(a.setFillColor("#9E4ADD"),c.drawShape(a,this,5,5,10,10));break;case "access":c=mxStencilRegistry.getStencil("mxgraph.atlassian.access");null!=c&&(a.setFillColor("#F8902F"),c.drawShape(a,this,5,5,10,10));break;case "purchase":c=mxStencilRegistry.getStencil("mxgraph.atlassian.purchase");null!=c&&(a.setFillColor("#61B659"),c.drawShape(a,this,5,5,10,10));break;case "itHelp":c=mxStencilRegistry.getStencil("mxgraph.atlassian.it_help"),
null!=c&&(a.setFillColor("#5EA3E4"),c.drawShape(a,this,5,5,10,10))}switch(e){case "blocker":c=mxStencilRegistry.getStencil("mxgraph.atlassian.no");null!=c&&(a.setFillColor("#CE0000"),c.drawShape(a,this,85,5,10,10));break;case "critical":c=mxStencilRegistry.getStencil("mxgraph.atlassian.critical");null!=c&&(a.setFillColor("#CE0000"),c.drawShape(a,this,86,3,8,14));break;case "major":c=mxStencilRegistry.getStencil("mxgraph.atlassian.double_up");null!=c&&(a.setFillColor("#CE0000"),c.drawShape(a,this,
85,5,10,10));break;case "minor":c=mxStencilRegistry.getStencil("mxgraph.atlassian.double");null!=c&&(a.setFillColor("#2A8735"),c.drawShape(a,this,85,5,10,10));break;case "trivial":c=mxStencilRegistry.getStencil("mxgraph.atlassian.single"),null!=c&&(a.setFillColor("#9AA1B2"),c.drawShape(a,this,85,5,10,10))}a.setFillColor("#FFFFFD");a.setFontColor("#4E6B89");switch(d){case "todo":a.rect(b-45,5,40,20);a.fill();a.text(b-25,15,0,0,"TO DO",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);
break;case "inProgress":a.rect(b-85,5,80,20);a.fill();a.text(b-45,15,0,0,"IN PROGRESS",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);break;case "inReview":a.rect(b-75,5,70,20);a.fill();a.text(b-40,15,0,0,"IN REVIEW",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);break;case "done":a.rect(b-45,5,40,20);a.fill();a.text(b-25,15,0,0,"DONE",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);break;default:e=mxUtils.getValue(this.style,"issueStatusWidth",6.5*
d.length),a.rect(b-e-5,5,e,20),a.fill(),a.text(b-7,15,0,0,d,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)}};mxCellRenderer.registerShape(mxAtlassianJiraIssue.prototype.cst.ISSUE,mxAtlassianJiraIssue);function mxShapeBasicCross(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicCross,mxActor);mxShapeBasicCross.prototype.cst={CROSS:"mxgraph.basic.cross2"};
mxShapeBasicCross.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(.5*b+d,0);a.lineTo(.5*b+d,.5*c-d);a.lineTo(b,.5*c-d);a.lineTo(b,.5*c+d);a.lineTo(.5*b+d,.5*c+d);a.lineTo(.5*b+d,c);a.lineTo(.5*b-d,c);a.lineTo(.5*b-d,.5*c+d);a.lineTo(0,.5*c+d);a.lineTo(0,.5*c-d);a.lineTo(.5*b-d,.5*c-d);a.lineTo(.5*b-d,0);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeBasicCross.prototype.cst.CROSS,mxShapeBasicCross);mxShapeBasicCross.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+d.width/2+e,d.y+d.height/2-e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x-d.width/2)))/100})]};
function mxShapeBasicRectCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5}mxUtils.extend(mxShapeBasicRectCallout,mxActor);mxShapeBasicRectCallout.prototype.customProperties=[{name:"dx",dispName:"Callout Position",type:"float",min:0,defVal:30},{name:"dy",dispName:"Callout Size",type:"float",min:0,defVal:15}];mxShapeBasicRectCallout.prototype.cst={RECT_CALLOUT:"mxgraph.basic.rectCallout"};
mxShapeBasicRectCallout.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);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.begin();a.moveTo(d-.5*e,c-e);a.lineTo(0,c-e);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,c-e);a.lineTo(d+.5*e,c-e);a.lineTo(d-e,c);a.close();a.fillAndStroke()};
mxShapeBasicRectCallout.prototype.getLabelMargins=function(){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))*this.scale):null};mxCellRenderer.registerShape(mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT,mxShapeBasicRectCallout);
Graph.handleFactory[mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+d.height-b)},function(d,e){var b=.6*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));this.state.style.dx=Math.round(100*Math.max(b,Math.min(d.width-
b,e.x-d.x)))/100;this.state.style.dy=Math.round(Math.max(0,Math.min(d.height,d.y+d.height-e.y)))})]};
mxShapeBasicRectCallout.prototype.getConstraints=function(a,d,e){a=[];var 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))));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*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-c)));return a};
function mxShapeBasicRoundRectCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=this.dy=.5;this.size=10}mxUtils.extend(mxShapeBasicRoundRectCallout,mxActor);mxShapeBasicRoundRectCallout.prototype.cst={ROUND_RECT_CALLOUT:"mxgraph.basic.roundRectCallout"};mxShapeBasicRoundRectCallout.prototype.getLabelMargins=mxShapeBasicRectCallout.prototype.getLabelMargins;
mxShapeBasicRoundRectCallout.prototype.customProperties=[{name:"size",dispName:"Arc Size",type:"float",min:0,defVal:5},{name:"dx",dispName:"Callout Position",type:"float",min:0,defVal:30},{name:"dy",dispName:"Callout Size",type:"float",min:0,defVal:15}];
mxShapeBasicRoundRectCallout.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);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))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=Math.min((c-e)/2,b/2,f);d=Math.max(f+.5*e,d);d=Math.min(b-f-.5*e,d);a.begin();a.moveTo(d-.5*e,c-e);a.lineTo(f,c-e);a.arcTo(f,f,0,0,1,0,c-e-f);a.lineTo(0,f);a.arcTo(f,
f,0,0,1,f,0);a.lineTo(b-f,0);a.arcTo(f,f,0,0,1,b,f);a.lineTo(b,c-e-f);a.arcTo(f,f,0,0,1,b-f,c-e);a.lineTo(d+.5*e,c-e);a.arcTo(1.9*e,1.4*e,0,0,1,d-e,c);a.arcTo(.9*e,1.4*e,0,0,0,d-.5*e,c-e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RECT_CALLOUT,mxShapeBasicRoundRectCallout);mxShapeBasicRoundRectCallout.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RECT_CALLOUT]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+d.height-b)},function(d,e){var b=.6*parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));this.state.style.dx=Math.round(100*Math.max(b,
Math.min(d.width-b,e.x-d.x)))/100;this.state.style.dy=Math.round(Math.max(0,Math.min(d.height,d.y+d.height-e.y)))}),Graph.createHandle(a,["size"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(d.x+d.width-e,d.y+10)},function(d,e){var b=parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy));this.state.style.size=Math.round(100*Math.max(0,Math.min(d.width/2,(d.height-b)/2,d.x+d.width-e.x)))/100})]};
mxShapeBasicRoundRectCallout.prototype.getConstraints=function(a,d,e){a=[];var 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)))),f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=Math.min((e-c)/2,d/2,f);b=Math.max(f+.5*c,b);b=Math.min(d-f-.5*c,b);f<.25*d&&(a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,
0),!1)));f<.25*(e-c)&&(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(e-c))),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(e-c))),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-c))),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-c))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.293*f,.293*f));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,d-.293*f,.293*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.293*f,e-c-.293*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.293*f,e-c-.293*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-c,e));return a};
function mxShapeBasicWave(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeBasicWave,mxActor);mxShapeBasicWave.prototype.customProperties=[{name:"dy",dispName:"Wave Size",type:"float",min:0,max:1,defVal:.3}];mxShapeBasicWave.prototype.cst={WAVE:"mxgraph.basic.wave2"};
mxShapeBasicWave.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(0,d/2);a.quadTo(b/6,d*(1-1.4),b/3,d/2);a.quadTo(b/2,1.4*d,2*b/3,d/2);a.quadTo(5*b/6,d*(1-1.4),b,d/2);a.lineTo(b,c-d/2);a.quadTo(5*b/6,c-1.4*d,2*b/3,c-d/2);a.quadTo(b/2,c-d*(1-1.4),b/3,c-d/2);a.quadTo(b/6,c-1.4*d,0,c-d/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicWave.prototype.cst.WAVE,mxShapeBasicWave);
mxShapeBasicWave.prototype.constraints=null;Graph.handleFactory[mxShapeBasicWave.prototype.cst.WAVE]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+d.width/2,d.y+e*d.height)},function(d,e){this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(e.y-d.y)/d.height)))/100})]};
mxShapeBasicWave.prototype.getConstraints=function(a,d,e){a=[];var b=e*Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/6,.015*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/3,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.95*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.67*d,.5*b));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.83*d,.015*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.83*d,e-.95*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.67*d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e-.04*b));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/3,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d/6,e-.95*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};function mxShapeBasicOctagon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicOctagon,mxActor);
mxShapeBasicOctagon.prototype.customProperties=[{name:"dx",dispName:"Cutoff Size",type:"float",min:0,defVal:15}];mxShapeBasicOctagon.prototype.cst={OCTAGON:"mxgraph.basic.octagon2"};
mxShapeBasicOctagon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,0);a.lineTo(b-d,0);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(b-d,c);a.lineTo(d,c);a.lineTo(0,c-d);a.lineTo(0,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicOctagon.prototype.cst.OCTAGON,mxShapeBasicOctagon);mxShapeBasicOctagon.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicOctagon.prototype.cst.OCTAGON]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicOctagon.prototype.getConstraints=function(a,d,e){a=[];var b=2*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=.5*Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-b));return a};function mxShapeBasicIsoCube(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.isoAngle=15}mxUtils.extend(mxShapeBasicIsoCube,mxActor);mxShapeBasicIsoCube.prototype.customProperties=[{name:"isoAngle",dispName:"Perspective Angle",type:"float",min:0,defVal:15}];
mxShapeBasicIsoCube.prototype.cst={ISO_CUBE:"mxgraph.basic.isocube"};
mxShapeBasicIsoCube.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;d=Math.min(b*Math.tan(d),.5*c);a.begin();a.moveTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);a.lineTo(0,c-d);a.lineTo(0,d);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,d);a.lineTo(.5*b,2*d);a.lineTo(b,d);a.moveTo(.5*b,2*d);a.lineTo(.5*b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeBasicIsoCube.prototype.cst.ISO_CUBE,mxShapeBasicIsoCube);mxShapeBasicIsoCube.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicIsoCube.prototype.cst.ISO_CUBE]=function(a){return[Graph.createHandle(a,["isoAngle"],function(d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",this.isoAngle))))*Math.PI/200;return new mxPoint(d.x,d.y+Math.min(d.width*Math.tan(e),.5*d.height))},function(d,e){this.state.style.isoAngle=Math.round(100*Math.max(0,Math.min(100,e.y-d.y)))/100})]};
mxShapeBasicIsoCube.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;b=Math.min(d*Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};function mxShapeBasicTriangleAcute(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicTriangleAcute,mxActor);
mxShapeBasicTriangleAcute.prototype.customProperties=[{name:"dx",dispName:"Top",type:"float",min:0,max:1,defVal:.5}];mxShapeBasicTriangleAcute.prototype.cst={ACUTE_TRIANGLE:"mxgraph.basic.acute_triangle"};mxShapeBasicTriangleAcute.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(0,c);a.lineTo(d,0);a.lineTo(b,c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIANGLE,mxShapeBasicTriangleAcute);mxShapeBasicTriangleAcute.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIANGLE]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+10)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
mxShapeBasicTriangleAcute.prototype.getConstraints=function(a,d,e){a=[];var b=d*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));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,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-.5*(d-b),.5*e));return a};function mxShapeBasicTriangleObtuse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicTriangleObtuse,mxActor);mxShapeBasicTriangleObtuse.prototype.customProperties=[{name:"dx",dispName:"Bottom",type:"float",min:0,max:1,defVal:.25}];mxShapeBasicTriangleObtuse.prototype.cst={OBTUSE_TRIANGLE:"mxgraph.basic.obtuse_triangle"};
mxShapeBasicTriangleObtuse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(d,c);a.lineTo(0,0);a.lineTo(b,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRIANGLE,mxShapeBasicTriangleObtuse);mxShapeBasicTriangleObtuse.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRIANGLE]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+d.height-10)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
mxShapeBasicTriangleObtuse.prototype.getConstraints=function(a,d,e){a=[];var b=d*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+b),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,.5*e));return a};function mxShapeBasicDrop(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBasicDrop,mxActor);mxShapeBasicDrop.prototype.cst={DROP:"mxgraph.basic.drop"};
mxShapeBasicDrop.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*Math.min(c,b);e=c-d;var f=Math.atan(Math.sqrt(e*e-d*d)/d);e=d*Math.sin(f);f=d*Math.cos(f);a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b+e,c-d-f);a.arcTo(d,d,0,0,1,.5*b+d,c-d);a.arcTo(d,d,0,0,1,.5*b,c);a.arcTo(d,d,0,0,1,.5*b-d,c-d);a.arcTo(d,d,0,0,1,.5*b-e,c-d-f);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicDrop.prototype.cst.DROP,mxShapeBasicDrop);mxShapeBasicDrop.prototype.constraints=null;
function mxShapeBasicCone2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5;this.dy=.9}mxUtils.extend(mxShapeBasicCone2,mxActor);mxShapeBasicCone2.prototype.customProperties=[{name:"dx",dispName:"Top",type:"float",min:0,max:1,defVal:.5},{name:"dy",dispName:"Bottom",type:"float",min:0,max:1,defVal:.9}];mxShapeBasicCone2.prototype.cst={CONE2:"mxgraph.basic.cone2"};
mxShapeBasicCone2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=c-e;a.begin();a.moveTo(d,0);0<e?(a.lineTo(b,c-e),a.arcTo(.5*b,e,0,0,1,.5*b,c),a.arcTo(.5*b,e,0,0,1,0,c-e)):(a.lineTo(b,c),a.lineTo(0,c));a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicCone2.prototype.cst.CONE2,mxShapeBasicCone2);
mxShapeBasicCone2.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicCone2.prototype.cst.CONE2]=function(a){var d=[Graph.createHandle(a,["dx"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(e.x+b*e.width,e.y+10)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(b.x-e.x)/e.width)))/100})];a=Graph.createHandle(a,["dy"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+
10,e.y+b*e.height)},function(e,b){this.state.style.dy=Math.round(100*Math.max(0,Math.min(1,(b.y-e.y)/e.height)))/100});d.push(a);return d};
mxShapeBasicCone2.prototype.getConstraints=function(a,d,e){a=[];var b=d*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=e*Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c=e-c;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-
c));return a};function mxShapeBasicPyramid(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=.5;this.dx2=.6;this.dy1=.9;this.dy2=.8}mxUtils.extend(mxShapeBasicPyramid,mxActor);
mxShapeBasicPyramid.prototype.customProperties=[{name:"dx1",dispName:"Top",type:"float",min:0,max:1,defVal:.4},{name:"dx2",dispName:"Bottom",type:"float",min:0,max:1,defVal:.6},{name:"dy1",dispName:"Perspective Left",type:"float",min:0,max:1,defVal:.9},{name:"dy2",dispName:"Perspective Right",type:"float",min:0,max:1,defVal:.8}];mxShapeBasicPyramid.prototype.cst={PYRAMID:"mxgraph.basic.pyramid"};
mxShapeBasicPyramid.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));e=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));var f=c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),g=c*Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2))));a.begin();a.moveTo(d,0);a.lineTo(b,g);a.lineTo(e,c);a.lineTo(0,f);a.close();a.fillAndStroke();
a.setShadow(!1);a.begin();a.moveTo(d,0);a.lineTo(e,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBasicPyramid.prototype.cst.PYRAMID,mxShapeBasicPyramid);mxShapeBasicPyramid.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicPyramid.prototype.cst.PYRAMID]=function(a){var d=[Graph.createHandle(a,["dx1"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));return new mxPoint(b.x+c*b.width,b.y+10)},function(b,c){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(1,(c.x-b.x)/b.width)))/100})],e=Graph.createHandle(a,["dx2"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+
c*b.width,b.y+b.height-10)},function(b,c){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(1,(c.x-b.x)/b.width)))/100});d.push(e);e=Graph.createHandle(a,["dy1"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy1",this.dy1))));return new mxPoint(b.x+10,b.y+c*b.height)},function(b,c){this.state.style.dy1=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/100});d.push(e);a=Graph.createHandle(a,["dy2"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"dy2",this.dy2))));return new mxPoint(b.x+b.width-10,b.y+c*b.height)},function(b,c){this.state.style.dy2=Math.round(100*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/100});d.push(a);return d};
mxShapeBasicPyramid.prototype.getConstraints=function(a,d,e){a=[];var b=d*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),c=d*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),f=e*Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy1",this.dy1)))),g=e*Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy2",this.dy2))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d+b),.5*g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,g));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),.5*(e+g)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*(e+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.5*f));return a};
function mxShapeBasic4PointStar2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.8}mxUtils.extend(mxShapeBasic4PointStar2,mxActor);mxShapeBasic4PointStar2.prototype.customProperties=[{name:"dx",dispName:"Thickness",type:"float",min:0,max:1,defVal:.8}];mxShapeBasic4PointStar2.prototype.cst={FOUR_POINT_STAR_2:"mxgraph.basic.4_point_star_2"};
mxShapeBasic4PointStar2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(0,.5*c);a.lineTo(d*b,d*c);a.lineTo(.5*b,0);a.lineTo(b-d*b,d*c);a.lineTo(b,.5*c);a.lineTo(b-d*b,c-d*c);a.lineTo(.5*b,c);a.lineTo(d*b,c-d*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_STAR_2,mxShapeBasic4PointStar2);
mxShapeBasic4PointStar2.prototype.constraints=null;Graph.handleFactory[mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_STAR_2]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width/2,d.y+e*d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,2*(e.x-d.x)/d.width)))/100})]};
mxShapeBasic4PointStar2.prototype.getConstraints=function(a,d,e){a=[];d=.5*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(d,d),!1));a.push(new mxConnectionConstraint(new mxPoint(1-d,d),!1));a.push(new mxConnectionConstraint(new mxPoint(1-
d,1-d),!1));a.push(new mxConnectionConstraint(new mxPoint(d,1-d),!1));return a};function mxShapeBasicDiagSnipRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicDiagSnipRect,mxActor);mxShapeBasicDiagSnipRect.prototype.customProperties=[{name:"dx",dispName:"Snip",type:"float",min:0,deVal:6}];mxShapeBasicDiagSnipRect.prototype.cst={DIAG_SNIP_RECT:"mxgraph.basic.diag_snip_rect"};
mxShapeBasicDiagSnipRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,0);a.lineTo(b,0);a.lineTo(b,c-d);a.lineTo(b-d,c);a.lineTo(0,c);a.lineTo(0,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RECT,mxShapeBasicDiagSnipRect);mxShapeBasicDiagSnipRect.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RECT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicDiagSnipRect.prototype.getConstraints=function(a,d,e){a=[];var b=2*Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=.5*Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,e-b));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));return a};function mxShapeBasicDiagRoundRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicDiagRoundRect,mxActor);mxShapeBasicDiagRoundRect.prototype.customProperties=[{name:"dx",dispName:"Rounding Size",type:"float",min:0,defVal:6}];mxShapeBasicDiagRoundRect.prototype.cst={DIAG_ROUND_RECT:"mxgraph.basic.diag_round_rect"};
mxShapeBasicDiagRoundRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,0);a.lineTo(b,0);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(0,c);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_RECT,mxShapeBasicDiagRoundRect);
mxShapeBasicDiagRoundRect.prototype.constraints=null;Graph.handleFactory[mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_RECT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicDiagRoundRect.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!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));return a};
function mxShapeBasicCornerRoundRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicCornerRoundRect,mxActor);mxShapeBasicCornerRoundRect.prototype.customProperties=[{name:"dx",dispName:"Rounding Size",type:"float",min:0,defVal:6}];mxShapeBasicCornerRoundRect.prototype.cst={CORNER_ROUND_RECT:"mxgraph.basic.corner_round_rect"};
mxShapeBasicCornerRoundRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicCornerRoundRect.prototype.cst.CORNER_ROUND_RECT,mxShapeBasicCornerRoundRect);mxShapeBasicCornerRoundRect.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicCornerRoundRect.prototype.cst.CORNER_ROUND_RECT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicCornerRoundRect.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));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));return a};
function mxShapeBasicPlaque(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicPlaque,mxActor);mxShapeBasicPlaque.prototype.customProperties=[{name:"dx",dispName:"Cutoff Size",type:"float",min:0,defVal:6}];mxShapeBasicPlaque.prototype.cst={PLAQUE:"mxgraph.basic.plaque"};
mxShapeBasicPlaque.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(b-d,0);a.arcTo(d,d,0,0,0,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,0,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,0,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,0,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicPlaque.prototype.cst.PLAQUE,mxShapeBasicPlaque);
mxShapeBasicPlaque.prototype.constraints=null;Graph.handleFactory[mxShapeBasicPlaque.prototype.cst.PLAQUE]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+1.41*e,d.y+1.41*e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicPlaque.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxShapeBasicFrame(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicFrame,mxActor);
mxShapeBasicFrame.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",min:0,defVal:10}];mxShapeBasicFrame.prototype.cst={FRAME:"mxgraph.basic.frame"};
mxShapeBasicFrame.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.lineTo(0,0);a.close();a.moveTo(d,d);a.lineTo(d,c-d);a.lineTo(b-d,c-d);a.lineTo(b-d,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicFrame.prototype.cst.FRAME,mxShapeBasicFrame);mxShapeBasicFrame.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicFrame.prototype.cst.FRAME]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
mxShapeBasicFrame.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,0));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*e));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*e));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*(d-2*b)+b,b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(1.5*d-b),b));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,-b,b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-b,.25*(e-2*b)+b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,.75*(e-2*b)+b));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-b,-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*(d-2*b)+b,e-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*(d-2*b)+b,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,
1),!1,null,b,-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(e-2*b)+b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(e-2*b)+b));return a};function mxShapeBasicPlaqueFrame(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicPlaqueFrame,mxActor);
mxShapeBasicPlaqueFrame.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",mix:0,defVal:10}];mxShapeBasicPlaqueFrame.prototype.cst={PLAQUE_FRAME:"mxgraph.basic.plaque_frame"};
mxShapeBasicPlaqueFrame.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.25*b,.25*c,d);a.begin();a.moveTo(b-d,0);a.arcTo(d,d,0,0,0,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,0,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,0,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,0,d,0);a.close();a.moveTo(2*d,d);a.arcTo(2*d,2*d,0,0,1,d,2*d);a.lineTo(d,c-2*d);a.arcTo(2*d,2*d,0,0,1,2*d,c-d);a.lineTo(b-2*d,c-d);a.arcTo(2*d,2*d,0,
0,1,b-d,c-2*d);a.lineTo(b-d,2*d);a.arcTo(2*d,2*d,0,0,1,b-2*d,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME,mxShapeBasicPlaqueFrame);mxShapeBasicPlaqueFrame.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicPlaqueFrame.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1,null,-b,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b,0));return a};function mxShapeBasicRoundedFrame(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicRoundedFrame,mxActor);mxShapeBasicRoundedFrame.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",min:0,defVal:10}];
mxShapeBasicRoundedFrame.prototype.cst={ROUNDED_FRAME:"mxgraph.basic.rounded_frame"};
mxShapeBasicRoundedFrame.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.25*b,.25*c,d);a.begin();a.moveTo(b-2*d,0);a.arcTo(2*d,2*d,0,0,1,b,2*d);a.lineTo(b,c-2*d);a.arcTo(2*d,2*d,0,0,1,b-2*d,c);a.lineTo(2*d,c);a.arcTo(2*d,2*d,0,0,1,0,c-2*d);a.lineTo(0,2*d);a.arcTo(2*d,2*d,0,0,1,2*d,0);a.close();a.moveTo(2*d,d);a.arcTo(d,d,0,0,0,d,2*d);a.lineTo(d,c-2*d);a.arcTo(d,d,0,0,0,2*d,c-d);a.lineTo(b-2*
d,c-d);a.arcTo(d,d,0,0,0,b-d,c-2*d);a.lineTo(b-d,2*d);a.arcTo(d,d,0,0,0,b-2*d,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAME,mxShapeBasicRoundedFrame);mxShapeBasicRoundedFrame.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAME]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicRoundedFrame.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1,null,-b,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b,0));return a};function mxShapeBasicFrameCorner(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicFrameCorner,mxActor);mxShapeBasicFrameCorner.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",min:0,defVal:10}];mxShapeBasicFrameCorner.prototype.cst={FRAME_CORNER:"mxgraph.basic.frame_corner"};
mxShapeBasicFrameCorner.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b-d,d);a.lineTo(d,d);a.lineTo(d,c-d);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER,mxShapeBasicFrameCorner);mxShapeBasicFrameCorner.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
mxShapeBasicFrameCorner.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(.5*d,.5*e,b);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(1,0),!1,null,-b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-2*b)+b,b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-2*b)+b));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,b,-b));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxShapeBasicDiagStripe(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicDiagStripe,mxActor);
mxShapeBasicDiagStripe.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",mix:0,defVal:10}];mxShapeBasicDiagStripe.prototype.cst={DIAG_STRIPE:"mxgraph.basic.diag_stripe"};mxShapeBasicDiagStripe.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(b,c,d);a.begin();a.moveTo(0,c);a.lineTo(b,0);a.lineTo(b,Math.min(100*d/b,c));a.lineTo(Math.min(100*d/c,b),c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE,mxShapeBasicDiagStripe);mxShapeBasicDiagStripe.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+d.height)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
mxShapeBasicDiagStripe.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(d,e,b);a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*Math.min(100*b/d,e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,Math.min(100*
b/d,e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+Math.min(100*b/e,d)),.5*(Math.min(100*b/d,e)+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,Math.min(100*b/e,d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*Math.min(100*b/e,d),e));return a};function mxShapeBasicDonut(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicDonut,mxActor);
mxShapeBasicDonut.prototype.customProperties=[{name:"dx",dispName:"Width",type:"float",min:0,defVal:25}];mxShapeBasicDonut.prototype.cst={DONUT:"mxgraph.basic.donut"};
mxShapeBasicDonut.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(0,.5*c);a.arcTo(.5*b,.5*c,0,0,1,.5*b,0);a.arcTo(.5*b,.5*c,0,0,1,b,.5*c);a.arcTo(.5*b,.5*c,0,0,1,.5*b,c);a.arcTo(.5*b,.5*c,0,0,1,0,.5*c);a.close();a.moveTo(.5*b,d);a.arcTo(.5*b-d,.5*c-d,0,0,0,d,.5*c);a.arcTo(.5*b-d,.5*c-d,0,0,0,.5*b,c-d);a.arcTo(.5*b-d,.5*c-d,0,0,0,b-d,.5*c);a.arcTo(.5*b-d,.5*c-d,
0,0,0,.5*b,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicDonut.prototype.cst.DONUT,mxShapeBasicDonut);mxShapeBasicDonut.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
function mxShapeBasicLayeredRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicLayeredRect,mxActor);mxShapeBasicLayeredRect.prototype.customProperties=[{name:"dx",dispName:"Layer Distance",type:"float",mix:0,defVal:10}];mxShapeBasicLayeredRect.prototype.cst={LAYERED_RECT:"mxgraph.basic.layered_rect"};
mxShapeBasicLayeredRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,d);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(d,c);a.close();a.fillAndStroke();a.begin();a.moveTo(.5*d,.5*d);a.lineTo(b-.5*d,.5*d);a.lineTo(b-.5*d,c-.5*d);a.lineTo(.5*d,c-.5*d);a.close();a.fillAndStroke();a.begin();a.moveTo(0,0);a.lineTo(b-d,0);a.lineTo(b-d,c-d);a.lineTo(0,c-d);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT,mxShapeBasicLayeredRect);mxShapeBasicLayeredRect.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+d.width-e,d.y+d.height-e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,-e.x+d.width+d.x)))/100})]};
mxShapeBasicLayeredRect.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.min(.5*d,.5*e,b);a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*(d-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*(d-b),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),
!1,null,d-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.25*(e-b)+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(e-b)+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(e-b)+b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.75*(d-b)+b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-b)+b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*(d-b)+b,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,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,.5*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-b)));return a};function mxShapeBasicButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicButton,mxActor);mxShapeBasicButton.prototype.customProperties=[{name:"dx",dispName:"Button Height",type:"float",min:0,defVal:10}];mxShapeBasicButton.prototype.cst={BUTTON:"mxgraph.basic.button"};
mxShapeBasicButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.setLineJoin("round");a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(d,d);a.lineTo(d,c-d);a.close();a.fillAndStroke();a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b-d,d);a.lineTo(d,d);a.close();a.fillAndStroke();
a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(b-d,c-d);a.lineTo(b-d,d);a.close();a.fillAndStroke();a.begin();a.moveTo(0,c);a.lineTo(d,c-d);a.lineTo(b-d,c-d);a.lineTo(b,c);a.close();a.fillAndStroke();a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(d,d);a.lineTo(d,c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicButton.prototype.cst.BUTTON,mxShapeBasicButton);mxShapeBasicButton.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
function mxShapeBasicShadedButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicShadedButton,mxActor);mxShapeBasicShadedButton.prototype.customProperties=[{name:"dx",dispName:"Button Height",type:"float",min:0,defVal:10}];mxShapeBasicShadedButton.prototype.cst={SHADED_BUTTON:"mxgraph.basic.shaded_button"};
mxShapeBasicShadedButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setShadow(!1);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fill();a.setFillColor("#ffffff");a.setAlpha(.25);a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(d,d);a.lineTo(d,c-d);a.close();a.fill();a.setAlpha(.5);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b-d,d);a.lineTo(d,
d);a.close();a.fill();a.setFillColor("#000000");a.setAlpha(.25);a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(b-d,c-d);a.lineTo(b-d,d);a.close();a.fill();a.setAlpha(.5);a.begin();a.moveTo(0,c);a.lineTo(d,c-d);a.lineTo(b-d,c-d);a.lineTo(b,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON,mxShapeBasicShadedButton);mxShapeBasicShadedButton.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.x-d.x)))/100})]};
function mxShapeBasicPie(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75}mxUtils.extend(mxShapeBasicPie,mxActor);mxShapeBasicPie.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",type:"float",min:0,max:1,defVal:.2},{name:"endAngle",dispName:"End Angle",type:"float",min:0,max:1,defVal:.9}];mxShapeBasicPie.prototype.cst={PIE:"mxgraph.basic.pie"};
mxShapeBasicPie.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=2*Math.PI*f,k=2*Math.PI*g;d=.5*b;e=.5*c;var l=d+Math.sin(h)*d,m=e-Math.cos(h)*e,n=d+Math.sin(k)*d,p=e-Math.cos(k)*e;k-=h;0>k&&(k+=2*Math.PI);h=0;k>=Math.PI&&(h=1);a.begin();f%=1;g%=1;0==f&&.5==g?(a.moveTo(d,e),a.lineTo(l,m),a.arcTo(d,
e,0,0,1,b,.5*c),a.arcTo(d,e,0,0,1,.5*b,c)):.5==f&&0==g?(a.moveTo(d,e),a.lineTo(l,m),a.arcTo(d,e,0,0,1,0,.5*c),a.arcTo(d,e,0,0,1,.5*b,0)):(a.moveTo(d,e),a.lineTo(l,m),a.arcTo(d,e,0,h,1,n,p));a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicPie.prototype.cst.PIE,mxShapeBasicPie);mxShapeBasicPie.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(e){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(e.x+.5*e.width+Math.sin(b)*e.width*.5,e.y+.5*e.height-Math.cos(b)*e.height*.5)},function(e,b){e=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(b.x-e.x-.5*e.width)/(.5*e.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,(b.y-e.y-.5*e.height)/
(.5*e.height))))/100)/Math.PI;0>e&&(e=1+e);this.state.style.startAngle=e})];a=Graph.createHandle(a,["endAngle"],function(e){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(e.x+.5*e.width+Math.sin(b)*e.width*.5,e.y+.5*e.height-Math.cos(b)*e.height*.5)},function(e,b){e=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(b.x-e.x-.5*e.width)/(.5*e.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,(b.y-e.y-.5*e.height)/
(.5*e.height))))/100)/Math.PI;0>e&&(e=1+e);this.state.style.endAngle=e});d.push(a);return d};function mxShapeBasicArc(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75}mxUtils.extend(mxShapeBasicArc,mxActor);mxShapeBasicArc.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",type:"float",min:0,max:1,defVal:.3},{name:"endAngle",dispName:"End Angle",type:"float",min:0,max:1,defVal:.1}];
mxShapeBasicArc.prototype.cst={ARC:"mxgraph.basic.arc"};
mxShapeBasicArc.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=2*Math.PI*f,k=2*Math.PI*g;d=.5*b;e=.5*c;var l=d+Math.sin(h)*d,m=e-Math.cos(h)*e,n=d+Math.sin(k)*d,p=e-Math.cos(k)*e;k-=h;0>k&&(k+=2*Math.PI);h=0;k>Math.PI&&(h=1);a.begin();f%=1;g%=1;0==f&&.5==g?(a.moveTo(l,m),a.arcTo(d,e,0,0,1,
b,.5*c),a.arcTo(d,e,0,0,1,.5*b,c)):.5==f&&0==g?(a.moveTo(l,m),a.arcTo(d,e,0,0,1,0,.5*c),a.arcTo(d,e,0,0,1,.5*b,0)):(a.moveTo(l,m),a.arcTo(d,e,0,h,1,n,p));a.stroke()};mxCellRenderer.registerShape(mxShapeBasicArc.prototype.cst.ARC,mxShapeBasicArc);mxShapeBasicArc.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(e){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(e.x+.5*e.width+Math.sin(b)*e.width*.5,e.y+.5*e.height-Math.cos(b)*e.height*.5)},function(e,b){e=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(b.x-e.x-.5*e.width)/(.5*e.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,(b.y-e.y-.5*e.height)/
(.5*e.height))))/100)/Math.PI;0>e&&(e=1+e);this.state.style.startAngle=e})];a=Graph.createHandle(a,["endAngle"],function(e){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(e.x+.5*e.width+Math.sin(b)*e.width*.5,e.y+.5*e.height-Math.cos(b)*e.height*.5)},function(e,b){e=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(b.x-e.x-.5*e.width)/(.5*e.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,(b.y-e.y-.5*e.height)/
(.5*e.height))))/100)/Math.PI;0>e&&(e=1+e);this.state.style.endAngle=e});d.push(a);return d};function mxShapeBasicPartConcEllipse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeBasicPartConcEllipse,mxActor);
mxShapeBasicPartConcEllipse.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",type:"float",min:0,max:1,defVal:.25},{name:"endAngle",dispName:"End Angle",type:"float",min:0,max:1,defVal:.1},{name:"arcWidth",dispName:"Arc Width",type:"float",min:0,max:1,defVal:.5}];mxShapeBasicPartConcEllipse.prototype.cst={PART_CONC_ELLIPSE:"mxgraph.basic.partConcEllipse"};
mxShapeBasicPartConcEllipse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle))));d=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle))));var g=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));b*=.5;c*=.5;e=b*g;g*=c;var h=d-f;0>h?h+=2*Math.PI:h==Math.PI&&(d+=1E-5);var k=b+Math.sin(f)*b,l=c-Math.cos(f)*
c,m=b+Math.sin(f)*e;f=c-Math.cos(f)*g;var n=b+Math.sin(d)*b,p=c-Math.cos(d)*c,q=b+Math.sin(d)*e;d=c-Math.cos(d)*g;var t=0;h>=Math.PI&&(t=1);a.begin();a.moveTo(k,l);a.arcTo(b,c,0,t,1,n,p);a.lineTo(q,d);a.arcTo(e,g,0,t,0,m,f);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE,mxShapeBasicPartConcEllipse);mxShapeBasicPartConcEllipse.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.startAngle=b})],e=Graph.createHandle(a,["endAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.endAngle=b});d.push(e);a=Graph.createHandle(a,["arcWidth"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"arcWidth",this.arcWidth))));return new mxPoint(b.x+b.width/2,b.y+c*b.height*.5)},function(b,c){this.state.style.arcWidth=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,(c.y-b.y)/(.5*b.height))))/100});d.push(a);return d};
function mxShapeBasicNumEntryVert(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeBasicNumEntryVert,mxActor);mxShapeBasicNumEntryVert.prototype.cst={NUM_ENTRY_VERT:"mxgraph.basic.numberedEntryVert"};
mxShapeBasicNumEntryVert.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d=Math.min(d,b-10,c-5);a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(0,.5*d);a.lineTo(.5*b-.5*d-5,.5*d);a.arcTo(.5*d+5,.5*d+5,0,0,0,.5*b+.5*d+5,.5*d);a.lineTo(b,.5*d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT,mxShapeBasicNumEntryVert);
mxShapeBasicNumEntryVert.prototype.constraints=null;Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(d.width,d.width,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+d.width/2,d.y+e)},function(d,e){this.state.style.dy=Math.round(100*Math.max(0,Math.min(d.height,d.width,e.y-d.y)))/100})]};
function mxShapeBasicBendingArch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeBasicBendingArch,mxActor);mxShapeBasicBendingArch.prototype.cst={BENDING_ARCH:"mxgraph.basic.bendingArch"};
mxShapeBasicBendingArch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));d=.5*b;e=.5*c;var k=d*h;h*=e;var l=d+Math.sin(f)*d,m=e-Math.cos(f)*e,n=d+Math.sin(f)*k,p=e-Math.cos(f)*h,q=
d+Math.sin(g)*d,t=e-Math.cos(g)*e,u=d+Math.sin(g)*k,v=e-Math.cos(g)*h;g-=f;0>g&&(g+=2*Math.PI);f=0;g>Math.PI&&(f=1);g=k-5;var r=h-5;a.ellipse(.5*b-g,.5*c-r,2*g,2*r);a.fillAndStroke();a.begin();a.moveTo(l,m);a.arcTo(d,e,0,f,1,q,t);a.lineTo(u,v);a.arcTo(k,h,0,f,0,n,p);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH,mxShapeBasicBendingArch);mxShapeBasicBendingArch.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.startAngle=b})],e=Graph.createHandle(a,["endAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.endAngle=b});d.push(e);a=Graph.createHandle(a,["arcWidth"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"arcWidth",this.arcWidth))));return new mxPoint(b.x+b.width/2,b.y+c*b.height*.5)},function(b,c){this.state.style.arcWidth=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,(c.y-b.y)/(.5*b.height))))/100});d.push(a);return d};
function mxShapeBasicThreeCornerRoundRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicThreeCornerRoundRect,mxActor);mxShapeBasicThreeCornerRoundRect.prototype.customProperties=[{name:"dx",dispName:"Rounding Size",type:"float",min:0,defVal:6}];mxShapeBasicThreeCornerRoundRect.prototype.cst={THREE_CORNER_ROUND_RECT:"mxgraph.basic.three_corner_round_rect"};
mxShapeBasicThreeCornerRoundRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=2*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.min(.5*b,.5*c,d);a.begin();a.moveTo(d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(0,c);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBasicThreeCornerRoundRect.prototype.cst.THREE_CORNER_ROUND_RECT,mxShapeBasicThreeCornerRoundRect);
mxShapeBasicThreeCornerRoundRect.prototype.constraints=null;Graph.handleFactory[mxShapeBasicThreeCornerRoundRect.prototype.cst.THREE_CORNER_ROUND_RECT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/4,d.width/4,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+e)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.height/4,d.width/4,e.x-d.x)))/100})]};
mxShapeBasicThreeCornerRoundRect.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!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));return a};
function mxShapeBasicPolygon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=this.dx=.5}mxUtils.extend(mxShapeBasicPolygon,mxActor);mxShapeBasicPolygon.prototype.customProperties=[{name:"polyline",dispName:"Polyline",type:"bool",defVal:!1}];mxShapeBasicPolygon.prototype.cst={POLYGON:"mxgraph.basic.polygon"};
mxShapeBasicPolygon.prototype.paintVertexShape=function(a,d,e,b,c){try{a.translate(d,e);var f=JSON.parse(mxUtils.getValue(this.state.style,"polyCoords","[]")),g=mxUtils.getValue(this.style,"polyline",!1);if(0<f.length){a.begin();a.moveTo(f[0][0]*b,f[0][1]*c);for(d=1;d<f.length;d++)a.lineTo(f[d][0]*b,f[d][1]*c);0==g&&a.close();a.end();a.fillAndStroke()}}catch(h){}};mxCellRenderer.registerShape(mxShapeBasicPolygon.prototype.cst.POLYGON,mxShapeBasicPolygon);
mxShapeBasicPolygon.prototype.constraints=null;
Graph.handleFactory[mxShapeBasicPolygon.prototype.cst.POLYGON]=function(a){var d=[];try{for(var e=JSON.parse(mxUtils.getValue(a.style,"polyCoords","[]")),b=0;b<e.length;b++)(function(c){d.push(Graph.createHandle(a,["polyCoords"],function(f){return new mxPoint(f.x+e[c][0]*f.width,f.y+e[c][1]*f.height)},function(f,g){e[c]=[Math.round(100*Math.max(0,Math.min(1,(g.x-f.x)/f.width)))/100,Math.round(100*Math.max(0,Math.min(1,(g.y-f.y)/f.height)))/100];a.style.polyCoords=JSON.stringify(e)},!1))})(b)}catch(c){}return d};
function mxShapeBasicPatternFillRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeBasicPatternFillRect,mxActor);mxShapeBasicPatternFillRect.prototype.cst={PATTERN_FILL_RECT:"mxgraph.basic.patternFillRect"};
mxShapeBasicPatternFillRect.prototype.customProperties=[{name:"step",dispName:"Fill Step",type:"float",min:0,defVal:5},{name:"fillStyle",dispName:"Fill Style",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"diag",dispName:"Diagonal"},{val:"diagRev",dispName:"Diagonal Reverse"},{val:"vert",dispName:"Vertical"},{val:"hor",dispName:"Horizontal"},{val:"grid",dispName:"Grid"},{val:"diagGrid",dispName:"Diagonal Grid"}]},{name:"fillStrokeWidth",dispName:"Fill Stroke Width",type:"float",
min:0,defVal:1},{name:"fillStrokeColor",dispName:"Fill Stroke Color",type:"color",defVal:"#cccccc"},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0}];
mxShapeBasicPatternFillRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"strokeColor","#000000");e=mxUtils.getValue(this.style,"strokeWidth","1");a.rect(0,0,b,c);a.fill();var f=mxUtils.getValue(this.style,"fillStrokeColor","#cccccc"),g=parseFloat(mxUtils.getValue(this.style,"fillStrokeWidth",1));a.setStrokeColor(f);a.setStrokeWidth(g);f=parseFloat(mxUtils.getValue(this.style,"step",5));g=mxUtils.getValue(this.style,"fillStyle","none");if("diag"==g||
"diagGrid"==g){f*=1.41;var h=0;for(a.begin();h<c+b;)h<=c?a.moveTo(0,h):a.moveTo(h-c,c),h<=b?a.lineTo(h,0):a.lineTo(b,h-b),h+=f;a.stroke()}else if("vert"==g||"grid"==g){a.begin();for(h=0;h<=b;)a.moveTo(h,0),a.lineTo(h,c),h+=f;a.stroke()}if("diagRev"==g||"diagGrid"==g){"diagRev"==g&&(f*=1.41);h=0;for(a.begin();h<c+b;)h<=c?(a.moveTo(b,h),h<=b?a.lineTo(b-h,0):a.lineTo(b-b,h-b)):(a.moveTo(b-h+c,c),h<=b?a.lineTo(b-h,0):a.lineTo(0,h-b)),h+=f;a.stroke()}else if("hor"==g||"grid"==g){a.begin();for(h=0;h<=c;)a.moveTo(0,
h),a.lineTo(b,h),h+=f;a.stroke()}a.setStrokeColor(d);a.setStrokeWidth(e);a.begin();a.moveTo(0,0);"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b,0):a.moveTo(b,0);"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b,c):a.moveTo(b,c);"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(0,c):a.moveTo(0,c);"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(0,0);a.end();a.stroke()};mxCellRenderer.registerShape(mxShapeBasicPatternFillRect.prototype.cst.PATTERN_FILL_RECT,mxShapeBasicPatternFillRect);
mxShapeBasicPatternFillRect.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.25),!1));return a};function mxShapeBootstrapRRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRRect,mxShape);mxShapeBootstrapRRect.prototype.cst={PACKAGE:"mxgraph.bootstrap.rrect",R_SIZE:"rSize"};mxShapeBootstrapRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeBootstrapRRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapRRect.prototype.cst.R_SIZE,"10"));a.roundrect(0,0,b,c,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapRRect.prototype.cst.PACKAGE,mxShapeBootstrapRRect);function mxShapeBootstrapTopButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapTopButton,mxShape);
mxShapeBootstrapTopButton.prototype.cst={TOP_BUTTON:"mxgraph.bootstrap.topButton",R_SIZE:"rSize"};mxShapeBootstrapTopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeBootstrapTopButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapTopButton.prototype.cst.TOP_BUTTON,mxShapeBootstrapTopButton);
function mxShapeBootstrapBottomButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapBottomButton,mxShape);mxShapeBootstrapBottomButton.prototype.cst={BOTTOM_BUTTON:"mxgraph.bootstrap.bottomButton",R_SIZE:"rSize"};mxShapeBootstrapBottomButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeBootstrapBottomButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapBottomButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapBottomButton.prototype.cst.BOTTOM_BUTTON,mxShapeBootstrapBottomButton);
function mxShapeBootstrapRightButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRightButton,mxShape);mxShapeBootstrapRightButton.prototype.cst={RIGHT_BUTTON:"mxgraph.bootstrap.rightButton",R_SIZE:"rSize"};mxShapeBootstrapRightButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeBootstrapRightButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapRightButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(0,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapRightButton.prototype.cst.RIGHT_BUTTON,mxShapeBootstrapRightButton);
function mxShapeBootstrapLeftButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapLeftButton,mxShape);mxShapeBootstrapLeftButton.prototype.cst={LEFT_BUTTON:"mxgraph.bootstrap.leftButton",R_SIZE:"rSize"};mxShapeBootstrapLeftButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}];
mxShapeBootstrapLeftButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapLeftButton.prototype.cst.R_SIZE,"10"));a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapLeftButton.prototype.cst.LEFT_BUTTON,mxShapeBootstrapLeftButton);
function mxShapeBootstrapLeftButtonStriped(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapLeftButtonStriped,mxShape);mxShapeBootstrapLeftButtonStriped.prototype.cst={LEFT_BUTTON_STRIPED:"mxgraph.bootstrap.leftButtonStriped"};
mxShapeBootstrapLeftButtonStriped.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);rSize=5;a.begin();a.moveTo(b,0);a.lineTo(b,c);a.lineTo(rSize,c);a.arcTo(rSize,rSize,0,0,1,0,c-rSize);a.lineTo(0,rSize);a.arcTo(rSize,rSize,0,0,1,rSize,0);a.close();a.fill();a.setAlpha("0.2");d=.5*c;a.setFillColor("#ffffff");a.begin();a.moveTo(0,.75*c);a.lineTo(0,.25*c);a.lineTo(.75*c,c);a.lineTo(.25*c,c);a.close();a.fill();e=!1;for(var f=.5*d;!e;)a.begin(),a.moveTo(f,0),f+d>=b?(a.lineTo(b,0),a.lineTo(b,
b-f)):(a.lineTo(f+d,0),f+d+c>b?(a.lineTo(b,b-f-d),b-f>c?(a.lineTo(b,c),a.lineTo(f+c,c)):a.lineTo(b,b-f)):(a.lineTo(f+d+c,c),a.lineTo(f+c,c))),a.close(),a.fill(),f+=2*d,f>b&&(e=!0)};mxCellRenderer.registerShape(mxShapeBootstrapLeftButtonStriped.prototype.cst.LEFT_BUTTON_STRIPED,mxShapeBootstrapLeftButtonStriped);function mxShapeBootstrapRoundedButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRoundedButton,mxShape);
mxShapeBootstrapRoundedButton.prototype.cst={ROUNDED_BUTTON:"mxgraph.bootstrap.roundedButton"};mxShapeBootstrapRoundedButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b>c?(d=.5*c,a.begin(),a.moveTo(b-d,0),a.arcTo(d,d,0,0,1,b-d,c),a.lineTo(d,c),a.arcTo(d,d,0,0,1,d,0)):(d=.5*b,a.begin(),a.moveTo(0,c-d),a.arcTo(d,d,0,0,0,b,c-d),a.lineTo(b,d),a.arcTo(d,d,0,0,0,0,d));a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeBootstrapRoundedButton.prototype.cst.ROUNDED_BUTTON,mxShapeBootstrapRoundedButton);function mxShapeBootstrapArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapArrow,mxShape);mxShapeBootstrapArrow.prototype.cst={ARROW:"mxgraph.bootstrap.arrow"};
mxShapeBootstrapArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(.9*b,0);a.lineTo(b,.5*c);a.lineTo(.9*b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapArrow.prototype.cst.ARROW,mxShapeBootstrapArrow);function mxShapeBootstrapTabTop(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapTabTop,mxShape);
mxShapeBootstrapTabTop.prototype.cst={TAB_TOP:"mxgraph.bootstrap.tabTop",R_SIZE:"rSize"};mxShapeBootstrapTabTop.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}];
mxShapeBootstrapTabTop.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10"));e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.setStrokeColor(f);a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setStrokeColor(e);
a.begin();a.moveTo(0,c);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapTabTop.prototype.cst.TAB_TOP,mxShapeBootstrapTabTop);function mxShapeBootstrapImage(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapImage,mxShape);mxShapeBootstrapImage.prototype.cst={IMAGE:"mxgraph.bootstrap.image",R_SIZE:"rSize"};
mxShapeBootstrapImage.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}];
mxShapeBootstrapImage.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10")));mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.begin();a.moveTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-d);a.arcTo(d,d,0,0,1,b-d,c);a.lineTo(d,c);a.arcTo(d,d,0,0,1,0,c-d);a.close();
a.stroke();e=.5*d;a.translate(e,e);b=Math.max(0,b-d);c=Math.max(0,c-d);a.begin();a.moveTo(0,e);a.arcTo(e,e,0,0,1,e,0);a.lineTo(b-e,0);a.arcTo(e,e,0,0,1,b,e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapImage.prototype.cst.IMAGE,mxShapeBootstrapImage);function mxShapeBootstrapCheckbox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeBootstrapCheckbox,mxShape);mxShapeBootstrapCheckbox.prototype.cst={CHECKBOX:"mxgraph.bootstrap.checkbox"};mxShapeBootstrapCheckbox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b,c,3,3);a.fillAndStroke();a.setStrokeWidth("3");a.begin();a.moveTo(.8*b,.2*c);a.lineTo(.4*b,.8*c);a.lineTo(.25*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapCheckbox.prototype.cst.CHECKBOX,mxShapeBootstrapCheckbox);
function mxShapeBootstrapCheckbox2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapCheckbox2,mxShape);mxShapeBootstrapCheckbox2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}];
mxShapeBootstrapCheckbox2.prototype.cst={CHECKBOX2:"mxgraph.bootstrap.checkbox2"};
mxShapeBootstrapCheckbox2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"checked",!1),g=mxUtils.getValue(this.style,"checkedFill","#ffffff"),h=mxUtils.getValue(this.style,"checkedStroke","#000000");a.translate(d,e);f?(a.setFillColor(g),a.setStrokeColor(h),a.roundrect(0,0,b,c,2,2),a.fill(),a.setStrokeWidth("2"),a.begin(),a.moveTo(.8*b,.2*c),a.lineTo(.4*b,.75*c),a.lineTo(.25*b,.6*c),a.stroke()):(a.roundrect(0,0,b,c,2,2),a.fillAndStroke())};
mxCellRenderer.registerShape(mxShapeBootstrapCheckbox2.prototype.cst.CHECKBOX2,mxShapeBootstrapCheckbox2);function mxShapeBootstrapRadioButton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRadioButton,mxShape);mxShapeBootstrapRadioButton.prototype.cst={RADIO_BUTTON:"mxgraph.bootstrap.radioButton"};
mxShapeBootstrapRadioButton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.ellipse(0,0,b,c);a.fillAndStroke();a.setFillColor(d);a.ellipse(.25*b,.25*c,.5*b,.5*c);a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapRadioButton.prototype.cst.RADIO_BUTTON,mxShapeBootstrapRadioButton);
function mxShapeBootstrapRadioButton2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRadioButton2,mxShape);mxShapeBootstrapRadioButton2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}];
mxShapeBootstrapRadioButton2.prototype.cst={RADIO_BUTTON2:"mxgraph.bootstrap.radioButton2"};
mxShapeBootstrapRadioButton2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"checked",!1),g=mxUtils.getValue(this.style,"checkedFill","#ffffff"),h=mxUtils.getValue(this.style,"checkedStroke","#000000");a.translate(d,e);f?(a.setFillColor(g),a.setStrokeColor(g),a.ellipse(0,0,b,c),a.fillAndStroke(),a.setFillColor(h),a.ellipse(.2*b,.2*c,.6*b,.6*c),a.fill()):(a.ellipse(0,0,b,c),a.fillAndStroke())};
mxCellRenderer.registerShape(mxShapeBootstrapRadioButton2.prototype.cst.RADIO_BUTTON2,mxShapeBootstrapRadioButton2);function mxShapeBootstrapHorLines(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapHorLines,mxShape);mxShapeBootstrapHorLines.prototype.cst={HOR_LINES:"mxgraph.bootstrap.horLines"};
mxShapeBootstrapHorLines.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fill();a.begin();a.moveTo(0,0);a.lineTo(b,0);a.moveTo(0,c);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapHorLines.prototype.cst.HOR_LINES,mxShapeBootstrapHorLines);function mxShapeBootstrapUserTwo(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapUserTwo,mxShape);
mxShapeBootstrapUserTwo.prototype.cst={USER2:"mxgraph.bootstrap.user2"};
mxShapeBootstrapUserTwo.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.95*c);a.arcTo(.3*b,.3*c,0,0,1,.02*b,.87*c);a.arcTo(.1*b,.1*c,0,0,1,.08*b,.812*c);a.arcTo(3*b,3*c,0,0,1,.29*b,.732*c);a.arcTo(.15*b,.15*c,0,0,0,.385*b,.607*c);a.arcTo(.11*b,.11*c,0,0,0,.355*b,.53*c);a.arcTo(.3*b,.3*c,0,0,1,.305*b,.44*c);a.arcTo(.33*b,.38*c,0,0,1,.312*b,.15*c);a.arcTo(.218*b,.218*c,0,0,1,.688*b,.15*c);a.arcTo(.33*b,.38*c,0,0,1,.693*b,.44*c);a.arcTo(.25*b,.25*c,0,0,1,.645*b,
.53*c);a.arcTo(.1*b,.1*c,0,0,0,.612*b,.6*c);a.arcTo(.15*b,.15*c,0,0,0,.7*b,.726*c);a.arcTo(3*b,3*c,0,0,1,.92*b,.812*c);a.arcTo(.1*b,.1*c,0,0,1,.97*b,.865*c);a.arcTo(.2*b,.2*c,0,0,1,.995*b,.952*c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapUserTwo.prototype.cst.USER2,mxShapeBootstrapUserTwo);function mxShapeBootstrapRating(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapRating,mxShape);
mxShapeBootstrapRating.prototype.cst={RATING:"mxgraph.bootstrap.rating",RATING_STYLE:"ratingStyle",RATING_SCALE:"ratingScale",RATING_HEART:"heart",RATING_STAR:"star",EMPTY_FILL_COLOR:"emptyFillColor",GRADE:"grade"};
mxShapeBootstrapRating.prototype.customProperties=[{name:"ratingStyle",dispName:"Rating Style",type:"enum",enumList:[{val:"heart",dispName:"Heart"},{val:"star",dispName:"Star"}]},{name:"ratingScale",dispName:"Rating Scale",type:"int",min:1,defVal:5},{name:"emptyFillColor",dispName:"Inactive Color",type:"color",defVal:"none"},{name:"grade",dispName:"Grade",type:"int",min:1,defVal:3}];
mxShapeBootstrapRating.prototype.paintVertexShape=function(a,d,e,b,c){b=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.RATING_STYLE,mxShapeBootstrapRating.prototype.cst.RATING_STAR);var f=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.GRADE,"5"),g=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.RATING_SCALE,"10");a.translate(d,e);if(b===mxShapeBootstrapRating.prototype.cst.RATING_STAR)for(d=0;d<f;d++)a.begin(),a.moveTo(d*c*1.2,.33*c),a.lineTo(d*
c*1.2+.364*c,.33*c),a.lineTo(d*c*1.2+.475*c,0),a.lineTo(d*c*1.2+.586*c,.33*c),a.lineTo(d*c*1.2+.95*c,.33*c),a.lineTo(d*c*1.2+.66*c,.551*c),a.lineTo(d*c*1.2+.775*c,.9*c),a.lineTo(d*c*1.2+.475*c,.684*c),a.lineTo(d*c*1.2+.175*c,.9*c),a.lineTo(d*c*1.2+.29*c,.551*c),a.close(),a.fillAndStroke();else if(b===mxShapeBootstrapRating.prototype.cst.RATING_HEART)for(d=0;d<f;d++)a.begin(),a.moveTo(d*c*1.2+.519*c,.947*c),a.curveTo(d*c*1.2+.558*c,.908*c,d*c*1.2+.778*c,.682*c,d*c*1.2+.916*c,.54*c),a.curveTo(d*c*1.2+
1.039*c,.414*c,d*c*1.2+1.036*c,.229*c,d*c*1.2+.924*c,.115*c),a.curveTo(d*c*1.2+.812*c,0,d*c*1.2+.631*c,0,d*c*1.2+.519*c,.115*c),a.curveTo(d*c*1.2+.408*c,0,d*c*1.2+.227*c,0,d*c*1.2+.115*c,.115*c),a.curveTo(d*c*1.2+.03*c,.229*c,d*c*1.2,.414*c,d*c*1.2+.123*c,.54*c),a.close(),a.fillAndStroke();d=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.EMPTY_FILL_COLOR,"#ffffff");a.setFillColor(d);if(b===mxShapeBootstrapRating.prototype.cst.RATING_STAR)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.2,
.33*c),a.lineTo(d*c*1.2+.364*c,.33*c),a.lineTo(d*c*1.2+.475*c,0),a.lineTo(d*c*1.2+.586*c,.33*c),a.lineTo(d*c*1.2+.95*c,.33*c),a.lineTo(d*c*1.2+.66*c,.551*c),a.lineTo(d*c*1.2+.775*c,.9*c),a.lineTo(d*c*1.2+.475*c,.684*c),a.lineTo(d*c*1.2+.175*c,.9*c),a.lineTo(d*c*1.2+.29*c,.551*c),a.close(),a.fillAndStroke();else if(b===mxShapeBootstrapRating.prototype.cst.RATING_HEART)for(d=f;d<g;d++)a.begin(),a.moveTo(d*c*1.2+.519*c,.947*c),a.curveTo(d*c*1.2+.558*c,.908*c,d*c*1.2+.778*c,.682*c,d*c*1.2+.916*c,.54*
c),a.curveTo(d*c*1.2+1.039*c,.414*c,d*c*1.2+1.036*c,.229*c,d*c*1.2+.924*c,.115*c),a.curveTo(d*c*1.2+.812*c,0,d*c*1.2+.631*c,0,d*c*1.2+.519*c,.115*c),a.curveTo(d*c*1.2+.408*c,0,d*c*1.2+.227*c,0,d*c*1.2+.115*c,.115*c),a.curveTo(d*c*1.2+.03*c,.229*c,d*c*1.2,.414*c,d*c*1.2+.123*c,.54*c),a.close(),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeBootstrapRating.prototype.cst.RATING,mxShapeBootstrapRating);function mxShapeBoostrapAnchor(a,d,e,b){mxShape.call(this);this.bounds=a}
mxUtils.extend(mxShapeBoostrapAnchor,mxShape);mxShapeBoostrapAnchor.prototype.cst={ANCHOR:"mxgraph.bootstrap.anchor"};mxShapeBoostrapAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeBoostrapAnchor.prototype.cst.ANCHOR,mxShapeBoostrapAnchor);function mxShapeBootstrapRangeInput(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}mxUtils.extend(mxShapeBootstrapRangeInput,mxShape);
mxShapeBootstrapRangeInput.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3},{name:"rangeStyle",dispName:"Range Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"rounded",dispName:"Rounded"}]},{name:"handleStyle",dispName:"Handle Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"circle",dispName:"Circle"}]}];mxShapeBootstrapRangeInput.prototype.cst={RANGE_INPUT:"mxgraph.bootstrap.rangeInput"};
mxShapeBootstrapRangeInput.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=mxUtils.getValue(this.style,"gradientColor","none"),h=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),k=mxUtils.getValue(this.state.style,"strokeColor","#000000"),l=mxUtils.getValue(this.state.style,"gradientDirection","south"),m=mxUtils.getValue(this.state.style,"rangeStyle","rounded"),n=mxUtils.getValue(this.state.style,"handleStyle",
"circle"),p=Math.min(.5*c,.5*b),q=.5*p;a.translate(d,e);if("rect"==m){var t=d=parseFloat(mxUtils.getValue(this.style,"opacity","100")),u=d;"none"==h&&(t=0);"none"==g&&(u=0);a.setGradient(h,h,0,0,b,c,l,t,u);a.rect(0,.5*c-2,b,4);a.fill()}else"rounded"==m&&(a.begin(),a.moveTo(0,.5*c),a.arcTo(q,q,0,0,1,q,.5*c-q),a.lineTo(b-q,.5*c-q),a.arcTo(q,q,0,0,1,b,.5*c),a.arcTo(q,q,0,0,1,b-q,.5*c+q),a.lineTo(q,.5*c+q),a.arcTo(q,q,0,0,1,0,.5*c),a.close(),a.fill());"rect"==n?(a.setGradient(h,g,0,0,b,c,l,t,u),b=.5*
c,a.rect(f-.5*b,0,b,c),a.fillAndStroke(),a.begin(),a.moveTo(f-.25*b,.3*c),a.lineTo(f+.25*b,.3*c),a.moveTo(f-.25*b,.5*c),a.lineTo(f+.25*b,.5*c),a.moveTo(f-.25*b,.7*c),a.lineTo(f+.25*b,.7*c),a.stroke()):"circle"==n&&(a.setFillColor(k),a.ellipse(f-p,0,2*p,2*p),a.fill())};mxCellRenderer.registerShape(mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT,mxShapeBootstrapRangeInput);mxShapeBootstrapRangeInput.prototype.constraints=null;
Graph.handleFactory[mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};
function mxShapeBootstrapSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapSwitch,mxShape);mxShapeBootstrapSwitch.prototype.customProperties=[{name:"buttonState",dispName:"Button State",type:"bool",defVal:!0},{name:"onStrokeColor",dispName:"On Stroke Color",type:"color"},{name:"onFillColor",dispName:"On Fill Color",type:"color"}];mxShapeBootstrapSwitch.prototype.cst={SHAPE_SWITCH:"mxgraph.bootstrap.switch"};
mxShapeBootstrapSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b=Math.max(b,2*c);var f=mxUtils.getValue(this.style,"buttonState",!0);this.background(a,d,e,b,c,f);a.setShadow(!1);this.foreground(a,d,e,b,c,f)};
mxShapeBootstrapSwitch.prototype.background=function(a,d,e,b,c,f){1==f?(a.setStrokeColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),a.setFillColor(mxUtils.getValue(this.style,"onFillColor","#0085FC")),a.roundrect(0,0,b,c,.5*c,.5*c),a.fill()):(a.roundrect(0,0,b,c,.5*c,.5*c),a.fillAndStroke())};
mxShapeBootstrapSwitch.prototype.foreground=function(a,d,e,b,c,f){d=.8*c;1==f?(a.setFillColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),a.ellipse(b-.9*c,.1*c,d,d)):(a.setFillColor(mxUtils.getValue(this.style,"strokeColor","#000000")),a.ellipse(.1*c,.1*c,d,d));a.fill()};mxCellRenderer.registerShape(mxShapeBootstrapSwitch.prototype.cst.SHAPE_SWITCH,mxShapeBootstrapSwitch);
function mxShapeBootstrapX(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeBootstrapX,mxShape);mxShapeBootstrapX.prototype.cst={SHAPE_X:"mxgraph.bootstrap.x"};mxShapeBootstrapX.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,c);a.moveTo(b,0);a.lineTo(0,c);a.stroke()};mxCellRenderer.registerShape(mxShapeBootstrapX.prototype.cst.SHAPE_X,mxShapeBootstrapX);
function mxShapeInfographicPopover(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicPopover,mxActor);mxShapeInfographicPopover.prototype.cst={SHAPE_POPOVER:"mxgraph.bootstrap.popover"};
mxShapeInfographicPopover.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10},{name:"dx",dispName:"Callout Position",min:0,defVal:100},{name:"dy",dispName:"Callout Size",min:0,defVal:30}];
mxShapeInfographicPopover.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,"rSize","10"));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),g=Math.max(e-f,0),h=Math.min(e+f,b);a.begin();a.moveTo(d,0);a.lineTo(b-d,0);a.arcTo(d,d,0,0,1,b,d);a.lineTo(b,c-f-d);a.arcTo(d,d,0,0,1,b-d,c-f);a.lineTo(h,c-f);a.lineTo(e,c);a.lineTo(g,c-f);a.lineTo(d,
c-f);a.arcTo(d,d,0,0,1,0,c-f-d);a.lineTo(0,d);a.arcTo(d,d,0,0,1,d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER,mxShapeInfographicPopover);mxShapeInfographicPopover.prototype.constraints=null;
Graph.handleFactory[mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+d.height-b)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,
Math.min(d.height,d.y+d.height-e.y)))/100})]};
mxShapeInfographicPopover.prototype.getConstraints=function(a,d,e){a=[];var 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))));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*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));return a};
function mxShapeC4Person(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4Person,mxShape);mxShapeC4Person.prototype.cst={PERSONSHAPE:"mxgraph.c4.person"};
mxShapeC4Person.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(b/2,c/3);e=d/2;a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(0,.8*d+e);a.arcTo(e,e,0,0,1,e,.8*d);a.lineTo(b-e,.8*d);a.arcTo(e,e,0,0,1,b,.8*d+e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke()};
mxShapeC4Person.prototype.getLabelMargins=function(a){return new mxRectangle(0,.8*Math.min(a.width/2,a.height/3),0,0)};mxCellRenderer.registerShape(mxShapeC4Person.prototype.cst.PERSONSHAPE,mxShapeC4Person);function mxShapeC4Person2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4Person2,mxShape);mxShapeC4Person2.prototype.cst={PERSONSHAPE:"mxgraph.c4.person2"};
mxShapeC4Person2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(.45*b,.45*c);e=d/2;a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(0,.8*d+e);a.arcTo(e,e,0,0,1,e,.8*d);a.lineTo(b-e,.8*d);a.arcTo(e,e,0,0,1,b,.8*d+e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke()};
mxShapeC4Person2.prototype.getLabelMargins=function(a){return new mxRectangle(0,.8*Math.min(.45*a.width,.45*a.height),0,0)};mxCellRenderer.registerShape(mxShapeC4Person2.prototype.cst.PERSONSHAPE,mxShapeC4Person2);function mxShapeC4WebBrowserContainer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4WebBrowserContainer,mxShape);mxShapeC4WebBrowserContainer.prototype.cst={WEB_BROWSER_CONTAINER_SHAPE:"mxgraph.c4.webBrowserContainer"};
mxShapeC4WebBrowserContainer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,8);a.arcTo(8,8,0,0,1,8,0);a.lineTo(b-8,0);a.arcTo(8,8,0,0,1,b,8);a.lineTo(b,c-8);a.arcTo(8,8,0,0,1,b-8,c);a.lineTo(8,c);a.arcTo(8,8,0,0,1,0,c-8);a.close();a.fillAndStroke();a.setShadow(!1);61<b&&39<c&&(a.setFillColor("#23A2D9"),a.begin(),a.moveTo(5,8),a.arcTo(3,3,0,0,1,8,5),a.lineTo(b-36-20-3,5),a.arcTo(3,3,0,0,1,b-36-20,8),a.lineTo(b-36-20,14),a.arcTo(3,3,0,0,1,b-36-20-3,17),a.lineTo(8,
17),a.arcTo(3,3,0,0,1,5,14),a.close(),a.moveTo(b-36-15,8),a.arcTo(3,3,0,0,1,b-36-15+3,5),a.lineTo(b-24-15-3,5),a.arcTo(3,3,0,0,1,b-24-15,8),a.lineTo(b-24-15,14),a.arcTo(3,3,0,0,1,b-24-15-3,17),a.lineTo(b-36-15+3,17),a.arcTo(3,3,0,0,1,b-36-15,14),a.close(),a.moveTo(b-24-10,8),a.arcTo(3,3,0,0,1,b-24-10+3,5),a.lineTo(b-12-10-3,5),a.arcTo(3,3,0,0,1,b-12-10,8),a.lineTo(b-12-10,14),a.arcTo(3,3,0,0,1,b-12-10-3,17),a.lineTo(b-24-10+3,17),a.arcTo(3,3,0,0,1,b-24-10,14),a.close(),a.moveTo(b-12-5,8),a.arcTo(3,
3,0,0,1,b-12-5+3,5),a.lineTo(b-5-3,5),a.arcTo(3,3,0,0,1,b-5,8),a.lineTo(b-5,14),a.arcTo(3,3,0,0,1,b-5-3,17),a.lineTo(b-12-5+3,17),a.arcTo(3,3,0,0,1,b-12-5,14),a.close(),a.moveTo(5,30),a.arcTo(8,8,0,0,1,13,22),a.lineTo(b-8-5,22),a.arcTo(8,8,0,0,1,b-5,30),a.lineTo(b-5,c-8-5),a.arcTo(8,8,0,0,1,b-8-5,c-5),a.lineTo(13,c-5),a.arcTo(8,8,0,0,1,5,c-8-5),a.close(),a.fill(),a.fill())};mxCellRenderer.registerShape(mxShapeC4WebBrowserContainer.prototype.cst.WEB_BROWSER_CONTAINER_SHAPE,mxShapeC4WebBrowserContainer);
function mxShapeC4WebBrowserContainer2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeC4WebBrowserContainer2,mxShape);mxShapeC4WebBrowserContainer2.prototype.cst={WEB_BROWSER_CONTAINER2_SHAPE:"mxgraph.c4.webBrowserContainer2"};mxShapeC4WebBrowserContainer2.prototype.customProperties=[{name:"strokeColor2",dispName:"Outline color",type:"color",defVal:"#0E7DAD"}];
mxShapeC4WebBrowserContainer2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.state.style,"fillColor","#ffffff");e=mxUtils.getValue(this.state.style,"strokeColor","#000000");var f=mxUtils.getValue(this.state.style,"strokeColor2","#0E7DAD");a.setStrokeColor(f);a.setFillColor(e);a.begin();a.moveTo(0,8);a.arcTo(8,8,0,0,1,8,0);a.lineTo(b-8,0);a.arcTo(8,8,0,0,1,b,8);a.lineTo(b,c-8);a.arcTo(8,8,0,0,1,b-8,c);a.lineTo(8,c);a.arcTo(8,8,0,0,1,0,c-8);a.close();a.fillAndStroke();
a.setShadow(!1);61<b&&39<c&&(a.setFillColor(d),a.begin(),a.moveTo(5,8),a.arcTo(3,3,0,0,1,8,5),a.lineTo(b-36-20-3,5),a.arcTo(3,3,0,0,1,b-36-20,8),a.lineTo(b-36-20,14),a.arcTo(3,3,0,0,1,b-36-20-3,17),a.lineTo(8,17),a.arcTo(3,3,0,0,1,5,14),a.close(),a.moveTo(b-36-15,8),a.arcTo(3,3,0,0,1,b-36-15+3,5),a.lineTo(b-24-15-3,5),a.arcTo(3,3,0,0,1,b-24-15,8),a.lineTo(b-24-15,14),a.arcTo(3,3,0,0,1,b-24-15-3,17),a.lineTo(b-36-15+3,17),a.arcTo(3,3,0,0,1,b-36-15,14),a.close(),a.moveTo(b-24-10,8),a.arcTo(3,3,0,0,
1,b-24-10+3,5),a.lineTo(b-12-10-3,5),a.arcTo(3,3,0,0,1,b-12-10,8),a.lineTo(b-12-10,14),a.arcTo(3,3,0,0,1,b-12-10-3,17),a.lineTo(b-24-10+3,17),a.arcTo(3,3,0,0,1,b-24-10,14),a.close(),a.moveTo(b-12-5,8),a.arcTo(3,3,0,0,1,b-12-5+3,5),a.lineTo(b-5-3,5),a.arcTo(3,3,0,0,1,b-5,8),a.lineTo(b-5,14),a.arcTo(3,3,0,0,1,b-5-3,17),a.lineTo(b-12-5+3,17),a.arcTo(3,3,0,0,1,b-12-5,14),a.close(),a.moveTo(5,30),a.arcTo(8,8,0,0,1,13,22),a.lineTo(b-8-5,22),a.arcTo(8,8,0,0,1,b-5,30),a.lineTo(b-5,c-8-5),a.arcTo(8,8,0,0,
1,b-8-5,c-5),a.lineTo(13,c-5),a.arcTo(8,8,0,0,1,5,c-8-5),a.close(),a.fill(),a.fill())};mxCellRenderer.registerShape(mxShapeC4WebBrowserContainer2.prototype.cst.WEB_BROWSER_CONTAINER2_SHAPE,mxShapeC4WebBrowserContainer2);function mxCabinetsCabinet(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxCabinetsCabinet,mxShape);mxCabinetsCabinet.prototype.cst={HAS_STAND:"hasStand",CABINET:"mxgraph.cabinets.cabinet"};
mxCabinetsCabinet.prototype.customProperties=[{name:"hasStand",dispName:"Has Stand",type:"bool",defVal:!0}];mxCabinetsCabinet.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxCabinetsCabinet.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxCabinetsCabinet.prototype.foreground=function(a,d,e,b,c){a.rect(0,0,b,15);a.stroke();a.begin();a.moveTo(15,15);a.lineTo(15,c);a.moveTo(b-15,15);a.lineTo(b-15,c);a.stroke();1===mxUtils.getValue(this.style,mxCabinetsCabinet.prototype.cst.HAS_STAND,"1")?a.rect(0,c-40,b,40):a.rect(0,c-15,b,15);a.fillAndStroke()};mxCellRenderer.registerShape(mxCabinetsCabinet.prototype.cst.CABINET,mxCabinetsCabinet);
function mxCabinetsCoverPlate(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxCabinetsCoverPlate,mxShape);mxCabinetsCoverPlate.prototype.cst={COVER_PLATE:"mxgraph.cabinets.coverPlate"};mxCabinetsCoverPlate.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};
mxCabinetsCoverPlate.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.moveTo(10,.5*c-12.5);a.lineTo(10,.5*c+12.5);a.lineTo(b-10,.5*c+12.5);a.lineTo(b-10,.5*c-12.5);a.close();a.fillAndStroke()};mxCabinetsCoverPlate.prototype.foreground=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxCabinetsCoverPlate.prototype.cst.COVER_PLATE,mxCabinetsCoverPlate);
function mxCabinetsDimension(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxCabinetsDimension,mxShape);mxCabinetsDimension.prototype.cst={DIMENSION:"mxgraph.cabinets.dimension"};mxCabinetsDimension.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxCabinetsDimension.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,20);a.lineTo(b,20);a.moveTo(10,15);a.lineTo(0,20);a.lineTo(10,25);a.moveTo(b-10,15);a.lineTo(b,20);a.lineTo(b-10,25);a.moveTo(0,15);a.lineTo(0,c);a.moveTo(b,15);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxCabinetsDimension.prototype.cst.DIMENSION,mxCabinetsDimension);function mxCabinetsDimensionBottom(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxCabinetsDimensionBottom,mxShape);mxCabinetsDimensionBottom.prototype.cst={DIMENSION:"mxgraph.cabinets.dimensionBottom"};mxCabinetsDimensionBottom.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxCabinetsDimensionBottom.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,c-20);a.lineTo(b,c-20);a.moveTo(10,c-15);a.lineTo(0,c-20);a.lineTo(10,c-25);a.moveTo(b-10,c-15);a.lineTo(b,c-20);a.lineTo(b-10,c-25);a.moveTo(0,c-15);a.lineTo(0,0);a.moveTo(b,c-15);a.lineTo(b,0);a.stroke()};mxCellRenderer.registerShape(mxCabinetsDimensionBottom.prototype.cst.DIMENSION,mxCabinetsDimensionBottom);
function mxShapeCisco19Rect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeCisco19Rect,mxShape);mxShapeCisco19Rect.prototype.cst={SHAPE_RECT:"mxgraph.cisco19.rect"};
mxShapeCisco19Rect.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.state.style,"prIcon","l2_switch");mxUtils.getValue(this.state.style,"fillColor","#ffffff");var g=mxUtils.getValue(this.state.style,"strokeColor","#000000"),h="mxgraph.cisco19.bg1",k="router csr_1000v wireless_router l3_modular3 ucs_express router_with_voice router_with_firewall netflow_router secure_router ip_telephone_router asr_9000 clock vbond vmanage vsmart".split(" ");a.translate(d,e);["l2_modular",
"l3_modular","6500_vss","nexus_9500","nexus_7k"].includes(f)?h="mxgraph.cisco19.bg2":["l2_switch_with_dual_supervisor","l3_switch_with_dual_supervisor"].includes(f)?h="mxgraph.cisco19.bg3":["l2_modular2"].includes(f)?h="mxgraph.cisco19.bg4":["l3_modular2","6500_vss2","hypervisor","collab1"].includes(f)?h="mxgraph.cisco19.bg5":k.includes(f)?(a.begin(),"wireless_router"==f?a.ellipse(0,.17*c,b,.83*c):a.ellipse(0,0,b,c),a.fill()):"content_router;router_with_firewall2;netflow_router2;nam_virtual_service_blade;ucs_5108_blade_chassis;storage;nexus_1kv_vsm;nexus_1k;nexus_1010;dual mode access point;wireless_lan_controller;primary_codec;virtual_desktop_service;video_gateway;video_analytics;telepresence_exchange;meeting_scheduling_and_management_server;content_recording_streaming_server;communications_manager;cisco_unified_presence_service;cisco_unified_contact_center_enterprise_and_hosted;h323;monitor;telepresence_endpoint_twin_data_display;operations_manager;transcoder;contact_center_express;ip_ip_gateway;shield;set_top;da_encoder;ad_encoder;da_decoder;ad_decoder;acs;email_security;vpn_concentrator;ssl_terminator;cisco_security_manager;web_security;nac_appliance;ironport;ips_ids;firewall;asa_5500;flow_collector;load_balancer;web_application_firewall;analysis_correlation;flow_analytics;virtual_private_network2;web_security_services;web_security_services2;virtual_private_network_connector".split(";").includes(f)?
h="mxgraph.cisco19.bg6":["asr_1000"].includes(f)?h="mxgraph.cisco19.bg7":["fibre_channel_director_mds_9000","fibre_channel_fabric_switch"].includes(f)?h="mxgraph.cisco19.bg8":["ucs_c_series_server"].includes(f)?h="mxgraph.cisco19.bg9":["aci"].includes(f)?(d=mxStencilRegistry.getStencil("mxgraph.cisco19.acibg"),d.drawShape(a,this,.195*b,.195*c,.61*b,.61*c)):["immersive_telepresence_endpoint"].includes(f)&&(h="mxgraph.cisco19.bg10");k.includes(f)||"aci"==f||(d=mxStencilRegistry.getStencil(h),null!=
d&&d.drawShape(a,this,0,0,b,c));a.setShadow(!1);f=mxStencilRegistry.getStencil("mxgraph.cisco19."+f);a.setFillColor(g);null!=f&&f.drawShape(a,this,0,0,b,c)};mxCellRenderer.registerShape(mxShapeCisco19Rect.prototype.cst.SHAPE_RECT,mxShapeCisco19Rect);
mxShapeCisco19Rect.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.825,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.175,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.16),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.84),!1));a.push(new mxConnectionConstraint(new mxPoint(.66,.17),!1));a.push(new mxConnectionConstraint(new mxPoint(.66,.83),!1));a.push(new mxConnectionConstraint(new mxPoint(.34,.17),!1));a.push(new mxConnectionConstraint(new mxPoint(.34,
.83),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.33),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.67),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.33),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.67),!1));return a};function mxShapeCiscoSafeCompositeIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeCiscoSafeCompositeIcon,mxShape);mxShapeCiscoSafeCompositeIcon.prototype.cst={SHAPE_COMPOSITE_ICON:"mxgraph.cisco_safe.compositeIcon"};
mxShapeCiscoSafeCompositeIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.state.style,"strokeColor","none"),g=mxUtils.getValue(this.state.style,"bgColor","#C2E0AE"),h=mxUtils.getValue(this.state.style,"fillColor","none"),k=mxUtils.getValue(this.state.style,"shadow",!1),l=parseFloat(mxUtils.getValue(this.state.style,"opacity",!1));a.translate(d,e);d=mxUtils.getValue(this.state.style,"bgIcon","");e=mxUtils.getValue(this.state.style,"resIcon","");m=mxStencilRegistry.getStencil(e);
null!=m&&"mxgraph.cisco_safe.architecture.generic_appliance"!=d&&m.drawShape(a,this,0,0,b,c);a.setFillColor(f);a.setStrokeColor("none");a.setShadow(!1);if("ellipse"==d)a.begin(),100>b?a.ellipse(.01*b,.01*c,.98*b,.98*c):a.ellipse(1,1,b-2,c-2),a.fill();else if("threat1"==d)a.begin(),a.ellipse(.18*b,.16*c,.66*b,.65*c),a.fill();else if("threat2"==d)a.begin(),a.ellipse(.01*b,.01*c,.98*b,.6*c),a.fill();else if("threat3"==d)a.begin(),a.ellipse(.18*b,.2*c,.64*b,.79*c),a.fill();else if("threat4"==d)a.begin(),
a.ellipse(.09*b,.03*c,.82*b,.77*c),a.fill();else if("threat5"==d)a.begin(),a.ellipse(.16*b,.01*c,.67*b,.72*c),a.fill();else if("mxgraph.cisco_safe.architecture.generic_appliance"==d){a.setShadow(k);a.setFillColor(g);a.begin();a.moveTo(0,.3*c);a.arcTo(.3*b,.3*c,0,0,1,.3*b,0);a.lineTo(.7*b,0);a.arcTo(.3*b,.3*c,0,0,1,b,.3*c);a.lineTo(b,.7*c);a.arcTo(.3*b,.3*c,0,0,1,.7*b,c);a.lineTo(.3*b,c);a.arcTo(.3*b,.3*c,0,0,1,0,.7*c);a.close();a.fill();a.setShadow(!1);a.setFillColor(f);var m=mxStencilRegistry.getStencil(d);
null!=m&&m.drawShape(a,this,.26*b,.26*c,.48*b,.48*c);a.setAlpha(.5);a.setFillColor("#ffffff");a.ellipse(.105*b,.48*c,.04*b,.04*c);a.fill();a.ellipse(.855*b,.48*c,.04*b,.04*c);a.fill();a.ellipse(.48*b,.105*c,.04*b,.04*c);a.fill();a.ellipse(.48*b,.855*c,.04*b,.04*c);a.fill();a.ellipse(.17*b,.17*c,.04*b,.04*c);a.fill();a.ellipse(.79*b,.17*c,.04*b,.04*c);a.fill();a.ellipse(.79*b,.79*c,.04*b,.04*c);a.fill();a.ellipse(.17*b,.79*c,.04*b,.04*c);a.fill();a.setAlpha(l/100)}else m=mxStencilRegistry.getStencil(d),
null!=m&&(100>b?m.drawShape(a,this,.01*b,.01*c,.98*b,.98*c):m.drawShape(a,this,1,1,b-2,c-2));m=mxStencilRegistry.getStencil(e);null!=m&&(a.setFillColor(h),"mxgraph.cisco_safe.architecture.generic_appliance"==d?m.drawShape(a,this,.25*b,.25*c,.5*b,.5*c):m.drawShape(a,this,0,0,b,c))};mxCellRenderer.registerShape(mxShapeCiscoSafeCompositeIcon.prototype.cst.SHAPE_COMPOSITE_ICON,mxShapeCiscoSafeCompositeIcon);
function mxShapeDFDStart(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeDFDStart,mxShape);mxShapeDFDStart.prototype.cst={START:"mxgraph.dfd.start"};mxShapeDFDStart.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(.5*c,.5*b);a.begin();a.moveTo(b-d,.5*c-d);a.arcTo(d,d,0,0,1,b,.5*c);a.arcTo(d,d,0,0,1,b-d,.5*c+d);a.lineTo(d,.5*c+d);a.arcTo(d,d,0,0,1,0,.5*c);a.arcTo(d,d,0,0,1,d,.5*c-d);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeDFDStart.prototype.cst.START,mxShapeDFDStart);
mxShapeDFDStart.prototype.getConstraints=function(a,d,e){a=[];var b=Math.min(.5*e,.5*d);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.5),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.5),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.293*b,.5*e-.707*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.293*b,.5*e-.707*b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-.293*b,.5*e+.707*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.293*b,.5*e+.707*b));d>=4*e&&(a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1)),a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1)));return a};function mxShapeDFDArchive(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeDFDArchive,mxShape);mxShapeDFDArchive.prototype.cst={ARCHIVE:"mxgraph.dfd.archive"};mxShapeDFDArchive.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.1*b,.2*c);a.lineTo(.9*b,.2*c);a.stroke()};mxCellRenderer.registerShape(mxShapeDFDArchive.prototype.cst.ARCHIVE,mxShapeDFDArchive);
mxShapeDFDArchive.prototype.getConstraints=function(a,d,e){a=[];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(.875,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.625,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.375,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.125,.25),!1));return a};function mxShapeDFDCheck2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeDFDCheck2,mxShape);mxShapeDFDCheck2.prototype.cst={CHECK2:"mxgraph.dfd.check2"};
mxShapeDFDCheck2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(.5*c,.5*b);a.begin();a.moveTo(0,.5*c);a.lineTo(d,0);a.lineTo(b-d,0);a.lineTo(b,.5*c);a.lineTo(b-d,c);a.lineTo(d,c);a.lineTo(0,.5*c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(b-d,0);a.lineTo(b-2*d,.5*c);a.lineTo(b-d,c);a.stroke()};mxCellRenderer.registerShape(mxShapeDFDCheck2.prototype.cst.CHECK2,mxShapeDFDCheck2);
mxShapeDFDCheck2.prototype.getConstraints=function(a,d,e){a=[];var b=Math.min(.5*e,.5*d);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*b,.25*e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*b,.75*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*b,.75*e));d>e&&(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,e)));4*b<=d&&(a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.25,
1),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1)));return a};function mxShapeDFDDataStoreID(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeDFDDataStoreID,mxShape);mxShapeDFDDataStoreID.prototype.cst={DATA_STORE_ID:"mxgraph.dfd.dataStoreID"};
mxShapeDFDDataStoreID.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(b,c);a.lineTo(0,c);a.lineTo(0,0);a.lineTo(b,0);a.fillAndStroke();a.setShadow(!1);d=Math.min(30,b);a.begin();a.moveTo(d,0);a.lineTo(d,c);a.stroke()};mxCellRenderer.registerShape(mxShapeDFDDataStoreID.prototype.cst.DATA_STORE_ID,mxShapeDFDDataStoreID);mxShapeDFDDataStoreID.prototype.constraints=null;
function mxShapeDFDExternalEntity(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeDFDExternalEntity,mxShape);mxShapeDFDExternalEntity.prototype.cst={EXTERNAL_ENTITY:"mxgraph.dfd.externalEntity"};
mxShapeDFDExternalEntity.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b-10,0);a.lineTo(b,10);a.lineTo(b,c);a.lineTo(10,c);a.lineTo(0,c-10);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillColor("#000000");a.setAlpha(.5);a.begin();a.moveTo(0,0);a.lineTo(b-10,0);a.lineTo(b,10);a.lineTo(10,10);a.lineTo(10,c);a.lineTo(0,c-10);a.close();a.fill();d=parseFloat(mxUtils.getValue(this.style,"opacity","100"));a.setAlpha(d/100);a.begin();a.moveTo(0,0);a.lineTo(b-
10,0);a.lineTo(b,10);a.lineTo(b,c);a.lineTo(10,c);a.lineTo(0,c-10);a.close();a.moveTo(10,c);a.lineTo(10,10);a.lineTo(b,10);a.moveTo(0,0);a.lineTo(10,10);a.stroke()};mxCellRenderer.registerShape(mxShapeDFDExternalEntity.prototype.cst.EXTERNAL_ENTITY,mxShapeDFDExternalEntity);
mxShapeDFDExternalEntity.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*(d-10),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-10),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*(d-10),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-10,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,10,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.25*(d-10)+10,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-10)+10,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*(d-10)+10,e));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10+.25*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10+.5*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,10+.75*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-10)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-10));return a};function mxShapeDFDLoop(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeDFDLoop,mxShape);
mxShapeDFDLoop.prototype.cst={LOOP:"mxgraph.dfd.loop"};mxShapeDFDLoop.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(.8*c,.8*b);a.begin();a.moveTo(b-.25*d,0);a.arcTo(d,d,0,0,1,b-.25*d,c);a.lineTo(.25*d,c);a.arcTo(d,d,0,0,1,.25*d,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeDFDLoop.prototype.cst.LOOP,mxShapeDFDLoop);
mxShapeDFDLoop.prototype.getConstraints=function(a,d,e){a=[];var b=Math.min(.8*e,.8*d);a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b,e));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));return a};
function mxShapeEipMessageExpiration(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipMessageExpiration,mxShape);mxShapeEipMessageExpiration.prototype.cst={SHAPE_MESS_EXP:"mxgraph.eip.messExp"};mxShapeEipMessageExpiration.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeEipMessageExpiration.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.stroke();a.setStrokeColor("#808080");a.begin();a.moveTo(.5*b,.1*c);a.lineTo(.5*b,.5*c);a.lineTo(.6*b,.8*c);a.stroke()};mxCellRenderer.registerShape(mxShapeEipMessageExpiration.prototype.cst.SHAPE_MESS_EXP,mxShapeEipMessageExpiration);
mxShapeEipMessageExpiration.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));return a};function mxShapeEipReturnAddress(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipReturnAddress,mxShape);mxShapeEipReturnAddress.prototype.cst={SHAPE_RET_ADDR:"mxgraph.eip.retAddr"};mxShapeEipReturnAddress.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeEipReturnAddress.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapeEipReturnAddress.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.05*b,.11*c);a.lineTo(.25*b,.11*c);a.moveTo(.05*b,.18*c);a.lineTo(.25*b,.18*c);a.moveTo(.05*b,.25*c);a.lineTo(.25*b,.25*c);a.setStrokeWidth(2);a.moveTo(.3*b,.63*c);a.lineTo(.8*b,.63*c);a.moveTo(.3*b,.72*c);a.lineTo(.8*b,.72*c);a.moveTo(.3*b,.8*c);a.lineTo(.8*b,.8*c);a.stroke();a.setFillColor("#EDEDED");a.rect(.8*b,.1*c,.12*b,.19*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeEipReturnAddress.prototype.cst.SHAPE_RET_ADDR,mxShapeEipReturnAddress);
mxShapeEipReturnAddress.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
function mxShapeEipAnchor(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipAnchor,mxShape);mxShapeEipAnchor.prototype.cst={SHAPE_ANCHOR:"mxgraph.eip.anchor"};mxShapeEipAnchor.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeEipAnchor.prototype.cst.SHAPE_ANCHOR,mxShapeEipAnchor);
function mxShapeEipMessageChannel(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipMessageChannel,mxShape);mxShapeEipMessageChannel.prototype.cst={SHAPE_MESSAGE_CHANNEL:"mxgraph.eip.messageChannel"};mxShapeEipMessageChannel.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeEipMessageChannel.prototype.background=function(a,d,e,b,c){a.setGradient("#e6e6e6","#808080",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(8,.5*c+10);a.arcTo(12,12,0,0,1,8,.5*c-10);a.lineTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.close();a.fillAndStroke()};mxShapeEipMessageChannel.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#e6e6e6");a.begin();a.moveTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.arcTo(12,12,0,0,1,b-8,.5*c-10);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeEipMessageChannel.prototype.cst.SHAPE_MESSAGE_CHANNEL,mxShapeEipMessageChannel);mxShapeEipMessageChannel.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,2.7,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,-2.7,0));for(e=10;e<d;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,e,0)),e+=10;return a};
function mxShapeEipDatatypeChannel(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipDatatypeChannel,mxShape);mxShapeEipDatatypeChannel.prototype.cst={SHAPE_DATATYPE_CHANNEL:"mxgraph.eip.dataChannel"};mxShapeEipDatatypeChannel.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeEipDatatypeChannel.prototype.background=function(a,d,e,b,c){a.setGradient("#e6e6e6","#808080",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(8,.5*c+10);a.arcTo(12,12,0,0,1,8,.5*c-10);a.lineTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.close();a.fillAndStroke()};
mxShapeEipDatatypeChannel.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#e6e6e6");a.begin();a.moveTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.arcTo(12,12,0,0,1,b-8,.5*c-10);a.fillAndStroke();a.setFillColor("#fffbc0");a.setStrokeWidth("1");for(d=1;20*d+10<b-14;d++)a.rect(20*d,.5*c-5,10,10),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeEipDatatypeChannel.prototype.cst.SHAPE_DATATYPE_CHANNEL,mxShapeEipDatatypeChannel);
mxShapeEipDatatypeChannel.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,2.7,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,-2.7,0));for(e=10;e<d;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,e,0)),e+=10;return a};
function mxShapeEipDeadLetterChannel(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipDeadLetterChannel,mxShape);mxShapeEipDeadLetterChannel.prototype.cst={SHAPE_DEAD_LETTER_CHANNEL:"mxgraph.eip.deadLetterChannel"};mxShapeEipDeadLetterChannel.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeEipDeadLetterChannel.prototype.background=function(a,d,e,b,c){a.setGradient("#e6e6e6","#808080",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(8,.5*c+10);a.arcTo(12,12,0,0,1,8,.5*c-10);a.lineTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.close();a.fillAndStroke()};
mxShapeEipDeadLetterChannel.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#e6e6e6");a.begin();a.moveTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.arcTo(12,12,0,0,1,b-8,.5*c-10);a.fillAndStroke();a.setFillColor("#ff0000");a.setStrokeWidth("1");a.begin();a.moveTo(.5*b-6,.5*c-3);a.lineTo(.5*b-3,.5*c-6);a.lineTo(.5*b+3,.5*c-6);a.lineTo(.5*b+6,.5*c-3);a.lineTo(.5*b+6,.5*c+3);a.lineTo(.5*b+3,.5*c+6);a.lineTo(.5*b-3,.5*c+6);a.lineTo(.5*b-6,.5*c+3);a.close();a.fillAndStroke();a.setStrokeWidth("2");
a.setStrokeColor("#ffffff");a.begin();a.moveTo(.5*b-4,.5*c);a.lineTo(.5*b+4,.5*c);a.stroke()};mxCellRenderer.registerShape(mxShapeEipDeadLetterChannel.prototype.cst.SHAPE_DEAD_LETTER_CHANNEL,mxShapeEipDeadLetterChannel);
mxShapeEipDeadLetterChannel.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,2.7,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,-2.7,0));for(e=10;e<d;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,e,0)),e+=10;return a};
function mxShapeEipInvalidMessageChannel(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeEipInvalidMessageChannel,mxShape);mxShapeEipInvalidMessageChannel.prototype.cst={SHAPE_INVALID_MESSAGE_CHANNEL:"mxgraph.eip.invalidMessageChannel"};mxShapeEipInvalidMessageChannel.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeEipInvalidMessageChannel.prototype.background=function(a,d,e,b,c){a.setGradient("#e6e6e6","#808080",0,0,b,c,mxConstants.DIRECTION_SOUTH,1,1);a.begin();a.moveTo(8,.5*c+10);a.arcTo(12,12,0,0,1,8,.5*c-10);a.lineTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.close();a.fillAndStroke()};
mxShapeEipInvalidMessageChannel.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#e6e6e6");a.begin();a.moveTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.arcTo(12,12,0,0,1,b-8,.5*c-10);a.fillAndStroke();a.setFillColor("#ffe040");a.setStrokeWidth("1");a.begin();a.moveTo(.5*b-6,.5*c+5);a.lineTo(.5*b,.5*c-5);a.lineTo(.5*b+6,.5*c+5);a.close();a.fillAndStroke();a.setStrokeWidth("1");a.begin();a.moveTo(.5*b,.5*c-2);a.lineTo(.5*b,.5*c+2);a.moveTo(.5*b,.5*c+3);a.lineTo(.5*b,.5*c+4);a.stroke()};
mxCellRenderer.registerShape(mxShapeEipInvalidMessageChannel.prototype.cst.SHAPE_INVALID_MESSAGE_CHANNEL,mxShapeEipInvalidMessageChannel);
mxShapeEipInvalidMessageChannel.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,2.7,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,-2.7,0));for(e=10;e<d;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,e,0)),e+=10;return a};
function mxShapeElectricalTestPoint(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTestPoint,mxShape);mxShapeElectricalTestPoint.prototype.cst={SHAPE_TEST_POINT:"mxgraph.electrical.transmission.testPoint"};
mxShapeElectricalTestPoint.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e=Math.min(b,c);a.setFillColor(d);a.begin();a.ellipse(.5*b-e/2,0,e,e);a.fillAndStroke();c>b&&(a.begin(),a.moveTo(.5*b,e),a.lineTo(.5*b,c),a.stroke())};mxCellRenderer.registerShape(mxShapeElectricalTestPoint.prototype.cst.SHAPE_TEST_POINT,mxShapeElectricalTestPoint);
mxShapeElectricalTestPoint.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];function mxShapeElectricalStraightBus(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalStraightBus,mxShape);mxShapeElectricalStraightBus.prototype.cst={SHAPE_STRAIGHT_BUS:"mxgraph.electrical.transmission.straightBus"};
mxShapeElectricalStraightBus.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.2*b;e=b>c?.5*c:b/2;a.begin();a.moveTo(b-d,0);a.lineTo(b-d,c-e);a.lineTo(b,c-e);a.lineTo(.5*b,c);a.lineTo(0,c-e);a.lineTo(d,c-e);a.lineTo(d,0);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalStraightBus.prototype.cst.SHAPE_STRAIGHT_BUS,mxShapeElectricalStraightBus);
mxShapeElectricalStraightBus.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];function mxShapeElectricalTwoLineBusElbow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=0}mxUtils.extend(mxShapeElectricalTwoLineBusElbow,mxShape);mxShapeElectricalTwoLineBusElbow.prototype.cst={SHAPE_TWO_LINE_BUS_ELBOW:"mxgraph.electrical.transmission.twoLineBusElbow"};
mxShapeElectricalTwoLineBusElbow.prototype.customProperties=[{name:"notch",dispName:"Spacing",type:"float",min:0,defVal:25}];mxShapeElectricalTwoLineBusElbow.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(b,c);a.lineTo(b,0);a.stroke();d=Math.min(b,f);f=Math.min(c,f);a.begin();a.moveTo(0,c-f);a.lineTo(b-d,c-f);a.lineTo(b-d,0);a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalTwoLineBusElbow.prototype.cst.SHAPE_TWO_LINE_BUS_ELBOW,mxShapeElectricalTwoLineBusElbow);mxShapeElectricalTwoLineBusElbow.prototype.constraints=null;
Graph.handleFactory[mxShapeElectricalTwoLineBusElbow.prototype.cst.SHAPE_TWO_LINE_BUS_ELBOW]=function(a){return[Graph.createHandle(a,["notch"],function(d){var e=Math.max(Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))),0);return new mxPoint(d.x+d.width/4,d.y+d.height-e)},function(d,e){this.state.style.notch=Math.round(.2*Math.max(0,d.width-e.y+d.y))/.2})]};
function mxShapeElectricalThreeLineBusElbow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=0}mxUtils.extend(mxShapeElectricalThreeLineBusElbow,mxShape);mxShapeElectricalThreeLineBusElbow.prototype.cst={SHAPE_THREE_LINE_BUS_ELBOW:"mxgraph.electrical.transmission.threeLineBusElbow"};mxShapeElectricalThreeLineBusElbow.prototype.customProperties=[{name:"notch",dispName:"Spacing",type:"float",min:0,defVal:30}];
mxShapeElectricalThreeLineBusElbow.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(b,c);a.lineTo(b,0);a.stroke();d=Math.min(b,f);f=Math.min(c,f);a.begin();a.moveTo(0,c-f);a.lineTo(b-d,c-f);a.lineTo(b-d,0);a.stroke();a.begin();a.moveTo(0,c-f/2);a.lineTo(b-d/2,c-f/2);a.lineTo(b-d/2,0);a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalThreeLineBusElbow.prototype.cst.SHAPE_THREE_LINE_BUS_ELBOW,mxShapeElectricalThreeLineBusElbow);mxShapeElectricalThreeLineBusElbow.prototype.constraints=null;
Graph.handleFactory[mxShapeElectricalThreeLineBusElbow.prototype.cst.SHAPE_THREE_LINE_BUS_ELBOW]=function(a){return[Graph.createHandle(a,["notch"],function(d){var e=Math.max(Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))),0);return new mxPoint(d.x+d.width/4,d.y+d.height-e)},function(d,e){this.state.style.notch=Math.round(.2*Math.max(0,d.width-e.y+d.y))/.2})]};
function mxShapeElectricalFourLineBusElbow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=0}mxUtils.extend(mxShapeElectricalFourLineBusElbow,mxShape);mxShapeElectricalFourLineBusElbow.prototype.cst={SHAPE_FOUR_LINE_BUS_ELBOW:"mxgraph.electrical.transmission.fourLineBusElbow"};mxShapeElectricalFourLineBusElbow.prototype.customProperties=[{name:"notch",dispName:"Spacing",type:"float",min:0,defVal:75}];
mxShapeElectricalFourLineBusElbow.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(b,c);a.lineTo(b,0);a.stroke();d=Math.min(b,f);f=Math.min(c,f);a.begin();a.moveTo(0,c-f);a.lineTo(b-d,c-f);a.lineTo(b-d,0);a.stroke();a.begin();a.moveTo(0,c-f/3);a.lineTo(b-d/3,c-f/3);a.lineTo(b-d/3,0);a.stroke();a.begin();a.moveTo(0,c-2*f/3);a.lineTo(b-2*d/3,c-2*f/3);a.lineTo(b-2*
d/3,0);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalFourLineBusElbow.prototype.cst.SHAPE_FOUR_LINE_BUS_ELBOW,mxShapeElectricalFourLineBusElbow);mxShapeElectricalFourLineBusElbow.prototype.constraints=null;
Graph.handleFactory[mxShapeElectricalFourLineBusElbow.prototype.cst.SHAPE_FOUR_LINE_BUS_ELBOW]=function(a){return[Graph.createHandle(a,["notch"],function(d){var e=Math.max(Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))),0);return new mxPoint(d.x+d.width/4,d.y+d.height-e)},function(d,e){this.state.style.notch=Math.round(.2*Math.max(0,d.width-e.y+d.y))/.2})]};
function mxShapeElectricalEightLineBusElbow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=0}mxUtils.extend(mxShapeElectricalEightLineBusElbow,mxShape);mxShapeElectricalEightLineBusElbow.prototype.cst={SHAPE_EIGHT_LINE_BUS_ELBOW:"mxgraph.electrical.transmission.eightLineBusElbow"};mxShapeElectricalEightLineBusElbow.prototype.customProperties=[{name:"notch",dispName:"Spacing",type:"float",min:0,defVal:180}];
mxShapeElectricalEightLineBusElbow.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(b,c);a.lineTo(b,0);a.stroke();d=Math.min(b,f);f=Math.min(c,f);a.begin();a.moveTo(0,c-f);a.lineTo(b-d,c-f);a.lineTo(b-d,0);a.stroke();a.begin();a.moveTo(0,c-f/7);a.lineTo(b-d/7,c-f/7);a.lineTo(b-d/7,0);a.stroke();a.begin();a.moveTo(0,c-2*f/7);a.lineTo(b-2*d/7,c-2*f/7);a.lineTo(b-
2*d/7,0);a.stroke();a.begin();a.moveTo(0,c-3*f/7);a.lineTo(b-3*d/7,c-3*f/7);a.lineTo(b-3*d/7,0);a.stroke();a.begin();a.moveTo(0,c-4*f/7);a.lineTo(b-4*d/7,c-4*f/7);a.lineTo(b-4*d/7,0);a.stroke();a.begin();a.moveTo(0,c-5*f/7);a.lineTo(b-5*d/7,c-5*f/7);a.lineTo(b-5*d/7,0);a.stroke();a.begin();a.moveTo(0,c-6*f/7);a.lineTo(b-6*d/7,c-6*f/7);a.lineTo(b-6*d/7,0);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalEightLineBusElbow.prototype.cst.SHAPE_EIGHT_LINE_BUS_ELBOW,mxShapeElectricalEightLineBusElbow);
mxShapeElectricalEightLineBusElbow.prototype.constraints=null;Graph.handleFactory[mxShapeElectricalEightLineBusElbow.prototype.cst.SHAPE_EIGHT_LINE_BUS_ELBOW]=function(a){return[Graph.createHandle(a,["notch"],function(d){var e=Math.max(Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))),0);return new mxPoint(d.x+d.width/4,d.y+d.height-e)},function(d,e){this.state.style.notch=Math.round(.2*Math.max(0,d.width-e.y+d.y))/.2})]};
function mxShapeElectricalLogicGate(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalLogicGate,mxShape);mxShapeElectricalLogicGate.prototype.cst={SHAPE_LOGIC_GATE:"mxgraph.electrical.logic_gates.logic_gate"};
mxShapeElectricalLogicGate.prototype.customProperties=[{name:"operation",dispName:"Operation",type:"enum",defVal:"and",enumList:[{val:"and",dispName:"And"},{val:"or",dispName:"Or"},{val:"xor",dispName:"Xor"}]},{name:"numInputs",dispName:"Inputs",type:"int",min:2,defVal:2},{name:"negating",dispName:"Negating",type:"bool",defVal:0}];
mxShapeElectricalLogicGate.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,"numInputs","2"));e=c/d;var f=.5*e;a.begin();a.moveTo(.8*b,.5*c);a.lineTo(b,.5*c);for(var g=mxUtils.getValue(this.style,"operation","and"),h=0;h<d;h++)a.moveTo(0,f),"and"==g?a.lineTo(.2*b,f):a.lineTo(.23*b,f),f+=e;a.stroke();switch(g){case "xor":a.begin(),a.moveTo(.1*b,0),a.arcTo(.6*b,c,0,0,1,.1*b,c),a.stroke();case "or":a.begin();a.moveTo(.4*b,0);a.arcTo(.45*b,.83*c,0,
0,1,.8*b,.5*c);a.arcTo(.45*b,.83*c,0,0,1,.4*b,c);a.lineTo(.15*b,c);a.arcTo(.6*b,c,0,0,0,.15*b,0);a.close();a.fillAndStroke();break;default:a.begin(),a.moveTo(.2*b,0),a.lineTo(.5*b,0),a.arcTo(.3*b,.5*c,0,0,1,.5*b,c),a.lineTo(.2*b,c),a.close(),a.fillAndStroke()}"1"==mxUtils.getValue(this.style,"negating","0")&&(this.style.negSize?(d=parseFloat(mxUtils.getValue(this.style,"negSize","0.13")),d=Math.min(b*d*.5,c*d)):d=Math.min(.04*b,.07*c),a.begin(),a.ellipse(.8*b,.5*c-.5*d,d,d),a.fillAndStroke())};
mxCellRenderer.registerShape(mxShapeElectricalLogicGate.prototype.cst.SHAPE_LOGIC_GATE,mxShapeElectricalLogicGate);mxShapeElectricalLogicGate.prototype.getConstraints=function(a){var d=[new mxConnectionConstraint(new mxPoint(1,.5),!1)];a=parseInt(mxUtils.getValue(a,"numInputs","2"));for(var e=1/a,b=.5*e,c=0;c<a;c++)d.push(new mxConnectionConstraint(new mxPoint(0,b),!1)),b+=e;return d};
function mxShapeElectricalBuffer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBuffer,mxShape);mxShapeElectricalBuffer.prototype.cst={SHAPE_BUFFER2:"mxgraph.electrical.logic_gates.buffer2"};mxShapeElectricalBuffer.prototype.customProperties=[{name:"negating",dispName:"Negating",type:"bool",defVal:0}];
mxShapeElectricalBuffer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.8*b,.5*c);a.lineTo(b,.5*c);a.stroke();a.begin();a.moveTo(.2*b,0);a.lineTo(.8*b,.5*c);a.lineTo(.2*b,c);a.close();a.fillAndStroke();"1"==mxUtils.getValue(this.style,"negating","0")&&(d=Math.min(.04*b,.07*c),a.begin(),a.ellipse(.8*b,.5*c-.5*d,d,d),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeElectricalBuffer.prototype.cst.SHAPE_BUFFER2,mxShapeElectricalBuffer);
mxShapeElectricalBuffer.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];function mxShapeElectricalDualInLineIC(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalDualInLineIC,mxShape);mxShapeElectricalDualInLineIC.prototype.cst={SHAPE_DUAL_INLINE_IC:"mxgraph.electrical.logic_gates.dual_inline_ic"};
mxShapeElectricalDualInLineIC.prototype.customProperties=[{name:"pinStyle",dispName:"Pin Style",type:"enum",defVal:"line",enumList:[{val:"line",dispName:"Line"},{val:"square",dispName:"Square"}]},{name:"startPin",dispName:"Starting Pin",type:"enum",defVal:"n",enumList:[{val:"n",dispName:"N"},{val:"e",dispName:"E"},{val:"s",dispName:"S"},{val:"w",dispName:"W"}]},{name:"pinSpacing",dispName:"Pin Spacing",type:"float",min:1,defVal:20},{name:"pinLabelType",dispName:"Pin Label Type",type:"enum",defVal:"gen",
enumList:[{val:"gen",dispName:"Generated"},{val:"cust",dispName:"Custom"}]},{name:"labelCount",dispName:"Number of Labels",type:"int",defVal:20,dependentProps:["labelNames"]},{name:"labelNames",dispName:"Label Names",type:"staticArr",subType:"string",sizeProperty:"labelCount",subDefVal:"a"}];
mxShapeElectricalDualInLineIC.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"fontColor","#000000");a.setFontColor(d);d=mxUtils.getValue(this.style,"startPin","n");e=mxUtils.getValue(this.style,"pinLabelType","gen");var f=decodeURIComponent(mxUtils.getValue(this.style,"labelNames","").toString()).split(",");a.begin();"n"==d||"s"==d?a.rect(10,0,b-20,c):a.rect(0,10,b,c-20);a.fillAndStroke();var g=parseFloat(mxUtils.getValue(this.style,"pinSpacing","20")),
h=mxUtils.getValue(this.style,"pinStyle","line"),k=parseFloat(mxUtils.getValue(this.style,"fontSize","12")),l="n"==d||"s"==d?parseInt(c/g):parseInt(b/g);if("line"==h){a.setFontSize(.8*k);h=1;k=.5*g;a.begin();if("n"==d||"s"==d)for(;h*g<=c;){a.moveTo(0,k);a.lineTo(10,k);a.moveTo(b-10,k);a.lineTo(b,k);var m="n"==d?h:l+h;"gen"==e?a.text(20,k,0,0,m.toString(),mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(20,k,0,0,f[m-1].toString(),mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);m="n"==d?2*l-h+1:l-h+1;"gen"==e?a.text(b-20,k,0,0,m.toString(),mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(b-20,k,0,0,f[m-1].toString(),mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);k+=g;h++}else for(;h*g<=b;)a.moveTo(k,0),a.lineTo(k,10),a.moveTo(k,c-10),a.lineTo(k,c),m="e"==d?l-h+1:2*l-h+1,"gen"==e?a.text(k,20,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(k,20,0,0,f[m-1].toString(),
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),m="e"==d?l+h:h,"gen"==e?a.text(k,c-20,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(k,c-20,0,0,f[m-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),k+=g,h++;a.stroke()}else if(a.setFontSize(.5*k),h=1,k=.5*g,"n"==d||"s"==d)for(;h*g<=c;)a.begin(),a.rect(0,k-.25*g,10,.5*g),a.fillAndStroke(),a.begin(),a.rect(b-10,k-.25*g,10,.5*g),a.fillAndStroke(),m="n"==
d?h:l+h,"gen"==e?a.text(5,k+1,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(5,k+1,0,0,f[m-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),m="n"==d?2*l-h+1:l-h+1,"gen"==e?a.text(b-5,k+1,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(b-5,k+1,0,0,f[m-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),k+=g,h++;else for(;h*g<=b;)a.begin(),
a.rect(k-.25*g,0,.5*g,10),a.fillAndStroke(),a.begin(),a.rect(k-.25*g,c-10,.5*g,10),a.fillAndStroke(),m="e"==d?l-h+1:2*l-h+1,"gen"==e?a.text(k,5,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(k,5,0,0,f[m-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),m="e"==d?l+h:h,"gen"==e?a.text(k,c-5,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):m-1<f.length&&a.text(k,c-5,0,0,f[m-1].toString(),
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),k+=g,h++;a.setShadow(!1);a.begin();switch(d){case "e":40<c&&(a.moveTo(b,.5*c-10),a.arcTo(12,12,0,0,0,b,.5*c+10));break;case "s":40<b&&(a.moveTo(.5*b-10,c),a.arcTo(12,12,0,0,1,.5*b+10,c));break;case "w":40<c&&(a.moveTo(0,.5*c-10),a.arcTo(12,12,0,0,1,0,.5*c+10));break;default:40<b&&(a.moveTo(.5*b-10,0),a.arcTo(12,12,0,0,0,.5*b+10,0))}a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalDualInLineIC.prototype.cst.SHAPE_DUAL_INLINE_IC,mxShapeElectricalDualInLineIC);
mxShapeElectricalDualInLineIC.prototype.getConstraints=function(a,d,e){a=[];var b=parseFloat(mxUtils.getValue(this.style,"pinSpacing","20")),c=mxUtils.getValue(this.style,"startPin","n"),f=1,g=.5*b;parseInt(e/b);if("n"==c||"s"==c)for(;f*b<=e;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,g)),a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,g)),g+=b,f++;else for(;f*b<=d;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
1),!1,null,g,0)),g+=b,f++;return a};function mxShapeElectricalQFPIC(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalQFPIC,mxShape);mxShapeElectricalQFPIC.prototype.cst={SHAPE_QFP_IC:"mxgraph.electrical.logic_gates.qfp_ic"};
mxShapeElectricalQFPIC.prototype.customProperties=[{name:"pinStyle",dispName:"Pin Style",type:"enum",defVal:"line",enumList:[{val:"line",dispName:"Line"},{val:"square",dispName:"Square"}]},{name:"startPin",dispName:"Starting Pin",type:"enum",defVal:"sw",enumList:[{val:"sw",dispName:"SW"},{val:"nw",dispName:"NW"},{val:"ne",dispName:"NE"},{val:"se",dispName:"SE"}]},{name:"pinSpacing",dispName:"Pin Spacing",type:"float",min:1,defVal:20},{name:"pinLabelType",dispName:"Pin Label Type",type:"enum",defVal:"gen",
enumList:[{val:"gen",dispName:"Generated"},{val:"cust",dispName:"Custom"}]},{name:"labelCount",dispName:"Number of Labels",type:"int",defVal:40,dependentProps:["labelNames"]},{name:"labelNames",dispName:"Label Names",type:"staticArr",subType:"string",sizeProperty:"labelCount",subDefVal:"a"}];
mxShapeElectricalQFPIC.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(15,10);a.lineTo(b-15,10);a.lineTo(b-10,15);a.lineTo(b-10,c-15);a.lineTo(b-15,c-10);a.lineTo(15,c-10);a.lineTo(10,c-15);a.lineTo(10,15);a.close();a.fillAndStroke();d=parseFloat(mxUtils.getValue(this.style,"pinSpacing","20"));var f=mxUtils.getValue(this.style,"pinStyle","line");e=mxUtils.getValue(this.style,"pinLabelType","gen");var g=decodeURIComponent(mxUtils.getValue(this.style,"labelNames",
"").toString()).split(","),h=parseFloat(mxUtils.getValue(this.style,"fontSize","12")),k=mxUtils.getValue(this.style,"fontColor","#000000");a.setFontColor(k);k=mxUtils.getValue(this.style,"startPin","sw");if("line"==f){a.setFontSize(.8*h);f=1;h=.5*d+20;a.begin();for(var l=parseInt((c-d-40)/d)+1,m=parseInt((b-d-40)/d)+1;h<=c-.5*d-20;){a.moveTo(0,h);a.lineTo(10,h);a.moveTo(b-10,h);a.lineTo(b,h);switch(k){case "nw":var n=f;break;case "ne":n=m+f;break;case "se":n=l+m+f;break;default:n=l+2*m+f}"gen"==e?
a.text(20,h,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(20,h,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);switch(k){case "nw":n=m+2*l-f+1;break;case "ne":n=2*m+2*l-f+1;break;case "se":n=l-f+1;break;default:n=m+l-f+1}"gen"==e?a.text(b-20,h,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(b-20,h,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0);h+=d;f++}f=1;for(h=.5*d+20;h<=b-.5*d-20;){a.moveTo(h,0);a.lineTo(h,10);a.moveTo(h,c-10);a.lineTo(h,c);switch(k){case "nw":n=l+f;break;case "ne":n=l+m+f;break;case "se":n=2*l+m+f;break;default:n=f}"gen"==e?a.text(h,c-20,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(h,c-20,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);switch(k){case "nw":n=2*m+2*l-f+1;break;case "ne":n=m-f+1;break;case "se":n=
m+l-f+1;break;default:n=2*m+l-f+1}"gen"==e?a.text(h,20,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(h,20,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);h+=d;f++}a.stroke()}else{a.setFontSize(.5*h);f=1;h=.5*d+20;l=parseInt((c-d-40)/d)+1;for(m=parseInt((b-d-40)/d)+1;h<=c-.5*d-20;){a.begin();a.rect(0,h-.25*d,10,.5*d);a.fillAndStroke();a.begin();a.rect(b-10,h-.25*d,10,.5*d);a.fillAndStroke();switch(k){case "nw":n=
f;break;case "ne":n=m+f;break;case "se":n=l+m+f;break;default:n=l+2*m+f}"gen"==e?a.text(5,h+1,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(5,h+1,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);switch(k){case "nw":n=m+2*l-f+1;break;case "ne":n=2*m+2*l-f+1;break;case "se":n=l-f+1;break;default:n=m+l-f+1}"gen"==e?a.text(b-5,h+1,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):
n-1<g.length&&a.text(b-5,h+1,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);h+=d;f++}f=1;for(h=.5*d+20;h<=b-.5*d-20;){a.begin();a.rect(h-.25*d,0,.5*d,10);a.fillAndStroke();a.begin();a.rect(h-.25*d,c-10,.5*d,10);a.fillAndStroke();switch(k){case "nw":n=l+f;break;case "ne":n=l+m+f;break;case "se":n=2*l+m+f;break;default:n=f}"gen"==e?a.text(h,c-4,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(h,c-4,0,0,g[n-1].toString(),
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);switch(k){case "nw":n=2*m+2*l-f+1;break;case "ne":n=m-f+1;break;case "se":n=m+l-f+1;break;default:n=2*m+l-f+1}"gen"==e?a.text(h,6,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0):n-1<g.length&&a.text(h,6,0,0,g[n-1].toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);h+=d;f++}}a.setShadow(!1);if(40<b){a.setFillColor(mxUtils.getValue(this.style,"strokeColor","#000000"));a.begin();switch(k){case "nw":a.ellipse(15,
15,10,10);break;case "ne":a.ellipse(b-25,15,10,10);break;case "se":a.ellipse(b-25,c-25,10,10);break;default:a.ellipse(15,c-25,10,10)}a.fillAndStroke()}};mxCellRenderer.registerShape(mxShapeElectricalQFPIC.prototype.cst.SHAPE_QFP_IC,mxShapeElectricalQFPIC);
mxShapeElectricalQFPIC.prototype.getConstraints=function(a,d,e){a=[];for(var b=parseFloat(mxUtils.getValue(this.style,"pinSpacing","20")),c=.5*b+20;c<=e-.5*b-20;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c)),a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,c)),c+=b;for(c=.5*b+20;c<=d-.5*b-20;)a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,c,0)),c+=b;return a};
function mxShapeElectricalMux(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalMux,mxShape);mxShapeElectricalMux.prototype.cst={SHAPE_MUX:"mxgraph.electrical.abstract.mux2"};
mxShapeElectricalMux.prototype.customProperties=[{name:"operation",dispName:"Operation",type:"enum",defVal:"mux",enumList:[{val:"mux",dispName:"Mux"},{val:"demux",dispName:"Demux"}]},{name:"selectorPins",dispName:"Selector Pins",type:"int",min:1,max:8,defVal:1}];
mxShapeElectricalMux.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseInt(mxUtils.getValue(this.style,"selectorPins","1"));e=mxUtils.getValue(this.style,"operation","mux");var f=parseFloat(mxUtils.getValue(this.style,"fontSize","12"));a.setFontSize(.5*f);f=mxUtils.getValue(this.style,"fontColor","#000000");a.setFontColor(f);f=0;switch(mxUtils.getValue(this.style,"direction","east")){case "south":f=270;break;case "west":f=180;break;case "north":f=90}switch(e){case "demux":a.begin();
a.moveTo(b-10,0);a.lineTo(10,.1*c);a.lineTo(10,.9*c-10);a.lineTo(b-10,c-10);a.close();a.fillAndStroke();break;default:a.begin(),a.moveTo(10,0),a.lineTo(b-10,.1*c),a.lineTo(b-10,.9*c-10),a.lineTo(10,c-10),a.close(),a.fillAndStroke()}var g=1,h=1;if("mux"==e){g=Math.pow(2,d);var k=(c-16)/g}else h=Math.pow(2,d),k=(c-16)/h;var l=3+.5*k;a.begin();if(1==g)a.moveTo(0,.5*(c-10)),a.lineTo(10,.5*(c-10));else for(var m=0;m<g;m++)a.moveTo(0,l),a.lineTo(10,l),a.text(14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;if(1==h)a.moveTo(b-10,.5*(c-10)),a.lineTo(b,.5*(c-10));else for(m=0;m<h;m++)a.moveTo(b-10,l),a.lineTo(b,l),a.text(b-14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;k=(b-20)/d;g=10+.5*k;for(m=0;m<d;m++)"mux"==e?a.moveTo(g,c-10-(g-10)/(b-20)*c*.1):a.moveTo(g,c-10-(b-g-10)/(b-20)*c*.1),a.lineTo(g,c),a.text(g+5,c-4,0,0,"S"+(d-m-1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),g+=k;
a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalMux.prototype.cst.SHAPE_MUX,mxShapeElectricalMux);
mxShapeElectricalMux.prototype.getConstraints=function(a,d,e){a=[];var b=(e-16)/e,c=parseInt(mxUtils.getValue(this.style,"selectorPins","1")),f=1,g=1;"mux"==mxUtils.getValue(this.style,"operation","mux")?(f=Math.pow(2,c),b/=f):(g=Math.pow(2,c),b/=g);var h=.5*b;if(1==f)a.push(new mxConnectionConstraint(new mxPoint(0,.5*(e-10)/e),!1,0,0));else for(e=0;e<f;e++)a.push(new mxConnectionConstraint(new mxPoint(0,h),!1,null,0,3)),h+=b;if(1==g)a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,-5));
else for(e=0;e<g;e++)a.push(new mxConnectionConstraint(new mxPoint(1,h),!1,null,0,3)),h+=b;b=(d-20)/(d*c);d=.5*b;for(e=0;e<c;e++)a.push(new mxConnectionConstraint(new mxPoint(d,1),!1,null,10,0)),d+=b;return a};function mxShapeElectricalBatteryStack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBatteryStack,mxShape);mxShapeElectricalBatteryStack.prototype.cst={SHAPE_BATTERY_STACK:"mxgraph.electrical.miscellaneous.batteryStack"};
mxShapeElectricalBatteryStack.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.3*c;var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,"0");var g=Math.floor((b-20)/d),h=.5*(b-g*d);if(0<g)for(a.begin(),a.moveTo(0,.5*c),a.lineTo(h+.2*d,.5*c),a.moveTo(b-h-.2*d,.5*c),a.lineTo(b,.5*c),a.stroke(),b=h,a.setFillColor(f),f=0;f<g;f++)a.rect(b+.2*d,.25*c,.2*d,.5*c),a.fillAndStroke(),a.begin(),a.moveTo(b+.8*d,0),a.lineTo(b+
.8*d,c),a.stroke(),0<f&&(a.setDashed("1"),a.begin(),a.moveTo(b-.2*d,.5*c),a.lineTo(b+.2*d,.5*c),a.stroke(),a.setDashed(e)),b+=d};mxCellRenderer.registerShape(mxShapeElectricalBatteryStack.prototype.cst.SHAPE_BATTERY_STACK,mxShapeElectricalBatteryStack);mxShapeElectricalBatteryStack.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];
function mxShapeElectricalDCSource3_v2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalDCSource3_v2,mxShape);mxShapeElectricalDCSource3_v2.prototype.cst={SHAPE_DC_SOURCE_3_V2:"mxgraph.electrical.signal_sources.dc_source_3_v2"};
mxShapeElectricalDCSource3_v2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(3,.05*Math.min(c,b));a.ellipse(0,0,b,c);a.fillAndStroke();a.begin();a.moveTo(.5*b-d,.05*c+3);a.lineTo(.5*b+d,.05*c+3);a.moveTo(.5*b,.05*c-d+3);a.lineTo(.5*b,.05*c+d+3);a.moveTo(.5*b-d,.95*c-3);a.lineTo(.5*b+d,.95*c-3);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalDCSource3_v2.prototype.cst.SHAPE_DC_SOURCE_3_V2,mxShapeElectricalDCSource3_v2);
mxShapeElectricalDCSource3_v2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];function mxShapeElectricalSource(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSource,mxShape);mxShapeElectricalSource.prototype.cst={SHAPE_SOURCE:"mxgraph.electrical.signal_sources.source"};
mxShapeElectricalSource.prototype.customProperties=[{name:"elSourceType",dispName:"Source Type",type:"enum",defVal:"independent",enumList:[{val:"independent",dispName:"Independent"},{val:"dependent",dispName:"Dependent"}]},{name:"elSignalType",dispName:"Signal Type",type:"enum",defVal:"ac",enumList:[{val:"ac",dispName:"AC"},{val:"none",dispName:"None"},{val:"square",dispName:"Square"},{val:"triangular",dispName:"Triangular"},{val:"sawtooth",dispName:"Sawtooth"},{val:"noise",dispName:"Noise"},{val:"ideal",
dispName:"Ideal"},{val:"expSquib",dispName:"Explosive Squib"},{val:"pulse",dispName:"Pulse"},{val:"invPulse",dispName:"Inverse Pulse"},{val:"chopSquare",dispName:"Chopped Square"},{val:"stepOn",dispName:"Step On"},{val:"stepOff",dispName:"Step Off"},{val:"dc1",dispName:"DC Horizontal"},{val:"dc2",dispName:"DC Vertical"},{val:"dc3",dispName:"DC Plus minus"}]}];
mxShapeElectricalSource.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSourceType","independent");e=mxUtils.getValue(this.style,"elSignalType","none");switch(d){case "independent":a.ellipse(0,0,b,c);a.fillAndStroke();break;case "dependent":a.begin(),a.moveTo(0,.5*c),a.lineTo(.5*b,0),a.lineTo(b,.5*c),a.lineTo(.5*b,c),a.lineTo(0,.5*c),a.close(),a.fillAndStroke()}switch(e){case "ac":a.begin();a.moveTo(.3*b,.5*c);a.quadTo(.34*b,.35*c,.4*b,.35*c);a.quadTo(.46*
b,.35*c,.5*b,.5*c);a.quadTo(.53*b,.65*c,.6*b,.65*c);a.quadTo(.66*b,.65*c,.7*b,.5*c);a.stroke();break;case "square":a.begin();a.moveTo(.3*b,.5*c);a.lineTo(.3*b,.35*c);a.lineTo(.5*b,.35*c);a.lineTo(.5*b,.65*c);a.lineTo(.7*b,.65*c);a.lineTo(.7*b,.5*c);a.stroke();break;case "triangular":a.begin();a.moveTo(.3*b,.65*c);a.lineTo(.4*b,.35*c);a.lineTo(.5*b,.65*c);a.lineTo(.6*b,.35*c);a.lineTo(.7*b,.65*c);a.stroke();break;case "sawtooth":a.begin();a.moveTo(.24*b,.65*c);a.lineTo(.42*b,.35*c);a.lineTo(.42*b,
.65*c);a.lineTo(.58*b,.35*c);a.lineTo(.58*b,.65*c);a.lineTo(.76*b,.35*c);a.lineTo(.76*b,.65*c);a.stroke();break;case "noise":a.begin();a.moveTo(.5*b,.17*c);a.lineTo(.5*b,.5*c);a.moveTo(.18*b,.42*c);a.lineTo(.5*b,.5*c);a.moveTo(.32*b,.78*c);a.lineTo(.5*b,.5*c);a.moveTo(.82*b,.42*c);a.lineTo(.5*b,.5*c);a.moveTo(.68*b,.78*c);a.lineTo(.5*b,.5*c);a.stroke();break;case "ideal":a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();break;case "expSquib":a.ellipse(0,.43*c,.14*b,.14*c);a.stroke();a.ellipse(.86*
b,.43*c,.14*b,.14*c);a.stroke();a.begin();a.moveTo(.83*b,.63*c);a.lineTo(.73*b,.73*c);a.lineTo(.27*b,.27*c);a.lineTo(.17*b,.37*c);a.stroke();a.begin();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.moveTo(.2*b,.25*c);a.lineTo(.13*b,.4*c);a.lineTo(.28*b,.33*c);a.close();a.fillAndStroke();break;case "pulse":a.begin();a.moveTo(.3*b,.65*c);a.lineTo(.4*b,.65*c);a.lineTo(.4*b,.35*c);a.lineTo(.6*b,.35*c);a.lineTo(.6*b,.65*c);a.lineTo(.7*b,.65*c);a.stroke();break;
case "invPulse":a.begin();a.moveTo(.3*b,.35*c);a.lineTo(.4*b,.35*c);a.lineTo(.4*b,.65*c);a.lineTo(.6*b,.65*c);a.lineTo(.6*b,.35*c);a.lineTo(.7*b,.35*c);a.stroke();break;case "chopSquare":a.begin();a.moveTo(.3*b,.5*c);a.lineTo(.33*b,.35*c);a.lineTo(.47*b,.35*c);a.lineTo(.53*b,.65*c);a.lineTo(.67*b,.65*c);a.lineTo(.7*b,.5*c);a.stroke();break;case "stepOn":a.begin();a.moveTo(.3*b,.65*c);a.lineTo(.5*b,.65*c);a.lineTo(.5*b,.35*c);a.lineTo(.7*b,.35*c);a.stroke();break;case "stepOff":a.begin();a.moveTo(.3*
b,.35*c);a.lineTo(.5*b,.35*c);a.lineTo(.5*b,.65*c);a.lineTo(.7*b,.65*c);a.stroke();break;case "dc1":a.begin();a.moveTo(.17*b,.5*c);a.lineTo(.83*b,.5*c);a.moveTo(.67*b,.42*c);a.lineTo(.83*b,.5*c);a.lineTo(.67*b,.58*c);a.stroke();break;case "dc2":a.begin();a.moveTo(.5*b,.17*c);a.lineTo(.5*b,.83*c);a.moveTo(.42*b,.67*c);a.lineTo(.5*b,.83*c);a.lineTo(.58*b,.67*c);a.stroke();break;case "dc3":e=Math.max(3,.05*Math.min(c,b));var f=3;"dependent"==d&&(f+=3);a.begin();a.moveTo(.5*b-e,.05*c+f);a.lineTo(.5*b+
e,.05*c+f);a.moveTo(.5*b,.05*c-e+f);a.lineTo(.5*b,.05*c+e+f);a.moveTo(.5*b-e,.95*c-f);a.lineTo(.5*b+e,.95*c-f);a.stroke()}};mxCellRenderer.registerShape(mxShapeElectricalSource.prototype.cst.SHAPE_SOURCE,mxShapeElectricalSource);function mxShapeElectricalTwoWaySwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTwoWaySwitch,mxShape);mxShapeElectricalTwoWaySwitch.prototype.cst={SHAPE_TWO_WAY_SWITCH:"mxgraph.electrical.electro-mechanical.twoWaySwitch"};
mxShapeElectricalTwoWaySwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"int",min:1,defVal:"1"}];
mxShapeElectricalTwoWaySwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.8*b,.88*c);a.lineTo(b,.88*c);a.moveTo(.8*b,.12*c);a.lineTo(b,.12*c);"2"==d?(a.moveTo(.28*b,.48*c),a.lineTo(.72*b,.15*c)):(a.moveTo(.28*b,.52*c),a.lineTo(.72*b,.85*c));a.stroke();a.ellipse(.72*b,.77*c,.08*b,.23*c);a.fillAndStroke();a.ellipse(.72*b,0,.08*b,.23*c);a.fillAndStroke();a.ellipse(.2*b,.385*
c,.08*b,.23*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalTwoWaySwitch.prototype.cst.SHAPE_TWO_WAY_SWITCH,mxShapeElectricalTwoWaySwitch);mxShapeElectricalTwoWaySwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(1,.12),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.88),!0)];function mxShapeElectricalPushbutton(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalPushbutton,mxShape);mxShapeElectricalPushbutton.prototype.cst={SHAPE_PUSHBUTTON:"mxgraph.electrical.electro-mechanical.pushbutton"};mxShapeElectricalPushbutton.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalPushbutton.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(0,.8*c);a.lineTo(.2*b,.8*c);a.moveTo(.8*b,.8*c);a.lineTo(b,.8*c);"off"==d?(a.moveTo(.5*b,.5*c),a.lineTo(.5*b,0),a.moveTo(.46*b,0),a.lineTo(.54*b,0),a.moveTo(.2*b,.5*c),a.lineTo(.8*b,.5*c)):(a.moveTo(.5*b,c),a.lineTo(.5*b,.5*c),a.moveTo(.46*b,.5*c),a.lineTo(.54*b,.5*c),a.moveTo(.2*b,c),a.lineTo(.8*b,c));a.stroke();a.ellipse(.72*b,.65*c,.08*
b,.3*c);a.fillAndStroke();a.ellipse(.2*b,.65*c,.08*b,.3*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalPushbutton.prototype.cst.SHAPE_PUSHBUTTON,mxShapeElectricalPushbutton);mxShapeElectricalPushbutton.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalSingleSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalSingleSwitch,mxShape);mxShapeElectricalSingleSwitch.prototype.cst={SHAPE_SINGLE_SWITCH:"mxgraph.electrical.electro-mechanical.singleSwitch"};mxShapeElectricalSingleSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalSingleSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(0,.8*c);a.lineTo(.2*b,.8*c);a.moveTo(.8*b,.8*c);a.lineTo(b,.8*c);"off"==d?(a.moveTo(.28*b,.75*c),a.lineTo(.76*b,0)):(a.moveTo(.2*b,.8*c),a.lineTo(.8*b,.8*c));a.stroke();a.ellipse(.72*b,.65*c,.08*b,.3*c);a.fillAndStroke();a.ellipse(.2*b,.65*c,.08*b,.3*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalSingleSwitch.prototype.cst.SHAPE_SINGLE_SWITCH,mxShapeElectricalSingleSwitch);mxShapeElectricalSingleSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalSwitchDisconnector(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSwitchDisconnector,mxShape);
mxShapeElectricalSwitchDisconnector.prototype.cst={SHAPE_SWITCH_DISCONNECTOR:"mxgraph.electrical.electro-mechanical.switchDisconnector"};mxShapeElectricalSwitchDisconnector.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalSwitchDisconnector.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.84*c);a.lineTo(b,.84*c);a.moveTo(.8*b,.68*c);a.lineTo(.8*b,c);a.moveTo(0,.84*c);a.lineTo(.24*b,.84*c);"off"==d?a.lineTo(.76*b,0):a.lineTo(.8*b,.84*c);a.stroke();a.ellipse(.72*b,.68*c,.08*b,.32*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalSwitchDisconnector.prototype.cst.SHAPE_SWITCH_DISCONNECTOR,mxShapeElectricalSwitchDisconnector);
mxShapeElectricalSwitchDisconnector.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.84),!0),new mxConnectionConstraint(new mxPoint(1,.84),!0)];function mxShapeElectricalFuse2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalFuse2,mxShape);mxShapeElectricalFuse2.prototype.cst={SHAPE_FUSE2:"mxgraph.electrical.electro-mechanical.fuse2"};
mxShapeElectricalFuse2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalFuse2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.8*c);a.lineTo(b,.8*c);a.moveTo(0,.8*c);a.lineTo(.25*b,.8*c);"off"==d?(a.lineTo(.76*b,0),a.moveTo(.348*b,.47*c),a.lineTo(.563*b,.13*c),a.lineTo(.603*b,.46*c),a.lineTo(.387*b,.78*c)):(a.lineTo(.8*b,.8*c),a.moveTo(.38*b,.6*c),a.lineTo(.62*b,.6*c),a.lineTo(.62*b,c),a.lineTo(.38*b,c));a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalFuse2.prototype.cst.SHAPE_FUSE2,mxShapeElectricalFuse2);mxShapeElectricalFuse2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalLiquidLevelActuatedSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalLiquidLevelActuatedSwitch,mxShape);
mxShapeElectricalLiquidLevelActuatedSwitch.prototype.cst={SHAPE_LIQUID_LEVEL_ACTUATED_SWITCH:"mxgraph.electrical.electro-mechanical.liquidLevelActuatedSwitch"};mxShapeElectricalLiquidLevelActuatedSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalLiquidLevelActuatedSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.27*c);a.lineTo(b,.27*c);a.moveTo(0,.27*c);a.lineTo(.2*b,.27*c);"off"==d?(a.moveTo(.24*b,0),a.lineTo(.76*b,0),a.moveTo(.5*b,0),a.lineTo(.5*b,.47*c),a.stroke(),a.ellipse(.45*b,.47*c,.1*b,.26*c)):(a.moveTo(.28*b,.27*c),a.lineTo(.72*b,.27*c),a.moveTo(.5*b,.27*c),a.lineTo(.5*b,.74*c),a.stroke(),a.ellipse(.45*b,.74*c,.1*b,
.26*c));a.fillAndStroke();a.ellipse(.2*b,.17*c,.08*b,.2*c);a.fillAndStroke();a.ellipse(.72*b,.17*c,.08*b,.2*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalLiquidLevelActuatedSwitch.prototype.cst.SHAPE_LIQUID_LEVEL_ACTUATED_SWITCH,mxShapeElectricalLiquidLevelActuatedSwitch);mxShapeElectricalLiquidLevelActuatedSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.27),!0),new mxConnectionConstraint(new mxPoint(1,.27),!0)];
function mxShapeElectricalLiquidLevelActuatedSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalLiquidLevelActuatedSwitch2,mxShape);mxShapeElectricalLiquidLevelActuatedSwitch2.prototype.cst={SHAPE_LIQUID_LEVEL_ACTUATED_SWITCH_2:"mxgraph.electrical.electro-mechanical.liquidLevelActuatedSwitch2"};
mxShapeElectricalLiquidLevelActuatedSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalLiquidLevelActuatedSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.76*b,c);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(.24*b,c);"off"==d?(a.lineTo(.76*b,.5*c),a.moveTo(.42*b,0),a.lineTo(.58*b,0),a.lineTo(.58*b,.4*c),a.lineTo(.42*b,.4*c),a.close(),a.moveTo(.46*b,.22*c),a.arcTo(.05*b,.1*c,0,0,1,.54*b,.22*c),a.arcTo(.05*b,.1*c,0,0,1,.46*b,.22*c),a.close(),a.moveTo(.5*b,.1*c),a.lineTo(.5*b,.17*c),
a.moveTo(.5*b,.4*c),a.lineTo(.5*b,.55*c),a.moveTo(.5*b,.63*c),a.lineTo(.5*b,.75*c)):(a.lineTo(.76*b,c),a.moveTo(.42*b,.25*c),a.lineTo(.58*b,.25*c),a.lineTo(.58*b,.65*c),a.lineTo(.42*b,.65*c),a.close(),a.moveTo(.46*b,.47*c),a.arcTo(.05*b,.1*c,0,0,1,.54*b,.47*c),a.arcTo(.05*b,.1*c,0,0,1,.46*b,.47*c),a.close(),a.moveTo(.5*b,.35*c),a.lineTo(.5*b,.42*c),a.moveTo(.5*b,.65*c),a.lineTo(.5*b,.8*c),a.moveTo(.5*b,.88*c),a.lineTo(.5*b,c),a.stroke());a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalLiquidLevelActuatedSwitch2.prototype.cst.SHAPE_LIQUID_LEVEL_ACTUATED_SWITCH_2,mxShapeElectricalLiquidLevelActuatedSwitch2);mxShapeElectricalLiquidLevelActuatedSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalGasFlowActuatedSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalGasFlowActuatedSwitch,mxShape);mxShapeElectricalGasFlowActuatedSwitch.prototype.cst={SHAPE_GAS_FLOW_ACTUATED_SWITCH:"mxgraph.electrical.electro-mechanical.gasFlowActuatedSwitch"};mxShapeElectricalGasFlowActuatedSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalGasFlowActuatedSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.76*b,c);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(.24*b,c);"off"==d?(a.lineTo(.76*b,.5*c),a.moveTo(.42*b,0),a.lineTo(.58*b,0),a.lineTo(.58*b,.4*c),a.lineTo(.42*b,.4*c),a.close(),a.moveTo(.54*b,.34*c),a.lineTo(.54*b,.09*c),a.lineTo(.46*b,.09*c),a.lineTo(.46*b,.26*c),a.lineTo(.54*b,.26*c),a.moveTo(.5*b,.4*c),a.lineTo(.5*b,.55*c),a.moveTo(.5*
b,.63*c),a.lineTo(.5*b,.75*c),a.stroke(),a.ellipse(.475*b,.165*c,.025*b,.06*c)):(a.lineTo(.76*b,c),a.moveTo(.42*b,.25*c),a.lineTo(.58*b,.25*c),a.lineTo(.58*b,.65*c),a.lineTo(.42*b,.65*c),a.close(),a.moveTo(.54*b,.59*c),a.lineTo(.54*b,.34*c),a.lineTo(.46*b,.34*c),a.lineTo(.46*b,.51*c),a.lineTo(.54*b,.51*c),a.moveTo(.5*b,.65*c),a.lineTo(.5*b,.8*c),a.moveTo(.5*b,.88*c),a.lineTo(.5*b,c),a.stroke(),a.ellipse(.475*b,.415*c,.025*b,.06*c));a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalGasFlowActuatedSwitch.prototype.cst.SHAPE_GAS_FLOW_ACTUATED_SWITCH,mxShapeElectricalGasFlowActuatedSwitch);mxShapeElectricalGasFlowActuatedSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalFlowActuatedSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalFlowActuatedSwitch,mxShape);mxShapeElectricalFlowActuatedSwitch.prototype.cst={SHAPE_FLOW_ACTUATED_SWITCH:"mxgraph.electrical.electro-mechanical.flowActuatedSwitch"};mxShapeElectricalFlowActuatedSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalFlowActuatedSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.1*c);a.lineTo(b,.1*c);a.moveTo(0,.1*c);a.lineTo(.2*b,.1*c);"off"==d?(a.moveTo(.28*b,.13*c),a.lineTo(.76*b,.61*c),a.moveTo(.5*b,.35*c),a.lineTo(.5*b,c),a.lineTo(.6*b,c),a.lineTo(.5*b,.68*c)):(a.moveTo(.28*b,.1*c),a.lineTo(.72*b,.1*c),a.moveTo(.5*b,.1*c),a.lineTo(.5*b,.85*c),a.lineTo(.6*b,.85*c),a.lineTo(.5*b,.53*c));a.stroke();
a.ellipse(.2*b,0,.08*b,.2*c);a.stroke();a.ellipse(.72*b,0,.08*b,.2*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalFlowActuatedSwitch.prototype.cst.SHAPE_FLOW_ACTUATED_SWITCH,mxShapeElectricalFlowActuatedSwitch);mxShapeElectricalFlowActuatedSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.27),!0),new mxConnectionConstraint(new mxPoint(1,.27),!0)];
function mxShapeElectricalPressureActuatedSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalPressureActuatedSwitch,mxShape);mxShapeElectricalPressureActuatedSwitch.prototype.cst={SHAPE_PRESSURE_ACTUATED_SWITCH:"mxgraph.electrical.electro-mechanical.pressureActuatedSwitch"};
mxShapeElectricalPressureActuatedSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalPressureActuatedSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.1*c);a.lineTo(b,.1*c);a.moveTo(0,.1*c);a.lineTo(.2*b,.1*c);"off"==d?(a.moveTo(.28*b,.13*c),a.lineTo(.76*b,.61*c),a.moveTo(.5*b,.35*c),a.lineTo(.5*b,.74*c),a.moveTo(.39*b,c),a.arcTo(.11*b,.26*c,0,0,1,.5*b,.74*c),a.arcTo(.11*b,.26*c,0,0,1,.61*b,c)):(a.moveTo(.28*b,.1*c),a.lineTo(.72*b,.1*c),a.moveTo(.5*b,.1*c),a.lineTo(.5*
b,.49*c),a.moveTo(.39*b,.75*c),a.arcTo(.11*b,.26*c,0,0,1,.5*b,.49*c),a.arcTo(.11*b,.26*c,0,0,1,.61*b,.75*c));a.close();a.stroke();a.ellipse(.2*b,0,.08*b,.2*c);a.stroke();a.ellipse(.72*b,0,.08*b,.2*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalPressureActuatedSwitch.prototype.cst.SHAPE_PRESSURE_ACTUATED_SWITCH,mxShapeElectricalPressureActuatedSwitch);
mxShapeElectricalPressureActuatedSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.1),!0),new mxConnectionConstraint(new mxPoint(1,.1),!0)];function mxShapeElectricalTemperatureActuatedSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTemperatureActuatedSwitch,mxShape);mxShapeElectricalTemperatureActuatedSwitch.prototype.cst={SHAPE_TEMPERATURE_ACTUATED_SWITCH:"mxgraph.electrical.electro-mechanical.temperatureActuatedSwitch"};
mxShapeElectricalTemperatureActuatedSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalTemperatureActuatedSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.1*c);a.lineTo(b,.1*c);a.moveTo(0,.1*c);a.lineTo(.2*b,.1*c);"off"==d?(a.moveTo(.28*b,.13*c),a.lineTo(.76*b,.61*c),a.moveTo(.5*b,.35*c),a.lineTo(.5*b,.64*c),a.lineTo(.57*b,.64*c),a.lineTo(.57*b,.81*c),a.lineTo(.5*b,.81*c),a.lineTo(.5*b,c)):(a.moveTo(.28*b,.1*c),a.lineTo(.72*b,.1*c),a.moveTo(.5*b,.1*c),a.lineTo(.5*b,.39*
c),a.lineTo(.57*b,.39*c),a.lineTo(.57*b,.56*c),a.lineTo(.5*b,.56*c),a.lineTo(.5*b,.75*c));a.stroke();a.ellipse(.2*b,0,.08*b,.2*c);a.stroke();a.ellipse(.72*b,0,.08*b,.2*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalTemperatureActuatedSwitch.prototype.cst.SHAPE_TEMPERATURE_ACTUATED_SWITCH,mxShapeElectricalTemperatureActuatedSwitch);
mxShapeElectricalTemperatureActuatedSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.1),!0),new mxConnectionConstraint(new mxPoint(1,.1),!0)];function mxShapeElectricalSafetyInterlockSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSafetyInterlockSwitch,mxShape);mxShapeElectricalSafetyInterlockSwitch.prototype.cst={SHAPE_SAFETY_INTERLOCK_SWITCH:"mxgraph.electrical.electro-mechanical.safetyInterlockSwitch"};
mxShapeElectricalSafetyInterlockSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalSafetyInterlockSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.34*c);a.lineTo(b,.34*c);a.moveTo(0,.34*c);a.lineTo(.2*b,.34*c);"off"==d?(a.moveTo(.25*b,0),a.lineTo(.75*b,0),a.lineTo(.5*b,.81*c)):(a.moveTo(.25*b,.19*c),a.lineTo(.75*b,.19*c),a.lineTo(.5*b,c));a.close();a.stroke();a.ellipse(.2*b,.27*c,.08*b,.14*c);a.stroke();a.ellipse(.72*b,.27*c,.08*b,.14*c);a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalSafetyInterlockSwitch.prototype.cst.SHAPE_SAFETY_INTERLOCK_SWITCH,mxShapeElectricalSafetyInterlockSwitch);mxShapeElectricalSafetyInterlockSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!0),new mxConnectionConstraint(new mxPoint(1,.35),!0)];function mxShapeElectricalTemperatureSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalTemperatureSwitch,mxShape);mxShapeElectricalTemperatureSwitch.prototype.cst={SHAPE_TEMPERATURE_SWITCH:"mxgraph.electrical.electro-mechanical.temperatureSwitch"};mxShapeElectricalTemperatureSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalTemperatureSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.76*b,c);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(.24*b,c);"off"==d?a.lineTo(.76*b,.1*c):a.lineTo(.76*b,c);a.stroke();a.ellipse(.43*b,0,.1*b,.22*c);a.fillAndStroke();a.begin();a.moveTo(.48*b,0);a.lineTo(.48*b,.22*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalTemperatureSwitch.prototype.cst.SHAPE_TEMPERATURE_SWITCH,mxShapeElectricalTemperatureSwitch);
mxShapeElectricalTemperatureSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalThermostat2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalThermostat2,mxShape);mxShapeElectricalThermostat2.prototype.cst={SHAPE_THERMOSTAT2:"mxgraph.electrical.electro-mechanical.thermostat2"};
mxShapeElectricalThermostat2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalThermostat2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.86*c);a.lineTo(b,.86*c);a.moveTo(0,.86*c);a.lineTo(.2*b,.86*c);"off"==d?(a.moveTo(.28*b,.82*c),a.lineTo(.76*b,.2*c)):(a.moveTo(.28*b,.86*c),a.lineTo(.72*b,.85*c));a.stroke();a.ellipse(.2*b,.72*c,.08*b,.28*c);a.fillAndStroke();a.ellipse(.72*b,.72*c,.08*b,.28*c);a.fillAndStroke();a.text(.5*b,.2*c,0,0,"tº",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeElectricalThermostat2.prototype.cst.SHAPE_THERMOSTAT2,mxShapeElectricalThermostat2);mxShapeElectricalThermostat2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalLimitSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalLimitSwitch2,mxShape);
mxShapeElectricalLimitSwitch2.prototype.cst={SHAPE_LIMIT_SWITCH2:"mxgraph.electrical.electro-mechanical.limitSwitch2"};mxShapeElectricalLimitSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalLimitSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.84*c);a.lineTo(b,.84*c);a.moveTo(0,.84*c);a.lineTo(.2*b,.84*c);"off"==d?(a.moveTo(.28*b,.8*c),a.lineTo(.76*b,0),a.moveTo(.46*b,.5*c),a.lineTo(.545*b,.07*c),a.lineTo(.57*b,.3*c)):(a.moveTo(.28*b,.84*c),a.lineTo(.72*b,.84*c),a.moveTo(.47*b,.84*c),a.lineTo(.58*b,.57*c),a.lineTo(.58*b,.84*c));a.stroke();a.ellipse(.2*b,.68*c,.08*b,.32*
c);a.fillAndStroke();a.ellipse(.72*b,.68*c,.08*b,.32*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalLimitSwitch2.prototype.cst.SHAPE_LIMIT_SWITCH2,mxShapeElectricalLimitSwitch2);mxShapeElectricalLimitSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalCircuitBreaker2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalCircuitBreaker2,mxShape);mxShapeElectricalCircuitBreaker2.prototype.cst={SHAPE_CIRCUIT_BREAKER2:"mxgraph.electrical.electro-mechanical.circuitBreaker2"};mxShapeElectricalCircuitBreaker2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalCircuitBreaker2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,.8*c);a.lineTo(b,.8*c);a.moveTo(.75*b,.6*c);a.lineTo(.85*b,c);a.moveTo(.85*b,.6*c);a.lineTo(.75*b,c);a.moveTo(0,.8*c);a.lineTo(.24*b,.8*c);"off"==d?a.lineTo(.76*b,0):a.lineTo(.8*b,.8*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalCircuitBreaker2.prototype.cst.SHAPE_CIRCUIT_BREAKER2,mxShapeElectricalCircuitBreaker2);
mxShapeElectricalCircuitBreaker2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalSelectorSwitch3Position2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSelectorSwitch3Position2,mxShape);mxShapeElectricalSelectorSwitch3Position2.prototype.cst={SHAPE_SELECTOR_SWITCH_3_POSITION:"mxgraph.electrical.electro-mechanical.selectorSwitch3Position2"};
mxShapeElectricalSelectorSwitch3Position2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"int",min:1,max:3,defVal:"1"}];
mxShapeElectricalSelectorSwitch3Position2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");e=mxUtils.getValue(this.style,"strokeColor","#000000");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.68*b,.06*c);a.lineTo(b,.06*c);a.moveTo(.75*b,.5*c);a.lineTo(b,.5*c);a.moveTo(.68*b,.94*c);a.lineTo(b,.94*c);a.stroke();a.ellipse(.2*b,.435*c,.08*b,.13*c);a.fillAndStroke();a.ellipse(.6*b,0,.08*b,.13*c);a.fillAndStroke();a.ellipse(.67*
b,.435*c,.08*b,.13*c);a.fillAndStroke();a.ellipse(.6*b,.87*c,.08*b,.13*c);a.fillAndStroke();a.setFillColor(e);"1"==d?(a.begin(),a.moveTo(.27*b,.47*c),a.lineTo(.59*b,.12*c),a.stroke(),a.begin(),a.moveTo(.52*b,.12*c),a.lineTo(.61*b,.095*c),a.lineTo(.565*b,.22*c)):"2"==d?(a.begin(),a.moveTo(.28*b,.5*c),a.lineTo(.64*b,.5*c),a.stroke(),a.begin(),a.moveTo(.59*b,.44*c),a.lineTo(.67*b,.5*c),a.lineTo(.59*b,.56*c)):(a.begin(),a.moveTo(.27*b,.53*c),a.lineTo(.59*b,.88*c),a.stroke(),a.begin(),a.moveTo(.52*b,.88*
c),a.lineTo(.61*b,.905*c),a.lineTo(.565*b,.78*c));a.close();a.fill()};mxCellRenderer.registerShape(mxShapeElectricalSelectorSwitch3Position2.prototype.cst.SHAPE_SELECTOR_SWITCH_3_POSITION,mxShapeElectricalSelectorSwitch3Position2);mxShapeElectricalSelectorSwitch3Position2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];
function mxShapeElectricalSelectorSwitch4Position2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSelectorSwitch4Position2,mxShape);mxShapeElectricalSelectorSwitch4Position2.prototype.cst={SHAPE_SELECTOR_SWITCH_4_POSITION:"mxgraph.electrical.electro-mechanical.selectorSwitch4Position2"};
mxShapeElectricalSelectorSwitch4Position2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"int",min:1,max:4,defVal:"1"}];
mxShapeElectricalSelectorSwitch4Position2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");e=mxUtils.getValue(this.style,"strokeColor","#000000");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.68*b,.045*c);a.lineTo(b,.045*c);a.moveTo(.8*b,.35*c);a.lineTo(b,.35*c);a.moveTo(.8*b,.65*c);a.lineTo(b,.65*c);a.moveTo(.68*b,.955*c);a.lineTo(b,.955*c);a.stroke();a.ellipse(.2*b,.455*c,.08*b,.09*c);a.fillAndStroke();a.ellipse(.6*b,0,
.08*b,.09*c);a.fillAndStroke();a.ellipse(.72*b,.305*c,.08*b,.09*c);a.fillAndStroke();a.ellipse(.72*b,.605*c,.08*b,.09*c);a.fillAndStroke();a.ellipse(.6*b,.91*c,.08*b,.09*c);a.fillAndStroke();a.setFillColor(e);"1"==d?(a.begin(),a.moveTo(.27*b,.47*c),a.lineTo(.58*b,.11*c),a.stroke(),a.begin(),a.moveTo(.515*b,.115*c),a.lineTo(.61*b,.08*c),a.lineTo(.58*b,.18*c)):"2"==d?(a.begin(),a.moveTo(.28*b,.485*c),a.lineTo(.69*b,.37*c),a.stroke(),a.begin(),a.moveTo(.62*b,.34*c),a.lineTo(.72*b,.36*c),a.lineTo(.64*
b,.43*c)):"3"==d?(a.begin(),a.moveTo(.28*b,.515*c),a.lineTo(.69*b,.63*c),a.stroke(),a.begin(),a.moveTo(.62*b,.66*c),a.lineTo(.72*b,.64*c),a.lineTo(.64*b,.57*c)):(a.begin(),a.moveTo(.27*b,.53*c),a.lineTo(.58*b,.89*c),a.stroke(),a.begin(),a.moveTo(.515*b,.885*c),a.lineTo(.61*b,.92*c),a.lineTo(.58*b,.82*c));a.close();a.fill()};mxCellRenderer.registerShape(mxShapeElectricalSelectorSwitch4Position2.prototype.cst.SHAPE_SELECTOR_SWITCH_4_POSITION,mxShapeElectricalSelectorSwitch4Position2);
mxShapeElectricalSelectorSwitch4Position2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalSelectorSwitch6Position2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalSelectorSwitch6Position2,mxShape);mxShapeElectricalSelectorSwitch6Position2.prototype.cst={SHAPE_SELECTOR_SWITCH_6_POSITION:"mxgraph.electrical.electro-mechanical.selectorSwitch6Position2"};
mxShapeElectricalSelectorSwitch6Position2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"int",min:1,max:6,defVal:"1"}];
mxShapeElectricalSelectorSwitch6Position2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");e=mxUtils.getValue(this.style,"strokeColor","#000000");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.39*b,.03*c);a.lineTo(b,.03*c);a.moveTo(.68*b,.22*c);a.lineTo(b,.22*c);a.moveTo(.8*b,.405*c);a.lineTo(b,.405*c);a.moveTo(.8*b,.595*c);a.lineTo(b,.595*c);a.moveTo(.68*b,.78*c);a.lineTo(b,.78*c);a.moveTo(.39*b,.97*c);a.lineTo(b,.97*c);
a.stroke();a.ellipse(.2*b,.47*c,.08*b,.06*c);a.fillAndStroke();a.ellipse(.31*b,0,.08*b,.06*c);a.fillAndStroke();a.ellipse(.6*b,.19*c,.08*b,.06*c);a.fillAndStroke();a.ellipse(.72*b,.375*c,.08*b,.06*c);a.fillAndStroke();a.ellipse(.72*b,.565*c,.08*b,.06*c);a.fillAndStroke();a.ellipse(.6*b,.75*c,.08*b,.06*c);a.fillAndStroke();a.ellipse(.31*b,.94*c,.08*b,.06*c);a.fillAndStroke();a.setFillColor(e);"1"==d?(a.begin(),a.moveTo(.25*b,.47*c),a.lineTo(.34*b,.08*c),a.stroke(),a.begin(),a.moveTo(.29*b,.115*c),
a.lineTo(.34*b,.06*c),a.lineTo(.37*b,.12*c)):"2"==d?(a.begin(),a.moveTo(.27*b,.48*c),a.lineTo(.595*b,.25*c),a.stroke(),a.begin(),a.moveTo(.52*b,.265*c),a.lineTo(.61*b,.24*c),a.lineTo(.58*b,.302*c)):"3"==d?(a.begin(),a.moveTo(.28*b,.495*c),a.lineTo(.69*b,.42*c),a.stroke(),a.begin(),a.moveTo(.63*b,.405*c),a.lineTo(.72*b,.415*c),a.lineTo(.65*b,.455*c)):"4"==d?(a.begin(),a.moveTo(.28*b,.505*c),a.lineTo(.69*b,.58*c),a.stroke(),a.begin(),a.moveTo(.63*b,.595*c),a.lineTo(.72*b,.585*c),a.lineTo(.65*b,.545*
c)):"5"==d?(a.begin(),a.moveTo(.27*b,.52*c),a.lineTo(.595*b,.75*c),a.stroke(),a.begin(),a.moveTo(.52*b,.735*c),a.lineTo(.61*b,.76*c),a.lineTo(.58*b,.698*c)):(a.begin(),a.moveTo(.25*b,.53*c),a.lineTo(.34*b,.92*c),a.stroke(),a.begin(),a.moveTo(.29*b,.885*c),a.lineTo(.34*b,.94*c),a.lineTo(.37*b,.88*c));a.close();a.fill()};mxCellRenderer.registerShape(mxShapeElectricalSelectorSwitch6Position2.prototype.cst.SHAPE_SELECTOR_SWITCH_6_POSITION,mxShapeElectricalSelectorSwitch6Position2);
mxShapeElectricalSelectorSwitch6Position2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.03),!0),new mxConnectionConstraint(new mxPoint(1,.22),!0),new mxConnectionConstraint(new mxPoint(1,.405),!0),new mxConnectionConstraint(new mxPoint(1,.595),!0),new mxConnectionConstraint(new mxPoint(1,.78),!0),new mxConnectionConstraint(new mxPoint(1,.97),!0)];
function mxShapeElectricalShortingSelectorSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalShortingSelectorSwitch2,mxShape);mxShapeElectricalShortingSelectorSwitch2.prototype.cst={SHAPE_SHORTING_SELECTOR_SWITCH_2:"mxgraph.electrical.electro-mechanical.shortingSelectorSwitch2"};
mxShapeElectricalShortingSelectorSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"int",min:1,max:4,defVal:"1"}];
mxShapeElectricalShortingSelectorSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");mxUtils.getValue(this.style,"strokeColor","#000000");a.begin();a.moveTo(0,.5*c);a.lineTo(.25*b,.5*c);a.stroke();a.ellipse(.25*b,.455*c,.1*b,.09*c);a.fillAndStroke();a.ellipse(.75*b,0,.1*b,.09*c);a.fillAndStroke();a.ellipse(.9*b,.305*c,.1*b,.09*c);a.fillAndStroke();a.ellipse(.9*b,.605*c,.1*b,.09*c);a.fillAndStroke();a.ellipse(.75*b,.91*c,.1*b,.09*
c);a.fillAndStroke();"1"==d?(a.begin(),a.moveTo(.33*b,.47*c),a.lineTo(.72*b,.12*c),a.stroke(),a.begin(),a.moveTo(.617*b,.044*c),a.arcTo(.21*b,.17*c,0,0,1,.818*b,.182*c),a.lineTo(.766*b,.198*c),a.arcTo(.15*b,.13*c,0,0,0,.617*b,.092*c)):"2"==d?(a.begin(),a.moveTo(.34*b,.49*c),a.lineTo(.83*b,.375*c),a.stroke(),a.begin(),a.moveTo(.791*b,.263*c),a.arcTo(.24*b,.2*c,0,0,1,.889*b,.474*c),a.lineTo(.837*b,.465*c),a.arcTo(.16*b,.14*c,0,0,0,.767*b,.303*c)):"3"==d?(a.begin(),a.moveTo(.34*b,.51*c),a.lineTo(.83*
b,.625*c),a.stroke(),a.begin(),a.moveTo(.791*b,.737*c),a.arcTo(.24*b,.2*c,0,0,0,.889*b,.526*c),a.lineTo(.837*b,.535*c),a.arcTo(.16*b,.14*c,0,0,1,.767*b,.697*c)):(a.begin(),a.moveTo(.33*b,.53*c),a.lineTo(.72*b,.88*c),a.stroke(),a.begin(),a.moveTo(.617*b,.956*c),a.arcTo(.21*b,.17*c,0,0,0,.818*b,.818*c),a.lineTo(.766*b,.802*c),a.arcTo(.15*b,.13*c,0,0,1,.617*b,.908*c));a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalShortingSelectorSwitch2.prototype.cst.SHAPE_SHORTING_SELECTOR_SWITCH_2,mxShapeElectricalShortingSelectorSwitch2);mxShapeElectricalShortingSelectorSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0)];function mxShapeElectricalProximityLimitSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalProximityLimitSwitch2,mxShape);
mxShapeElectricalProximityLimitSwitch2.prototype.cst={SHAPE_PROXIMITY_LIMIT_SWITCH_2:"mxgraph.electrical.electro-mechanical.proximityLimitSwitch2"};mxShapeElectricalProximityLimitSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalProximityLimitSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.8*b,.5*c);a.lineTo(b,.5*c);a.moveTo(.13*b,.5*c);a.lineTo(.5*b,0);a.lineTo(.87*b,.5*c);a.lineTo(.5*b,c);a.close();a.stroke();"off"==d?(a.begin(),a.moveTo(.755*b,.355*c),a.lineTo(.22*b,.5*c),a.lineTo(.625*b,.61*c),a.lineTo(.72*b,.36*c)):(a.begin(),a.moveTo(.76*b,.43*c),a.lineTo(.235*b,.5*c),
a.lineTo(.615*b,.66*c),a.lineTo(.72*b,.44*c));a.stroke();a.ellipse(.2*b,.445*c,.08*b,.11*c);a.fillAndStroke();a.ellipse(.72*b,.445*c,.08*b,.11*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalProximityLimitSwitch2.prototype.cst.SHAPE_PROXIMITY_LIMIT_SWITCH_2,mxShapeElectricalProximityLimitSwitch2);mxShapeElectricalProximityLimitSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];
function mxShapeElectricalInertiaSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalInertiaSwitch2,mxShape);mxShapeElectricalInertiaSwitch2.prototype.cst={SHAPE_INERTIA_SWITCH_2:"mxgraph.electrical.electro-mechanical.inertiaSwitch2"};mxShapeElectricalInertiaSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalInertiaSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(0,.85*c);a.lineTo(.2*b,.85*c);a.moveTo(.8*b,.85*c);a.lineTo(b,.85*c);a.stroke();"off"==d?(a.begin(),a.moveTo(.28*b,.79*c),a.lineTo(.76*b,0),a.moveTo(.493*b,.45*c),a.lineTo(.493*b,.26*c)):(a.begin(),a.moveTo(.28*b,.85*c),a.lineTo(.76*b,.85*c),a.moveTo(.51*b,.85*c),a.lineTo(.51*b,.26*c));a.lineTo(.43*b,.26*c);a.stroke();a.ellipse(.35*
b,.1*c,.08*b,.3*c);a.fillAndStroke();a.ellipse(.2*b,.7*c,.08*b,.3*c);a.fillAndStroke();a.ellipse(.72*b,.7*c,.08*b,.3*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalInertiaSwitch2.prototype.cst.SHAPE_INERTIA_SWITCH_2,mxShapeElectricalInertiaSwitch2);mxShapeElectricalInertiaSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.85),!0),new mxConnectionConstraint(new mxPoint(1,.85),!0)];
function mxShapeElectricalPushbuttonBreak2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalPushbuttonBreak2,mxShape);mxShapeElectricalPushbuttonBreak2.prototype.cst={SHAPE_PUSHBUTTON_BREAK_2:"mxgraph.electrical.electro-mechanical.pushbuttonBreak2"};
mxShapeElectricalPushbuttonBreak2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalPushbuttonBreak2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(0,.8*c);a.lineTo(.2*b,.8*c);a.moveTo(.8*b,.8*c);a.lineTo(b,.8*c);a.stroke();"off"==d?(a.begin(),a.moveTo(.24*b,c),a.lineTo(.76*b,c),a.moveTo(.5*b,c),a.lineTo(.5*b,.1*c)):(a.begin(),a.moveTo(.24*b,.9*c),a.lineTo(.76*b,.9*c),a.moveTo(.5*b,.9*c),a.lineTo(.5*b,0));a.stroke();a.ellipse(.2*b,.725*c,.08*b,.15*c);a.fillAndStroke();a.ellipse(.72*
b,.725*c,.08*b,.15*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalPushbuttonBreak2.prototype.cst.SHAPE_PUSHBUTTON_BREAK_2,mxShapeElectricalPushbuttonBreak2);mxShapeElectricalPushbuttonBreak2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalManualSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalManualSwitch2,mxShape);mxShapeElectricalManualSwitch2.prototype.cst={SHAPE_MANUAL_SWITCH_2:"mxgraph.electrical.electro-mechanical.manualSwitch2"};mxShapeElectricalManualSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalManualSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","on");a.begin();a.moveTo(.8*b,c);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(.25*b,c);"off"==d?(a.lineTo(.76*b,.1*c),a.moveTo(.49*b,0),a.lineTo(.49*b,.2*c),a.moveTo(.49*b,.3*c),a.lineTo(.49*b,.55*c),a.moveTo(.41*b,0),a.lineTo(.57*b,0)):(a.lineTo(.8*b,c),a.moveTo(.49*b,.45*c),a.lineTo(.49*b,.65*c),a.moveTo(.49*b,.75*c),a.lineTo(.49*b,c),a.moveTo(.41*b,.45*c),a.lineTo(.57*
b,.45*c));a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalManualSwitch2.prototype.cst.SHAPE_MANUAL_SWITCH_2,mxShapeElectricalManualSwitch2);mxShapeElectricalManualSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalTwoWayContact2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTwoWayContact2,mxShape);
mxShapeElectricalTwoWayContact2.prototype.cst={SHAPE_TWO_WAY_CONTACT_2:"mxgraph.electrical.electro-mechanical.twoWayContact2"};mxShapeElectricalTwoWayContact2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"neutral",enumList:[{val:"1",dispName:"1"},{val:"neutral",dispName:"Neutral"},{val:"2",dispName:"2"}]}];
mxShapeElectricalTwoWayContact2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(0,.5*c);a.lineTo(.21*b,.5*c);a.moveTo(.67*b,0);a.lineTo(b,0);a.moveTo(.67*b,c);a.lineTo(b,c);"1"==d?(a.moveTo(.28*b,.46*c),a.lineTo(.67*b,0)):"2"==d?(a.moveTo(.28*b,.54*c),a.lineTo(.67*b,c)):(a.moveTo(.28*b,.5*c),a.lineTo(.67*b,.5*c));a.stroke();a.ellipse(.2*b,.4*c,.08*b,.2*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalTwoWayContact2.prototype.cst.SHAPE_TWO_WAY_CONTACT_2,mxShapeElectricalTwoWayContact2);mxShapeElectricalTwoWayContact2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalPassingMakeContact2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalPassingMakeContact2,mxShape);mxShapeElectricalPassingMakeContact2.prototype.cst={SHAPE_PASSING_MAKE_CONTACT_2:"mxgraph.electrical.electro-mechanical.passingMakeContact2"};mxShapeElectricalPassingMakeContact2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalPassingMakeContact2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(b,.7*c);a.lineTo(.77*b,.7*c);a.lineTo(.93*b,c);a.moveTo(0,.7*c);a.lineTo(.25*b,.7*c);"off"==d?a.lineTo(.76*b,0):a.lineTo(.76*b,.7*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalPassingMakeContact2.prototype.cst.SHAPE_PASSING_MAKE_CONTACT_2,mxShapeElectricalPassingMakeContact2);
mxShapeElectricalPassingMakeContact2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0)];function mxShapeElectricalDPST2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalDPST2,mxShape);mxShapeElectricalDPST2.prototype.cst={SHAPE_DPST_2:"mxgraph.electrical.electro-mechanical.dpst2"};
mxShapeElectricalDPST2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalDPST2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(0,.4*c);a.lineTo(.2*b,.4*c);a.moveTo(.8*b,.4*c);a.lineTo(b,.4*c);a.moveTo(0,.92*c);a.lineTo(.2*b,.92*c);a.moveTo(.8*b,.92*c);a.lineTo(b,.92*c);"off"==d?(a.moveTo(.28*b,.38*c),a.lineTo(.76*b,0),a.moveTo(.28*b,.9*c),a.lineTo(.76*b,.52*c),a.moveTo(.5*b,.2*c),a.lineTo(.5*b,.33*c),a.moveTo(.5*b,.38*c),a.lineTo(.5*b,.51*c),a.moveTo(.5*b,.56*c),
a.lineTo(.5*b,.69*c)):(a.moveTo(.28*b,.4*c),a.lineTo(.72*b,.4*c),a.moveTo(.28*b,.92*c),a.lineTo(.72*b,.92*c),a.moveTo(.5*b,.4*c),a.lineTo(.5*b,.53*c),a.moveTo(.5*b,.58*c),a.lineTo(.5*b,.71*c),a.moveTo(.5*b,.76*c),a.lineTo(.5*b,.89*c));a.stroke();a.ellipse(.2*b,.325*c,.08*b,.15*c);a.fillAndStroke();a.ellipse(.2*b,.845*c,.08*b,.15*c);a.fillAndStroke();a.ellipse(.72*b,.325*c,.08*b,.15*c);a.fillAndStroke();a.ellipse(.72*b,.845*c,.08*b,.15*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalDPST2.prototype.cst.SHAPE_DPST_2,mxShapeElectricalDPST2);mxShapeElectricalDPST2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.4),!0),new mxConnectionConstraint(new mxPoint(0,.92),!0),new mxConnectionConstraint(new mxPoint(1,.4),!0),new mxConnectionConstraint(new mxPoint(1,.92),!0)];function mxShapeElectricalSpringReturn3(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalSpringReturn3,mxShape);mxShapeElectricalSpringReturn3.prototype.cst={SHAPE_SPRING_RETURN_3:"mxgraph.electrical.electro-mechanical.springReturn3"};mxShapeElectricalSpringReturn3.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalSpringReturn3.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(0,.62*c);a.lineTo(.21*b,.62*c);a.stroke();"off"==d?(a.begin(),a.moveTo(.28*b,.57*c),a.lineTo(.76*b,0),a.moveTo(b,.62*c),a.lineTo(.625*b,.62*c),a.lineTo(.695*b,.31*c)):(a.begin(),a.moveTo(.28*b,.64*c),a.lineTo(.76*b,c),a.moveTo(b,.62*c),a.lineTo(.625*b,.62*c),a.lineTo(.695*b,.93*c));a.lineTo(.765*b,.62*c);a.fillAndStroke();a.ellipse(.205*
b,.5*c,.08*b,.24*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalSpringReturn3.prototype.cst.SHAPE_SPRING_RETURN_3,mxShapeElectricalSpringReturn3);mxShapeElectricalSpringReturn3.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.62),!0),new mxConnectionConstraint(new mxPoint(1,.62),!0)];function mxShapeElectricalLimitSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalLimitSwitch,mxShape);mxShapeElectricalLimitSwitch.prototype.cst={SHAPE_LIMIT_SWITCH:"mxgraph.electrical.electro-mechanical.limitSwitch"};mxShapeElectricalLimitSwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalLimitSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(0,.16*c);a.lineTo(.2*b,.16*c);a.moveTo(.8*b,.16*c);a.lineTo(b,.16*c);a.stroke();"off"==d?(a.begin(),a.moveTo(.725*b,.75*c),a.lineTo(.24*b,.16*c),a.lineTo(.515*b,c),a.lineTo(.69*b,.72*c)):(a.begin(),a.moveTo(.76*b,0),a.lineTo(.24*b,.16*c),a.lineTo(.615*b,.52*c),a.lineTo(.72*b,.02*c));a.fillAndStroke();a.ellipse(.2*b,.04*c,.08*b,.24*
c);a.fillAndStroke();a.ellipse(.72*b,.04*c,.08*b,.24*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalLimitSwitch.prototype.cst.SHAPE_LIMIT_SWITCH,mxShapeElectricalLimitSwitch);mxShapeElectricalLimitSwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.16),!0),new mxConnectionConstraint(new mxPoint(1,.16),!0)];function mxShapeElectricalDPDT3(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalDPDT3,mxShape);mxShapeElectricalDPDT3.prototype.cst={SHAPE_DPDT_3:"mxgraph.electrical.electro-mechanical.dpdt3"};mxShapeElectricalDPDT3.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"}]}];
mxShapeElectricalDPDT3.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","neutral");a.begin();a.moveTo(0,.23*c);a.lineTo(.27*b,.23*c);a.moveTo(0,.79*c);a.lineTo(.27*b,.79*c);a.moveTo(.74*b,.05*c);a.lineTo(b,.05*c);a.moveTo(.74*b,.39*c);a.lineTo(b,.39*c);a.moveTo(.74*b,.61*c);a.lineTo(b,.61*c);a.moveTo(.74*b,.95*c);a.lineTo(b,.95*c);"1"==d?(a.moveTo(.37*b,.215*c),a.lineTo(.69*b,.105*c),a.moveTo(.37*b,.775*c),a.lineTo(.69*b,.665*c),a.moveTo(.515*
b,.17*c),a.lineTo(.515*b,.245*c),a.moveTo(.515*b,.28*c),a.lineTo(.515*b,.355*c),a.moveTo(.515*b,.39*c),a.lineTo(.515*b,.465*c),a.moveTo(.515*b,.5*c),a.lineTo(.515*b,.575*c),a.moveTo(.515*b,.61*c),a.lineTo(.515*b,.685*c)):(a.moveTo(.37*b,.245*c),a.lineTo(.69*b,.335*c),a.moveTo(.37*b,.805*c),a.lineTo(.69*b,.895*c),a.moveTo(.515*b,.29*c),a.lineTo(.515*b,.365*c),a.moveTo(.515*b,.4*c),a.lineTo(.515*b,.475*c),a.moveTo(.515*b,.51*c),a.lineTo(.515*b,.585*c),a.moveTo(.515*b,.62*c),a.lineTo(.515*b,.695*c),
a.moveTo(.515*b,.73*c),a.lineTo(.515*b,.805*c));a.stroke();a.ellipse(.265*b,.18*c,.105*b,.095*c);a.fillAndStroke();a.ellipse(.265*b,.745*c,.105*b,.095*c);a.fillAndStroke();a.ellipse(.635*b,0,.105*b,.095*c);a.fillAndStroke();a.ellipse(.635*b,.345*c,.105*b,.095*c);a.fillAndStroke();a.ellipse(.635*b,.56*c,.105*b,.095*c);a.fillAndStroke();a.ellipse(.635*b,.905*c,.105*b,.095*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalDPDT3.prototype.cst.SHAPE_DPDT_3,mxShapeElectricalDPDT3);
mxShapeElectricalDPDT3.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.23),!0),new mxConnectionConstraint(new mxPoint(0,.79),!0),new mxConnectionConstraint(new mxPoint(1,.05),!0),new mxConnectionConstraint(new mxPoint(1,.39),!0),new mxConnectionConstraint(new mxPoint(1,.61),!0),new mxConnectionConstraint(new mxPoint(1,.95),!0)];function mxShapeElectricalTwoPositionSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalTwoPositionSwitch2,mxShape);mxShapeElectricalTwoPositionSwitch2.prototype.cst={SHAPE_TWO_POSITION_SWITCH_2:"mxgraph.electrical.electro-mechanical.twoPositionSwitch2"};mxShapeElectricalTwoPositionSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"}]}];
mxShapeElectricalTwoPositionSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.8*b,.5*c);a.lineTo(b,.5*c);a.moveTo(.5*b,0);a.lineTo(.5*b,.18*c);a.moveTo(.5*b,.82*c);a.lineTo(.5*b,c);a.moveTo(.63*b,.145*c);a.arcTo(.2*b,.22*c,0,0,1,.835*b,.36*c);"1"==d?(a.moveTo(.24*b,.5*c),a.arcTo(.27*b,.27*c,0,0,1,.5*b,.78*c),a.moveTo(.76*b,.5*c),a.arcTo(.27*b,.27*c,0,0,1,.5*b,.22*c),a.moveTo(.39*
b,.56*c),a.lineTo(.55*b,.39*c),a.moveTo(.39*b,.56*c),a.lineTo(.55*b,.39*c),a.moveTo(.61*b,.44*c),a.lineTo(.45*b,.61*c),a.moveTo(.61*b,.44*c),a.lineTo(.45*b,.61*c)):(a.moveTo(.76*b,.5*c),a.arcTo(.27*b,.27*c,0,0,0,.5*b,.78*c),a.moveTo(.24*b,.5*c),a.arcTo(.27*b,.27*c,0,0,0,.5*b,.22*c),a.moveTo(.61*b,.56*c),a.lineTo(.45*b,.39*c),a.moveTo(.61*b,.56*c),a.lineTo(.45*b,.39*c),a.moveTo(.39*b,.44*c),a.lineTo(.55*b,.61*c),a.moveTo(.39*b,.44*c),a.lineTo(.55*b,.61*c));a.stroke();a.ellipse(.2*b,.4575*c,.08*b,.085*
c);a.fillAndStroke();a.ellipse(.72*b,.4575*c,.08*b,.085*c);a.fillAndStroke();a.ellipse(.46*b,.18*c,.08*b,.085*c);a.fillAndStroke();a.ellipse(.46*b,.735*c,.08*b,.085*c);a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.633*b,.1*c);a.lineTo(.633*b,.185*c);a.lineTo(.56*b,.1425*c);a.close();a.moveTo(.795*b,.355*c);a.lineTo(.875*b,.355*c);a.lineTo(.835*b,.435*c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalTwoPositionSwitch2.prototype.cst.SHAPE_TWO_POSITION_SWITCH_2,mxShapeElectricalTwoPositionSwitch2);mxShapeElectricalTwoPositionSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];
function mxShapeElectricalThreePositionSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalThreePositionSwitch2,mxShape);mxShapeElectricalThreePositionSwitch2.prototype.cst={SHAPE_THREE_POSITION_SWITCH_2:"mxgraph.electrical.electro-mechanical.threePositionSwitch2"};
mxShapeElectricalThreePositionSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"},{val:"3",dispName:"3"}]}];
mxShapeElectricalThreePositionSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,.2*c);a.moveTo(0,c);a.lineTo(.215*b,.825*c);a.moveTo(b,c);a.lineTo(.785*b,.825*c);a.moveTo(.12*b,.62*c);a.arcTo(.38*b,.38*c,0,0,1,.31*b,.26*c);"1"==d?(a.moveTo(.5*b,.26*c),a.arcTo(.65*b,.65*c,0,0,1,.25*b,.79*c)):"2"==d?(a.moveTo(.5*b,.26*c),a.arcTo(.65*b,.65*c,0,0,0,.75*b,.79*c)):(a.moveTo(.25*b,.79*c),a.arcTo(.5*
b,.5*c,0,0,1,.75*b,.79*c));a.stroke();a.ellipse(.2*b,.74*c,.1*b,.1*c);a.fillAndStroke();a.ellipse(.45*b,.21*c,.1*b,.1*c);a.fillAndStroke();a.ellipse(.7*b,.74*c,.1*b,.1*c);a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.285*b,.215*c);a.lineTo(.39*b,.2*c);a.lineTo(.345*b,.295*c);a.close();a.moveTo(.07*b,.63*c);a.lineTo(.18*b,.61*c);a.lineTo(.14*b,.71*c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeElectricalThreePositionSwitch2.prototype.cst.SHAPE_THREE_POSITION_SWITCH_2,mxShapeElectricalThreePositionSwitch2);mxShapeElectricalThreePositionSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];function mxShapeElectricalFourPositionSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeElectricalFourPositionSwitch2,mxShape);mxShapeElectricalFourPositionSwitch2.prototype.cst={SHAPE_FOUR_POSITION_SWITCH_2:"mxgraph.electrical.electro-mechanical.fourPositionSwitch2"};mxShapeElectricalFourPositionSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"},{val:"3",dispName:"3"},{val:"4",dispName:"4"}]}];
mxShapeElectricalFourPositionSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,.5*c);a.lineTo(.2*b,.5*c);a.moveTo(.8*b,.5*c);a.lineTo(b,.5*c);a.moveTo(.5*b,0);a.lineTo(.5*b,.18*c);a.moveTo(.5*b,.82*c);a.lineTo(.5*b,c);a.moveTo(.37*b,.145*c);a.arcTo(.2*b,.22*c,0,0,0,.165*b,.36*c);"1"==d?(a.moveTo(.32*b,.7*c),a.arcTo(.25*b,.25*c,0,0,1,.68*b,.7*c),a.moveTo(.32*b,.3*c),a.arcTo(.25*b,.25*c,0,0,0,.68*b,.3*c),a.moveTo(.46*
b,.37*c),a.lineTo(.46*b,.63*c),a.moveTo(.54*b,.37*c),a.lineTo(.54*b,.63*c),a.moveTo(.28*b,.5*c),a.lineTo(.72*b,.5*c)):"2"==d?(a.moveTo(.24*b,.5*c),a.arcTo(.27*b,.27*c,0,0,1,.5*b,.78*c),a.moveTo(.76*b,.5*c),a.arcTo(.27*b,.27*c,0,0,1,.5*b,.22*c),a.moveTo(.39*b,.56*c),a.lineTo(.55*b,.39*c),a.moveTo(.39*b,.56*c),a.lineTo(.55*b,.39*c),a.moveTo(.61*b,.44*c),a.lineTo(.45*b,.61*c),a.moveTo(.61*b,.44*c),a.lineTo(.45*b,.61*c),a.moveTo(.32*b,.32*c),a.lineTo(.68*b,.68*c)):"3"==d?(a.moveTo(.7*b,.32*c),a.arcTo(.25*
b,.25*c,0,0,0,.7*b,.68*c),a.moveTo(.3*b,.32*c),a.arcTo(.25*b,.25*c,0,0,1,.3*b,.68*c),a.moveTo(.37*b,.46*c),a.lineTo(.63*b,.46*c),a.moveTo(.37*b,.54*c),a.lineTo(.63*b,.54*c),a.moveTo(.5*b,.26*c),a.lineTo(.5*b,.74*c)):(a.moveTo(.76*b,.5*c),a.arcTo(.27*b,.27*c,0,0,0,.5*b,.78*c),a.moveTo(.24*b,.5*c),a.arcTo(.27*b,.27*c,0,0,0,.5*b,.22*c),a.moveTo(.61*b,.56*c),a.lineTo(.45*b,.39*c),a.moveTo(.61*b,.56*c),a.lineTo(.45*b,.39*c),a.moveTo(.39*b,.44*c),a.lineTo(.55*b,.61*c),a.moveTo(.39*b,.44*c),a.lineTo(.55*
b,.61*c),a.moveTo(.68*b,.32*c),a.lineTo(.32*b,.68*c));a.stroke();a.ellipse(.2*b,.4575*c,.08*b,.085*c);a.fillAndStroke();a.ellipse(.72*b,.4575*c,.08*b,.085*c);a.fillAndStroke();a.ellipse(.46*b,.18*c,.08*b,.085*c);a.fillAndStroke();a.ellipse(.46*b,.735*c,.08*b,.085*c);a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.367*b,.1*c);a.lineTo(.367*b,.185*c);a.lineTo(.44*b,.1425*c);a.close();a.moveTo(.205*b,.355*c);a.lineTo(.125*
b,.355*c);a.lineTo(.165*b,.435*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalFourPositionSwitch2.prototype.cst.SHAPE_FOUR_POSITION_SWITCH_2,mxShapeElectricalFourPositionSwitch2);mxShapeElectricalFourPositionSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];
function mxShapeElectricalPushbuttonMakeSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalPushbuttonMakeSwitch2,mxShape);mxShapeElectricalPushbuttonMakeSwitch2.prototype.cst={SHAPE_PUSHBUTTON_MAKE_SWITCH_2:"mxgraph.electrical.electro-mechanical.pushbuttonMakeSwitch2"};
mxShapeElectricalPushbuttonMakeSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"}]}];
mxShapeElectricalPushbuttonMakeSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,.94*c);a.lineTo(.2*b,.94*c);a.moveTo(.8*b,.94*c);a.lineTo(b,.94*c);"1"==d?(a.moveTo(.5*b,0),a.lineTo(.5*b,.8*c),a.moveTo(.24*b,.8*c),a.lineTo(.76*b,.8*c)):(a.moveTo(.5*b,.07*c),a.lineTo(.5*b,.87*c),a.moveTo(.24*b,.87*c),a.lineTo(.76*b,.87*c));a.stroke();a.ellipse(.2*b,.88*c,.08*b,.12*c);a.fillAndStroke();a.ellipse(.72*b,.88*
c,.08*b,.12*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalPushbuttonMakeSwitch2.prototype.cst.SHAPE_PUSHBUTTON_MAKE_SWITCH_2,mxShapeElectricalPushbuttonMakeSwitch2);mxShapeElectricalPushbuttonMakeSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.94),!0),new mxConnectionConstraint(new mxPoint(1,.94),!0)];
function mxShapeElectricalPushbuttonTwoCircuitSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalPushbuttonTwoCircuitSwitch2,mxShape);mxShapeElectricalPushbuttonTwoCircuitSwitch2.prototype.cst={SHAPE_PUSHBUTTON_TWO_CIRCUIT_SWITCH_2:"mxgraph.electrical.electro-mechanical.pushbuttonTwoCircuitSwitch2"};
mxShapeElectricalPushbuttonTwoCircuitSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"}]}];
mxShapeElectricalPushbuttonTwoCircuitSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,.68*c);a.lineTo(.2*b,.68*c);a.moveTo(.8*b,.68*c);a.lineTo(b,.68*c);a.moveTo(0,.96*c);a.lineTo(.2*b,.96*c);a.moveTo(.8*b,.96*c);a.lineTo(b,.96*c);"1"==d?(a.moveTo(.5*b,0),a.lineTo(.5*b,.73*c),a.moveTo(.24*b,.73*c),a.lineTo(.76*b,.73*c)):(a.moveTo(.5*b,.18*c),a.lineTo(.5*b,.91*c),a.moveTo(.24*b,.91*c),a.lineTo(.76*b,.91*
c));a.stroke();a.ellipse(.2*b,.92*c,.08*b,.08*c);a.fillAndStroke();a.ellipse(.72*b,.92*c,.08*b,.08*c);a.fillAndStroke();a.ellipse(.2*b,.64*c,.08*b,.08*c);a.fillAndStroke();a.ellipse(.72*b,.64*c,.08*b,.08*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalPushbuttonTwoCircuitSwitch2.prototype.cst.SHAPE_PUSHBUTTON_TWO_CIRCUIT_SWITCH_2,mxShapeElectricalPushbuttonTwoCircuitSwitch2);
mxShapeElectricalPushbuttonTwoCircuitSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.68),!0),new mxConnectionConstraint(new mxPoint(1,.68),!0),new mxConnectionConstraint(new mxPoint(0,.96),!0),new mxConnectionConstraint(new mxPoint(1,.96),!0)];function mxShapeElectricalTimeDelaySwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTimeDelaySwitch,mxShape);
mxShapeElectricalTimeDelaySwitch.prototype.cst={SHAPE_TIME_DELAY_SWITCH:"mxgraph.electrical.electro-mechanical.timeDelaySwitch"};mxShapeElectricalTimeDelaySwitch.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalTimeDelaySwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","off");a.begin();a.moveTo(0,.13*c);a.lineTo(.2*b,.13*c);a.moveTo(.8*b,.13*c);a.lineTo(b,.13*c);"off"==d?(a.moveTo(.5*b,.37*c),a.lineTo(.5*b,.83*c),a.moveTo(.28*b,.16*c),a.lineTo(.76*b,.62*c),a.moveTo(.44*b,c),a.lineTo(.5*b,.83*c),a.lineTo(.56*b,c)):(a.moveTo(.5*b,.04*c),a.lineTo(.5*b,.5*c),a.moveTo(.28*b,.09*c),a.lineTo(.76*b,0),a.moveTo(.44*b,.67*c),a.lineTo(.5*
b,.5*c),a.lineTo(.56*b,.67*c));a.stroke();a.ellipse(.2*b,.03*c,.08*b,.19*c);a.fillAndStroke();a.ellipse(.72*b,.03*c,.08*b,.19*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeElectricalTimeDelaySwitch.prototype.cst.SHAPE_TIME_DELAY_SWITCH,mxShapeElectricalTimeDelaySwitch);mxShapeElectricalTimeDelaySwitch.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.13),!0),new mxConnectionConstraint(new mxPoint(1,.13),!0)];
function mxShapeElectricalTimeDelaySwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalTimeDelaySwitch2,mxShape);mxShapeElectricalTimeDelaySwitch2.prototype.cst={SHAPE_TIME_DELAY_SWITCH2:"mxgraph.electrical.electro-mechanical.timeDelaySwitch2"};
mxShapeElectricalTimeDelaySwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalTimeDelaySwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","off");a.begin();a.moveTo(0,.45*c);a.lineTo(.23*b,.45*c);"off"==d?(a.lineTo(.75*b,0),a.moveTo(b,.45*c),a.lineTo(.8*b,.45*c),a.moveTo(.465*b,.25*c),a.lineTo(.465*b,.76*c),a.moveTo(.535*b,.19*c),a.lineTo(.535*b,.76*c),a.moveTo(.4*b,.89*c),a.arcTo(.11*b,.25*c,0,0,1,.6*b,.89*c)):(a.lineTo(.73*b,.25*c),a.moveTo(b,.45*c),a.lineTo(.67*b,.45*c),a.lineTo(.67*b,.16*
c),a.moveTo(.465*b,.36*c),a.lineTo(.465*b,.87*c),a.moveTo(.535*b,.33*c),a.lineTo(.535*b,.87*c),a.moveTo(.4*b,c),a.arcTo(.11*b,.25*c,0,0,1,.6*b,c));a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalTimeDelaySwitch2.prototype.cst.SHAPE_TIME_DELAY_SWITCH2,mxShapeElectricalTimeDelaySwitch2);mxShapeElectricalTimeDelaySwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.45),!0),new mxConnectionConstraint(new mxPoint(1,.45),!0)];
function mxShapeElectricalIsolatorSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalIsolatorSwitch2,mxShape);mxShapeElectricalIsolatorSwitch2.prototype.cst={SHAPE_ISOLATOR_SWITCH2:"mxgraph.electrical.electro-mechanical.isolatorSwitch2"};
mxShapeElectricalIsolatorSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalIsolatorSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","off");a.begin();a.moveTo(b,.8*c);a.lineTo(.8*b,.8*c);a.moveTo(.8*b,.6*c);a.lineTo(.8*b,c);a.moveTo(0,.8*c);a.lineTo(.23*b,.8*c);"off"==d?a.lineTo(.75*b,0):a.lineTo(.8*b,.8*c);a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalIsolatorSwitch2.prototype.cst.SHAPE_ISOLATOR_SWITCH2,mxShapeElectricalIsolatorSwitch2);
mxShapeElectricalIsolatorSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];function mxShapeElectricalChangeoverContactSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalChangeoverContactSwitch2,mxShape);mxShapeElectricalChangeoverContactSwitch2.prototype.cst={SHAPE_CHANGEOVER_CONTACT_SWITCH2:"mxgraph.electrical.electro-mechanical.changeoverContactSwitch2"};
mxShapeElectricalChangeoverContactSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"1",enumList:[{val:"1",dispName:"1"},{val:"2",dispName:"2"}]}];
mxShapeElectricalChangeoverContactSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","1");a.begin();a.moveTo(0,c);a.lineTo(.25*b,c);"1"==d?(a.lineTo(.76*b,.2*c),a.moveTo(b,0),a.lineTo(.67*b,0),a.lineTo(.67*b,.5*c),a.moveTo(b,c),a.lineTo(.8*b,c)):(a.lineTo(.77*b,.6*c),a.moveTo(b,c),a.lineTo(.67*b,c),a.lineTo(.67*b,.5*c),a.moveTo(b,0),a.lineTo(.8*b,0));a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalChangeoverContactSwitch2.prototype.cst.SHAPE_CHANGEOVER_CONTACT_SWITCH2,mxShapeElectricalChangeoverContactSwitch2);mxShapeElectricalChangeoverContactSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(0,.8),!0),new mxConnectionConstraint(new mxPoint(1,.8),!0)];
function mxShapeElectricalReedSwitch2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalReedSwitch2,mxShape);mxShapeElectricalReedSwitch2.prototype.cst={SHAPE_REED_SWITCH2:"mxgraph.electrical.electro-mechanical.reedSwitch2"};mxShapeElectricalReedSwitch2.prototype.customProperties=[{name:"elSwitchState",dispName:"Switch State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeElectricalReedSwitch2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"elSwitchState","off");a.begin();a.moveTo(.69*b,0);a.arcTo(.13*b,.5*c,0,0,1,.82*b,.5*c);a.arcTo(.13*b,.5*c,0,0,1,.69*b,c);a.lineTo(.31*b,c);a.arcTo(.13*b,.5*c,0,0,1,.18*b,.5*c);a.arcTo(.13*b,.5*c,0,0,1,.31*b,0);a.close();a.fillAndStroke();a.begin();a.moveTo(b,.5*c);a.lineTo(.65*b,.5*c);a.moveTo(0,.5*c);a.lineTo(.35*b,.5*c);"on"==d?a.lineTo(.65*b,.5*c):a.lineTo(.65*b,.25*c);a.stroke()};
mxCellRenderer.registerShape(mxShapeElectricalReedSwitch2.prototype.cst.SHAPE_REED_SWITCH2,mxShapeElectricalReedSwitch2);mxShapeElectricalReedSwitch2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];function mxFloorplanWall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWall,mxShape);mxFloorplanWall.prototype.cst={WALL:"mxgraph.floorplan.wall",WALL_THICKNESS:"wallThickness"};
mxFloorplanWall.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanWall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxFloorplanWall.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxFloorplanWall.prototype.cst.WALL_THICKNESS,"10"));a.rect(0,.5*c-.5*d,b,d);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanWall.prototype.cst.WALL,mxFloorplanWall);
function mxFloorplanWallCorner(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWallCorner,mxShape);mxFloorplanWallCorner.prototype.cst={WALL_CORNER:"mxgraph.floorplan.wallCorner",WALL_THICKNESS:"wallThickness"};mxFloorplanWallCorner.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];
mxFloorplanWallCorner.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxFloorplanWallCorner.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxFloorplanWallCorner.prototype.cst.WALL_THICKNESS,"10"));a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,d);a.lineTo(d,d);a.lineTo(d,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanWallCorner.prototype.cst.WALL_CORNER,mxFloorplanWallCorner);
function mxFloorplanWallU(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWallU,mxShape);mxFloorplanWallU.prototype.cst={WALL_U:"mxgraph.floorplan.wallU",WALL_THICKNESS:"wallThickness"};mxFloorplanWallU.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanWallU.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanWallU.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxFloorplanWallU.prototype.cst.WALL_THICKNESS,"10"));a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(b-d,c);a.lineTo(b-d,d);a.lineTo(d,d);a.lineTo(d,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanWallU.prototype.cst.WALL_U,mxFloorplanWallU);
function mxFloorplanRoom(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanRoom,mxShape);mxFloorplanRoom.prototype.cst={ROOM:"mxgraph.floorplan.room",WALL_THICKNESS:"wallThickness"};mxFloorplanRoom.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanRoom.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanRoom.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxFloorplanRoom.prototype.cst.WALL_THICKNESS,"10"));a.begin();a.moveTo(0,c);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.close();a.moveTo(d,d);a.lineTo(d,c-d);a.lineTo(b-d,c-d);a.lineTo(b-d,d);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanRoom.prototype.cst.ROOM,mxFloorplanRoom);
function mxFloorplanWindow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWindow,mxShape);mxFloorplanWindow.prototype.cst={WINDOW:"mxgraph.floorplan.window",WALL_THICKNESS:"wallThickness"};mxFloorplanWindow.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanWindow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanWindow.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxFloorplanWindow.prototype.cst.WALL_THICKNESS,"10"));a.rect(0,.5*c-.5*d,b,d);a.fillAndStroke();a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke()};mxCellRenderer.registerShape(mxFloorplanWindow.prototype.cst.WINDOW,mxFloorplanWindow);function mxFloorplanDimension(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxFloorplanDimension,mxShape);mxFloorplanDimension.prototype.cst={DIMENSION:"mxgraph.floorplan.dimension"};mxFloorplanDimension.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanDimension.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDimension.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,20);a.lineTo(b,20);a.moveTo(10,15);a.lineTo(0,20);a.lineTo(10,25);a.moveTo(b-10,15);a.lineTo(b,20);a.lineTo(b-10,25);a.moveTo(0,15);a.lineTo(0,c);a.moveTo(b,15);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDimension.prototype.cst.DIMENSION,mxFloorplanDimension);function mxFloorplanDimensionBottom(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxFloorplanDimensionBottom,mxShape);mxFloorplanDimensionBottom.prototype.cst={DIMENSION:"mxgraph.floorplan.dimensionBottom"};mxFloorplanDimensionBottom.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDimensionBottom.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,c-20);a.lineTo(b,c-20);a.moveTo(10,c-15);a.lineTo(0,c-20);a.lineTo(10,c-25);a.moveTo(b-10,c-15);a.lineTo(b,c-20);a.lineTo(b-10,c-25);a.moveTo(0,c-15);a.lineTo(0,0);a.moveTo(b,c-15);a.lineTo(b,0);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDimensionBottom.prototype.cst.DIMENSION,mxFloorplanDimensionBottom);
function mxFloorplanStairs(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanStairs,mxShape);mxFloorplanStairs.prototype.cst={STAIRS:"mxgraph.floorplan.stairs"};mxFloorplanStairs.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,Math.max(b,50),c)};
mxFloorplanStairs.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();for(d=25;d<b;d+=25)a.moveTo(d,0),a.lineTo(d,c);a.stroke();a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(b-25,0);a.lineTo(b,.5*c);a.lineTo(b-25,c);a.stroke()};mxCellRenderer.registerShape(mxFloorplanStairs.prototype.cst.STAIRS,mxFloorplanStairs);function mxFloorplanStairsRest(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxFloorplanStairsRest,mxShape);mxFloorplanStairsRest.prototype.cst={STAIRS:"mxgraph.floorplan.stairsRest"};mxFloorplanStairsRest.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,Math.max(b,50,c),c)};
mxFloorplanStairsRest.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();for(d=25;d<b-.5*c;d+=25)a.moveTo(d,0),a.lineTo(d,c);a.stroke();a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.moveTo(b,0);a.lineTo(b-.5*c,.5*c);a.lineTo(b,c);a.moveTo(b-.5*c,0);a.lineTo(b-.5*c,c);a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke()};mxCellRenderer.registerShape(mxFloorplanStairsRest.prototype.cst.STAIRS,mxFloorplanStairsRest);
function mxFloorplanDoorLeft(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanDoorLeft,mxShape);mxFloorplanDoorLeft.prototype.cst={DOOR_LEFT:"mxgraph.floorplan.doorLeft"};mxFloorplanDoorLeft.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDoorLeft.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,5);a.fillAndStroke();a.begin();a.moveTo(b,5);a.arcTo(b,b,0,0,1,0,5+b);a.lineTo(0,5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorLeft.prototype.cst.DOOR_LEFT,mxFloorplanDoorLeft);function mxFloorplanDoorRight(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanDoorRight,mxShape);mxFloorplanDoorRight.prototype.cst={DOOR_RIGHT:"mxgraph.floorplan.doorRight"};
mxFloorplanDoorRight.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxFloorplanDoorRight.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,5);a.fillAndStroke();a.begin();a.moveTo(0,5);a.arcTo(b,b,0,0,0,b,5+b);a.lineTo(b,5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorRight.prototype.cst.DOOR_RIGHT,mxFloorplanDoorRight);
function mxFloorplanDoorDouble(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanDoorDouble,mxShape);mxFloorplanDoorDouble.prototype.cst={DOOR_DOUBLE:"mxgraph.floorplan.doorDouble"};mxFloorplanDoorDouble.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDoorDouble.prototype.background=function(a,d,e,b,c){d=.5*b;a.rect(0,0,b,5);a.fillAndStroke();a.begin();a.moveTo(d,0);a.lineTo(d,5);a.moveTo(d,5);a.arcTo(d,d,0,0,1,0,5+d);a.lineTo(0,5);a.moveTo(d,5);a.arcTo(d,d,0,0,0,b,5+d);a.lineTo(b,5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorDouble.prototype.cst.DOOR_DOUBLE,mxFloorplanDoorDouble);function mxFloorplanDoorUneven(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}
mxUtils.extend(mxFloorplanDoorUneven,mxShape);mxFloorplanDoorUneven.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorUneven.prototype.cst={DOOR_UNEVEN:"mxgraph.floorplan.doorUneven"};mxFloorplanDoorUneven.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDoorUneven.prototype.background=function(a,d,e,b,c){d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.rect(0,0,b,5);a.fillAndStroke();a.begin();a.moveTo(d,0);a.lineTo(d,5);a.arcTo(d,d,0,0,1,0,5+d);a.lineTo(0,5);a.moveTo(d,5);a.arcTo(b-d,b-d,0,0,0,b,5+b-d);a.lineTo(b,5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorUneven.prototype.cst.DOOR_UNEVEN,mxFloorplanDoorUneven);
Graph.handleFactory[mxFloorplanDoorUneven.prototype.cst.DOOR_UNEVEN]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};function mxFloorplanDoorOpposing(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.3}
mxUtils.extend(mxFloorplanDoorOpposing,mxShape);mxFloorplanDoorOpposing.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorOpposing.prototype.cst={DOOR_OPPOSING:"mxgraph.floorplan.doorOpposing"};mxFloorplanDoorOpposing.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDoorOpposing.prototype.background=function(a,d,e,b,c){d=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.rect(0,d,b,5);a.fillAndStroke();a.begin();a.moveTo(d,d);a.lineTo(d,d+5);a.arcTo(d,d,0,0,0,0,0);a.lineTo(0,d);a.moveTo(d,d+5);a.arcTo(b-d,b-d,0,0,0,b,5+b);a.lineTo(b,d+5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorOpposing.prototype.cst.DOOR_OPPOSING,mxFloorplanDoorOpposing);
Graph.handleFactory[mxFloorplanDoorOpposing.prototype.cst.DOOR_OPPOSING]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};function mxFloorplanDoorRevolving(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxFloorplanDoorRevolving,mxShape);mxFloorplanDoorRevolving.prototype.cst={DOOR_REVOLVING:"mxgraph.floorplan.doorRevolving"};mxFloorplanDoorRevolving.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxFloorplanDoorRevolving.prototype.background=function(a,d,e,b,c){d=Math.min(b,c);a.rect(.5*(b-d),.5*c-2.5,d,5);a.fillAndStroke();a.rect(.5*b-2.5,.5*(c-d),5,d);a.fillAndStroke();a.begin();a.ellipse(.5*(b-d),.5*(c-d),d,d);a.stroke()};
mxCellRenderer.registerShape(mxFloorplanDoorRevolving.prototype.cst.DOOR_REVOLVING,mxFloorplanDoorRevolving);function mxFloorplanDoorPocket(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanDoorPocket,mxShape);mxFloorplanDoorPocket.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorPocket.prototype.cst={DOOR_POCKET:"mxgraph.floorplan.doorPocket"};
mxFloorplanDoorPocket.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.rect(f,.5*c-5,5,10);a.fillAndStroke();a.rect(b-5,.5*c-5,5,10);a.fillAndStroke();a.rect(0,.5*c-2.5,b-f,5);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanDoorPocket.prototype.cst.DOOR_POCKET,mxFloorplanDoorPocket);
Graph.handleFactory[mxFloorplanDoorPocket.prototype.cst.DOOR_POCKET]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(e.x-d.x)/d.width)))/100})]};
function mxFloorplanDoorDoublePocket(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanDoorDoublePocket,mxShape);mxFloorplanDoorDoublePocket.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorDoublePocket.prototype.cst={DOOR_DOUBLE_POCKET:"mxgraph.floorplan.doorDoublePocket"};
mxFloorplanDoorDoublePocket.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.rect(f,.5*c-5,5,10);a.fillAndStroke();a.rect(b-f-5,.5*c-5,5,10);a.fillAndStroke();a.rect(0,.5*c-2.5,.5*b-f,5);a.fillAndStroke();a.rect(.5*b+f,.5*c-2.5,.5*b-f,5);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanDoorDoublePocket.prototype.cst.DOOR_DOUBLE_POCKET,mxFloorplanDoorDoublePocket);
Graph.handleFactory[mxFloorplanDoorDoublePocket.prototype.cst.DOOR_DOUBLE_POCKET]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.25,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.25,(e.x-d.x)/d.width)))/100})]};
function mxFloorplanDoorBypass(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanDoorBypass,mxShape);mxFloorplanDoorBypass.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorBypass.prototype.cst={DOOR_BYPASS:"mxgraph.floorplan.doorBypass"};
mxFloorplanDoorBypass.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.rect(0,.5*c-5,5,10);a.fillAndStroke();a.rect(b-5,.5*c-5,5,10);a.fillAndStroke();a.rect(0,.5*c,.5*b,5);a.fillAndStroke();a.rect(f,.5*c-5,.5*b,5);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanDoorBypass.prototype.cst.DOOR_BYPASS,mxFloorplanDoorBypass);
Graph.handleFactory[mxFloorplanDoorBypass.prototype.cst.DOOR_BYPASS]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(e.x-d.x)/d.width)))/100})]};function mxFloorplanDoorBifold(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}
mxUtils.extend(mxFloorplanDoorBifold,mxShape);mxFloorplanDoorBifold.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorBifold.prototype.cst={DOOR_BIFOLD:"mxgraph.floorplan.doorBifold"};
mxFloorplanDoorBifold.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),g=parseFloat(mxUtils.getValue(this.style,"strokeWidth",this.dx));a.translate(d,e);a.rect(0,c-10,5,10);a.fillAndStroke();a.rect(b-5,c-10,5,10);a.fillAndStroke();a.setStrokeWidth(3*g);a.begin();a.moveTo(5,c-10);a.lineTo(Math.max(.5*(f-10)+5,5),0);a.lineTo(Math.max(f,5),c-10);a.moveTo(b-5,c-10);a.lineTo(b-Math.max(.5*(f-10)+5,5),0);a.lineTo(b-Math.max(f,
5),c-10);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorBifold.prototype.cst.DOOR_BIFOLD,mxFloorplanDoorBifold);Graph.handleFactory[mxFloorplanDoorBifold.prototype.cst.DOOR_BIFOLD]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(e.x-d.x)/d.width)))/100})]};
function mxFloorplanDoorSlidingGlass(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanDoorSlidingGlass,mxShape);mxFloorplanDoorSlidingGlass.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorSlidingGlass.prototype.cst={DOOR_SLIDING_GLASS:"mxgraph.floorplan.doorSlidingGlass"};
mxFloorplanDoorSlidingGlass.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.rect(0,.5*c-5,5,10);a.fillAndStroke();a.rect(b-5,.5*c-5,5,10);a.fillAndStroke();a.rect(0,.5*c,.5*b,2);a.fillAndStroke();a.rect(f,.5*c-2,.5*b,2);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanDoorSlidingGlass.prototype.cst.DOOR_SLIDING_GLASS,mxFloorplanDoorSlidingGlass);
Graph.handleFactory[mxFloorplanDoorSlidingGlass.prototype.cst.DOOR_SLIDING_GLASS]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(e.x-d.x)/d.width)))/100})]};
function mxFloorplanOverhead(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanOverhead,mxShape);mxFloorplanOverhead.prototype.cst={DOOR_OVERHEAD:"mxgraph.floorplan.doorOverhead"};mxFloorplanOverhead.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,c-10,5,10);a.fillAndStroke();a.rect(b-5,c-10,5,10);a.fillAndStroke();a.rect(5,0,b-10,c-5);a.fillAndStroke()};
mxCellRenderer.registerShape(mxFloorplanOverhead.prototype.cst.DOOR_OVERHEAD,mxFloorplanOverhead);function mxFloorplanOpening(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanOpening,mxShape);mxFloorplanOpening.prototype.cst={OPENING:"mxgraph.floorplan.opening"};mxFloorplanOpening.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,5,c);a.fillAndStroke();a.rect(b-5,0,5,c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxFloorplanOpening.prototype.cst.OPENING,mxFloorplanOpening);function mxFloorplanWindowGlider(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanWindowGlider,mxShape);mxFloorplanWindowGlider.prototype.customProperties=[{name:"dx",dispName:"Window size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanWindowGlider.prototype.cst={WINDOW_GLIDER:"mxgraph.floorplan.windowGlider"};
mxFloorplanWindowGlider.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.translate(d,e);a.rect(0,.5*c-5,b,10);a.fillAndStroke();a.rect(0,.5*c,.5*b,1);a.fillAndStroke();a.rect(f,.5*c-1,.5*b,1);a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanWindowGlider.prototype.cst.WINDOW_GLIDER,mxFloorplanWindowGlider);
Graph.handleFactory[mxFloorplanWindowGlider.prototype.cst.WINDOW_GLIDER]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(e.x-d.x)/d.width)))/100})]};
function mxFloorplanWindowGarden(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.windowPanes=3}mxUtils.extend(mxFloorplanWindowGarden,mxShape);mxFloorplanWindowGarden.prototype.customProperties=[{name:"windowPanes",dispName:"Panes",type:"int",min:0,max:20,defVal:3}];mxFloorplanWindowGarden.prototype.cst={WINDOW_GARDEN:"mxgraph.floorplan.windowGarden"};
mxFloorplanWindowGarden.prototype.paintVertexShape=function(a,d,e,b,c){var f=Math.min(mxUtils.getValue(this.style,"windowPanes",this.windowPanes),20),g=(b-14-2*(f-1))/f;a.translate(d,e);a.rect(0,c-10,5,10);a.fillAndStroke();a.rect(b-5,c-10,5,10);a.fillAndStroke();a.begin();a.moveTo(5,c);a.lineTo(5,0);a.lineTo(b-5,0);a.lineTo(b-5,c);a.lineTo(b-5-2,c);a.lineTo(b-5-2,2);for(d=1;d<f;d++)a.lineTo(b-5-2-d*g-2*(d-1),2),a.lineTo(b-5-2-d*g-2*(d-1),c),a.lineTo(b-5-4-2*(d-1)-d*g,c),a.lineTo(b-5-4-2*(d-1)-d*
g,2);a.lineTo(7,2);a.lineTo(7,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxFloorplanWindowGarden.prototype.cst.WINDOW_GARDEN,mxFloorplanWindowGarden);function mxFloorplanWindowBow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.windowPanes=3}mxUtils.extend(mxFloorplanWindowBow,mxShape);mxFloorplanWindowBow.prototype.cst={WINDOW_BOW:"mxgraph.floorplan.windowBow"};
mxFloorplanWindowBow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(.5*b,c);a.begin();a.moveTo(0,.5*(c-d));a.lineTo(d,.5*(c+d));a.lineTo(b-d,.5*(c+d));a.lineTo(b,.5*(c-d));a.stroke()};mxCellRenderer.registerShape(mxFloorplanWindowBow.prototype.cst.WINDOW_BOW,mxFloorplanWindowBow);function mxFloorplanWindowBay(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.windowPanes=3}mxUtils.extend(mxFloorplanWindowBay,mxShape);
mxFloorplanWindowBay.prototype.cst={WINDOW_BAY:"mxgraph.floorplan.windowBay"};mxFloorplanWindowBay.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(.15*b,.6*c);a.lineTo(.35*b,c);a.lineTo(.65*b,c);a.lineTo(.85*b,.6*c);a.lineTo(b,0);a.stroke()};mxCellRenderer.registerShape(mxFloorplanWindowBay.prototype.cst.WINDOW_BAY,mxFloorplanWindowBay);
function mxFloorplanDoorAccordion(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxFloorplanDoorAccordion,mxShape);mxFloorplanDoorAccordion.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}];mxFloorplanDoorAccordion.prototype.cst={DOOR_ACCORDION:"mxgraph.floorplan.doorAccordion"};
mxFloorplanDoorAccordion.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(5,f);f=Math.min(b-5,f);var g=parseFloat(mxUtils.getValue(this.style,"strokeWidth",this.dx));a.translate(d,e);a.rect(0,.5*c-5,5,10);a.fillAndStroke();a.rect(b-5,.5*c-5,5,10);a.fillAndStroke();a.setStrokeWidth(3*g);d=f-5;a.begin();a.moveTo(5,.5*c);a.lineTo(5+.1*d,0);a.lineTo(5+.3*d,c);a.lineTo(5+.5*d,0);a.lineTo(5+.7*d,c);a.lineTo(5+
.9*d,0);a.lineTo(5+d,.5*c);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorAccordion.prototype.cst.DOOR_ACCORDION,mxFloorplanDoorAccordion);
Graph.handleFactory[mxFloorplanDoorAccordion.prototype.cst.DOOR_ACCORDION]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e*d.width,d.y+5)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-d.x)/d.width)))/100})]};function mxFloorplanDoorDoubleAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxFloorplanDoorDoubleAction,mxShape);mxFloorplanDoorDoubleAction.prototype.cst={DOOR_DOUBLE_ACTION:"mxgraph.floorplan.doorDoubleAction"};mxFloorplanDoorDoubleAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxFloorplanDoorDoubleAction.prototype.background=function(a,d,e,b,c){a.rect(0,.5*c-2.5,b,5);a.fillAndStroke();a.begin();a.moveTo(b,.5*c+2.5);a.arcTo(b,b,0,0,1,0,.5*c+2.5+b);a.lineTo(0,.5*c+2.5);a.stroke();a.setDashed(!0);a.begin();a.moveTo(b,.5*c-2.5);a.arcTo(b,b,0,0,0,0,.5*c-2.5-b);a.lineTo(0,.5*c-2.5);a.stroke()};mxCellRenderer.registerShape(mxFloorplanDoorDoubleAction.prototype.cst.DOOR_DOUBLE_ACTION,mxFloorplanDoorDoubleAction);
function mxShapeFlowchartDocument2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.size=.5}mxUtils.extend(mxShapeFlowchartDocument2,mxActor);mxShapeFlowchartDocument2.prototype.cst={DOCUMENT2:"mxgraph.flowchart.document2"};mxShapeFlowchartDocument2.prototype.customProperties=[{name:"size",dispName:"Wave Size",type:"float",min:0,max:1,defVal:.25}];
mxShapeFlowchartDocument2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.begin();a.moveTo(b-5,0);a.arcTo(5,5,0,0,1,b,5);a.lineTo(b,c-d/2);a.quadTo(3*b/4,c-1.4*d,b/2,c-d/2);a.quadTo(b/4,c-d*(1-1.4),0,c-d/2);a.lineTo(0,d/2);a.lineTo(0,5);a.arcTo(5,5,0,0,1,5,0);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeFlowchartDocument2.prototype.cst.DOCUMENT2,mxShapeFlowchartDocument2);
mxShapeFlowchartDocument2.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1),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,.25),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!1)];
Graph.handleFactory[mxShapeFlowchartDocument2.prototype.cst.DOCUMENT2]=function(a){return[Graph.createHandle(a,["size"],function(d){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(d.x+3*d.width/4,d.y+(1-e)*d.height)},function(d,e){this.state.style.size=Math.max(0,Math.min(1,(d.y+d.height-e.y)/d.height))})]};
function mxShapeGCP2DoubleRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGCP2DoubleRect,mxShape);mxShapeGCP2DoubleRect.prototype.cst={SHAPE_DOUBLE_RECT:"mxgraph.gcp2.doubleRect"};mxShapeGCP2DoubleRect.prototype.paintVertexShape=function(a,d,e,b,c){b-=8;c-=8;a.translate(d,e);a.begin();a.roundrect(8,8,b,c,1,1);a.fillAndStroke();a.roundrect(0,0,b,c,1,1);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeGCP2DoubleRect.prototype.cst.SHAPE_DOUBLE_RECT,mxShapeGCP2DoubleRect);mxShapeGCP2DoubleRect.prototype.constraints=mxRectangleShape.prototype.constraints;function mxShapeGCP2HexIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGCP2HexIcon,mxShape);mxShapeGCP2HexIcon.prototype.cst={HEX_ICON:"mxgraph.gcp2.hexIcon"};
mxShapeGCP2HexIcon.prototype.customProperties=[{name:"instNum",dispName:"Number of instances",type:"int",min:0,defVal:0},{name:"prType",dispName:"Instance Type",defVal:"standard",type:"enum",enumList:[{val:"standard",dispName:"Standard"},{val:"dynamic",dispName:"Dynamic"},{val:"multiple",dispName:"Multiple"},{val:"shared",dispName:"Shared"},{val:"replica",dispName:"Replica"},{val:"dynamic2",dispName:"Dynamic 2"},{val:"dynamic3",dispName:"Dynamic 3"},{val:"highmem",dispName:"High-Mem"},{val:"highcomp",
dispName:"High-Comp"},{val:"backend",dispName:"Backend"},{val:"input",dispName:"Input"}]},{name:"prIcon",dispName:"Instance Icon",defVal:"compute_engine",type:"enum",enumList:[{val:"compute_engine",dispName:"Compute Engine"},{val:"gpu",dispName:"GPU"},{val:"app_engine",dispName:"App Engine"},{val:"cloud_functions",dispName:"Cloud Functions"},{val:"container_engine",dispName:"Kubernetes Engine"},{val:"container_optimized_os",dispName:"Container-Optimized OS"},{val:"api_analytics",dispName:"API Analytics"},
{val:"apigee_sense",dispName:"Apigee Sense"},{val:"api_monetization",dispName:"API Monetization"},{val:"cloud_endpoints",dispName:"Cloud Endpoints"},{val:"apigee_api_platform",dispName:"Apigee API Platform"},{val:"developer_portal",dispName:"Developer Portal"},{val:"cloud_iam",dispName:"Cloud IAM"},{val:"beyondcorp",dispName:"BeyondCorp"},{val:"cloud_iam",dispName:"Cloud Resource Manager"},{val:"data_loss_prevention_api",dispName:"Data Loss Prevention API"},{val:"cloud_security_scanner",dispName:"Cloud Security Scanner"},
{val:"key_management_service",dispName:"Key Management Service"},{val:"identity_aware_proxy",dispName:"Identity-Aware Proxy"},{val:"security_key_enforcement",dispName:"Security Key Enforcement"},{val:"bigquery",dispName:"BigQuery"},{val:"cloud_datalab",dispName:"Cloud Datalab"},{val:"cloud_dataflow",dispName:"Cloud Dataflow"},{val:"cloud_pubsub",dispName:"Cloud Pub/Sub"},{val:"cloud_dataproc",dispName:"Cloud Dataproc"},{val:"genomics",dispName:"Genomics"},{val:"cloud_dataprep",dispName:"Cloud Dataprep"},
{val:"data_studio",dispName:"Data Studio"},{val:"transfer_appliance",dispName:"Transfer Appliance"},{val:"cloud_machine_learning",dispName:"Cloud Machine Learning"},{val:"cloud_natural_language_api",dispName:"Cloud Natural Language API"},{val:"cloud_vision_api",dispName:"Vision API"},{val:"cloud_translation_api",dispName:"Translation API"},{val:"cloud_speech_api",dispName:"Speech API"},{val:"cloud_jobs_api",dispName:"Jobs API"},{val:"cloud_video_intelligence_api",dispName:"Cloud Video Intelligence API"},
{val:"advanced_solutions_lab",dispName:"Advanced Solutions Lab"},{val:"cloud_iot_core",dispName:"Cloud IoT Core"},{val:"cloud_storage",dispName:"Cloud Storage"},{val:"cloud_sql",dispName:"Cloud SQL"},{val:"cloud_bigtable",dispName:"Cloud Bigtable"},{val:"cloud_spanner",dispName:"Cloud Spanner"},{val:"cloud_datastore",dispName:"Cloud Datastore"},{val:"persistent_disk",dispName:"Persistent Disk"},{val:"cloud_memorystore",dispName:"Cloud Memorystore"},{val:"cloud_filestore",dispName:"Cloud Filestore"},
{val:"stackdriver",dispName:"Stackdriver"},{val:"cloud_deployment_manager",dispName:"Monitoring"},{val:"cloud_deployment_manager",dispName:"Deployment Manager"},{val:"logging",dispName:"Logging"},{val:"placeholder",dispName:"Cloud Console"},{val:"error_reporting",dispName:"Error Reporting"},{val:"placeholder",dispName:"Cloud Shell"},{val:"trace",dispName:"Trace"},{val:"placeholder",dispName:"Cloud Mobile App"},{val:"profiler",dispName:"Profiler"},{val:"placeholder",dispName:"Billing API"},{val:"cloud_apis",
dispName:"Cloud APIs"},{val:"virtual_private_cloud",dispName:"Virtual Private Cloud"},{val:"dedicated_interconnect",dispName:"Dedicated Interconnect"},{val:"cloud_load_balancing",dispName:"Cloud Load Balancing"},{val:"cloud_dns",dispName:"Cloud DNS"},{val:"cloud_cdn",dispName:"Cloud CDN"},{val:"cloud_network",dispName:"Cloud Network"},{val:"cloud_external_ip_addresses",dispName:"Cloud External IP Addresses"},{val:"cloud_routes",dispName:"Cloud Routes"},{val:"cloud_firewall_rules",dispName:"Cloud Firewall Rules"},
{val:"cloud_vpn",dispName:"Cloud VPN"},{val:"cloud_router",dispName:"Cloud Router"},{val:"cloud_armor",dispName:"Cloud Armor"},{val:"standard_network_tier",dispName:"Standard Network Tier"},{val:"premium_network_tier",dispName:"Premium Network Tier"},{val:"partner_interconnect",dispName:"Partner Interconnect"},{val:"placeholder",dispName:"Cloud SDK"},{val:"container_builder",dispName:"Cloud Build"},{val:"cloud_tools_for_powershell",dispName:"Cloud Tools for Visual Studio"},{val:"placeholder",dispName:"Cloud Source Repositories"},
{val:"placeholder",dispName:"Maven App Engine Plugin"},{val:"placeholder",dispName:"Cloud Tools for Eclipse"},{val:"placeholder",dispName:"Cloud Tools for IntelliJ"},{val:"placeholder",dispName:"Cloud Test Lab"},{val:"cloud_tools_for_powershell",dispName:"Cloud Tools for PowerShell"},{val:"cloud_tools_for_powershell",dispName:"IDE Plugins"},{val:"container_registry",dispName:"Container Registry"},{val:"cloud_iot_edge",dispName:"Cloud IoT Edge"},{val:"cloud_firestore",dispName:"Cloud Firestore"},{val:"cloud_run",
dispName:"Cloud Run"},{val:"gke_on_prem",dispName:"GKE-on-Prem"},{val:"cloud_data_catalog",dispName:"Cloud Data Catalog"},{val:"cloud_data_fusion",dispName:"Cloud Data Fusion"},{val:"ai_hub",dispName:"AI Hub"},{val:"automl_video_intelligence",dispName:"AutoML Video Intelligence"},{val:"automl_natural_language",dispName:"AutoML Natural Language"},{val:"automl_tables",dispName:"AutoML Tables"},{val:"automl_translation",dispName:"AutoML Translation"},{val:"automl_vision",dispName:"AutoML Vision"},{val:"recommendations_ai",
dispName:"Recommendations AI"},{val:"cloud_inference_api",dispName:"Cloud Inference API"},{val:"cloud_service_mesh",dispName:"Cloud Service Mesh"},{val:"cloud_nat",dispName:"Cloud NAT"},{val:"traffic_director",dispName:"Traffic Director"},{val:"cloud_test_lab",dispName:"Cloud Test Lab"},{val:"cloud_code",dispName:"Cloud Code"},{val:"cloud_tasks",dispName:"Cloud Tasks"},{val:"placeholder",dispName:"Gradle App Engine Plugin"}]}];
mxShapeGCP2HexIcon.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.state.style,"prIcon","compute_engine"),g=mxUtils.getValue(this.state.style,"prType","");d=parseInt(mxUtils.getValue(this.state.style,"instNum",0));e=mxUtils.getValue(this.state.style,"fillColor","#ffffff");var h=mxUtils.getValue(this.state.style,"opacity","100");mxUtils.getValue(this.state.style,"strokeColor","none");var k=mxUtils.getValue(this.state.style,"strokeWidth",1),l=Math.min(b,c);
switch(g){case "dynamic":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_2");a.setAlpha(.5*h/100);a.setStrokeColor("none");g.drawShape(a,this,.21*b,.12*c,.58*b,.76*c);break;case "multiple":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_2");a.setAlpha(.5*h/100);a.setStrokeColor("none");g.drawShape(a,this,.21*b,.12*c,.58*b,.76*c);var m=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_3");a.setAlpha(.7*h/100);a.setStrokeColor("none");m.drawShape(a,this,.17*b,.13*c,.66*
b,.74*c);break;case "shared":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1");this.style[mxConstants.STYLE_STROKEWIDTH]=.038*l;a.setAlpha(.4*h/100);a.setStrokeColor(e);a.setFillColor("none");g.drawShape(a,this,.02*b,0*c,.96*b,c);m=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_2");a.setAlpha(.7*h/100);m.drawShape(a,this,.14*b,.01*c,.72*b,.98*c);a.setAlpha(h/100);a.setFillColor("#ffffff");g.drawShape(a,this,.13*b,.12*c,.74*b,.76*c);this.style[mxConstants.STYLE_STROKEWIDTH]=
k;break;case "replica":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1");this.style[mxConstants.STYLE_STROKEWIDTH]=.038*l;a.setAlpha(.4*h/100);a.setStrokeColor(e);a.setFillColor("none");g.drawShape(a,this,.02*b,0*c,.96*b,c);a.setAlpha(.7*h/100);g.drawShape(a,this,.075*b,.06*c,.85*b,.88*c);a.setAlpha(h/100);a.setFillColor("#ffffff");g.drawShape(a,this,.13*b,.12*c,.74*b,.76*c);this.style[mxConstants.STYLE_STROKEWIDTH]=k;break;case "dynamic2":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_2");
a.setAlpha(.5*h/100);a.setStrokeColor("none");g.drawShape(a,this,.14*b,.01*c,.72*b,.98*c);m=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1");this.style[mxConstants.STYLE_STROKEWIDTH]=.01*l;a.setStrokeColor(e);a.setAlpha(h/100);a.setFillColor("#ffffff");m.drawShape(a,this,.13*b,.12*c,.74*b,.76*c);this.style[mxConstants.STYLE_STROKEWIDTH]=k;break;case "dynamic3":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_2");a.setStrokeColor("none");g.drawShape(a,this,.14*b,.01*c,.72*b,.98*
c);m=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1");this.style[mxConstants.STYLE_STROKEWIDTH]=.01*l;a.setStrokeColor(e);a.setAlpha(h/100);a.setFillColor("#ffffff");m.drawShape(a,this,.13*b,.12*c,.74*b,.76*c);this.style[mxConstants.STYLE_STROKEWIDTH]=k;break;case "highmem":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_highmem");a.setAlpha(.5*h/100);a.setStrokeColor("none");g.drawShape(a,this,0,.56*c,b,.28*c);break;case "highcomp":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_highcomp");
a.setAlpha(.5*h/100);a.setStrokeColor("none");g.drawShape(a,this,0,.16*c,b,.28*c);break;case "backend":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1");a.setFillColor("#FCC64D");g.drawShape(a,this,.12*b,.11*c,.76*b,.78*c);break;case "input":g=mxStencilRegistry.getStencil("mxgraph.gcp2.outline_blank_1"),a.setFillColor("#A5DA40"),g.drawShape(a,this,.12*b,.11*c,.76*b,.78*c)}a.setAlpha(h/100);f=mxStencilRegistry.getStencil("mxgraph.gcp2."+f);null!=f&&(a.setFillColor(e),a.setStrokeColor("none"),
f.drawShape(a,this,.17*b,.16*c,.66*b,.68*c));0<d&&(a.setFillColor("#ffffff"),a.setStrokeColor("#ffffff"),a.setStrokeWidth(.038*l),a.ellipse(.2*b,0,.18*b,.22*c),a.fillAndStroke(),a.setAlpha(.5*h/100),a.setStrokeColor(e),a.ellipse(.2*b,0,.18*b,.22*c),a.stroke(),a.setAlpha(h/100),a.setFontColor("#4E6B89"),a.setFontStyle(1),a.setFontSize(.1*Math.min(b,c)),a.text(.29*b,.11*c+1,0,0,d.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0))};
mxCellRenderer.registerShape(mxShapeGCP2HexIcon.prototype.cst.HEX_ICON,mxShapeGCP2HexIcon);
mxShapeGCP2HexIcon.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.825,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.175,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.16),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,.84),!1));a.push(new mxConnectionConstraint(new mxPoint(.66,.17),!1));a.push(new mxConnectionConstraint(new mxPoint(.66,.83),!1));a.push(new mxConnectionConstraint(new mxPoint(.34,.17),!1));a.push(new mxConnectionConstraint(new mxPoint(.34,
.83),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.33),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.67),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.33),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,.67),!1));return a};function mxShapeGmdlPlayer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlPlayer,mxShape);mxShapeGmdlPlayer.prototype.cst={SHAPE_PLAYER:"mxgraph.gmdl.player"};
mxShapeGmdlPlayer.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(0,0,b,c);a.fill();a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeGmdlPlayer.prototype.foreground=function(a,d,e,b,c){4<=c&&(a.setFillColor("#FFED00"),a.begin(),a.rect(0,0,.8*b,4),a.fill());14<=c&&33<=b&&(a.setFillColor("#717171"),a.begin(),a.rect(b-33,.5*c-7,4,14),a.fill(),a.begin(),a.rect(b-25,.5*c-7,4,14),a.fill())};mxCellRenderer.registerShape(mxShapeGmdlPlayer.prototype.cst.SHAPE_PLAYER,mxShapeGmdlPlayer);
function mxShapeGmdlSwitch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSwitch,mxShape);mxShapeGmdlSwitch.prototype.cst={SHAPE_SWITCH:"mxgraph.gmdl.switch",STATE:"switchState",STATE_ON:"on",STATE_OFF:"off"};mxShapeGmdlSwitch.prototype.customProperties=[{name:"switchState",dispName:"State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}];
mxShapeGmdlSwitch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,mxShapeGmdlSwitch.prototype.cst.STATE,mxShapeGmdlSwitch.prototype.cst.STATE_ON);this.background(a,d,e,b,c,f);a.setShadow(!0);this.foreground(a,d,e,b,c,f)};
mxShapeGmdlSwitch.prototype.background=function(a,d,e,b,c,f){a.begin();f===mxShapeGmdlSwitch.prototype.cst.STATE_ON?(a.save(),a.setAlpha("0.5"),a.moveTo(.135*b,.8*c),a.arcTo(.135*b,.3*c,0,0,1,.135*b,.2*c),a.lineTo(.675*b,.2*c),a.arcTo(.135*b,.3*c,0,0,1,.675*b,.8*c),a.close(),a.fillAndStroke(),a.restore()):(a.setFillColor("#BCBBBB"),a.moveTo(.225*b,.8*c),a.arcTo(.135*b,.3*c,0,0,1,.225*b,.2*c),a.lineTo(.865*b,.2*c),a.arcTo(.135*b,.3*c,0,0,1,.865*b,.8*c),a.close(),a.fillAndStroke())};
mxShapeGmdlSwitch.prototype.foreground=function(a,d,e,b,c,f){a.begin();f===mxShapeGmdlSwitch.prototype.cst.STATE_ON?a.ellipse(.36*b,0,.64*b,c):(a.setFillColor("#F1F1F1"),a.ellipse(0,0,.64*b,c));a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeGmdlSwitch.prototype.cst.SHAPE_SWITCH,mxShapeGmdlSwitch);function mxShapeGmdlMarginRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlMarginRect,mxShape);
mxShapeGmdlMarginRect.prototype.cst={SHAPE_MARGIN_RECT:"mxgraph.gmdl.marginRect",MARGIN:"rectMargin",MARGIN_TOP:"rectMarginTop",MARGIN_LEFT:"rectMarginLeft",MARGIN_BOTTOM:"rectMarginBottom",MARGIN_RIGHT:"rectMarginRight"};
mxShapeGmdlMarginRect.prototype.customProperties=[{name:"rectMargin",dispName:"Margin",type:"float",min:0,defVal:0},{name:"rectMarginTop",dispName:"Margin Top",type:"float",defVal:0},{name:"rectMarginLeft",dispName:"Margin Left",type:"float",defVal:0},{name:"rectMarginBottom",dispName:"Margin Bottom",type:"float",defVal:0},{name:"rectMarginRight",dispName:"Margin Right",type:"float",defVal:0}];
mxShapeGmdlMarginRect.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};
mxShapeGmdlMarginRect.prototype.background=function(a,d,e,b,c,f){d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN,"0"));var g=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_TOP,"0"));f=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_LEFT,"0"));e=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_BOTTOM,"0"));var h=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_RIGHT,
"0"));f=d+f;g=d+g;b=b-h-f-d;c=c-e-g-d;0<b&&0<c&&(a.begin(),a.rect(f,g,b,c),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeGmdlMarginRect.prototype.cst.SHAPE_MARGIN_RECT,mxShapeGmdlMarginRect);function mxShapeGmdlSliderNormal(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderNormal,mxShape);mxShapeGmdlSliderNormal.prototype.cst={SHAPE_SLIDER_NORMAL:"mxgraph.gmdl.sliderNormal",HANDLE_SIZE:"handleSize"};
mxShapeGmdlSliderNormal.prototype.customProperties=[{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}];mxShapeGmdlSliderNormal.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderNormal.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderNormal.prototype.cst.HANDLE_SIZE,"10"));a.ellipse(0,.5*c-.5*d,d,d);a.stroke();a.begin();a.moveTo(d,.5*c);a.lineTo(b,.5*c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeGmdlSliderNormal.prototype.cst.SHAPE_SLIDER_NORMAL,mxShapeGmdlSliderNormal);
function mxShapeGmdlSlider2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSlider2,mxShape);mxShapeGmdlSlider2.prototype.cst={SHAPE_SLIDER:"mxgraph.gmdl.slider2",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"};mxShapeGmdlSlider2.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}];
mxShapeGmdlSlider2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSlider2.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSlider2.prototype.cst.HANDLE_SIZE,"10"));e=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSlider2.prototype.cst.BAR_POS,"40"))/100;e=Math.max(0,Math.min(1,e));a.save();a.setStrokeColor("#bbbbbb");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.fillAndStroke();a.restore();a.begin();a.moveTo(0,.5*c);a.lineTo(e*b,.5*c);a.fillAndStroke();a.begin();a.ellipse(e*b-.5*d,.5*c-.5*d,d,d);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeGmdlSlider2.prototype.cst.SHAPE_SLIDER,mxShapeGmdlSlider2);mxShapeGmdlSlider2.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlSlider2.prototype.cst.SHAPE_SLIDER]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeGmdlSliderFocused(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderFocused,mxShape);mxShapeGmdlSliderFocused.prototype.cst={SHAPE_SLIDER_FOCUSED:"mxgraph.gmdl.sliderFocused",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"};mxShapeGmdlSliderFocused.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}];
mxShapeGmdlSliderFocused.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderFocused.prototype.background=function(a,d,e,b,c){d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderFocused.prototype.cst.HANDLE_SIZE,"10"));e=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderFocused.prototype.cst.BAR_POS,"40"))/100;var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#ffffff");e=Math.max(0,Math.min(1,e));a.save();a.setStrokeColor("#bbbbbb");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.fillAndStroke();a.restore();a.begin();a.moveTo(0,.5*
c);a.lineTo(e*b,.5*c);a.fillAndStroke();a.begin();a.ellipse(e*b-.167*d,.5*c-.167*d,.33*d,.33*d);a.fillAndStroke();a.setFillColor(f);a.setAlpha(.15);a.begin();a.ellipse(e*b-.5*d,.5*c-.5*d,d,d);a.fill()};mxCellRenderer.registerShape(mxShapeGmdlSliderFocused.prototype.cst.SHAPE_SLIDER_FOCUSED,mxShapeGmdlSliderFocused);mxShapeGmdlSliderFocused.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlSliderFocused.prototype.cst.SHAPE_SLIDER_FOCUSED]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeGmdlSliderDisabled(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderDisabled,mxShape);mxShapeGmdlSliderDisabled.prototype.cst={SHAPE_SLIDER_DISABLED:"mxgraph.gmdl.sliderDisabled",HANDLE_POSITION:"hPos",HANDLE_SIZE:"handleSize"};
mxShapeGmdlSliderDisabled.prototype.customProperties=[{name:"hPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}];mxShapeGmdlSliderDisabled.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderDisabled.prototype.background=function(a,d,e,b,c){e=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled.prototype.cst.HANDLE_SIZE,"10"));d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled.prototype.cst.HANDLE_POSITION,"50"))/100;d=Math.max(d,0);d=Math.min(d,1);a.ellipse(b*d-.5*e,.5*(c-e),e,e);a.fillAndStroke();e=b*d-7;d=b*d+7;0<e&&(a.begin(),a.moveTo(0,.5*c),a.lineTo(e,.5*c),a.stroke());d<b&&(a.begin(),a.moveTo(d,.5*c),a.lineTo(b,.5*c),a.stroke())};
mxCellRenderer.registerShape(mxShapeGmdlSliderDisabled.prototype.cst.SHAPE_SLIDER_DISABLED,mxShapeGmdlSliderDisabled);function mxShapeGmdlSliderDisabled2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderDisabled2,mxShape);mxShapeGmdlSliderDisabled2.prototype.cst={SHAPE_SLIDER_DISABLED:"mxgraph.gmdl.sliderDisabled2",HANDLE_POSITION:"hPos",HANDLE_SIZE:"handleSize"};
mxShapeGmdlSliderDisabled2.prototype.customProperties=[{name:"hPos",dispName:"Handle Position",type:"float",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}];mxShapeGmdlSliderDisabled2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderDisabled2.prototype.background=function(a,d,e,b,c){e=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled2.prototype.cst.HANDLE_SIZE,"10"));d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled2.prototype.cst.HANDLE_POSITION,"50"))/100;d=Math.min(Math.max(d,0),1);a.ellipse(b*d-.5*e,.5*(c-e),e,e);a.fillAndStroke();e=b*d-7;d=b*d+7;0<e&&(a.begin(),a.moveTo(0,.5*c),a.lineTo(e,.5*c),a.stroke());d<b&&(a.begin(),a.moveTo(d,.5*c),a.lineTo(b,.5*c),a.stroke())};
mxCellRenderer.registerShape(mxShapeGmdlSliderDisabled2.prototype.cst.SHAPE_SLIDER_DISABLED,mxShapeGmdlSliderDisabled2);mxShapeGmdlSlider2.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlSliderDisabled2.prototype.cst.SHAPE_SLIDER_DISABLED]=function(a){return[Graph.createHandle(a,["hPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"hPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2)},function(d,e){this.state.style.hPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeGmdlSliderDiscrete(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderDiscrete,mxShape);mxShapeGmdlSliderDiscrete.prototype.cst={SHAPE_DISCRETE:"mxgraph.gmdl.sliderDiscrete",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"};mxShapeGmdlSliderDiscrete.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"int",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}];
mxShapeGmdlSliderDiscrete.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderDiscrete.prototype.background=function(a,d,e,b,c){parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscrete.prototype.cst.HANDLE_SIZE,"10"));d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscrete.prototype.cst.BAR_POS,"40"))/100;e=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12"));var f=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000");d=Math.max(0,Math.min(1,d));a.save();a.setStrokeColor("#bbbbbb");a.begin();a.moveTo(0,.5*
c+22.5);a.lineTo(b,.5*c+22.5);a.fillAndStroke();a.restore();a.begin();a.moveTo(0,.5*c+22.5);a.lineTo(d*b,.5*c+22.5);a.fillAndStroke();a.begin();a.moveTo(d*b,.5*c+15.5);a.lineTo(d*b-10.5,.5*c+2.5);a.arcTo(15,15,0,0,1,d*b,.5*c-22.5);a.arcTo(15,15,0,0,1,d*b+10.5,.5*c+2.5);a.close();a.fillAndStroke();a.setFontSize(e);a.setFontColor(f);a.text(d*b,.5*c-9,0,0,Math.round(100*d).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxCellRenderer.registerShape(mxShapeGmdlSliderDiscrete.prototype.cst.SHAPE_DISCRETE,mxShapeGmdlSliderDiscrete);mxShapeGmdlSliderDiscrete.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlSliderDiscrete.prototype.cst.SHAPE_DISCRETE]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2+22.5)},function(d,e){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/100})]};
function mxShapeGmdlSliderDiscreteDots(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeGmdlSliderDiscreteDots,mxShape);mxShapeGmdlSliderDiscreteDots.prototype.cst={SHAPE_DISCRETE_DOTS:"mxgraph.gmdl.sliderDiscreteDots",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"};
mxShapeGmdlSliderDiscreteDots.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"int",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}];mxShapeGmdlSliderDiscreteDots.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!0)};
mxShapeGmdlSliderDiscreteDots.prototype.background=function(a,d,e,b,c){parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscreteDots.prototype.cst.HANDLE_SIZE,"10"));d=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscreteDots.prototype.cst.BAR_POS,"40"))/100;e=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12"));var f=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000"),g=mxUtils.getValue(this.style,"bright","1");d=Math.max(0,Math.min(1,d));a.save();
a.setStrokeColor("#bebebe");a.begin();a.moveTo(0,.5*c+22.5);a.lineTo(b,.5*c+22.5);a.fillAndStroke();a.restore();.1>=d&&a.setFillColor("#bebebe");a.begin();a.moveTo(0,.5*c+22.5);a.lineTo(d*b,.5*c+22.5);a.fillAndStroke();a.begin();a.moveTo(d*b,.5*c+15.5);a.lineTo(d*b-10.5,.5*c+2.5);a.arcTo(15,15,0,0,1,d*b,.5*c-22.5);a.arcTo(15,15,0,0,1,d*b+10.5,.5*c+2.5);a.close();a.fill();"1"==g?a.setFillColor("#000000"):a.setFillColor("#ffffff");a.ellipse(-1.5,.5*c+21,3,3);a.fill();a.ellipse(.2*b-1.5,.5*c+21,3,3);
a.fill();a.ellipse(.4*b-1.5,.5*c+21,3,3);a.fill();a.ellipse(.6*b-1.5,.5*c+21,3,3);a.fill();a.ellipse(.8*b-1.5,.5*c+21,3,3);a.fill();a.ellipse(b-1.5,.5*c+21,3,3);a.fill();a.setFontSize(e);a.setFontColor(f);a.text(d*b,.5*c-9,0,0,Math.round(100*d).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxCellRenderer.registerShape(mxShapeGmdlSliderDiscreteDots.prototype.cst.SHAPE_DISCRETE_DOTS,mxShapeGmdlSliderDiscreteDots);mxShapeGmdlSliderDiscreteDots.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlSliderDiscreteDots.prototype.cst.SHAPE_DISCRETE_DOTS]=function(a){return[Graph.createHandle(a,["barPos"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(d.x+e*d.width/100,d.y+d.height/2+22.5)},function(d,e){this.state.style.barPos=Math.round(.05*Math.max(0,Math.min(100,100*(e.x-d.x)/d.width)))/.05})]};
function mxShapeGmdlProgressBar(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx1=.8}mxUtils.extend(mxShapeGmdlProgressBar,mxShape);mxShapeGmdlProgressBar.prototype.cst={PROGRESS_BAR:"mxgraph.gmdl.progressBar"};mxShapeGmdlProgressBar.prototype.customProperties=[{name:"dx1",dispName:"Handle Position",type:"int",min:0,defVal:.8}];
mxShapeGmdlProgressBar.prototype.paintVertexShape=function(a,d,e,b,c){var f=b*Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));a.translate(d,e);a.save();a.setStrokeColor("#aaaaaa");a.begin();a.moveTo(0,.5*c);a.lineTo(b,.5*c);a.stroke();a.restore();a.setShadow(!1);a.begin();a.moveTo(0,.5*c);a.lineTo(f,.5*c);a.stroke()};mxCellRenderer.registerShape(mxShapeGmdlProgressBar.prototype.cst.PROGRESS_BAR,mxShapeGmdlProgressBar);mxShapeGmdlProgressBar.prototype.constraints=null;
Graph.handleFactory[mxShapeGmdlProgressBar.prototype.cst.PROGRESS_BAR]=function(a){var d=[Graph.createHandle(a,["dx1"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));return new mxPoint(e.x+b*e.width,e.y+e.height/2)},function(e,b){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(1,(b.x-e.x)/e.width)))/100})];a=Graph.createHandle(a,["dx2"],function(e){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx1))));
return new mxPoint(e.x+b*e.width,e.y+e.height/2)},function(e,b){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(1,(b.x-e.x)/e.width)))/100});d.push(a);return d};function mxShapeIBMBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeIBMBox,mxShape);mxShapeIBMBox.prototype.cst={IBM_BOX:"mxgraph.ibm.box"};
mxShapeIBMBox.prototype.customProperties=[{name:"prType",dispName:"Box Type",defVal:"cloud",type:"enum",enumList:[{val:"cloud",dispName:"IBM Cloud"},{val:"vpc",dispName:"VPC"},{val:"region",dispName:"Region"},{val:"zone",dispName:"Zone"},{val:"subnet",dispName:"Subnet ACL"},{val:"public",dispName:"Public Network"},{val:"enterprise",dispName:"Enterprise Network"},{val:"classic",dispName:"Classic Infrastructure"}]}];
mxShapeIBMBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(0,0,b,c);a.fillAndStroke();d=mxUtils.getValue(this.state.style,"strokeColor","none");a.setFillColor(d);a.setStrokeColor("none");switch(mxUtils.getValue(this.state.style,"prType","")){case "cloud":d=mxStencilRegistry.getStencil("mxgraph.ibm.cloudtag");d.drawShape(a,this,0,0,25,25);break;case "vpc":d=mxStencilRegistry.getStencil("mxgraph.ibm.vpctag");d.drawShape(a,this,0,0,25,25);break;case "region":d=mxStencilRegistry.getStencil("mxgraph.ibm.regiontag");
d.drawShape(a,this,0,0,25,25);break;case "zone":d=mxStencilRegistry.getStencil("mxgraph.ibm.zonetag");d.drawShape(a,this,0,0,25,25);break;case "subnet":d=mxStencilRegistry.getStencil("mxgraph.ibm.subnettag");d.drawShape(a,this,0,0,25,25);break;case "public":d=mxStencilRegistry.getStencil("mxgraph.ibm.publictag");d.drawShape(a,this,0,0,25,25);break;case "enterprise":d=mxStencilRegistry.getStencil("mxgraph.ibm.enterprisetag");d.drawShape(a,this,0,0,25,25);break;case "classic":d=mxStencilRegistry.getStencil("mxgraph.ibm.classictag"),
d.drawShape(a,this,0,0,25,25)}};mxCellRenderer.registerShape(mxShapeIBMBox.prototype.cst.IBM_BOX,mxShapeIBMBox);function mxShapeInfographicNumEntryVert(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeInfographicNumEntryVert,mxActor);mxShapeInfographicNumEntryVert.prototype.cst={NUM_ENTRY_VERT:"mxgraph.infographic.numberedEntryVert"};
mxShapeInfographicNumEntryVert.prototype.customProperties=[{name:"dy",dispName:"Circle Size",min:0,defVal:25}];
mxShapeInfographicNumEntryVert.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d=Math.min(d,b-10,c-5);a.ellipse(.5*b-.5*d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(0,.5*d);a.lineTo(.5*b-.5*d-5,.5*d);a.arcTo(.5*d+5,.5*d+5,0,0,0,.5*b+.5*d+5,.5*d);a.lineTo(b,.5*d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeInfographicNumEntryVert.prototype.cst.NUM_ENTRY_VERT,mxShapeInfographicNumEntryVert);
Graph.handleFactory[mxShapeInfographicNumEntryVert.prototype.cst.NUM_ENTRY_VERT]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(d.width,d.width,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+d.width/2,d.y+e)},function(d,e){this.state.style.dy=Math.round(100*Math.max(0,Math.min(d.height,d.width,e.y-d.y)))/100})]};
mxShapeInfographicNumEntryVert.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d=Math.min(b,d-10,e-5);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,.25*d));
a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));return a};function mxShapeInfographicBendingArch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeInfographicBendingArch,mxActor);mxShapeInfographicBendingArch.prototype.cst={BENDING_ARCH:"mxgraph.infographic.bendingArch"};
mxShapeInfographicBendingArch.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",min:0,max:1,defVal:.75},{name:"endAngle",dispName:"End Angle",min:0,max:1,defVal:.25},{name:"arcWidth",dispName:"Arc Width",min:0,max:1,defVal:.25}];
mxShapeInfographicBendingArch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));d=.5*b;e=.5*c;var k=d*h;h*=e;var l=d+Math.sin(f)*d,m=e-Math.cos(f)*e,n=d+Math.sin(f)*k,p=e-Math.cos(f)*
h,q=d+Math.sin(g)*d,t=e-Math.cos(g)*e,u=d+Math.sin(g)*k,v=e-Math.cos(g)*h;g-=f;0>g&&(g+=2*Math.PI);f=0;g>Math.PI&&(f=1);g=k-5;var r=h-5;a.ellipse(.5*b-g,.5*c-r,2*g,2*r);a.fillAndStroke();a.begin();a.moveTo(l,m);a.arcTo(d,e,0,f,1,q,t);a.lineTo(u,v);a.arcTo(k,h,0,f,0,n,p);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicBendingArch.prototype.cst.BENDING_ARCH,mxShapeInfographicBendingArch);mxShapeInfographicBendingArch.prototype.constraints=null;
Graph.handleFactory[mxShapeInfographicBendingArch.prototype.cst.BENDING_ARCH]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.startAngle=b})],e=Graph.createHandle(a,["endAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,Math.min(1,
(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.endAngle=b});d.push(e);a=Graph.createHandle(a,["arcWidth"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"arcWidth",this.arcWidth))));return new mxPoint(b.x+b.width/2,b.y+c*b.height*.5)},function(b,c){this.state.style.arcWidth=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,(c.y-b.y)/(.5*b.height))))/100});d.push(a);return d};
function mxShapeInfographicParallelogram(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=10}mxUtils.extend(mxShapeInfographicParallelogram,mxActor);mxShapeInfographicParallelogram.prototype.cst={PARALLELOGRAM:"mxgraph.infographic.parallelogram"};mxShapeInfographicParallelogram.prototype.customProperties=[{name:"dx",dispName:"Angle",min:0,defVal:15}];
mxShapeInfographicParallelogram.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(.5*b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));a.begin();a.moveTo(0,c);a.lineTo(2*d,0);a.lineTo(b,0);a.lineTo(b-2*d,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicParallelogram.prototype.cst.PARALLELOGRAM,mxShapeInfographicParallelogram);
Graph.handleFactory[mxShapeInfographicParallelogram.prototype.cst.PARALLELOGRAM]=function(a){return[Graph.createHandle(a,["dx"],function(d){var e=Math.max(0,Math.min(d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(d.x+e,d.y+d.height/2)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width/2,e.x-d.x)))/100})]};
mxShapeInfographicParallelogram.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=d-2*b;a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2*b+.5*c,0));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-2*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,e));return a};function mxShapeInfographicRibbonRolled(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=185;this.dy=15}mxUtils.extend(mxShapeInfographicRibbonRolled,mxActor);mxShapeInfographicRibbonRolled.prototype.cst={RIBBON_ROLLED:"mxgraph.infographic.ribbonRolled"};
mxShapeInfographicRibbonRolled.prototype.customProperties=[{name:"dx",dispName:"Roll Length",min:0,defVal:185},{name:"dy",dispName:"Ribbon Width",min:0,defVal:15}];
mxShapeInfographicRibbonRolled.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.lineTo(0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(0,
e);a.lineTo(d,0);a.lineTo(d,e);a.close();a.moveTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.close();a.fill();a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.lineTo(0,c-e);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicRibbonRolled.prototype.cst.RIBBON_ROLLED,mxShapeInfographicRibbonRolled);
Graph.handleFactory[mxShapeInfographicRibbonRolled.prototype.cst.RIBBON_ROLLED]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+b)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,
Math.min(d.height/2,e.y-d.y)))/100})]};
mxShapeInfographicRibbonRolled.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dx",this.dx));var b=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e-=b;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,b));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(.75,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};
function mxShapeInfographicRibbonDoubleFolded(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=25;this.dy=15}mxUtils.extend(mxShapeInfographicRibbonDoubleFolded,mxActor);mxShapeInfographicRibbonDoubleFolded.prototype.cst={RIBBON_DOUBLE_FOLDED:"mxgraph.infographic.ribbonDoubleFolded"};mxShapeInfographicRibbonDoubleFolded.prototype.customProperties=[{name:"dx",dispName:"Fold Length",min:0,defVal:25},{name:"dy",dispName:"Ribbon Width",min:0,defVal:15}];
mxShapeInfographicRibbonDoubleFolded.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.lineTo(0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(0,
e);a.lineTo(d,0);a.lineTo(d,c-2*e);a.lineTo(0,c-e);a.close();a.moveTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.close();a.fill();a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b,c-e);a.lineTo(b-d,c);a.lineTo(b-d,c-e);a.lineTo(0,c-e);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicRibbonDoubleFolded.prototype.cst.RIBBON_DOUBLE_FOLDED,mxShapeInfographicRibbonDoubleFolded);
Graph.handleFactory[mxShapeInfographicRibbonDoubleFolded.prototype.cst.RIBBON_DOUBLE_FOLDED]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+b)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100;this.state.style.dy=Math.round(100*
Math.max(0,Math.min(d.height/2,e.y-d.y)))/100})]};
mxShapeInfographicRibbonDoubleFolded.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dx",this.dx));d=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(1,
0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,e-d));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,e-d));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,e-d));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,e-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};
function mxShapeInfographicRibbonFrontFolded(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicRibbonFrontFolded,mxActor);mxShapeInfographicRibbonFrontFolded.prototype.cst={RIBBON_FRONT_FOLDED:"mxgraph.infographic.ribbonFrontFolded"};
mxShapeInfographicRibbonFrontFolded.prototype.customProperties=[{name:"dx",dispName:"Fold Length",min:0,defVal:25},{name:"dy",dispName:"Ribbon Width",min:0,defVal:15},{name:"notch",dispName:"Notch",min:0,defVal:15}];
mxShapeInfographicRibbonFrontFolded.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(b-d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b-f,(c-e)/2+e);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();
a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,c-e);a.lineTo(0,c);a.close();a.fill();a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b-f,(c-e)/2+e);a.lineTo(b,c);a.lineTo(0,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicRibbonFrontFolded.prototype.cst.RIBBON_FRONT_FOLDED,mxShapeInfographicRibbonFrontFolded);
Graph.handleFactory[mxShapeInfographicRibbonFrontFolded.prototype.cst.RIBBON_FRONT_FOLDED]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+b,e.y+c)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(e.width,b.x-e.x)))/100;this.state.style.dy=Math.round(100*
Math.max(0,Math.min(e.height/2,b.y-e.y)))/100})];a=Graph.createHandle(a,["notch"],function(e){var b=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),c=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(e.x+e.width-c,e.y+b+.5*(e.height-b))},function(e,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(e.width,e.width+e.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicRibbonFrontFolded.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b=Math.max(0,Math.min(d-b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),
!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e+c)));return a};function mxShapeInfographicRibbonBackFolded(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicRibbonBackFolded,mxActor);mxShapeInfographicRibbonBackFolded.prototype.cst={RIBBON_BACK_FOLDED:"mxgraph.infographic.ribbonBackFolded"};
mxShapeInfographicRibbonBackFolded.prototype.customProperties=[{name:"dx",dispName:"Fold Length",min:0,defVal:25},{name:"dy",dispName:"Ribbon Width",min:0,defVal:15},{name:"notch",dispName:"Notch",min:0,defVal:15}];
mxShapeInfographicRibbonBackFolded.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(b-d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b-f,(c-e)/2+e);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);
a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.close();a.fill();a.begin();a.moveTo(0,e);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(b,e);a.lineTo(b-f,(c-e)/2+e);a.lineTo(b,c);a.lineTo(0,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicRibbonBackFolded.prototype.cst.RIBBON_BACK_FOLDED,mxShapeInfographicRibbonBackFolded);
Graph.handleFactory[mxShapeInfographicRibbonBackFolded.prototype.cst.RIBBON_BACK_FOLDED]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+b,e.y+c)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(e.width,b.x-e.x)))/100;this.state.style.dy=Math.round(100*
Math.max(0,Math.min(e.height/2,b.y-e.y)))/100})];a=Graph.createHandle(a,["notch"],function(e){var b=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),c=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(e.x+e.width-c,e.y+b+.5*(e.height-b))},function(e,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(e.width,e.width+e.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicRibbonBackFolded.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b=Math.max(0,Math.min(d-b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),
!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e+c)));return a};function mxShapeInfographicBanner(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicBanner,mxActor);mxShapeInfographicBanner.prototype.cst={BANNER:"mxgraph.infographic.banner"};
mxShapeInfographicBanner.prototype.customProperties=[{name:"dx",dispName:"Fold Length",min:0,defVal:25},{name:"dy",dispName:"Ribbon Width",min:0,defVal:15},{name:"notch",dispName:"Notch",min:0,defVal:15}];
mxShapeInfographicBanner.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b/2,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));d=Math.min(b/2-2*e,d);f=Math.min(d,f);a.begin();a.moveTo(0,e);a.lineTo(d,e);a.lineTo(d,0);a.lineTo(b-d,0);a.lineTo(b-d,e);a.lineTo(b,e);a.lineTo(b-f,.5*(c-e)+
e);a.lineTo(b,c);a.lineTo(b-d-2*e,c);a.lineTo(b-d-2*e,c-e);a.lineTo(d+2*e,c-e);a.lineTo(d+2*e,c);a.lineTo(0,c);a.lineTo(f,.5*(c-e)+e);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(0,e);a.lineTo(d,e);a.lineTo(d,c-e);a.lineTo(d+2*e,c);a.lineTo(0,c);a.lineTo(f,.5*(c-e)+e);a.close();a.moveTo(b,e);a.lineTo(b-d,e);a.lineTo(b-d,c-e);a.lineTo(b-d-2*e,c);a.lineTo(b,c);a.lineTo(b-f,.5*(c-e)+e);a.close();a.fill();a.setFillAlpha("0.4");a.begin();
a.moveTo(d,c-e);a.lineTo(d+2*e,c-e);a.lineTo(d+2*e,c);a.close();a.moveTo(b-d,c-e);a.lineTo(b-d-2*e,c-e);a.lineTo(b-d-2*e,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicBanner.prototype.cst.BANNER,mxShapeInfographicBanner);
Graph.handleFactory[mxShapeInfographicBanner.prototype.cst.BANNER]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(e){var b=Math.max(0,Math.min(e.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),c=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-b,e.y+c)},function(e,b){this.state.style.dx=Math.round(100*Math.max(0,Math.min(e.width/2,e.x+e.width-b.x)))/100;this.state.style.dy=Math.round(100*
Math.max(0,Math.min(e.height/2,b.y-e.y)))/100})];a=Graph.createHandle(a,["notch"],function(e){var b=Math.max(0,Math.min(e.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),c=Math.max(0,Math.min(e.width/2,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));c=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(e.x+e.width-c,e.y+b+.5*(e.height-b))},function(e,b){this.state.style.notch=Math.round(100*Math.max(0,Math.min(e.width,
e.width+e.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicBanner.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d/2,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));b=Math.min(d/2-2*c,b);f=Math.min(b,f);var g=d-2*b;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+
.25*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.75*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+g,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.75*g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*g,e-
c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.25*g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,.5*(e+c)));return a};
function mxShapeInfographicCircularCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeInfographicCircularCallout,mxActor);mxShapeInfographicCircularCallout.prototype.cst={CIRCULAR_CALLOUT:"mxgraph.infographic.circularCallout"};mxShapeInfographicCircularCallout.prototype.customProperties=[{name:"dy",dispName:"Ribbon Width",min:0,defVal:15}];
mxShapeInfographicCircularCallout.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(.5*b,.5*b-d));var f=Math.max(0,Math.min(.5*c,.5*c-d));a.begin();a.moveTo(b,.5*c);a.arcTo(.5*b,.5*c,0,0,1,.5*b,c);a.arcTo(.5*b,.5*c,0,0,1,0,.5*c);a.arcTo(.5*b,.5*c,0,0,1,.5*b,0);a.lineTo(b,0);a.close();a.moveTo(.5*b,d);a.arcTo(e,f,0,0,0,.5*b-e,.5*c);a.arcTo(e,f,0,0,0,.5*b,.5*c+f);a.arcTo(e,f,0,0,0,
.5*b+e,.5*c);a.arcTo(e,f,0,0,0,.5*b,.5*c-f);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicCircularCallout.prototype.cst.CIRCULAR_CALLOUT,mxShapeInfographicCircularCallout);
Graph.handleFactory[mxShapeInfographicCircularCallout.prototype.cst.CIRCULAR_CALLOUT]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(d.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+.5*d.width,d.y+e)},function(d,e){this.state.style.dy=Math.round(100*Math.max(0,Math.min(d.height/2,e.y-d.y)))/100})]};
mxShapeInfographicCircularCallout.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dy",this.dy));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));return a};function mxShapeInfographicShadedTriangle(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeInfographicShadedTriangle,mxActor);mxShapeInfographicShadedTriangle.prototype.cst={SHADED_TRIANGLE:"mxgraph.infographic.shadedTriangle"};
mxShapeInfographicShadedTriangle.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillColor("#ffffff");a.setFillAlpha("0.2");a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(.5*b,.67*c);a.close();a.fill();a.setFillColor("#000000");a.begin();a.moveTo(b,c);a.lineTo(.5*b,.67*c);a.lineTo(.5*b,0);a.close();a.fill();a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeInfographicShadedTriangle.prototype.cst.SHADED_TRIANGLE,mxShapeInfographicShadedTriangle);
mxShapeInfographicShadedTriangle.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,.5),!1));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(.25,.5),!1));return a};
function mxShapeInfographicShadedPyramid(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeInfographicShadedPyramid,mxActor);mxShapeInfographicShadedPyramid.prototype.cst={SHADED_PYRAMID:"mxgraph.infographic.shadedPyramid"};
mxShapeInfographicShadedPyramid.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(c-.3*b,0);a.begin();a.moveTo(0,d);a.lineTo(.5*b,0);a.lineTo(b,d);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillColor("#ffffff");a.setFillAlpha("0.2");a.begin();a.moveTo(0,d);a.lineTo(.5*b,0);a.lineTo(.5*b,c);a.close();a.fill();a.setFillColor("#000000");a.begin();a.moveTo(b,d);a.lineTo(.5*b,c);a.lineTo(.5*b,0);a.close();a.fill();a.begin();a.moveTo(0,d);a.lineTo(.5*b,0);
a.lineTo(b,d);a.lineTo(.5*b,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicShadedPyramid.prototype.cst.SHADED_PYRAMID,mxShapeInfographicShadedPyramid);
mxShapeInfographicShadedPyramid.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(e-.3*d,0);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*(e+b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*
d,.5*(e+b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,.5*b));return a};function mxShapeInfographicPyramidStep(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeInfographicPyramidStep,mxActor);mxShapeInfographicPyramidStep.prototype.cst={PYRAMID_STEP:"mxgraph.infographic.pyramidStep"};
mxShapeInfographicPyramidStep.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(.1*b,0);a.begin();a.moveTo(0,d);a.lineTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillColor("#ffffff");a.setFillAlpha("0.2");a.begin();a.moveTo(0,d);a.lineTo(.5*b,0);a.lineTo(.5*b,c);a.lineTo(0,c);a.close();a.fill();a.setFillColor("#000000");a.begin();a.moveTo(b,d);a.lineTo(b,c);a.lineTo(.5*b,c);a.lineTo(.5*b,0);a.close();a.fill();a.begin();
a.moveTo(0,d);a.lineTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(0,c);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicPyramidStep.prototype.cst.PYRAMID_STEP,mxShapeInfographicPyramidStep);
mxShapeInfographicPyramidStep.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(.1*d,0);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.5*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
d,b+.75*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.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,b+.75*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.5*(e-b)));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.25*(e-b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};function mxShapeInfographicCylinder(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeInfographicCylinder,mxActor);mxShapeInfographicCylinder.prototype.cst={CYLINDER:"mxgraph.infographic.cylinder"};
mxShapeInfographicCylinder.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.5*b;a.begin();a.moveTo(0,10);a.arcTo(d,10,0,0,1,b,10);a.lineTo(b,c-10);a.arcTo(d,10,0,0,1,0,c-10);a.close();a.fillAndStroke();a.setShadow(!1);a.setGradient("#000000","#ffffff",0,0,b,c,mxConstants.DIRECTION_EAST,.4,.4);a.begin();a.moveTo(0,10);a.arcTo(d,10,0,0,0,b,10);a.lineTo(b,c-10);a.arcTo(d,10,0,0,1,0,c-10);a.close();a.fill();a.begin();a.moveTo(0,10);a.arcTo(d,10,0,0,1,b,10);a.lineTo(b,c-10);a.arcTo(d,
10,0,0,1,0,c-10);a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicCylinder.prototype.cst.CYLINDER,mxShapeInfographicCylinder);
mxShapeInfographicCylinder.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10+.25*(e-20)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10+.5*(e-20)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,10+.75*(e-20)));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,e-10));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-10));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10+.75*(e-20)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10+.5*(e-20)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,10+.25*(e-20)));return a};
function mxShapeInfographicCircularCallout2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeInfographicCircularCallout2,mxActor);mxShapeInfographicCircularCallout2.prototype.cst={CIRCULAR_CALLOUT_2:"mxgraph.infographic.circularCallout2"};
mxShapeInfographicCircularCallout2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none");a.setFillColor(e);e=Math.max(0,Math.min(.5*b,.4*c,.5*c-7));a.begin();a.moveTo(.5*b-2,2.15*e);a.arcTo(.23*e,.23*e,0,0,0,.5*b-.2*e,1.97*e);a.arcTo(e,e,0,0,1,.5*b-e,e);a.arcTo(e,e,0,0,1,.5*b,0);a.arcTo(e,e,0,0,1,.5*b+e,e);a.arcTo(e,e,0,0,1,.5*b+.2*e,1.97*e);a.arcTo(.23*e,
.23*e,0,0,0,.5*b+2,2.15*e);var f=Math.max(.1*e,6);4<.04*e?(a.lineTo(.5*b+2,c-.22*e),a.arcTo(.05*e,.05*e,0,0,0,.5*b+.04*e,c-.19*e)):a.lineTo(.5*b+2,c-2*f);a.arcTo(f,f,0,0,1,.5*b+f,c-f);a.arcTo(f,f,0,0,1,.5*b,c);a.arcTo(f,f,0,0,1,.5*b-f,c-f);4<.04*e?(a.arcTo(f,f,0,0,1,.5*b-.04*e,c-.19*e),a.arcTo(.5*f,.5*f,0,0,0,.5*b-2,c-.22*e)):a.arcTo(f,f,0,0,1,.5*b-2,c-2*f);a.close();a.moveTo(.5*b,.2*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b-.8*e,.8*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b,1.8*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b+.8*e,.8*
e);a.arcTo(.8*e,.8*e,0,0,0,.5*b,.2*e);a.close();a.moveTo(.5*b,c-1.75*f);a.arcTo(.75*f,.75*f,0,0,0,.5*b-.75*f,c-f);a.arcTo(.75*f,.75*f,0,0,0,.5*b,c-.25*f);a.arcTo(.75*f,.75*f,0,0,0,.5*b+.75*f,c-f);a.arcTo(.75*f,.75*f,0,0,0,.5*b,c-1.75*f);a.close();a.fill();a.setFillColor(d);a.setShadow(!1);a.begin();a.moveTo(.5*b,.2*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b-.8*e,.8*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b,1.8*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b+.8*e,.8*e);a.arcTo(.8*e,.8*e,0,0,0,.5*b,.2*e);a.close();a.moveTo(.5*b,c-1.75*
f);a.arcTo(.75*f,.75*f,0,0,0,.5*b-.75*f,c-f);a.arcTo(.75*f,.75*f,0,0,0,.5*b,c-.25*f);a.arcTo(.75*f,.75*f,0,0,0,.5*b+.75*f,c-f);a.arcTo(.75*f,.75*f,0,0,0,.5*b,c-1.75*f);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicCircularCallout2.prototype.cst.CIRCULAR_CALLOUT_2,mxShapeInfographicCircularCallout2);
mxShapeInfographicCircularCallout2.prototype.getConstraints=function(a,d,e){a=[];e=Math.max(0,Math.min(.5*d,.4*e,.5*e-7));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-e,e));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+e,e));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));return a};
function mxShapeInfographicBannerSingleFold(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dx2=this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicBannerSingleFold,mxActor);mxShapeInfographicBannerSingleFold.prototype.cst={BANNER_SINGLE_FOLD:"mxgraph.infographic.bannerSingleFold"};
mxShapeInfographicBannerSingleFold.prototype.customProperties=[{name:"dx",dispName:"Fold Length",type:"float",defVal:32,min:0},{name:"dy",dispName:"Banner Width",type:"float",defVal:17,min:0},{name:"notch",dispName:"Notch",type:"float",defVal:15,min:0}];
mxShapeInfographicBannerSingleFold.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));var f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));d=Math.min(b-2*e,d);var g=Math.max(0,Math.min(b-d-2*e,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));f=Math.min(d,f);a.begin();a.moveTo(g,
0);a.lineTo(b-d,0);a.lineTo(b-d,e);a.lineTo(b,e);a.lineTo(b-f,.5*(c-e)+e);a.lineTo(b,c);a.lineTo(b-d-2*e,c);a.lineTo(b-d-2*e,c-e);a.lineTo(g,c-e);a.lineTo(0,.5*(c-e));a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.05");a.setFillColor("#000000");a.begin();a.moveTo(b,e);a.lineTo(b-d,e);a.lineTo(b-d,c-e);a.lineTo(b-d-2*e,c);a.lineTo(b,c);a.lineTo(b-f,.5*(c-e)+e);a.close();a.fill();a.setFillAlpha("0.4");a.begin();a.moveTo(b-d,c-e);a.lineTo(b-d-2*e,c-e);a.lineTo(b-d-2*e,c);a.close();a.fill();
a.begin();a.moveTo(g,0);a.lineTo(b-d,0);a.lineTo(b-d,e);a.lineTo(b,e);a.lineTo(b-f,.5*(c-e)+e);a.lineTo(b,c);a.lineTo(b-d-2*e,c);a.lineTo(b-d-2*e,c-e);a.lineTo(g,c-e);a.lineTo(0,.5*(c-e));a.close();a.stroke()};mxCellRenderer.registerShape(mxShapeInfographicBannerSingleFold.prototype.cst.BANNER_SINGLE_FOLD,mxShapeInfographicBannerSingleFold);
Graph.handleFactory[mxShapeInfographicBannerSingleFold.prototype.cst.BANNER_SINGLE_FOLD]=function(a){var d=[Graph.createHandle(a,["dx","dy"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(b.x+b.width-c,b.y+f)},function(b,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(b.width,b.x+b.width-c.x)))/100;this.state.style.dy=
Math.round(100*Math.max(0,Math.min(b.height/2,c.y-b.y)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.height/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy)))),f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));f=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+b.width-f,b.y+c+.5*(b.height-c))},function(b,c){this.state.style.notch=Math.round(100*
Math.max(0,Math.min(b.width,b.width+b.x-c.x)))/100});d.push(e);a=Graph.createHandle(a,["dx2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));c=Math.max(0,Math.min(b.width-c,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx2))));return new mxPoint(b.x+c,b.y+.5*(b.height-f))},function(b,c){var f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)))),g=Math.max(0,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width-f-2*g,c.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicBannerSingleFold.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),f=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));b=Math.min(d-2*c,b);var g=Math.max(0,Math.min(d-b-2*c,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));f=Math.min(b,f);var h=d-b-g;a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.25*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.5*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.75*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*b,c));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-.75*b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b-2*c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.75*(b+2*c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*(b+2*c),
e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*(b+2*c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.25*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.5*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.75*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+h,e-c));return a};
function mxShapeInfographicShadedCube(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.isoAngle=15}mxUtils.extend(mxShapeInfographicShadedCube,mxActor);mxShapeInfographicShadedCube.prototype.cst={SHADED_CUBE:"mxgraph.infographic.shadedCube"};mxShapeInfographicShadedCube.prototype.customProperties=[{name:"isoAngle",dispName:"Perspective",type:"float",defVal:15,min:0}];
mxShapeInfographicShadedCube.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;d=Math.min(b*Math.tan(d),.5*c);a.begin();a.moveTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);a.lineTo(0,c-d);a.lineTo(0,d);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(.5*b,2*d);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);
a.close();a.fill();a.setFillColor("#ffffff");a.begin();a.moveTo(.5*b,2*d);a.lineTo(0,d);a.lineTo(0,c-d);a.lineTo(.5*b,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE,mxShapeInfographicShadedCube);
Graph.handleFactory[mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE]=function(a){return[Graph.createHandle(a,["isoAngle"],function(d){var e=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",this.isoAngle))))*Math.PI/200;return new mxPoint(d.x,d.y+Math.min(d.width*Math.tan(e),.5*d.height))},function(d,e){this.state.style.isoAngle=Math.round(100*Math.max(0,Math.min(100,e.y-d.y)))/100})]};
mxShapeInfographicShadedCube.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;b=Math.min(d*Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,b+.5*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.75*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.5*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.25*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,.5*b));return a};
function mxShapeInfographicPartConcEllipse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeInfographicPartConcEllipse,mxActor);mxShapeInfographicPartConcEllipse.prototype.cst={PART_CONC_ELLIPSE:"mxgraph.infographic.partConcEllipse"};
mxShapeInfographicPartConcEllipse.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",min:0,max:1,defVal:.25},{name:"endAngle",dispName:"End Angle",min:0,max:1,defVal:.1},{name:"arcWidth",dispName:"Arc Width",min:0,max:1,defVal:.5}];
mxShapeInfographicPartConcEllipse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));d=.5*b;e=.5*c;var k=d*h,l=e*h,m=g-f;0>m?m+=2*Math.PI:m==Math.PI&&(g+=1E-5);var n=d+Math.sin(f)*d,
p=e-Math.cos(f)*e,q=d+Math.sin(f)*k;f=e-Math.cos(f)*l;var t=d+Math.sin(g)*d,u=e-Math.cos(g)*e,v=d+Math.sin(g)*k;g=e-Math.cos(g)*l;var r=0;m<=Math.PI&&(r=1);a.begin();a.moveTo(d,0);a.arcTo(d,e,0,0,1,b,e);a.arcTo(d,e,0,0,1,d,c);a.arcTo(d,e,0,0,1,0,e);a.arcTo(d,e,0,0,1,d,0);a.close();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,0,.5*b-k,e);a.arcTo(k,l,0,0,0,d,.5*c+l);a.arcTo(k,l,0,0,0,.5*b+k,e);a.arcTo(k,l,0,0,0,d,.5*c-l);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#ffffff");
a.begin();a.moveTo(n,p);a.arcTo(d,e,0,r,0,t,u);a.lineTo(v,g);a.arcTo(k,l,0,r,1,q,f);a.close();a.fill();d=.5*b;e=.5*c;k=d*h;l=e*h;h=k+.25*(d-k);m=l+.25*(e-l);a.setFillColor("#000000");a.begin();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,1,.5*b+k,e);a.arcTo(k,l,0,0,1,d,.5*c+l);a.arcTo(k,l,0,0,1,.5*b-k,e);a.arcTo(k,l,0,0,1,d,.5*c-l);a.close();a.moveTo(d,.5*c-m);a.arcTo(h,m,0,0,0,.5*b-h,e);a.arcTo(h,m,0,0,0,d,.5*c+m);a.arcTo(h,m,0,0,0,.5*b+h,e);a.arcTo(h,m,0,0,0,d,.5*c-m);a.close();a.fill()};
mxCellRenderer.registerShape(mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE,mxShapeInfographicPartConcEllipse);
Graph.handleFactory[mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,
Math.min(1,(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.startAngle=b})],e=Graph.createHandle(a,["endAngle"],function(b){var c=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(b.x+.5*b.width+Math.sin(c)*b.width*.5,b.y+.5*b.height-Math.cos(c)*b.height*.5)},function(b,c){b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-b.x-.5*b.width)/(.5*b.width))))/100,-Math.round(100*Math.max(-1,
Math.min(1,(c.y-b.y-.5*b.height)/(.5*b.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.endAngle=b});d.push(e);a=Graph.createHandle(a,["arcWidth"],function(b){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"arcWidth",this.arcWidth))));return new mxPoint(b.x+b.width/2,b.y+c*b.height*.5)},function(b,c){this.state.style.arcWidth=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,(c.y-b.y)/(.5*b.height))))/100});d.push(a);return d};
mxShapeInfographicPartConcEllipse.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));return a};function mxShapeInfographicBannerHalfFold(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dx2=this.dx=.5}mxUtils.extend(mxShapeInfographicBannerHalfFold,mxActor);mxShapeInfographicBannerHalfFold.prototype.cst={BANNER_HALF_FOLD:"mxgraph.infographic.bannerHalfFold"};
mxShapeInfographicBannerHalfFold.prototype.customProperties=[{name:"dx",dispName:"Banner Width",min:0,defVal:40},{name:"dx2",dispName:"Spike Size",min:0,defVal:20},{name:"notch",dispName:"Notch Size",min:0,defVal:15}];
mxShapeInfographicBannerHalfFold.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(b-d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));var f=Math.max(0,Math.min(c-d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(e,0);a.lineTo(b-d,0);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(b-.5*d,c-f);a.lineTo(b-d,c);a.lineTo(b-d,d);a.lineTo(e,d);a.lineTo(0,.5*
d);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(b-d,d);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(b-.5*d,c-f);a.lineTo(b-d,c);a.lineTo(b-d,d);a.lineTo(0,d);a.close();a.fill();a.begin();a.moveTo(e,0);a.lineTo(b-d,0);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(b-.5*d,c-f);a.lineTo(b-d,c);a.lineTo(b-d,d);a.lineTo(e,d);a.lineTo(0,.5*d);a.close();a.stroke()};
mxCellRenderer.registerShape(mxShapeInfographicBannerHalfFold.prototype.cst.BANNER_HALF_FOLD,mxShapeInfographicBannerHalfFold);
Graph.handleFactory[mxShapeInfographicBannerHalfFold.prototype.cst.BANNER_HALF_FOLD]=function(a){var d=[Graph.createHandle(a,["dx"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(b.x+b.width-c,b.y+c)},function(b,c){this.state.style.dx=Math.round(100*Math.max(0,Math.min(b.width,b.x+b.width-c.x)))/100})],e=Graph.createHandle(a,["notch"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,
"dx",this.dx)))),f=Math.max(0,Math.min(b.height-c,parseFloat(mxUtils.getValue(this.state.style,"notch",this.notch))));return new mxPoint(b.x+b.width-.5*c,b.y+b.height-f)},function(b,c){this.state.style.notch=Math.round(100*Math.max(0,Math.min(b.height,b.height+b.y-c.y)))/100});d.push(e);a=Graph.createHandle(a,["dx2"],function(b){var c=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),f=Math.max(0,Math.min(b.width-c,parseFloat(mxUtils.getValue(this.state.style,
"dx2",this.dx2))));return new mxPoint(b.x+f,b.y+c)},function(b,c){var f=Math.max(0,Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));this.state.style.dx2=Math.round(100*Math.max(0,Math.min(b.width-f,c.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicBannerHalfFold.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),c=Math.max(0,Math.min(d-b,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2)))),f=Math.max(0,Math.min(e-b,parseFloat(mxUtils.getValue(this.style,"notch",this.notch)))),g=d-b-c,h=e-b;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c+.25*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.75*g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*b,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,
b+.5*h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*h));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*b,e-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,e));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,b+.75*h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,b+.5*h));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-b,b+.25*h));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.25*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.75*g,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));return a};
function mxShapeInfographicCircularDial(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=.5}mxUtils.extend(mxShapeInfographicCircularDial,mxActor);mxShapeInfographicCircularDial.prototype.cst={CIRCULAR_DIAL:"mxgraph.infographic.circularDial"};mxShapeInfographicCircularDial.prototype.customProperties=[{name:"dy",dispName:"Hole Size",min:0,defVal:15}];
mxShapeInfographicCircularDial.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(.5*c-10,.5*b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));e=Math.max(0,Math.min(.5*b,.5*c-10));var f=e-d;a.begin();a.moveTo(.5*b-e,c);a.lineTo(.5*b-e,e);a.arcTo(e,e,0,0,1,.5*b,0);a.arcTo(e,e,0,0,1,.5*b+e,e);a.lineTo(.5*b+e,c);a.close();a.moveTo(.5*b,d);a.arcTo(f,f,0,0,0,.5*b-f,e);a.arcTo(f,f,0,0,0,.5*b,e+f);a.arcTo(f,f,0,0,0,.5*b+f,e);a.arcTo(f,f,0,0,0,.5*b,d);a.close();
a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(.5*b-e,2*e);a.lineTo(.5*b+e,2*e);a.lineTo(.5*b+e,c);a.lineTo(.5*b-e,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicCircularDial.prototype.cst.CIRCULAR_DIAL,mxShapeInfographicCircularDial);
Graph.handleFactory[mxShapeInfographicCircularDial.prototype.cst.CIRCULAR_DIAL]=function(a){return[Graph.createHandle(a,["dy"],function(d){var e=Math.max(0,Math.min(d.height/2,d.width/2,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+.5*d.width,d.y+e)},function(d,e){this.state.style.dy=Math.round(100*Math.max(0,Math.min(d.height/2,d.width/2,e.y-d.y)))/100})]};
mxShapeInfographicCircularDial.prototype.getConstraints=function(a,d,e){a=[];parseFloat(mxUtils.getValue(this.style,"dy",this.dy));var b=Math.max(0,Math.min(.5*d,.5*e-10));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,.5*(b+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-.71*b,.29*b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+.71*b,.29*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,.5*(b+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d+.5*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d-.5*b,e));return a};
function mxShapeInfographicRibbonSimple(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch2=this.notch1=.5}mxUtils.extend(mxShapeInfographicRibbonSimple,mxActor);mxShapeInfographicRibbonSimple.prototype.cst={RIBBON_SIMPLE:"mxgraph.infographic.ribbonSimple"};mxShapeInfographicRibbonSimple.prototype.customProperties=[{name:"notch1",dispName:"Notch Size",min:0,defVal:20},{name:"notch2",dispName:"Spike Size",min:0,defVal:20}];
mxShapeInfographicRibbonSimple.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch1",this.notch2))));e=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"notch2",this.notch2))));a.begin();a.moveTo(0,c);a.lineTo(d,.5*c);a.lineTo(0,0);a.lineTo(b-e,0);a.lineTo(b,.5*c);a.lineTo(b-e,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeInfographicRibbonSimple.prototype.cst.RIBBON_SIMPLE,mxShapeInfographicRibbonSimple);
Graph.handleFactory[mxShapeInfographicRibbonSimple.prototype.cst.RIBBON_SIMPLE]=function(a){var d=[Graph.createHandle(a,["notch1"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"notch1",this.notch1))));return new mxPoint(e.x+b,e.y+.5*e.height)},function(e,b){this.state.style.notch1=Math.round(100*Math.max(0,Math.min(e.width,b.x-e.x)))/100})];a=Graph.createHandle(a,["notch2"],function(e){var b=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,
"notch2",this.notch2))));return new mxPoint(e.x+e.width-b,e.y)},function(e,b){this.state.style.notch2=Math.round(100*Math.max(0,Math.min(e.width,e.width+e.x-b.x)))/100});d.push(a);return d};
mxShapeInfographicRibbonSimple.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch1",this.notch2)))),c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"notch2",this.notch2))));d-=c;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.75*d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));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,.75*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*e));return a};function mxShapeInfographicBarCallout(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicBarCallout,mxActor);mxShapeInfographicBarCallout.prototype.cst={BAR_CALLOUT:"mxgraph.infographic.barCallout"};mxShapeInfographicBarCallout.prototype.customProperties=[{name:"dx",dispName:"Callout Position",min:0,defVal:100},{name:"dy",dispName:"Callout Size",min:0,defVal:30}];
mxShapeInfographicBarCallout.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);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))));var f=Math.max(d-.35*e,0),g=Math.min(d+.35*e,b);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c-e);a.lineTo(g,c-e);a.lineTo(d,c);a.lineTo(f,c-e);a.lineTo(0,c-e);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeInfographicBarCallout.prototype.cst.BAR_CALLOUT,mxShapeInfographicBarCallout);mxShapeInfographicBarCallout.prototype.constraints=null;
Graph.handleFactory[mxShapeInfographicBarCallout.prototype.cst.BAR_CALLOUT]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+d.height-b)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,
Math.min(d.height,d.y+d.height-e.y)))/100})]};
mxShapeInfographicBarCallout.prototype.getConstraints=function(a,d,e){a=[];var 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))));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*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));return a};
function mxShapeInfographicFlag(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dy=this.dx=.5}mxUtils.extend(mxShapeInfographicFlag,mxActor);mxShapeInfographicFlag.prototype.cst={FLAG:"mxgraph.infographic.flag"};mxShapeInfographicFlag.prototype.customProperties=[{name:"dx",dispName:"Pole Width",min:0,defVal:30},{name:"dy",dispName:"Spike Size",min:0,defVal:20}];
mxShapeInfographicFlag.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);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.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c-e);a.lineTo(d,c-e);a.lineTo(.5*d,c);a.lineTo(0,c-e);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#ffffff");a.begin();a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,c-e);a.lineTo(.5*
d,c);a.lineTo(0,c-e);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicFlag.prototype.cst.FLAG,mxShapeInfographicFlag);
Graph.handleFactory[mxShapeInfographicFlag.prototype.cst.FLAG]=function(a){return[Graph.createHandle(a,["dx","dy"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),b=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(d.x+e,d.y+d.height-b)},function(d,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100;this.state.style.dy=Math.round(100*Math.max(0,Math.min(d.height,
d.y+d.height-e.y)))/100})]};
mxShapeInfographicFlag.prototype.getConstraints=function(a,d,e){a=[];var 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))));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*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,0));return a};function mxShapeKubernetesIcon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeKubernetesIcon,mxShape);mxShapeKubernetesIcon.prototype.cst={ICON:"mxgraph.kubernetes.icon"};
mxShapeKubernetesIcon.prototype.customProperties=[{name:"prIcon",dispName:"Type",defVal:"api",type:"enum",enumList:[{val:"c_c_m",dispName:"C-C-M"},{val:"c_m",dispName:"C-M"},{val:"c_role",dispName:"C-Role"},{val:"cm",dispName:"CM"},{val:"crb",dispName:"CRB"},{val:"crd",dispName:"CRD"},{val:"cronjob",dispName:"Cronjob"},{val:"deploy",dispName:"Deploy"},{val:"ds",dispName:"DS"},{val:"ep",dispName:"EP"},{val:"etcd",dispName:"ETCD"},{val:"group",dispName:"Group"},{val:"hpa",dispName:"HPA"},{val:"ing",
dispName:"ING"},{val:"job",dispName:"Job"},{val:"k_proxy",dispName:"K-Proxy"},{val:"kubelet",dispName:"Kubelet"},{val:"limits",dispName:"Limits"},{val:"master",dispName:"Master"},{val:"netpol",dispName:"Netpol"},{val:"node",dispName:"Node"},{val:"ns",dispName:"NS"},{val:"pod",dispName:"Pod"},{val:"psp",dispName:"PSP"},{val:"pv",dispName:"PV"},{val:"pvc",dispName:"PVC"},{val:"quota",dispName:"Quota"},{val:"rb",dispName:"RB"},{val:"role",dispName:"Role"},{val:"rs",dispName:"RS"},{val:"sa",dispName:"SA"},
{val:"sc",dispName:"SC"},{val:"sched",dispName:"Sched"},{val:"secret",dispName:"Secret"},{val:"sts",dispName:"STS"},{val:"svc",dispName:"SVC"},{val:"user",dispName:"User"},{val:"vol",dispName:"Vol"}]}];
mxShapeKubernetesIcon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.state.style,"prIcon",""),g=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),h=mxUtils.getValue(this.state.style,"strokeColor","#ffffff");a.translate(d,e);d=mxStencilRegistry.getStencil("mxgraph.kubernetes.frame");a.setFillColor(h);d.drawShape(a,this,0,0,b,c);a.setFillColor(g);d.drawShape(a,this,.03*b,.03*c,.94*b,.94*c);f=mxStencilRegistry.getStencil("mxgraph.kubernetes."+f);null!=f&&(a.setFillColor(h),
f.drawShape(a,this,.2*b,.2*c,.6*b,.6*c))};mxCellRenderer.registerShape(mxShapeKubernetesIcon.prototype.cst.ICON,mxShapeKubernetesIcon);mxShapeKubernetesIcon.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};function mxShapeKubernetesIcon2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeKubernetesIcon2,mxShape);mxShapeKubernetesIcon2.prototype.cst={ICON2:"mxgraph.kubernetes.icon2"};
mxShapeKubernetesIcon2.prototype.customProperties=[{name:"kubernetesLabel",dispName:"Label",type:"boolean",defVal:0},{name:"prIcon",dispName:"Type",defVal:"api",type:"enum",enumList:[{val:"api",dispName:"API"},{val:"c_c_m",dispName:"C-C-M"},{val:"cm",dispName:"CM"},{val:"c_m",dispName:"C-M"},{val:"c_role",dispName:"C-Role"},{val:"control_plane",dispName:"Control Plane"},{val:"crb",dispName:"CRB"},{val:"crd",dispName:"CRD"},{val:"cronjob",dispName:"Cronjob"},{val:"deploy",dispName:"Deploy"},{val:"ds",
dispName:"DS"},{val:"ep",dispName:"EP"},{val:"etcd",dispName:"ETCD"},{val:"group",dispName:"Group"},{val:"hpa",dispName:"HPA"},{val:"ing",dispName:"ING"},{val:"job",dispName:"Job"},{val:"k_proxy",dispName:"K-Proxy"},{val:"kubelet",dispName:"Kubelet"},{val:"limits",dispName:"Limits"},{val:"netpol",dispName:"Netpol"},{val:"node",dispName:"Node"},{val:"ns",dispName:"NS"},{val:"pod",dispName:"Pod"},{val:"psp",dispName:"PSP"},{val:"pv",dispName:"PV"},{val:"pvc",dispName:"PVC"},{val:"quota",dispName:"Quota"},
{val:"rb",dispName:"RB"},{val:"role",dispName:"Role"}]}];
mxShapeKubernetesIcon2.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.state.style,"prIcon",""),g=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),h=mxUtils.getValue(this.state.style,"strokeColor","#ffffff"),k=mxUtils.getValue(this.state.style,"kubernetesLabel",0);a.translate(d,e);d=mxStencilRegistry.getStencil("mxgraph.kubernetes.frame");a.setFillColor(h);d.drawShape(a,this,0,0,b,c);a.setFillColor(g);d.drawShape(a,this,.03*b,.03*c,.94*b,.94*c);g=mxStencilRegistry.getStencil("mxgraph.kubernetes2."+
f);a.setFillColor(h);a.setFontColor(h);a.setFontSize(.2*Math.min(b,c));d=h=Math.min(c,b);1==k&&(h*=.8,d=.9*h);"api"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"api",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"c_c_m"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"c-c-m",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"cm"==f?(g.drawShape(a,this,.5*b-.3*h,.25*c,.6*h,.5*d),1==k&&a.text(.5*b,.75*c,
0,0,"cm",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"c_m"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"c-m",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"c_role"==f?(g.drawShape(a,this,.5*b-.25*h,.2*c,.5*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"c-role",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"control_plane"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&(a.setFontSize(.12*Math.min(b,c)),a.text(.5*
b,.78*c,0,0,"control\nplane",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0))):"crb"==f?(g.drawShape(a,this,.5*b-.25*h,.3*c,.5*h,.3*d),1==k&&a.text(.5*b,.75*c,0,0,"crb",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"crd"==f?(g.drawShape(a,this,.5*b-.25*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"crd",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"cronjob"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"cronjob",
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"deploy"==f?(g.drawShape(a,this,.5*b-.27*h,.25*c,.6*h,.55*d),1==k&&a.text(.5*b,.75*c,0,0,"deploy",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"ds"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"ds",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"ep"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"ep",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0)):"etcd"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"etcd",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"group"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"group",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"hpa"==f?(g.drawShape(a,this,.5*b-.4*h,.1*c,.8*h,.8*d),1==k&&a.text(.5*b,.75*c,0,0,"hpa",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"ing"==f?(g.drawShape(a,
this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"ing",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"job"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"job",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"k_proxy"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"k-proxy",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"kubelet"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*
d),1==k&&a.text(.5*b,.75*c,0,0,"kubelet",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"limits"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"limits",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"netpol"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"netpol",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"node"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*
c,0,0,"node",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"ns"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"ns",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"pod"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"pod",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"psp"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"psp",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,
0,null,0,0,0)):"pv"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"pv",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"pvc"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"pvc",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"quota"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"quota",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"rb"==f?(g.drawShape(a,
this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"rb",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"role"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"role",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"rs"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"rs",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"sa"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*
b,.75*c,0,0,"sa",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"sc"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"sc",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"sched"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"sched",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"secret"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"secret",mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"sts"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"sts",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"svc"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"svc",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):"user"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"user",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):
"vol"==f?(g.drawShape(a,this,.5*b-.3*h,.2*c,.6*h,.6*d),1==k&&a.text(.5*b,.75*c,0,0,"vol",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):null!=g&&g.drawShape(a,this,.2*b,.2*c,.6*b,.6*c)};mxCellRenderer.registerShape(mxShapeKubernetesIcon2.prototype.cst.ICON2,mxShapeKubernetesIcon2);mxShapeKubernetesIcon2.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));return a};
function mxLeanBoatShipment(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanBoatShipment,mxShape);mxLeanBoatShipment.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.15*b,.77*c);a.lineTo(.5*b,0);a.lineTo(.85*b,.77*c);a.close();a.moveTo(.2*b,c);a.lineTo(0,.8*c);a.lineTo(b,.8*c);a.lineTo(.8*b,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.boat_shipment",mxLeanBoatShipment);
mxLeanBoatShipment.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1),new mxConnectionConstraint(new mxPoint(0,.8),!1),new mxConnectionConstraint(new mxPoint(1,.8),!1),new mxConnectionConstraint(new mxPoint(.2,1),!1),new mxConnectionConstraint(new mxPoint(.8,1),!1),new mxConnectionConstraint(new mxPoint(.26,.5),!1),new mxConnectionConstraint(new mxPoint(.74,.5),!1)];
function mxLeanSafetyStock(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanSafetyStock,mxShape);mxLeanSafetyStock.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxLeanSafetyStock.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxLeanSafetyStock.prototype.foreground=function(a,d,e){a.begin();a.moveTo(0,.34*e);a.lineTo(d,.34*e);a.moveTo(0,.66*e);a.lineTo(d,.66*e);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.buffer_or_safety_stock",mxLeanSafetyStock);
mxLeanSafetyStock.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanDataBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanDataBox,mxShape);
mxLeanDataBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxLeanDataBox.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e);a.lineTo(0,0);a.lineTo(d,0);a.lineTo(d,e);a.fillAndStroke()};mxLeanDataBox.prototype.foreground=function(a,d,e){a.begin();a.moveTo(0,.2*e);a.lineTo(d,.2*e);a.moveTo(0,.4*e);a.lineTo(d,.4*e);a.moveTo(0,.6*e);a.lineTo(d,.6*e);a.moveTo(0,.8*e);a.lineTo(d,.8*e);a.stroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.data_box",mxLeanDataBox);
mxLeanDataBox.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanCustomerSupplier(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanCustomerSupplier,mxShape);
mxLeanCustomerSupplier.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1)};mxLeanCustomerSupplier.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e);a.lineTo(0,.3*e);a.lineTo(.33*d,.02*e);a.lineTo(.33*d,.3*e);a.lineTo(.67*d,.02*e);a.lineTo(.67*d,.3*e);a.lineTo(d,.02*e);a.lineTo(d,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.outside_sources",mxLeanCustomerSupplier);
mxLeanCustomerSupplier.prototype.constraints=[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(.33,0),!0),new mxConnectionConstraint(new mxPoint(.67,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanDedicatedProcess(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanDedicatedProcess,mxShape);
mxLeanDedicatedProcess.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8"));this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c,d)};mxLeanDedicatedProcess.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};mxLeanDedicatedProcess.prototype.foreground=function(a,d,e,b){e=Math.min(1.5*b,e);a.begin();a.moveTo(0,e);a.lineTo(d,e);a.stroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.manufacturing_process",mxLeanDedicatedProcess);
mxLeanDedicatedProcess.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanSharedProcess(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanSharedProcess,mxShape);
mxLeanSharedProcess.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8"));this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c,d)};mxLeanSharedProcess.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxLeanSharedProcess.prototype.foreground=function(a,d,e,b){b=Math.min(1.5*b,e);a.begin();a.moveTo(0,b);a.lineTo(d,b);a.stroke();var c=0;a.begin();var f=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"2"));for(a.setStrokeWidth(.5*f);c<e+d;)if(c+=10,c>b){f=Math.max(0,c-e);var g=Math.min(c,e),h=Math.min(c-b,d);var k=Math.max(c-d,b);f<d&&(a.moveTo(f,g),a.lineTo(h,k))}a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.manufacturing_process_shared",mxLeanSharedProcess);
mxLeanSharedProcess.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanWorkcell(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanWorkcell,mxShape);
mxLeanWorkcell.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(.65*b,c);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,c);a.lineTo(0,c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.work_cell",mxLeanWorkcell);
mxLeanWorkcell.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanInventoryBox(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanInventoryBox,mxShape);
mxLeanInventoryBox.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,c);a.lineTo(.5*b,0);a.lineTo(b,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.4*b,.45*c);a.lineTo(.6*b,.45*c);a.moveTo(.5*b,.45*c);a.lineTo(.5*b,.85*c);a.moveTo(.4*b,.85*c);a.lineTo(.6*b,.85*c);a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.inventory_box",mxLeanInventoryBox);
mxLeanInventoryBox.prototype.constraints=[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(.375,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.125,.75),!1),new mxConnectionConstraint(new mxPoint(.625,.25),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(.875,.75),!1),
new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanPushArrow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanPushArrow,mxShape);mxLeanPushArrow.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxLeanPushArrow.prototype.background=function(a,d,e){a.begin();a.moveTo(0,.17*e);a.lineTo(.75*d,.17*e);a.lineTo(.75*d,0);a.lineTo(d,.5*e);a.lineTo(.75*d,e);a.lineTo(.75*d,.83*e);a.lineTo(0,.83*e);a.close();a.fillAndStroke()};
mxLeanPushArrow.prototype.foreground=function(a,d,e,b){b=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(b);a.rect(0,.17*e,.12*d,.66*e);a.fill();a.rect(.24*d,.17*e,.12*d,.66*e);a.fill();a.rect(.48*d,.17*e,.12*d,.66*e);a.fill();a.begin();a.moveTo(.72*d,.17*e);a.lineTo(.75*d,.17*e);a.lineTo(.75*d,0);a.lineTo(d,.5*e);a.lineTo(.75*d,e);a.lineTo(.75*d,.83*e);a.lineTo(.72*d,.83*e);a.close();a.fill()};mxCellRenderer.registerShape("mxgraph.lean_mapping.push_arrow",mxLeanPushArrow);
mxLeanPushArrow.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.17),!1),new mxConnectionConstraint(new mxPoint(.5,.17),!1),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.17),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.83),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.25,.83),!1),new mxConnectionConstraint(new mxPoint(.5,.83),!1),new mxConnectionConstraint(new mxPoint(.75,
1),!0)];function mxLeanSupermarket(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanSupermarket,mxShape);mxLeanSupermarket.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.moveTo(0,.33*c);a.lineTo(b,.33*c);a.moveTo(0,.67*c);a.lineTo(b,.67*c);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.supermarket",mxLeanSupermarket);
mxLeanSupermarket.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanMaterialPull(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanMaterialPull,mxShape);
mxLeanMaterialPull.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.732*b,.0736*c);a.arcTo(.4827*b,.4959*c,0,1,0,.9553*b,.6191*c);a.stroke();a.begin();a.moveTo(.9071*b,.6191*c);a.lineTo(.9794*b,.4951*c);a.lineTo(b,.6438*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.physical_pull",mxLeanMaterialPull);
mxLeanMaterialPull.prototype.constraints=[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(.98,.5),!0),new mxConnectionConstraint(new mxPoint(.144,.144),!1),new mxConnectionConstraint(new mxPoint(.144,.845),!1),new mxConnectionConstraint(new mxPoint(.845,.845),!1)];
function mxLeanFifoLane(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanFifoLane,mxShape);mxLeanFifoLane.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8"));this.background(a,b,c,d);a.setShadow(!1)};
mxLeanFifoLane.prototype.background=function(a,d,e,b){b=Math.min(1.5*b,e);a.begin();a.moveTo(0,b);a.lineTo(d,b);a.moveTo(0,e);a.lineTo(d,e);a.stroke();a.rect(.02*d,b+4,.26*d,e-b-8);a.fillAndStroke();a.ellipse(.35*d,b+4,.26*d,e-b-8);a.fillAndStroke();a.begin();a.moveTo(.69*d,b+4);a.lineTo(.98*d,b+4);a.lineTo(.835*d,e-4);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.fifo_lane",mxLeanFifoLane);
mxLeanFifoLane.prototype.constraints=[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(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanTruckShipment(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanTruckShipment,mxShape);mxLeanTruckShipment.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1)};
mxLeanTruckShipment.prototype.background=function(a,d,e){a.rect(0,0,.6*d,.8*e);a.fillAndStroke();a.rect(.6*d,.35*e,.4*d,.45*e);a.fillAndStroke();var b=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(b);a.ellipse(.15*d,.8*e,.2*d,.2*e);a.fillAndStroke();a.ellipse(.65*d,.8*e,.2*d,.2*e);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.truck_shipment",mxLeanTruckShipment);
mxLeanTruckShipment.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(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.6,.35),!1),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,.8),!1),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanProductionControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanProductionControl,mxShape);mxLeanProductionControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.schedule",mxLeanProductionControl);
mxLeanProductionControl.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanFifoSequence(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanFifoSequence,mxShape);
mxLeanFifoSequence.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.moveTo(0,c);a.lineTo(b,c);a.moveTo(.05*b,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(.75*b,.5*c);a.lineTo(.88*b,.5*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(.88*b,.39*c);a.lineTo(.98*b,.5*c);a.lineTo(.88*b,.61*c);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.fifo_sequence_flow",mxLeanFifoSequence);
mxLeanFifoSequence.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.25,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanProductionKanban(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanProductionKanban,mxShape);
mxLeanProductionKanban.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setDashed(!0);a.begin();a.moveTo(4,c-10);a.lineTo(4,25);a.lineTo(b,25);a.stroke();a.setDashed(!1);a.begin();a.moveTo(b-75,0);a.lineTo(b-30,0);a.lineTo(b-15,15);a.lineTo(b-15,50);a.lineTo(b-75,50);a.close();a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(0,c-10);a.lineTo(4,c);a.lineTo(8,c-10);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.production_kanban",mxLeanProductionKanban);mxLeanProductionKanban.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,4,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,25));return a};function mxLeanWithdrawalKanban(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanWithdrawalKanban,mxShape);
mxLeanWithdrawalKanban.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setDashed(!0);a.begin();a.moveTo(4,c-10);a.lineTo(4,25);a.lineTo(b,25);a.stroke();a.setDashed(!1);a.begin();a.moveTo(b-75,0);a.lineTo(b-30,0);a.lineTo(b-15,15);a.lineTo(b-15,50);a.lineTo(b-75,50);a.close();a.fillAndStroke();a.begin();a.moveTo(b-75,45);a.lineTo(b-70,50);a.moveTo(b-75,35);a.lineTo(b-60,50);a.moveTo(b-75,25);a.lineTo(b-50,50);a.moveTo(b-75,15);a.lineTo(b-40,50);a.moveTo(b-75,5);a.lineTo(b-30,50);
a.moveTo(b-70,0);a.lineTo(b-20,50);a.moveTo(b-60,0);a.lineTo(b-15,45);a.moveTo(b-50,0);a.lineTo(b-15,35);a.moveTo(b-40,0);a.lineTo(b-15,25);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(0,c-10);a.lineTo(4,c);a.lineTo(8,c-10);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.withdrawal_kanban",mxLeanWithdrawalKanban);
mxLeanWithdrawalKanban.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,4,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,25));return a};function mxLeanSignalKanban(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanSignalKanban,mxShape);
mxLeanSignalKanban.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.setDashed(!0);a.begin();a.moveTo(4,c-10);a.lineTo(4,15);a.lineTo(b,15);a.stroke();a.setDashed(!1);a.begin();a.moveTo(b-65,0);a.lineTo(b-25,0);a.lineTo(b-45,45);a.close();a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(0,c-10);a.lineTo(4,c);a.lineTo(8,c-10);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.signal_kanban",mxLeanSignalKanban);mxLeanSignalKanban.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,4,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,15));return a};function mxLeanSequencedPullBall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanSequencedPullBall,mxShape);
mxLeanSequencedPullBall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.ellipse(0,0,b,c);a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.setShadow(!1);a.ellipse(.15*b,.15*c,.7*b,.7*c);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.sequenced_pull_ball",mxLeanSequencedPullBall);
mxLeanSequencedPullBall.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.144,.144),!1),new mxConnectionConstraint(new mxPoint(.856,.144),!1),new mxConnectionConstraint(new mxPoint(.856,.856),!1),new mxConnectionConstraint(new mxPoint(.144,.856),!1),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0)];
function mxLeanRailShipment(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanRailShipment,mxShape);
mxLeanRailShipment.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(.1*b,0,.35*b,.8*c);a.fillAndStroke();a.rect(.55*b,0,.35*b,.8*c);a.fillAndStroke();a.begin();a.moveTo(0,c);a.lineTo(b,c);a.moveTo(.45*b,.7*c);a.lineTo(.55*b,.7*c);a.stroke();a.ellipse(.15*b,.8*c,.06*b,.2*c);a.fillAndStroke();a.ellipse(.34*b,.8*c,.06*b,.2*c);a.fillAndStroke();a.ellipse(.6*b,.8*c,.06*b,.2*c);a.fillAndStroke();a.ellipse(.79*b,.8*c,.06*b,.2*c);a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.rail_shipment",mxLeanRailShipment);
mxLeanRailShipment.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!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,.25),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(.1,.75),!1),new mxConnectionConstraint(new mxPoint(.9,.25),!1),new mxConnectionConstraint(new mxPoint(.9,
.5),!1),new mxConnectionConstraint(new mxPoint(.9,.75),!1),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanWarehouse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanWarehouse,mxShape);
mxLeanWarehouse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,.4*c);a.lineTo(b,.4*c);a.moveTo(.15*b,c);a.lineTo(.15*b,.55*c);a.lineTo(.3*b,.55*c);a.lineTo(.3*b,c);a.stroke();a.ellipse(.27*b,.75*c,.02*b,.02*b);a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.warehouse",mxLeanWarehouse);
mxLeanWarehouse.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanTimeline(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanTimeline,mxShape);
mxLeanTimeline.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,"mainText","20,Time 1,50,Time 2,30,Time 3,40,Time 4,30,Time 5,50,Time 6,20,Time 7").toString().split(",");d=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12");e=[];for(var g=0,h=0;h<f.length;h+=2){var k=parseFloat(f[h]);e.push(k);g+=k}b/=g;g=[];for(h=1;h<f.length;h+=2)g.push(f[h]);a.begin();f=0;a.moveTo(0,c);for(h=0;h<g.length;h++)k=e[h]*b,f+=k,0===h%2?(a.lineTo(f,c),a.lineTo(f,
1.5*d),a.text(f-.5*k,c-.75*d,0,0,g[h],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)):(a.lineTo(f,1.5*d),a.lineTo(f,c),a.text(f-.5*k,.75*d,0,0,g[h],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0));a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.timeline",mxLeanTimeline);function mxLeanCrossDock(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanCrossDock,mxShape);
mxLeanCrossDock.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(0,.25*c);a.lineTo(b,.25*c);a.moveTo(.1*b,.4*c);a.lineTo(.35*b,.4*c);a.arcTo(.15*b,.15*c,0,0,1,.5*b,.5*c);a.arcTo(.15*b,.15*c,0,0,0,.65*b,.6*c);a.lineTo(.9*b,.6*c);a.stroke();a.moveTo(.1*b,.4*c);a.lineTo(.35*b,.4*c);a.arcTo(.15*b,.25*c,0,0,1,.5*b,.55*c);a.arcTo(.15*b,.25*c,0,0,0,.65*b,.7*c);a.lineTo(.9*b,.7*c);a.stroke();a.moveTo(.1*b,.4*c);a.lineTo(.35*
b,.4*c);a.arcTo(.15*b,.3*c,0,0,1,.5*b,.6*c);a.arcTo(.15*b,.3*c,0,0,0,.65*b,.8*c);a.lineTo(.9*b,.8*c);a.stroke();a.moveTo(.1*b,.8*c);a.lineTo(.35*b,.8*c);a.arcTo(.15*b,.3*c,0,0,0,.5*b,.6*c);a.arcTo(.15*b,.3*c,0,0,1,.65*b,.4*c);a.lineTo(.9*b,.4*c);a.stroke();a.moveTo(.1*b,.8*c);a.lineTo(.35*b,.8*c);a.arcTo(.15*b,.1*c,0,0,0,.5*b,.75*c);a.arcTo(.15*b,.1*c,0,0,1,.65*b,.7*c);a.lineTo(.9*b,.7*c);a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.crossDock",mxLeanCrossDock);
mxLeanCrossDock.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(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];function mxLeanOrders(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanOrders,mxShape);
mxLeanOrders.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,.56*c,b,.44*c);a.fillAndStroke();d=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"2"));a.setStrokeWidth(.5*d);a.begin();a.moveTo(.04*b,.5418*c);a.lineTo(.94*b,.5418*c);a.moveTo(.0522*b,.5088*c);a.lineTo(.9522*b,.5088*c);a.moveTo(.05*b,.4738*c);a.lineTo(.95*b,.4738*c);a.moveTo(.0456*b,.4427*c);a.lineTo(.9456*b,.4427*c);a.moveTo(.0422*b,.4135*c);a.lineTo(.9422*b,.4135*c);a.moveTo(.0533*b,.3804*
c);a.lineTo(.9533*b,.3804*c);a.moveTo(.0556*b,.3454*c);a.lineTo(.9556*b,.3454*c);a.moveTo(.05*b,.3143*c);a.lineTo(.95*b,.3143*c);a.moveTo(.0489*b,.2832*c);a.lineTo(.0489*b,.2832*c);a.moveTo(.0544*b,.254*c);a.lineTo(.9544*b,.254*c);a.moveTo(.0489*b,.221*c);a.lineTo(.9489*b,.221*c);a.moveTo(.0556*b,.1918*c);a.lineTo(.9556*b,.1918*c);a.moveTo(.0522*b,.1587*c);a.lineTo(.9522*b,.1587*c);a.moveTo(.0544*b,.1276*c);a.lineTo(.9544*b,.1276*c);a.moveTo(.0544*b,.0965*c);a.lineTo(.9544*b,.0965*c);a.moveTo(.0556*
b,.0654*c);a.lineTo(.9556*b,.0654*c);a.moveTo(.0533*b,.0304*c);a.lineTo(.9533*b,.0304*c);a.moveTo(.0556*b,0);a.lineTo(.9556*b,0);a.stroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.orders",mxLeanOrders);
mxLeanOrders.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.05,0),!0),new mxConnectionConstraint(new mxPoint(.95,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!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(.05,.25),!1),new mxConnectionConstraint(new mxPoint(.05,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.95,.25),!1),new mxConnectionConstraint(new mxPoint(.95,.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)];function mxLeanBatchedKanban(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanBatchedKanban,mxShape);
mxLeanBatchedKanban.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(110,b);a.translate(d,e);a.begin();a.moveTo(4,.5*c);a.lineTo(b,.5*c);a.stroke();a.begin();a.moveTo(.5*b-20,.5*c-35);a.lineTo(.5*b+25,.5*c-35);a.lineTo(.5*b+40,.5*c-20);a.lineTo(.5*b+40,.5*c+15);a.lineTo(.5*b-20,.5*c+15);a.close();a.fillAndStroke();a.begin();a.moveTo(.5*b-30,.5*c-25);a.lineTo(.5*b+15,.5*c-25);a.lineTo(.5*b+30,.5*c-10);a.lineTo(.5*b+30,.5*c+25);a.lineTo(.5*b-30,.5*c+25);a.close();a.fillAndStroke();a.begin();
a.moveTo(.5*b-40,.5*c-15);a.lineTo(.5*b+5,.5*c-15);a.lineTo(.5*b+20,.5*c);a.lineTo(.5*b+20,.5*c+35);a.lineTo(.5*b-40,.5*c+35);a.close();a.fillAndStroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.begin();a.moveTo(b-10,.5*c-4);a.lineTo(b,.5*c);a.lineTo(b-10,.5*c+4);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.batched_kanban",mxLeanBatchedKanban);
mxLeanBatchedKanban.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];function mxLeanControlCenter(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxLeanControlCenter,mxShape);mxLeanControlCenter.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(.15*b,0,.7*b,.8*c);a.fillAndStroke();a.rect(0,.8*c,b,.2*c);a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.control_center",mxLeanControlCenter);
mxLeanControlCenter.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,0),!0),new mxConnectionConstraint(new mxPoint(.85,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(.15,.25),!1),new mxConnectionConstraint(new mxPoint(.15,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.85,.25),!1),new mxConnectionConstraint(new mxPoint(.85,
.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)];function mxLeanElectronicInfoShape(){mxArrow.call(this)}mxUtils.extend(mxLeanElectronicInfoShape,mxArrow);
mxLeanElectronicInfoShape.prototype.paintEdgeShape=function(a,d){var e=d[0];d=d[d.length-1];var b=d.x-e.x,c=d.y-e.y;e.x+=.05*b;e.y+=.05*c;d.x-=.05*b;d.y-=.05*c;b=d.x-e.x;c=d.y-e.y;var f=Math.sqrt(b*b+c*c),g=b/f,h=c/f,k=e.x+.5*b,l=e.y+.5*c;b=k-g*f*.1-h/3*f*.1;c=l-h*f*.1+g/3*f*.1;k=k+g*f*.1+h/3*f*.1;f=l+h*f*.1-g/3*f*.1;a.begin();a.moveTo(e.x,e.y);a.lineTo(k,f);a.lineTo(b,c);a.lineTo(d.x,d.y);a.stroke();b=d.x-b;c=d.y-c;f=Math.sqrt(b*b+c*c);g=b/f;h=c/f;a.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
"#000000"));a.begin();a.moveTo(d.x-10*g-5*h,d.y-10*h+5*g);a.lineTo(d.x,d.y);a.lineTo(d.x-10*g+5*h,d.y-10*h-5*g);a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.lean_mapping.electronic_info_flow_edge",mxLeanElectronicInfoShape);function mxLeanManualInfoShape(){mxArrow.call(this)}mxUtils.extend(mxLeanManualInfoShape,mxArrow);
mxLeanManualInfoShape.prototype.paintEdgeShape=function(a,d){var e=d[0];d=d[d.length-1];var b=d.x-e.x,c=d.y-e.y;e.x+=.05*b;e.y+=.05*c;d.x-=.05*b;d.y-=.05*c;b=d.x-e.x;c=d.y-e.y;var f=Math.sqrt(b*b+c*c);b/=f;c/=f;a.begin();a.moveTo(e.x,e.y);a.lineTo(d.x,d.y);a.stroke();a.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"));a.begin();a.moveTo(d.x-10*b-5*c,d.y-10*c+5*b);a.lineTo(d.x,d.y);a.lineTo(d.x-10*b+5*c,d.y-10*c-5*b);a.fillAndStroke()};
mxCellRenderer.registerShape("mxgraph.lean_mapping.manual_info_flow_edge",mxLeanManualInfoShape);function mxShapeLeanTimeline(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeLeanTimeline,mxShape);mxShapeLeanTimeline.prototype.cst={SHAPE_TIMELINE:"mxgraph.lean_mapping.timeline2"};
mxShapeLeanTimeline.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=mxUtils.getValue(this.style,"dy1","0");d=mxUtils.getValue(this.style,"dx2","0");e=mxUtils.getValue(this.style,"dy2","0");var g=mxUtils.getValue(this.style,"dx3","0"),h=mxUtils.getValue(this.style,"dy3","0"),k=mxUtils.getValue(this.style,"dx4","0"),l=mxUtils.getValue(this.style,"dy4","0"),m=mxUtils.getValue(this.style,"dx5","0"),n=mxUtils.getValue(this.style,"dy5","0"),p=mxUtils.getValue(this.style,"dy6","0");
a.begin();.5>=f?(a.moveTo(0,0),f=!0):(a.moveTo(0,c),f=!1);.5>=e&&f?(a.lineTo(d,0),f=!0):.5<e&&!f?(a.lineTo(d,c),f=!1):.5>=e&&!f?(a.lineTo(d,c),a.lineTo(d,0),f=!0):(a.lineTo(d,0),a.lineTo(d,c),f=!1);.5>=h&&f?(a.lineTo(g,0),f=!0):.5<h&&!f?(a.lineTo(g,c),f=!1):.5>=h&&!f?(a.lineTo(g,c),a.lineTo(g,0),f=!0):(a.lineTo(g,0),a.lineTo(g,c),f=!1);.5>=l&&f?(a.lineTo(k,0),f=!0):.5<l&&!f?(a.lineTo(k,c),f=!1):.5>=l&&!f?(a.lineTo(k,c),a.lineTo(k,0),f=!0):(a.lineTo(k,0),a.lineTo(k,c),f=!1);.5>=n&&f?(a.lineTo(m,0),
f=!0):.5<n&&!f?(a.lineTo(m,c),f=!1):.5>=n&&!f?(a.lineTo(m,c),a.lineTo(m,0),f=!0):(a.lineTo(m,0),a.lineTo(m,c),f=!1);.5>=p&&f?a.lineTo(b,0):.5<p&&!f?a.lineTo(b,c):.5>=p&&!f?(a.lineTo(b,c),a.lineTo(b,0)):(a.lineTo(b,0),a.lineTo(b,c));a.stroke()};mxCellRenderer.registerShape(mxShapeLeanTimeline.prototype.cst.SHAPE_TIMELINE,mxShapeLeanTimeline);
Graph.handleFactory[mxShapeLeanTimeline.prototype.cst.SHAPE_TIMELINE]=function(a){var d=[Graph.createHandle(a,["dy1"],function(b){var c=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy1",0))));return new mxPoint(b.x,b.y+c*b.height)},function(b,c){this.state.style.dy1=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3})],e=Graph.createHandle(a,["dx2","dy2"],function(b){var c=Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dx3",0)),parseFloat(mxUtils.getValue(this.state.style,
"dx2",0)))),f=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy2",0))));return new mxPoint(b.x+c,b.y+f*b.height)},function(b,c){this.state.style.dx2=Math.round(1E3*Math.max(0,Math.min(parseFloat(mxUtils.getValue(this.state.style,"dx3",0)),c.x-b.x)))/1E3;this.state.style.dy2=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3});d.push(e);e=Graph.createHandle(a,["dx3","dy3"],function(b){var c=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx2",0)),Math.min(parseFloat(mxUtils.getValue(this.state.style,
"dx4",0)),parseFloat(mxUtils.getValue(this.state.style,"dx3",0)))),f=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy3",0))));return new mxPoint(b.x+c,b.y+f*b.height)},function(b,c){this.state.style.dx3=Math.round(1E3*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx2",0)),Math.min(parseFloat(mxUtils.getValue(this.state.style,"dx4",0)),c.x-b.x)))/1E3;this.state.style.dy3=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3});d.push(e);e=Graph.createHandle(a,
["dx4","dy4"],function(b){var c=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx3",0)),Math.min(parseFloat(mxUtils.getValue(this.state.style,"dx5",0)),parseFloat(mxUtils.getValue(this.state.style,"dx4",0)))),f=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy4",0))));return new mxPoint(b.x+c,b.y+f*b.height)},function(b,c){this.state.style.dx4=Math.round(1E3*Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx3",0)),Math.min(parseFloat(mxUtils.getValue(this.state.style,
"dx5",0)),c.x-b.x)))/1E3;this.state.style.dy4=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3});d.push(e);e=Graph.createHandle(a,["dx5","dy5"],function(b){var c=Math.max(parseFloat(mxUtils.getValue(this.state.style,"dx4",0)),Math.min(b.width,parseFloat(mxUtils.getValue(this.state.style,"dx5",0)))),f=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy5",0))));return new mxPoint(b.x+c,b.y+f*b.height)},function(b,c){this.state.style.dx5=Math.round(1E3*Math.max(parseFloat(mxUtils.getValue(this.state.style,
"dx4",0)),Math.min(b.width,c.x-b.x)))/1E3;this.state.style.dy5=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3});d.push(e);a=Graph.createHandle(a,["dy6"],function(b){var c=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"dy6",0))));return new mxPoint(b.x+b.width,b.y+c*b.height)},function(b,c){this.state.style.dy6=Math.round(1E3*Math.max(0,Math.min(1,(c.y-b.y)/b.height)))/1E3});d.push(a);return d};
function mxShapeNetworksBus(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeNetworksBus,mxShape);mxShapeNetworksBus.prototype.cst={SHAPE_BUS:"mxgraph.networks.bus"};mxShapeNetworksBus.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeNetworksBus.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(8,.5*c+10);a.arcTo(12,12,0,0,1,8,.5*c-10);a.lineTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.close();a.fillAndStroke()};mxShapeNetworksBus.prototype.foreground=function(a,d,e,b,c){a.setFillColor("#ffffff");a.begin();a.moveTo(b-8,.5*c-10);a.arcTo(12,12,0,0,1,b-8,.5*c+10);a.arcTo(12,12,0,0,1,b-8,.5*c-10);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeNetworksBus.prototype.cst.SHAPE_BUS,mxShapeNetworksBus);
function mxShapeNetworksCommLinkEdge(){mxArrow.call(this)}mxUtils.extend(mxShapeNetworksCommLinkEdge,mxArrow);
mxShapeNetworksCommLinkEdge.prototype.paintEdgeShape=function(a,d){var e=d[0];d=d[d.length-1];var b=d.x-e.x,c=d.y-e.y;e.x+=.05*b;e.y+=.05*c;d.x-=.05*b;d.y-=.05*c;b=d.x-e.x;c=d.y-e.y;var f=Math.sqrt(b*b+c*c),g=b/f,h=c/f,k=e.x+.5*b,l=e.y+.5*c;c=k+g*f/3*.1-h/3*f*.1;b=l+h*f/3*.1+g/3*f*.1;var m=k+g*f*.1+h*f*.1,n=l+h*f*.1-g*f*.1,p=k-g*f/3*.1+h/3*f*.1,q=l-h*f/3*.1-g/3*f*.1;k=k-g*f*.1-h*f*.1;f=l-h*f*.1+g*f*.1;a.begin();a.moveTo(e.x,e.y);a.lineTo(m,n);a.lineTo(c,b);a.lineTo(d.x,d.y);a.lineTo(k,f);a.lineTo(p,
q);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("mxgraph.networks.comm_link_edge",mxShapeNetworksCommLinkEdge);function mxShapeNetworks2Icon(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.prevNetwork2BgColor="9DA6A8"}mxUtils.extend(mxShapeNetworks2Icon,mxShape);
mxShapeNetworks2Icon.prototype.customProperties=[{name:"network2IconShadow",dispName:"Long Shadow",type:"bool",defVal:!0,primary:!0},{name:"network2bgFillColor",dispName:"Background Color",type:"color",defVal:"#9DA6A8",primary:!0}];mxShapeNetworks2Icon.prototype.cst={SHAPE_ICON:"mxgraph.networks2.icon"};
mxShapeNetworks2Icon.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"network2IconShadow",!1),g=mxUtils.getColorValue(this.style,"network2bgFillColor","none");a.translate(d,e);"none"!=g&&this.background(a,0,0,b,c);a.setShadow(!1);f&&"none"!=g&&this.longShadow(a,0,0,b,c);"none"!=g?(a.translate(b/7,c/7),this.foreground(a,0,0,b/1.4,c/1.4),a.translate(-b/7,-c/7)):this.foreground(a,0,0,b,c);this.prevNetwork2BgColor=g};
mxShapeNetworks2Icon.prototype.background=function(a,d,e,b,c){var f=mxUtils.getColorValue(this.style,"gradientColor","none"),g=mxUtils.getValue(this.style,"gradientDirection","south");mxUtils.getColorValue(this.style,"fillColor","#ffffff");var h=mxUtils.getColorValue(this.style,"fillColor","#ffffff");var k=mxUtils.getColorValue(this.style,"network2bgFillColor","none");"none"==f?a.setFillColor(k):a.setGradient(k,f,0,0,b,c,g);a.roundrect(d,e,b,c,.03571*b,.03571*c);a.fill();a.setFillColor(h)};
mxShapeNetworks2Icon.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"network2Icon",null),g=null;null!=f&&(g=mxStencilRegistry.getStencil(f));if("none"!=mxUtils.getColorValue(this.style,"network2bgFillColor","none")){f=mxUtils.getValue(this.style,"network2IconW",1);var h=mxUtils.getValue(this.style,"network2IconH",1),k=mxUtils.getValue(this.style,"network2IconXOffset",0),l=mxUtils.getValue(this.style,"network2IconYOffset",0);null!=g&&g.drawShape(a,this,d+.5*b*(1-f)+k*b,
e+.5*c*(1-h)+l*c,b*f,c*h)}else null!=g&&g.drawShape(a,this,d,e,b,c)};mxShapeNetworks2Icon.prototype.longShadow=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,"network2Icon",null)+"_shadow",g=null;a.setFillColor("#000000");a.setStrokeColor("none");null!=f&&(g=mxStencilRegistry.getStencil(f));null!=g&&g.drawShape(a,this,d,e,b,c)};
mxShapeNetworks2Icon.prototype.styleChanged=function(a,d,e){if("network2bgFillColor"==a&&e.style[a]!=d&&"none"==d){a=e.view.graph;d=a.getCellGeometry(e.cell);var b=mxUtils.getValue(this.style,"network2IconW",1),c=mxUtils.getValue(this.style,"network2IconH",1);if(null!=d){d=d.clone();var f=d.width,g=d.height;d.width=d.width*b/1.4;d.height=d.height*c/1.4;d.x+=.5*(f-d.width);d.y+=.5*(g-d.height);a.model.setGeometry(e.cell,d)}}else"network2bgFillColor"==a&&e.style[a]!=d&&"none"!=d&&"none"==this.prevNetwork2BgColor&&
(a=e.view.graph,d=a.getCellGeometry(e.cell),b=mxUtils.getValue(this.style,"network2IconW",1),c=mxUtils.getValue(this.style,"network2IconH",1),null!=d&&(d=d.clone(),f=d.width,g=d.height,d.width=1.4*d.width/b,d.height=1.4*d.height/c,d.x+=.5*(f-d.width),d.y+=.5*(g-d.height),a.model.setGeometry(e.cell,d)))};mxCellRenderer.registerShape(mxShapeNetworks2Icon.prototype.cst.SHAPE_ICON,mxShapeNetworks2Icon);
function mxSAPIconShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxSAPIconShape,mxShape);mxSAPIconShape.prototype.cst={ICON:"mxgraph.sap.icon"};mxSAPIconShape.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,0,0,b,c);a.setShadow(!1);this.foreground(a,0,0,b,c)};mxSAPIconShape.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};
mxSAPIconShape.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,"SAPIcon","");a.image(.2*b,.2*c,.6*b,.6*c,GRAPH_IMAGE_PATH+"/lib/sap/"+d+".svg")};mxCellRenderer.registerShape(mxSAPIconShape.prototype.cst.ICON,mxSAPIconShape);
mxSAPIconShape.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.625,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.625,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.325),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.675),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));return a};function mxShapeSysMLComposite(){mxCylinder.call(this)}mxUtils.extend(mxShapeSysMLComposite,mxShape);mxShapeSysMLComposite.prototype.isHtmlAllowed=function(){return!1};
mxShapeSysMLComposite.prototype.paintForeground=function(a,d,e,b,c){if(null!=this.style){var f=mxCellRenderer.defaultShapes[this.style.symbol0];a.save();var g=new f;g.style=this.style;f.prototype.paintVertexShape.call(g,a,d,e,b,c);a.restore();a.setDashed(!1);var h=1;do{f=mxCellRenderer.defaultShapes[this.style["symbol"+h]];if(null!=f){g=this.style["symbol"+h+"Align"];var k=this.style["symbol"+h+"VerticalAlign"],l=this.style["symbol"+h+"Width"],m=this.style["symbol"+h+"Height"],n=this.style["symbol"+
h+"Spacing"]||0,p=this.style["symbol"+h+"VSpacing"]||0,q=this.style["symbol"+h+"ArcSpacing"],t=this.style["symbol"+h+"Direction"];null!=q&&(n+=this.getArcSize(b+this.strokewidth,c+this.strokewidth)*q,p+=this.getArcSize(b+this.strokewidth,c+this.strokewidth)*q);q=d;var u=e;q=g==mxConstants.ALIGN_CENTER?q+(b-l)/2:g==mxConstants.ALIGN_RIGHT?q+(b-l-n):q+n;u=k==mxConstants.ALIGN_MIDDLE?u+(c-m)/2:k==mxConstants.ALIGN_BOTTOM?u+(c-m-p):u+p;a.save();g=new f;g.style=mxUtils.clone(this.style);g.direction=t;
g.updateTransform(a,q,u,l,m);f.prototype.paintVertexShape.call(g,a,q,u,l,m);a.restore()}h++}while(null!=f)}};mxCellRenderer.registerShape("mxgraph.sysml.composite",mxShapeSysMLComposite);function mxShapeSysMLPackage(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPackage,mxShape);mxShapeSysMLPackage.prototype.cst={PACKAGE:"mxgraph.sysml.package",LABEL_X:"labelX"};
mxShapeSysMLPackage.prototype.customProperties=[{name:"labelX",dispName:"Header Width",type:"float",min:0,defVal:90}];
mxShapeSysMLPackage.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};
mxShapeSysMLPackage.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeSysMLPackage.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxShapeSysMLPackage.prototype.foreground=function(a,d,e,b,c){d=parseInt(mxUtils.getValue(this.style,mxShapeSysMLPackage.prototype.cst.LABEL_X,"90"));d=Math.min(d,b);20<d&&(a.begin(),a.moveTo(0,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.stroke())};
mxCellRenderer.registerShape(mxShapeSysMLPackage.prototype.cst.PACKAGE,mxShapeSysMLPackage);Graph.handleFactory[mxShapeSysMLPackage.prototype.cst.PACKAGE]=function(a){return[Graph.createHandle(a,["labelX"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"labelX",90))));return new mxPoint(d.x+e,d.y+10)},function(d,e){this.state.style.labelX=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100})]};
function mxShapeSysMLPackage2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPackage2,mxShape);mxShapeSysMLPackage2.prototype.cst={PACKAGE2:"mxgraph.sysml.package2",LABEL_X:"labelX"};mxShapeSysMLPackage2.prototype.customProperties=[{name:"labelX",dispName:"Header Width",type:"float",min:0,defVal:90}];
mxShapeSysMLPackage2.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeSysMLPackage2.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.stroke()};
mxShapeSysMLPackage2.prototype.foreground=function(a,d,e,b,c){d=parseInt(mxUtils.getValue(this.style,mxShapeSysMLPackage2.prototype.cst.LABEL_X,"90"));d=Math.min(d,b);20<d&&(a.begin(),a.moveTo(0,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.lineTo(0,0),a.close(),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeSysMLPackage2.prototype.cst.PACKAGE2,mxShapeSysMLPackage2);
Graph.handleFactory[mxShapeSysMLPackage2.prototype.cst.PACKAGE2]=function(a){return[Graph.createHandle(a,["labelX"],function(d){var e=Math.max(0,Math.min(d.width,parseFloat(mxUtils.getValue(this.state.style,"labelX",90))));return new mxPoint(d.x+e,d.y+10)},function(d,e){this.state.style.labelX=Math.round(100*Math.max(0,Math.min(d.width,e.x-d.x)))/100})]};function mxShapeSysMLNone(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLNone,mxShape);mxShapeSysMLNone.prototype.cst={NONE:"mxgraph.sysml.none"};mxShapeSysMLNone.prototype.paintVertexShape=function(a,d,e,b,c){};mxCellRenderer.registerShape(mxShapeSysMLNone.prototype.cst.NONE,mxShapeSysMLNone);function mxShapeSysMLRect(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLRect,mxShape);mxShapeSysMLRect.prototype.cst={RECT:"mxgraph.sysml.rect"};
mxShapeSysMLRect.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d,e,b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLRect.prototype.cst.RECT,mxShapeSysMLRect);function mxShapeSysMLPortOne(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPortOne,mxShape);mxShapeSysMLPortOne.prototype.cst={PORT1:"mxgraph.sysml.port1"};
mxShapeSysMLPortOne.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+.05*b,e,b-.1*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLPortOne.prototype.cst.PORT1,mxShapeSysMLPortOne);
mxShapeSysMLPortOne.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.05,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(.95,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,.25),!1));return a};function mxShapeSysMLPortTwo(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLPortTwo,mxShape);mxShapeSysMLPortTwo.prototype.cst={PORT2:"mxgraph.sysml.port2"};mxShapeSysMLPortTwo.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+.05*b,e,.8*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLPortTwo.prototype.cst.PORT2,mxShapeSysMLPortTwo);
mxShapeSysMLPortTwo.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.05,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(.95,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.95,
1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(.05,.25),!1));return a};function mxShapeSysMLPortThree(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLPortThree,mxShape);mxShapeSysMLPortThree.prototype.cst={PORT3:"mxgraph.sysml.port3"};
mxShapeSysMLPortThree.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+.07*b,e,.86*b,c);a.fillAndStroke();a.rect(d,e+.125*c,.14*b,.25*c);a.fillAndStroke();a.rect(d,e+.625*c,.14*b,.25*c);a.fillAndStroke();a.rect(d+.86*b,e+.375*c,.14*b,.25*c);a.fillAndStroke();this.drawIn(a,d+.01*b,e+.2*c,.11*b,.1*c);this.drawOut(a,d+.02*b,e+.7*c,.11*b,.1*c);this.drawInOut(a,d+.88*b,e+.45*c,.1*b,.1*c)};
mxShapeSysMLPortThree.prototype.drawIn=function(a,d,e,b,c){a.begin();a.moveTo(d,e+.5*c);a.lineTo(d+b,e+.5*c);a.moveTo(d+.75*b,e);a.lineTo(d+b,e+.5*c);a.lineTo(d+.75*b,e+c);a.stroke()};mxShapeSysMLPortThree.prototype.drawOut=function(a,d,e,b,c){a.begin();a.moveTo(d,e+.5*c);a.lineTo(d+b,e+.5*c);a.moveTo(d+.25*b,e);a.lineTo(d,e+.5*c);a.lineTo(d+.25*b,e+c);a.stroke()};
mxShapeSysMLPortThree.prototype.drawInOut=function(a,d,e,b,c){a.begin();a.moveTo(d+.75*b,e);a.lineTo(d+b,e+.5*c);a.lineTo(d+.75*b,e+c);a.moveTo(d+.25*b,e);a.lineTo(d,e+.5*c);a.lineTo(d+.25*b,e+c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLPortThree.prototype.cst.PORT3,mxShapeSysMLPortThree);function mxShapeSysMLPortFour(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPortFour,mxShape);
mxShapeSysMLPortFour.prototype.cst={PORT4:"mxgraph.sysml.port4"};mxShapeSysMLPortFour.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+.05*b,e,b-.05*b,c);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLPortFour.prototype.cst.PORT4,mxShapeSysMLPortFour);
mxShapeSysMLPortFour.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];function mxShapeSysMLItemFlow(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLItemFlow,mxShape);
mxShapeSysMLItemFlow.prototype.cst={ITEM_FLOW:"mxgraph.sysml.itemFlow",FLOW_DIR:"flowDir",FLOW_TYPE:"flowType"};mxShapeSysMLItemFlow.prototype.customProperties=[{name:"flowDir",dispName:"Flow Direction",type:"enum",enumList:[{val:"n",dispName:"North"},{val:"s",dispName:"South"},{val:"e",dispName:"East"},{val:"w",dispName:"West"}]},{name:"flowType",dispName:"Flow Type",type:"enum",enumList:[{val:"in",dispName:"In"},{val:"out",dispName:"Out"}]}];
mxShapeSysMLItemFlow.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapeSysMLItemFlow.prototype.cst.FLOW_DIR,"none").toLowerCase(),g=mxUtils.getValue(this.style,mxShapeSysMLItemFlow.prototype.cst.FLOW_TYPE,"none");"n"===f?(a.rect(d,e+10,b,c-10),a.fillAndStroke(),a.setShadow(!1),a.rect(d+.5*b-10,e,20,20),a.fillAndStroke(),"in"===g?this.drawDown(a,d+.5*b-5,e+2,10,16):"out"===g&&this.drawUp(a,d+.5*b-5,e+2,10,16)):"s"===f?(a.rect(d,e,b,c-10),a.fillAndStroke(),a.setShadow(!1),
a.rect(d+.5*b-10,e+c-20,20,20),a.fillAndStroke(),"in"===g?this.drawUp(a,d+.5*b-5,e+c-18,10,16):"out"===g&&this.drawDown(a,d+.5*b-5,e+c-18,10,16)):"w"===f?(a.rect(d+10,e,b-10,c),a.fillAndStroke(),a.setShadow(!1),a.rect(d,e+.5*c-10,20,20),a.fillAndStroke(),"in"===g?this.drawRight(a,d+2,e+.5*c-5,16,10):"out"===g&&this.drawLeft(a,d+2,e+.5*c-5,16,10)):"e"===f&&(a.rect(d,e,b-10,c),a.fillAndStroke(),a.setShadow(!1),a.rect(d+b-20,e+.5*c-10,20,20),a.fillAndStroke(),"in"===g?this.drawLeft(a,d+b-18,e+.5*c-5,
16,10):"out"===g&&this.drawRight(a,d+b-18,e+.5*c-5,16,10))};mxShapeSysMLItemFlow.prototype.drawRight=function(a,d,e,b,c){a.begin();a.moveTo(d,e+.5*c);a.lineTo(d+b,e+.5*c);a.moveTo(d+.75*b,e);a.lineTo(d+b,e+.5*c);a.lineTo(d+.75*b,e+c);a.stroke()};mxShapeSysMLItemFlow.prototype.drawDown=function(a,d,e,b,c){a.begin();a.moveTo(d+.5*b,e);a.lineTo(d+.5*b,e+c);a.moveTo(d,e+.75*c);a.lineTo(d+.5*b,e+c);a.lineTo(d+b,e+.75*c);a.stroke()};
mxShapeSysMLItemFlow.prototype.drawLeft=function(a,d,e,b,c){a.begin();a.moveTo(d,e+.5*c);a.lineTo(d+b,e+.5*c);a.moveTo(d+.25*b,e);a.lineTo(d,e+.5*c);a.lineTo(d+.25*b,e+c);a.stroke()};mxShapeSysMLItemFlow.prototype.drawUp=function(a,d,e,b,c){a.begin();a.moveTo(d+.5*b,e+c);a.lineTo(d+.5*b,e);a.moveTo(d,e+.25*c);a.lineTo(d+.5*b,e);a.lineTo(d+b,e+.25*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLItemFlow.prototype.cst.ITEM_FLOW,mxShapeSysMLItemFlow);
mxShapeSysMLItemFlow.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0)];function mxShapeSysMLItemFlowLeft(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLItemFlowLeft,mxShape);mxShapeSysMLItemFlowLeft.prototype.cst={ITEM_FLOW_LEFT:"mxgraph.sysml.itemFlowLeft"};
mxShapeSysMLItemFlowLeft.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+10,e,b-10,c);a.fillAndStroke();a.rect(d,e+.25*c-10,20,20);a.fillAndStroke();a.rect(d,e+.5*c-10,20,20);a.fillAndStroke();a.rect(d,e+.75*c-10,20,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLItemFlowLeft.prototype.cst.ITEM_FLOW_LEFT,mxShapeSysMLItemFlowLeft);
mxShapeSysMLItemFlowLeft.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0)];function mxShapeSysMLItemFlowRight(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLItemFlowRight,mxShape);mxShapeSysMLItemFlowRight.prototype.cst={ITEM_FLOW_RIGHT:"mxgraph.sysml.itemFlowRight"};mxShapeSysMLItemFlowRight.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d,e,b-10,c);a.fillAndStroke();a.rect(d+b-20,e+.25*c-10,20,20);a.fillAndStroke();a.rect(d+b-20,e+.5*c-10,20,20);a.fillAndStroke();a.rect(d+b-20,e+.75*c-10,20,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLItemFlowRight.prototype.cst.ITEM_FLOW_RIGHT,mxShapeSysMLItemFlowRight);
mxShapeSysMLItemFlowRight.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];function mxShapeSysMLNestedPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLNestedPort,mxShape);mxShapeSysMLNestedPort.prototype.cst={NESTED_PORT:"mxgraph.sysml.nestedPort"};mxShapeSysMLNestedPort.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d+.08*b,e,.92*b,c);a.fillAndStroke();a.rect(d+.03*b,e+.1*c,.1*b,.8*c);a.fillAndStroke();a.rect(d,e+.15*c,.06*b,.16*c);a.fillAndStroke();a.rect(d,e+.42*c,.06*b,.16*c);a.fillAndStroke();a.rect(d,e+.69*c,.06*b,.16*c);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLNestedPort.prototype.cst.NESTED_PORT,mxShapeSysMLNestedPort);mxMarker.addMarker("sysMLPackCont",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2;return function(){a.begin();a.moveTo(b.x-m/2-n/2,b.y-n/2+m/2);a.lineTo(b.x-m/2+n/2,b.y-n/2-m/2);a.stroke();a.ellipse(b.x-.5*m-p,b.y-.5*n-p,2*p,2*p);a.stroke()}});
mxMarker.addMarker("sysMLReqInt",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2;return function(){var q=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,"none");a.setFillColor(q);a.ellipse(b.x-.5*m-p,b.y-.5*n-p,2*p,2*p);a.fillAndStroke()}});
mxMarker.addMarker("sysMLProvInt",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2;return function(){var q=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,"none");a.setFillColor(q);a.begin();a.moveTo(b.x-n/2,b.y+m/2);a.arcTo(p,p,0,0,1,b.x+n/2,b.y-m/2);a.fillAndStroke()}});function mxShapeSysMLParametricDiagram(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLParametricDiagram,mxShape);
mxShapeSysMLParametricDiagram.prototype.cst={PARAM_DGM:"mxgraph.sysml.paramDgm"};mxShapeSysMLParametricDiagram.prototype.paintVertexShape=function(a,d,e,b,c){a.roundrect(d,e,b,c,10,10);a.fillAndStroke();a.setShadow(!1);60<c&&(a.rect(d,e+.25*c-10,20,20),a.stroke(),a.rect(d,e+.75*c-10,20,20),a.stroke())};mxCellRenderer.registerShape(mxShapeSysMLParametricDiagram.prototype.cst.PARAM_DGM,mxShapeSysMLParametricDiagram);
function mxShapeSysMLConstraintProperty(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLConstraintProperty,mxShape);mxShapeSysMLConstraintProperty.prototype.cst={CONS_PROP:"mxgraph.sysml.consProp"};mxShapeSysMLConstraintProperty.prototype.paintVertexShape=function(a,d,e,b,c){a.rect(d,e,b,c);a.fillAndStroke();a.setShadow(!1);60<c&&(a.rect(d,e+50,20,20),a.stroke(),a.rect(d,e+80,20,20),a.stroke())};
mxCellRenderer.registerShape(mxShapeSysMLConstraintProperty.prototype.cst.CONS_PROP,mxShapeSysMLConstraintProperty);function mxShapeSysMLCallBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLCallBehaviorAction,mxShape);mxShapeSysMLCallBehaviorAction.prototype.cst={CALL_BEH_ACT:"mxgraph.sysml.callBehAct"};
mxShapeSysMLCallBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.roundrect(d,e,b,c,10,10);a.fillAndStroke();30<c&&40<b&&(a.setShadow(!1),this.drawSymb(a,d+b-30,e+c-30,20,20))};mxShapeSysMLCallBehaviorAction.prototype.drawSymb=function(a,d,e,b,c){a.begin();a.moveTo(d+.5*b,e);a.lineTo(d+.5*b,e+c);a.moveTo(d,e+c);a.lineTo(d,e+.5*c);a.lineTo(d+b,e+.5*c);a.lineTo(d+b,e+c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLCallBehaviorAction.prototype.cst.CALL_BEH_ACT,mxShapeSysMLCallBehaviorAction);
mxShapeSysMLCallBehaviorAction.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));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,null,-2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));
a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,-2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,2.9,-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));return a};function mxShapeSysMLAcceptEventAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLAcceptEventAction,mxShape);mxShapeSysMLAcceptEventAction.prototype.cst={ACC_EVENT:"mxgraph.sysml.accEvent"};
mxShapeSysMLAcceptEventAction.prototype.paintVertexShape=function(a,d,e,b,c){a.begin();a.moveTo(d,e);a.lineTo(d+b,e);a.lineTo(d+b,e+c);a.lineTo(d,e+c);a.lineTo(d+.3*c,e+.5*c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLAcceptEventAction.prototype.cst.ACC_EVENT,mxShapeSysMLAcceptEventAction);
mxShapeSysMLAcceptEventAction.prototype.getConstraints=function(a,d,e){a=[];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(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,.3*e,0));return a};
function mxShapeSysMLTimeEvent(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLTimeEvent,mxShape);mxShapeSysMLTimeEvent.prototype.cst={TIME_EVENT:"mxgraph.sysml.timeEvent"};mxShapeSysMLTimeEvent.prototype.paintVertexShape=function(a,d,e,b,c){a.begin();a.moveTo(d,e);a.lineTo(d+b,e);a.lineTo(d,e+c);a.lineTo(d+b,e+c);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLTimeEvent.prototype.cst.TIME_EVENT,mxShapeSysMLTimeEvent);
mxShapeSysMLTimeEvent.prototype.getConstraints=function(a,d,e){a=[];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(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(.5,.5),!1));return a};
function mxShapeSysMLSendSignalAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLSendSignalAction,mxShape);mxShapeSysMLSendSignalAction.prototype.cst={SEND_SIG_ACT:"mxgraph.sysml.sendSigAct"};mxShapeSysMLSendSignalAction.prototype.paintVertexShape=function(a,d,e,b,c){a.begin();a.moveTo(d,e);a.lineTo(d+b-.3*c,e);a.lineTo(d+b,e+.5*c);a.lineTo(d+b-.3*c,e+c);a.lineTo(d,e+c);a.close();a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLSendSignalAction.prototype.cst.SEND_SIG_ACT,mxShapeSysMLSendSignalAction);
mxShapeSysMLSendSignalAction.prototype.getConstraints=function(a,d,e){a=[];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,null,.3*-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,.3*-e,0));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));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));return a};function mxShapeSysMLActivityFinal(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxShapeSysMLActivityFinal,mxShape);mxShapeSysMLActivityFinal.prototype.cst={ACT_FINAL:"mxgraph.sysml.actFinal"};mxShapeSysMLActivityFinal.prototype.paintVertexShape=function(a,d,e,b,c){a.ellipse(d,e,b,c);a.fillAndStroke();var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(f);a.ellipse(d+5,e+5,b-10,c-10);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLActivityFinal.prototype.cst.ACT_FINAL,mxShapeSysMLActivityFinal);
mxShapeSysMLActivityFinal.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));return a};function mxShapeSysMLActivityParameterNode(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLActivityParameterNode,mxShape);mxShapeSysMLActivityParameterNode.prototype.cst={ACT_PARAM_NODE:"mxgraph.sysml.actParamNode"};
mxShapeSysMLActivityParameterNode.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();d=Math.max(.35*b,70);e=Math.min(.65*b,b-10);a.begin();a.moveTo(d,c);a.lineTo(10,c);a.lineTo(10,0);a.lineTo(d,0);a.moveTo(e,c);a.lineTo(b-10,c);a.lineTo(b-10,0);a.lineTo(e,0);a.stroke();d=Math.min(50,b);20<d&&(a.begin(),a.moveTo(10,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.lineTo(10,0),a.close(),a.fillAndStroke());a.rect(0,.35*c-10,20,20);a.fillAndStroke();a.rect(0,.65*c-10,20,20);
a.fillAndStroke();a.rect(b-20,.5*c-10,20,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLActivityParameterNode.prototype.cst.ACT_PARAM_NODE,mxShapeSysMLActivityParameterNode);mxShapeSysMLActivityParameterNode.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.35),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.65),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
function mxShapeSysMLControlOperator(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLControlOperator,mxShape);mxShapeSysMLControlOperator.prototype.cst={CONT_OPER:"mxgraph.sysml.contOper"};mxShapeSysMLControlOperator.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLControlOperator.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};mxShapeSysMLControlOperator.prototype.foreground=function(a,d,e,b,c){d=Math.min(130,b);20<d&&(a.begin(),a.moveTo(0,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.stroke())};mxCellRenderer.registerShape(mxShapeSysMLControlOperator.prototype.cst.CONT_OPER,mxShapeSysMLControlOperator);
function mxShapeSysMLFlowFinal(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLFlowFinal,mxShape);mxShapeSysMLFlowFinal.prototype.cst={FLOW_FINAL:"mxgraph.sysml.flowFinal"};mxShapeSysMLFlowFinal.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.ellipse(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.145*b,.145*c);a.lineTo(.855*b,.855*c);a.moveTo(.855*b,.145*c);a.lineTo(.145*b,.855*c);a.stroke()};
mxCellRenderer.registerShape(mxShapeSysMLFlowFinal.prototype.cst.FLOW_FINAL,mxShapeSysMLFlowFinal);
mxShapeSysMLFlowFinal.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));return a};function mxShapeSysMLIsControl(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLIsControl,mxShape);mxShapeSysMLIsControl.prototype.cst={IS_CONTROL:"mxgraph.sysml.isControl"};mxShapeSysMLIsControl.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,.5*c-10,10,20);a.fillAndStroke();a.roundrect(10,0,b-20,c,10,10);a.fillAndStroke();a.rect(b-10,.5*c-10,10,20);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLIsControl.prototype.cst.IS_CONTROL,mxShapeSysMLIsControl);mxShapeSysMLIsControl.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeSysMLIsStream(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLIsStream,mxShape);mxShapeSysMLIsStream.prototype.cst={IS_STREAM:"mxgraph.sysml.isStream"};
mxShapeSysMLIsStream.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");a.setFillColor(d);a.rect(0,.5*c-10,10,20);a.fillAndStroke();a.setFillColor(e);a.roundrect(10,0,b-20,c,10,10);a.fillAndStroke();a.setFillColor(d);a.rect(b-10,.5*c-10,10,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLIsStream.prototype.cst.IS_STREAM,mxShapeSysMLIsStream);
mxShapeSysMLIsStream.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};function mxShapeSysMLIsActStream(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLIsActStream,mxShape);mxShapeSysMLIsActStream.prototype.cst={IS_ACT_STREAM:"mxgraph.sysml.isActStream"};
mxShapeSysMLIsActStream.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(0,0,b-10,c);a.fillAndStroke();d=Math.min(40,b);20<d&&(a.begin(),a.moveTo(0,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.lineTo(0,0),a.close(),a.fillAndStroke());a.rect(b-20,.5*c-10,20,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLIsActStream.prototype.cst.IS_ACT_STREAM,mxShapeSysMLIsActStream);
mxShapeSysMLIsActStream.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));return a};function mxShapeSysMLParameterSet(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLParameterSet,mxShape);
mxShapeSysMLParameterSet.prototype.cst={PARAM_SET:"mxgraph.sysml.paramSet"};mxShapeSysMLParameterSet.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,.5*c-28,10,56);a.fillAndStroke();a.roundrect(10,0,b-20,c,10,10);a.fillAndStroke();a.rect(b-10,.5*c-28,10,56);a.fillAndStroke();a.setShadow(!1);a.rect(4,.5*c-24,6,20);a.fillAndStroke();a.rect(4,.5*c+4,6,20);a.fillAndStroke();a.rect(b-10,.5*c-24,6,20);a.fillAndStroke();a.rect(b-10,.5*c+4,6,20);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLParameterSet.prototype.cst.PARAM_SET,mxShapeSysMLParameterSet);
mxShapeSysMLParameterSet.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,14));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(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};function mxShapeSysMLParameterActivitySet(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLParameterActivitySet,mxShape);
mxShapeSysMLParameterActivitySet.prototype.cst={PARAM_ACT_SET:"mxgraph.sysml.paramActSet"};
mxShapeSysMLParameterActivitySet.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(10,0,b-20,c);a.fillAndStroke();d=Math.min(50,b);20<d&&(a.begin(),a.moveTo(10,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.lineTo(10,0),a.close(),a.fillAndStroke());a.setShadow(!1);70<c&&(a.rect(0,.5*c-28,15,56),a.fillAndStroke(),a.rect(4,.5*c-24,15,20),a.fillAndStroke(),a.rect(4,.5*c+4,15,20),a.fillAndStroke(),a.rect(b-15,.5*c-28,15,56),a.fillAndStroke(),a.rect(b-19,.5*c-24,15,
20),a.fillAndStroke(),a.rect(b-19,.5*c+4,15,20),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeSysMLParameterActivitySet.prototype.cst.PARAM_ACT_SET,mxShapeSysMLParameterActivitySet);
mxShapeSysMLParameterActivitySet.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,14));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(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};function mxShapeSysMLProbability(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLProbability,mxShape);
mxShapeSysMLProbability.prototype.cst={PROBABILITY:"mxgraph.sysml.probability"};mxShapeSysMLProbability.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b-10,c,10,10);a.fillAndStroke();a.rect(b-10,.25*c-28,10,56);a.fillAndStroke();a.rect(b-10,.75*c-28,10,56);a.fillAndStroke();a.setShadow(!1);a.rect(b-10,.25*c-24,6,20);a.fillAndStroke();a.rect(b-10,.25*c+4,6,20);a.fillAndStroke();a.rect(b-10,.75*c-24,6,20);a.fillAndStroke();a.rect(b-10,.75*c+4,6,20);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLProbability.prototype.cst.PROBABILITY,mxShapeSysMLProbability);
mxShapeSysMLProbability.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,null,0,
-14));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1,null,-5,0));return a};function mxShapeSysMLActivityProbability(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLActivityProbability,mxShape);mxShapeSysMLActivityProbability.prototype.cst={ACT_PROB:"mxgraph.sysml.actProb"};
mxShapeSysMLActivityProbability.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.rect(0,0,b-10,c);a.fillAndStroke();d=Math.min(40,b);20<d&&(a.begin(),a.moveTo(0,20),a.lineTo(d-10,20),a.lineTo(d,10),a.lineTo(d,0),a.lineTo(0,0),a.close(),a.fillAndStroke());a.setShadow(!1);70<c&&(a.rect(b-15,.25*c-28,15,56),a.fillAndStroke(),a.rect(b-19,.25*c-24,15,20),a.fillAndStroke(),a.rect(b-19,.25*c+4,15,20),a.fillAndStroke(),a.rect(b-15,.75*c-28,15,56),a.fillAndStroke(),a.rect(b-19,.75*
c-24,15,20),a.fillAndStroke(),a.rect(b-19,.75*c+4,15,20),a.fillAndStroke())};mxCellRenderer.registerShape(mxShapeSysMLActivityProbability.prototype.cst.ACT_PROB,mxShapeSysMLActivityProbability);
mxShapeSysMLActivityProbability.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1,null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,
null,0,-14));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,null,0,14));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1,null,-5,0));return a};function mxShapeSysMLObjectFlowRight(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLObjectFlowRight,mxShape);mxShapeSysMLObjectFlowRight.prototype.cst={OBJ_FLOW_R:"mxgraph.sysml.objFlowR"};mxShapeSysMLObjectFlowRight.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.roundrect(0,0,b-10,c,10,10);a.fillAndStroke();a.rect(b-10,.5*c-10,10,20);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLObjectFlowRight.prototype.cst.OBJ_FLOW_R,mxShapeSysMLObjectFlowRight);mxShapeSysMLObjectFlowRight.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,-5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,-5,0));return a};
function mxShapeSysMLObjectFlowLeft(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLObjectFlowLeft,mxShape);mxShapeSysMLObjectFlowLeft.prototype.cst={OBJ_FLOW_L:"mxgraph.sysml.objFlowL"};mxShapeSysMLObjectFlowLeft.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,.5*c-10,10,20);a.fillAndStroke();a.roundrect(10,0,b-10,c,10,10);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeSysMLObjectFlowLeft.prototype.cst.OBJ_FLOW_L,mxShapeSysMLObjectFlowLeft);mxShapeSysMLObjectFlowLeft.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,5,0));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1,null,5,0));return a};
function mxShapeSysMLActivityPartition(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLActivityPartition,mxShape);mxShapeSysMLActivityPartition.prototype.cst={ACT_PART:"mxgraph.sysml.actPart"};mxShapeSysMLActivityPartition.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.moveTo(b,0);a.lineTo(b,c);a.stroke()};
mxCellRenderer.registerShape(mxShapeSysMLActivityPartition.prototype.cst.ACT_PART,mxShapeSysMLActivityPartition);function mxShapeSysMLContinuation(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLContinuation,mxShape);mxShapeSysMLContinuation.prototype.cst={CONT:"mxgraph.sysml.cont"};
mxShapeSysMLContinuation.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);b>c?(d=.5*c,a.begin(),a.moveTo(b-d,0),a.arcTo(d,d,0,0,1,b-d,c),a.lineTo(d,c),a.arcTo(d,d,0,0,1,d,0)):(d=.5*b,a.begin(),a.moveTo(0,c-d),a.arcTo(d,d,0,0,0,b,c-d),a.lineTo(b,d),a.arcTo(d,d,0,0,0,0,d));a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLContinuation.prototype.cst.CONT,mxShapeSysMLContinuation);
mxShapeSysMLContinuation.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));if(d>e){var b=.5*e;d>2*e&&(a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,
1),!1)))}else b=.5*d,e>2*d&&(a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,.75),!1)),a.push(new mxConnectionConstraint(new mxPoint(1,.25),!1)),a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.29*b,.29*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.29*b,.29*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.29*b,e-.29*b));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d-.29*b,e-.29*b));return a};function mxShapeSysMLCoregion(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLCoregion,mxShape);mxShapeSysMLCoregion.prototype.cst={COREGION:"mxgraph.sysml.coregion"};
mxShapeSysMLCoregion.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.min(10,c);a.begin();a.moveTo(0,d);a.lineTo(0,0);a.lineTo(b,0);a.lineTo(b,d);a.moveTo(0,c-d);a.lineTo(0,c);a.lineTo(b,c);a.lineTo(b,c-d);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLCoregion.prototype.cst.COREGION,mxShapeSysMLCoregion);
mxMarker.addMarker("sysMLx",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(b.x-m/2-n/2,b.y-n/2+m/2);a.lineTo(b.x+m/2+n/2,b.y+n/2-m/2);a.moveTo(b.x+m/2-n/2,b.y+n/2+m/2);a.lineTo(b.x-m/2+n/2,b.y-n/2-m/2);a.stroke()}});function mxShapeSysMLDimension(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLDimension,mxShape);mxShapeSysMLDimension.prototype.cst={DIMENSION:"mxgraph.sysml.dimension"};
mxShapeSysMLDimension.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxShapeSysMLDimension.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,20);a.lineTo(b,20);a.moveTo(10,15);a.lineTo(0,20);a.lineTo(10,25);a.moveTo(b-10,15);a.lineTo(b,20);a.lineTo(b-10,25);a.moveTo(0,15);a.lineTo(0,c);a.moveTo(b,15);a.lineTo(b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLDimension.prototype.cst.DIMENSION,mxShapeSysMLDimension);
mxMarker.addMarker("sysMLLost",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2;return function(){a.begin();a.moveTo(b.x-1.5*m-n/2,b.y-1.5*n+m/2);a.lineTo(b.x-m/2,b.y-n/2);a.lineTo(b.x-1.5*m+n/2,b.y-1.5*n-m/2);a.stroke();a.ellipse(b.x-.5*m-p,b.y-.5*n-p,2*p,2*p);var q=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(q);a.fillAndStroke()}});
mxMarker.addMarker("sysMLFound",function(a,d,e,b,c,f,g,h,k,l){var m=c*(g+k+1),n=f*(g+k+1),p=g/2;return function(){a.ellipse(b.x-.5*m-p,b.y-.5*n-p,2*p,2*p);var q=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(q);a.fillAndStroke()}});function mxShapeSysMLCompositeState(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLCompositeState,mxShape);mxShapeSysMLCompositeState.prototype.cst={COMP_STATE:"mxgraph.sysml.compState"};
mxShapeSysMLCompositeState.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};mxShapeSysMLCompositeState.prototype.background=function(a,d,e,b,c){a.roundrect(0,20,b,c-20,10,10);a.fillAndStroke();a.rect(15,0,110,20);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLCompositeState.prototype.cst.COMP_STATE,mxShapeSysMLCompositeState);
mxShapeSysMLCompositeState.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,22.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,22.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-
20)+20));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.25*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.5*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.75*(e-20)+20));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));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,15,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,70,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,125,0));125<.75*d&&(a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,20)),125<.5*d&&(a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,20)),125<.25*d&&a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,20))));return a};
function mxShapeSysMLRegion(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLRegion,mxShape);mxShapeSysMLRegion.prototype.cst={REGION:"mxgraph.sysml.region"};mxShapeSysMLRegion.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c,20,50);a.setShadow(!1);this.foreground(a,d,e,b,c,20,50)};
mxShapeSysMLRegion.prototype.background=function(a,d,e,b,c,f,g){d=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1"));a.roundrect(0,f,b,c-f,10,10);a.fillAndStroke();a.setStrokeWidth(2*d);a.rect(15,0,g,f);a.fillAndStroke();a.setStrokeWidth(d)};mxShapeSysMLRegion.prototype.foreground=function(a,d,e,b,c,f,g){a.setDashed(!0);a.begin();a.moveTo(.5*b,f);a.lineTo(.5*b,c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLRegion.prototype.cst.REGION,mxShapeSysMLRegion);
mxShapeSysMLRegion.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,22.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,22.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(e-20)+20));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.25*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.5*(e-20)+20));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,.75*(e-20)+20));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));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,15,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,40,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,65,0));65<.75*d&&(a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,20)),65<.5*d&&(a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1,null,0,20)),65<.25*d&&a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,20))));return a};
function mxShapeSysMLSimpleState(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLSimpleState,mxShape);mxShapeSysMLSimpleState.prototype.cst={SIMPLE_STATE:"mxgraph.sysml.simpleState"};mxShapeSysMLSimpleState.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1)};
mxShapeSysMLSimpleState.prototype.background=function(a,d,e,b,c){parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_STROKEWIDTH,"1"));a.roundrect(0,0,b,c,10,10);a.fillAndStroke()};mxShapeSysMLSimpleState.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(0,20);a.lineTo(b,20);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLSimpleState.prototype.cst.SIMPLE_STATE,mxShapeSysMLSimpleState);
mxShapeSysMLSimpleState.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-2.9,e-2.9));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));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,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.75),!1));return a};function mxShapeSysMLStateMachine(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLStateMachine,mxShape);mxShapeSysMLStateMachine.prototype.cst={STATE_MACHINE:"mxgraph.sysml.stateMachine"};mxShapeSysMLStateMachine.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLStateMachine.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b-10,c,10,10);a.fillAndStroke()};mxShapeSysMLStateMachine.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(b-20,.5*c-10,20,20);a.stroke();a.ellipse(b-17,.5*c-7,14,14);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLStateMachine.prototype.cst.STATE_MACHINE,mxShapeSysMLStateMachine);
mxShapeSysMLStateMachine.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-12.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-12.9,e-2.9));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));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,.25),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.75),!1));return a};function mxShapeSysMLX(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLX,mxShape);mxShapeSysMLX.prototype.cst={X:"mxgraph.sysml.x"};mxShapeSysMLX.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,c);a.moveTo(0,c);a.lineTo(b,0);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLX.prototype.cst.X,mxShapeSysMLX);
mxShapeSysMLX.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));return a};function mxShapeSysMLSubmachineState(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLSubmachineState,mxShape);
mxShapeSysMLSubmachineState.prototype.cst={SUBMACHINE_STATE:"mxgraph.sysml.submState"};mxShapeSysMLSubmachineState.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapeSysMLSubmachineState.prototype.background=function(a,d,e,b,c){a.roundrect(0,0,b-10,c,10,10);a.fillAndStroke()};
mxShapeSysMLSubmachineState.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(d);a.ellipse(b-20,.5*c-10,20,20);a.stroke();a.ellipse(b-17,.5*c-7,14,14);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeSysMLSubmachineState.prototype.cst.SUBMACHINE_STATE,mxShapeSysMLSubmachineState);
mxShapeSysMLSubmachineState.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-12.9,2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,2.9,e-2.9));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-12.9,e-2.9));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));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,.25),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.75),!1,null,-10,0));a.push(new mxConnectionConstraint(new mxPoint(0,.25),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.75),!1));return a};function mxShapeSysMLUseCaseExtensionPoints(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLUseCaseExtensionPoints,mxShape);mxShapeSysMLUseCaseExtensionPoints.prototype.cst={USE_CASE_EXT_PT:"mxgraph.sysml.useCaseExtPt"};mxShapeSysMLUseCaseExtensionPoints.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLUseCaseExtensionPoints.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeSysMLUseCaseExtensionPoints.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.02*b,.35*c);a.lineTo(.98*b,.35*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLUseCaseExtensionPoints.prototype.cst.USE_CASE_EXT_PT,mxShapeSysMLUseCaseExtensionPoints);
mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,
.145),!1));return a};function mxShapeSysMLPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPort,mxShape);mxShapeSysMLPort.prototype.cst={PORT:"mxgraph.sysml.port"};
mxShapeSysMLPort.prototype.customProperties=[{name:"sysMLPortType",dispName:"Port Type",type:"enum",enumList:[{val:"empty",dispName:"Empty"},{val:"flowN",dispName:"Flow Up"},{val:"flowE",dispName:"Flow Right"},{val:"flowS",dispName:"Flow Down"},{val:"flowW",dispName:"Flow Left"},{val:"doubleH",dispName:"Double Horizontal"},{val:"doubleV",dispName:"Double Vertical"}]}];
mxShapeSysMLPort.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();switch(mxUtils.getValue(this.style,"sysMLPortType","empty")){case "flowN":a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke();break;case "flowE":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.stroke();break;case "flowS":a.begin();a.moveTo(.25*
b,.5*c);a.lineTo(.5*b,.75*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.75*c);a.lineTo(.5*b,.25*c);a.stroke();break;case "flowW":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.25*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke();break;case "doubleH":a.begin();a.moveTo(.6*b,.25*c);a.lineTo(.85*b,.5*c);a.lineTo(.6*b,.75*c);a.moveTo(.4*b,.25*c);a.lineTo(.15*b,.5*c);a.lineTo(.4*b,.75*c);a.stroke();break;case "doubleV":a.begin(),a.moveTo(.25*b,.6*c),a.lineTo(.5*b,.85*c),a.lineTo(.75*
b,.6*c),a.moveTo(.25*b,.4*c),a.lineTo(.5*b,.15*c),a.lineTo(.75*b,.4*c),a.stroke()}};mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT,mxShapeSysMLPort);mxShapeSysMLPort.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
mxShapeUMLInputPin.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.moveTo(.4*b,.4*c);a.lineTo(.25*b,.5*c);a.lineTo(.4*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeUMLInputPin.prototype.cst.INPUT_PIN,mxShapeUMLInputPin);mxShapeUMLInputPin.prototype.constraints=null;
function mxShapeUMLBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLBehaviorAction,mxActor);mxShapeUMLBehaviorAction.prototype.cst={BEHAVIOR_ACTION:"mxgraph.uml25.behaviorAction"};
mxShapeUMLBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"rounded",!1);e=mxUtils.getValue(this.style,"absoluteArcSize",!1);var f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(b,c));f=Math.min(f,.5*b,.5*c);d||(f=0);a.begin();d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):(a.moveTo(0,0),a.lineTo(b,
0),a.lineTo(b,c),a.lineTo(0,c));a.close();a.fillAndStroke();a.setShadow(!1);60<=b&&40<=c&&(a.begin(),a.moveTo(b-60,.5*c+20),a.lineTo(b-60,.5*c),a.lineTo(b-20,.5*c),a.lineTo(b-20,.5*c+20),a.moveTo(b-40,.5*c-20),a.lineTo(b-40,.5*c+20),a.stroke())};mxCellRenderer.registerShape(mxShapeUMLBehaviorAction.prototype.cst.BEHAVIOR_ACTION,mxShapeUMLBehaviorAction);mxShapeUMLBehaviorAction.prototype.constraints=null;
function mxShapeUMLAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLAction,mxActor);mxShapeUMLAction.prototype.cst={ACTION:"mxgraph.uml25.action"};
mxShapeUMLAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"absoluteArcSize",!1);e=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));d||(e*=Math.min(b,c));e=Math.min(e,.5*b,.5*c);a.begin();a.moveTo(0,e);a.arcTo(e,e,0,0,1,e,0);a.lineTo(b-e-10,0);a.arcTo(e,e,0,0,1,b-10,e);a.lineTo(b-10,c-e);a.arcTo(e,e,0,0,1,b-e-10,c);a.lineTo(e,c);a.arcTo(e,e,0,0,1,0,c-e);a.close();a.fillAndStroke();a.rect(b-10,.5*c-10,10,20);a.fillAndStroke()};
mxCellRenderer.registerShape(mxShapeUMLAction.prototype.cst.ACTION,mxShapeUMLAction);mxShapeUMLAction.prototype.constraints=null;function mxShapeUMLActionParams(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLActionParams,mxActor);mxShapeUMLActionParams.prototype.cst={ACTION_PARAMS:"mxgraph.uml25.actionParams"};
mxShapeUMLActionParams.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"absoluteArcSize",!1);e=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));d||(e*=Math.min(b,c));e=Math.min(e,.5*b,.5*c);a.begin();a.moveTo(20,e);a.arcTo(e,e,0,0,1,20+e,0);a.lineTo(b-e,0);a.arcTo(e,e,0,0,1,b,e);a.lineTo(b,c-e);a.arcTo(e,e,0,0,1,b-e,c);a.lineTo(20+e,c);a.arcTo(e,e,0,0,1,20,c-e);a.close();a.fillAndStroke();a.rect(5,.5*c-17,20,34);a.fillAndStroke();a.rect(0,
.5*c-13,10,10);a.fillAndStroke();a.rect(0,.5*c+3,10,10);a.fillAndStroke()};mxCellRenderer.registerShape(mxShapeUMLActionParams.prototype.cst.ACTION_PARAMS,mxShapeUMLActionParams);mxShapeUMLActionParams.prototype.constraints=null;function mxShapePidDiscInst(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidDiscInst,mxShape);
mxShapePidDiscInst.prototype.cst={SHAPE_DISC_INST:"mxgraph.pid2inst.discInst",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local"};mxShapePidDiscInst.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]}];
mxShapePidDiscInst.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapePidDiscInst.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapePidDiscInst.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidDiscInst.prototype.cst.MOUNTING,"field");d===mxShapePidDiscInst.prototype.cst.ROOM?(a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidDiscInst.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidDiscInst.prototype.cst.LOCAL&&(a.begin(),a.moveTo(.005*b,.48*c),a.lineTo(.995*b,.48*c),a.moveTo(.005*b,.52*c),a.lineTo(.995*
b,.52*c),a.stroke())};mxCellRenderer.registerShape(mxShapePidDiscInst.prototype.cst.SHAPE_DISC_INST,mxShapePidDiscInst);
mxShapePidDiscInst.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.145,.145),!1),new mxConnectionConstraint(new mxPoint(.145,.855),!1),new mxConnectionConstraint(new mxPoint(.855,.145),!1),new mxConnectionConstraint(new mxPoint(.855,.855),!1)];
function mxShapePidSharedCont(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidSharedCont,mxShape);mxShapePidSharedCont.prototype.cst={SHAPE_SHARED_CONT:"mxgraph.pid2inst.sharedCont",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local"};
mxShapePidSharedCont.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]}];mxShapePidSharedCont.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapePidSharedCont.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapePidSharedCont.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidSharedCont.prototype.cst.MOUNTING,"field");a.ellipse(0,0,b,c);a.fillAndStroke();d===mxShapePidSharedCont.prototype.cst.ROOM?(a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidSharedCont.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidDiscInst.prototype.cst.LOCAL&&(a.begin(),a.moveTo(.005*b,.48*c),a.lineTo(.995*b,
.48*c),a.moveTo(.005*b,.52*c),a.lineTo(.995*b,.52*c),a.stroke())};mxCellRenderer.registerShape(mxShapePidSharedCont.prototype.cst.SHAPE_SHARED_CONT,mxShapePidSharedCont);
mxShapePidSharedCont.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];
function mxShapePidCompFunc(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidCompFunc,mxShape);mxShapePidCompFunc.prototype.cst={SHAPE_COMP_FUNC:"mxgraph.pid2inst.compFunc",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local"};
mxShapePidCompFunc.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]}];mxShapePidCompFunc.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapePidCompFunc.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.5*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(b,.5*c);a.lineTo(.75*b,c);a.lineTo(.25*b,c);a.close();a.fillAndStroke()};
mxShapePidCompFunc.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidCompFunc.prototype.cst.MOUNTING,"field");d===mxShapePidCompFunc.prototype.cst.ROOM?(a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidCompFunc.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidDiscInst.prototype.cst.LOCAL&&(a.begin(),a.moveTo(.01*b,.48*c),a.lineTo(.99*b,.48*c),a.moveTo(.01*b,.52*c),a.lineTo(.99*b,.52*
c),a.stroke())};mxCellRenderer.registerShape(mxShapePidCompFunc.prototype.cst.SHAPE_COMP_FUNC,mxShapePidCompFunc);
mxShapePidCompFunc.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.25,0),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,1),!1)];
function mxShapePidProgLogCont(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidProgLogCont,mxShape);mxShapePidProgLogCont.prototype.cst={SHAPE_PROG_LOG_CONT:"mxgraph.pid2inst.progLogCont",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local"};
mxShapePidProgLogCont.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]}];mxShapePidProgLogCont.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapePidProgLogCont.prototype.background=function(a,d,e,b,c){a.rect(0,0,b,c);a.fillAndStroke()};
mxShapePidProgLogCont.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidProgLogCont.prototype.cst.MOUNTING,"field");a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,0);a.lineTo(b,.5*c);a.lineTo(.5*b,c);a.close();a.stroke();d===mxShapePidProgLogCont.prototype.cst.ROOM?(a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidProgLogCont.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidDiscInst.prototype.cst.LOCAL&&
(a.begin(),a.moveTo(.02*b,.48*c),a.lineTo(.98*b,.48*c),a.moveTo(.02*b,.52*c),a.lineTo(.98*b,.52*c),a.stroke())};mxCellRenderer.registerShape(mxShapePidProgLogCont.prototype.cst.SHAPE_PROG_LOG_CONT,mxShapePidProgLogCont);
mxShapePidProgLogCont.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];
function mxShapePidIndicator(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidIndicator,mxShape);mxShapePidIndicator.prototype.cst={SHAPE_INDICATOR:"mxgraph.pid2inst.indicator",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local",IND_TYPE:"indType",INSTRUMENT:"inst",CONTROL:"ctrl",FUNCTION:"func",PLC:"plc"};
mxShapePidIndicator.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]},{name:"indType",dispName:"Type",type:"enum",defVal:"inst",enumList:[{val:"inst",dispName:"Instrument"},{val:"ctrl",dispName:"Control"},{val:"func",dispName:"Function"},{val:"plc",dispName:"PLC"}]}];
mxShapePidIndicator.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapePidIndicator.prototype.background=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidIndicator.prototype.cst.IND_TYPE,"inst");a.begin();a.moveTo(.5*b,b);a.lineTo(.5*b,c);a.stroke();d===mxShapePidIndicator.prototype.cst.INSTRUMENT?(a.ellipse(0,0,b,b),a.fillAndStroke()):d===mxShapePidIndicator.prototype.cst.CONTROL?(a.rect(0,0,b,b),a.fillAndStroke()):d===mxShapePidIndicator.prototype.cst.FUNCTION?(a.begin(),a.moveTo(0,.5*b),a.lineTo(.25*b,0),a.lineTo(.75*b,0),a.lineTo(b,.5*b),a.lineTo(.75*
b,b),a.lineTo(.25*b,b),a.close(),a.fillAndStroke()):d===mxShapePidIndicator.prototype.cst.PLC&&(a.rect(0,0,b,b),a.fillAndStroke())};
mxShapePidIndicator.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidIndicator.prototype.cst.MOUNTING,"field");e=mxUtils.getValue(this.style,mxShapePidIndicator.prototype.cst.IND_TYPE,"inst");e===mxShapePidIndicator.prototype.cst.CONTROL?(a.ellipse(0,0,b,b),a.stroke()):e===mxShapePidIndicator.prototype.cst.PLC&&(a.begin(),a.moveTo(0,.5*b),a.lineTo(.5*b,0),a.lineTo(b,.5*b),a.lineTo(.5*b,b),a.close(),a.stroke());d===mxShapePidIndicator.prototype.cst.ROOM?(a.begin(),a.moveTo(0,
.5*b),a.lineTo(b,.5*b),a.stroke()):d===mxShapePidIndicator.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*b),a.lineTo(b,.5*b),a.stroke()):d===mxShapePidIndicator.prototype.cst.LOCAL&&(a.begin(),a.moveTo(.005*b,.48*b),a.lineTo(.995*b,.48*b),a.moveTo(.005*b,.52*b),a.lineTo(.995*b,.52*b),a.stroke())};mxCellRenderer.registerShape(mxShapePidIndicator.prototype.cst.SHAPE_INDICATOR,mxShapePidIndicator);
mxShapePidIndicator.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,1),!0)];function mxShapePidLogic(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidLogic,mxShape);mxShapePidLogic.prototype.cst={SHAPE_LOGIC:"mxgraph.pid2inst.logic",MOUNTING:"mounting",FIELD:"field",ROOM:"room",INACCESSIBLE:"inaccessible",LOCAL:"local"};
mxShapePidLogic.prototype.customProperties=[{name:"mounting",dispName:"Mounting",type:"enum",defVal:"field",enumList:[{val:"field",dispName:"Field"},{val:"room",dispName:"Room"},{val:"inaccessible",dispName:"Inaccessible"},{val:"local",dispName:"Local"}]}];mxShapePidLogic.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapePidLogic.prototype.background=function(a,d,e,b,c){a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,0);a.lineTo(b,.5*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke()};
mxShapePidLogic.prototype.foreground=function(a,d,e,b,c){d=mxUtils.getValue(this.style,mxShapePidLogic.prototype.cst.MOUNTING,"field");d===mxShapePidLogic.prototype.cst.ROOM?(a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidLogic.prototype.cst.INACCESSIBLE?(a.setDashed(!0),a.begin(),a.moveTo(0,.5*c),a.lineTo(b,.5*c),a.stroke()):d===mxShapePidLogic.prototype.cst.LOCAL&&(a.begin(),a.moveTo(.02*b,.48*c),a.lineTo(.98*b,.48*c),a.moveTo(.02*b,.52*c),a.lineTo(.98*b,.52*c),a.stroke())};
mxCellRenderer.registerShape(mxShapePidLogic.prototype.cst.SHAPE_LOGIC,mxShapePidLogic);
mxShapePidLogic.prototype.constraints=[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),!0),new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.75),!1),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.75,.75),!1)];
function mxShapePidFan(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidFan,mxShape);mxShapePidFan.prototype.cst={SHAPE_FAN:"mxgraph.pid2misc.fan",FAN_TYPE:"fanType",COMMON:"common",AXIAL:"axial",RADIAL:"radial"};mxShapePidFan.prototype.customProperties=[{name:"fanType",dispName:"Type",type:"enum",defVal:"field",enumList:[{val:"common",dispName:"Common"},{val:"axial",dispName:"Axial"},{val:"radial",dispName:"Radial"}]}];
mxShapePidFan.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapePidFan.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};
mxShapePidFan.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.3*b,.045*c);a.lineTo(.97*b,.33*c);a.moveTo(.3*b,.955*c);a.lineTo(.97*b,.67*c);a.moveTo(.4228*b,.3655*c);a.arcTo(.15*b,.03*c,50,0,1,.5*b,.5*c);a.arcTo(.15*b,.03*c,50,0,1,.3772*b,.4045*c);a.arcTo(.15*b,.03*c,50,0,1,.3025*b,.271*c);a.arcTo(.15*b,.03*c,50,0,1,.4228*b,.3655*c);a.close();a.moveTo(.377*b,.5973*c);a.arcTo(.15*b,.03*c,-50,0,1,.4966*b,.5019*c);a.arcTo(.15*b,.03*c,-50,0,1,.423*b,.636*c);a.arcTo(.15*b,.03*c,-50,0,1,.3034*
b,.7314*c);a.arcTo(.15*b,.03*c,-50,0,1,.377*b,.5973*c);a.close();a.stroke();a.ellipse(.5*b,.47*c,.3*b,.06*c);a.stroke();d=mxUtils.getValue(this.style,mxShapePidFan.prototype.cst.FAN_TYPE,"common");d===mxShapePidFan.prototype.cst.AXIAL?(a.begin(),a.moveTo(.1*b,.5*c),a.lineTo(.3*b,.5*c),a.stroke()):d===mxShapePidFan.prototype.cst.RADIAL&&(a.begin(),a.moveTo(.2*b,.4*c),a.lineTo(.2*b,.6*c),a.stroke())};mxCellRenderer.registerShape(mxShapePidFan.prototype.cst.SHAPE_FAN,mxShapePidFan);
function mxShapePidColumn(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidColumn,mxShape);mxShapePidColumn.prototype.cst={SHAPE_COLUMN:"mxgraph.pid2misc.column",COLUMN_TYPE:"columnType",COMMON:"common",FIXED:"fixed",FLUIDIZED:"fluid",BAFFLE:"baffle",VALVE:"valve",BUBBLE:"bubble",NOZZLE:"nozzle",TRAY:"tray"};
mxShapePidColumn.prototype.customProperties=[{name:"columnType",dispName:"Type",type:"enum",defVal:"field",enumList:[{val:"common",dispName:"Common"},{val:"fixed",dispName:"Fixed"},{val:"fluid",dispName:"Fluid"},{val:"baffle",dispName:"Baffle"},{val:"valve",dispName:"Valve"},{val:"bubble",dispName:"Bubble"},{val:"nozzle",dispName:"Nozzle"},{val:"tray",dispName:"Tray"}]}];
mxShapePidColumn.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};mxShapePidColumn.prototype.background=function(a,d,e,b,c){c=Math.max(c,30);a.begin();a.moveTo(0,15);a.arcTo(.5*b,15,0,0,1,b,15);a.lineTo(b,c-15);a.arcTo(.5*b,15,0,0,1,0,c-15);a.close();a.fillAndStroke()};
mxShapePidColumn.prototype.foreground=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapePidColumn.prototype.cst.COLUMN_TYPE,"common");if(f===mxShapePidColumn.prototype.cst.FIXED){var g=1.2*b;d=c-50;e=d%g*.5+25;a.begin();for(c=0;c<=d-g;c+=g)a.moveTo(0,c+e+.1*g),a.lineTo(b,c+e+.1*g),a.moveTo(0,c+e+.9*g),a.lineTo(b,c+e+.9*g),a.moveTo(0,c+e+.1*g),a.lineTo(b,c+e+.9*g),a.moveTo(0,c+e+.9*g),a.lineTo(b,c+e+.1*g);a.stroke()}else if(f===mxShapePidColumn.prototype.cst.TRAY){g=.2*b;d=c-50;e=d%g*.5+
25;a.setDashed(!0);a.begin();for(c=0;c<=d;c+=g)a.moveTo(0,c+e),a.lineTo(b,c+e);a.stroke()}else if(f===mxShapePidColumn.prototype.cst.FLUIDIZED){g=.1*b;f=.1*b;d=c-50;e=25;var h=.02*Math.min(b,c);mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");var k=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,"0"),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.setFillColor(l);a.setDashed(!0);a.begin();a.moveTo(0,25);a.lineTo(b,25);a.moveTo(0,c-25);a.lineTo(b,c-25);
a.stroke();"0"===k?a.setDashed(!1):a.setDashed(!0);k=0;for(c=e+.5*g;c<d+e-h;c+=g){var m=f;l=k%2;0===l&&(m=.5*f);for(l=m;l<b;l+=f)a.ellipse(l,c,h,h),a.fillAndStroke();k++}}else if(f===mxShapePidColumn.prototype.cst.BAFFLE){g=.2*b;d=c-50-g;e=25+.5*g;a.setDashed(!0);a.begin();a.moveTo(0,25);a.lineTo(b,25);a.moveTo(0,c-25);a.lineTo(b,c-25);a.stroke();k=0;a.begin();for(c=e+.5*g;c<d+e;c+=g)l=k%2,0===l?(a.moveTo(0,c),a.lineTo(.9*b,c),a.lineTo(.9*b,c-.3*g)):(a.moveTo(.1*b,c-.5*g),a.lineTo(.1*b,c),a.lineTo(b,
c)),k++;a.stroke()}else if(f===mxShapePidColumn.prototype.cst.VALVE||f===mxShapePidColumn.prototype.cst.BUBBLE){g=.2*b;d=c-50-g;e=25+.5*g;k=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,"0");a.setFillColor(l);a.setDashed(!0);a.begin();a.moveTo(0,25);a.lineTo(b,25);a.moveTo(0,c-25);a.lineTo(b,c-25);a.stroke();"0"===k?a.setDashed(!1):a.setDashed(!0);a.begin();for(c=e+.5*g;c<d+e;c+=g)a.moveTo(0,c),a.lineTo(.4*b,c),f===mxShapePidColumn.prototype.cst.VALVE?(a.moveTo(.4*b,c-.2*g),a.lineTo(.6*b,c-
.2*g)):f===mxShapePidColumn.prototype.cst.BUBBLE&&(a.moveTo(.25*b,c-.2*g),a.arcTo(3*g,3*g,0,0,1,.75*b,c-.2*g)),a.moveTo(.6*b,c),a.lineTo(b,c);a.stroke()}else if(f===mxShapePidColumn.prototype.cst.NOZZLE){g=1.2*b;d=c-50;e=d%g*.5+25;k=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,0);for(c=0;c<=d-g;c+=g)a.setDashed(!0),a.begin(),a.moveTo(0,c+e+.2*g),a.lineTo(b,c+e+.2*g),a.moveTo(0,c+e+.8*g),a.lineTo(b,c+e+.8*g),a.stroke(),0===k?a.setDashed(!1):a.setDashed(!0),a.begin(),a.moveTo(0,c+e+.2*g),a.lineTo(b,
c+e+.8*g),a.moveTo(0,c+e+.8*g),a.lineTo(b,c+e+.2*g),0!==c&&(a.moveTo(0,c+e),a.lineTo(.5*b,c+e),a.moveTo(.5*b-.08*g,c+e+.08*g),a.lineTo(.5*b,c+e),a.lineTo(.5*b+.08*g,c+e+.08*g),a.moveTo(.5*b,c+e),a.lineTo(.5*b,c+e+.08*g)),a.stroke();a.stroke()}};mxCellRenderer.registerShape(mxShapePidColumn.prototype.cst.SHAPE_COLUMN,mxShapePidColumn);function mxShapePidConveyor(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidConveyor,mxShape);
mxShapePidConveyor.prototype.cst={SHAPE_CONVEYOR:"mxgraph.pid2misc.conveyor"};mxShapePidConveyor.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1)};
mxShapePidConveyor.prototype.background=function(a,d,e,b,c){d=Math.min(c,.5*b);a.begin();a.moveTo(.5*d,0);a.lineTo(b-.5*d,0);a.stroke();a.ellipse(0,0,d,d);a.fillAndStroke();a.ellipse(b-d,0,d,d);a.fillAndStroke();a.begin();a.moveTo(.5*d,d);a.lineTo(b-.5*d,d);a.stroke();b-=1.8*d;e=.9*d;c=.7*d;for(var f=0;f<b;f+=c)a.rect(e+f,0,.2*d,.1*d),a.fillAndStroke(),a.rect(e+f,.9*d,.2*d,.1*d),a.fillAndStroke()};mxCellRenderer.registerShape(mxShapePidConveyor.prototype.cst.SHAPE_CONVEYOR,mxShapePidConveyor);
function mxShapePidValve(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidValve,mxShape);
mxShapePidValve.prototype.cst={SHAPE_VALVE:"mxgraph.pid2valves.valve",DEFAULT_STATE:"defState",CLOSED:"closed",OPEN:"open",ACTUATOR:"actuator",MANUAL:"man",DIAPHRAGM:"diaph",BALANCED_DIAPHRAGM:"balDiaph",MOTOR:"motor",NONE:"none",SPRING:"spring",PILOT:"pilot",POWERED:"powered",SOLENOID:"solenoid",SOLENOID_MANUAL_RESET:"solenoidManRes",SINGLE_ACTING:"singActing",DOUBLE_ACTING:"dblActing",PILOT_CYLINDER:"pilotCyl",DIGITAL:"digital",WEIGHT:"weight",KEY:"key",ELECTRO_HYDRAULIC:"elHyd",VALVE_TYPE:"valveType",
BUTTERFLY:"butterfly",CHECK:"check",GATE:"gate",GLOBE:"globe",NEEDLE:"needle",PLUG:"plug",SELF_DRAINING:"selfDrain",ANGLE:"angle",ANGLE_GLOBE:"angleGlobe",THREE_WAY:"threeWay",ANGLE_BLOWDOWN:"angBlow",BALL:"ball"};
mxShapePidValve.prototype.customProperties=[{name:"defState",dispName:"Default State",type:"enum",defVal:"open",enumList:[{val:"closed",dispName:"Closed"},{val:"open",dispName:"Open"}]},{name:"actuator",dispName:"Actuator",type:"enum",defVal:"man",enumList:[{val:"man",dispName:"Manual"},{val:"diaph",dispName:"Diphragm"},{val:"balDiaph",dispName:"Balanced Diaphragm"},{val:"motor",dispName:"Motor"},{val:"none",dispName:"None"},{val:"spring",dispName:"Spring"},{val:"pilot",dispName:"Pilot"},{val:"powered",
dispName:"Powered"},{val:"solenoid",dispName:"Solenoid"},{val:"solenoidManRes",dispName:"Solenoid w/ Manual Reset"},{val:"singActing",dispName:"Single Acting"},{val:"dblActing",dispName:"Double Acting"},{val:"pilotCyl",dispName:"Pilot Cylinder"},{val:"digital",dispName:"Digital"},{val:"weight",dispName:"Weight"},{val:"key",dispName:"Key"},{val:"elHyd",dispName:"Electro-Hidraulic"}]},{name:"valveType",dispName:"Type",type:"enum",defVal:"gate",enumList:[{val:"butterfly",dispName:"Butterfly"},{val:"check",
dispName:"check"},{val:"gate",dispName:"Gate"},{val:"globe",dispName:"Globe"},{val:"needle",dispName:"Needle"},{val:"plug",dispName:"Plug"},{val:"selfDrain",dispName:"Self Draining"},{val:"angle",dispName:"Angle"},{val:"angleGlobe",dispName:"Angle Globe"},{val:"threeWay",dispName:"Three Way"},{val:"ball",dispName:"Ball"}]}];
mxShapePidValve.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.VALVE_TYPE,"gate"),g=mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.ACTUATOR,mxShapePidValve.prototype.cst.NONE),h=0;"none"!==g&&(h=this.isAngleVariant(f)?.3333*c:.4*c);a.translate(d,e);a.setLineJoin("round");this.background(a,d,e,b,c,f,g,h);a.setShadow(!1);this.foreground(a,d,e,b,c,f,g,h)};
mxShapePidValve.prototype.background=function(a,d,e,b,c,f,g,h){g!==mxShapePidValve.prototype.cst.NONE&&(this.isAngleVariant(f)?this.drawActuatorBg(a,d,e,b,c/1.2,g,h):this.drawActuatorBg(a,d,e,b,c,g,h));this.isGateVariant(f)?this.drawGateVariantBg(a,0,0,b,c,f,g,h):this.isAngleVariant(f)?this.drawAngleVariantBg(a,0,0,b,c,f,g,h):f===mxShapePidValve.prototype.cst.BUTTERFLY?this.drawButterflyValve(a,0,0,b,c,g,h):f===mxShapePidValve.prototype.cst.CHECK&&this.drawCheckValve(a,0,0,b,c,g,h)};
mxShapePidValve.prototype.foreground=function(a,d,e,b,c,f,g,h){f=mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.VALVE_TYPE,"gate");g!==mxShapePidValve.prototype.cst.NONE&&(this.isAngleVariant(f)?this.drawActuatorFg(a,d,e,b,c/1.2,g,h):this.drawActuatorFg(a,d,e,b,c,g,h));this.isGateVariant(f)&&this.drawGateVariantFg(a,0,0,b,c,f,g,h);this.isAngleVariant(f)&&this.drawAngleVariantFg(a,0,0,b,c,f,g,h)};
mxShapePidValve.prototype.drawActuatorBg=function(a,d,e,b,c,f){this.isSquareVariant(f)?(a.translate(.325*b,0),this.drawSquareAct(a,.35*b,.7*c,f),a.translate(.325*-b,0)):f===mxShapePidValve.prototype.cst.MANUAL?(a.translate(.25*b,.15*c),this.drawManAct(a,.5*b,.55*c),a.translate(.25*-b,.15*-c)):f===mxShapePidValve.prototype.cst.DIAPHRAGM?(a.translate(.25*b,.1*c),this.drawDiaphAct(a,.5*b,.6*c),a.translate(.25*-b,.1*-c)):f===mxShapePidValve.prototype.cst.BALANCED_DIAPHRAGM?(a.translate(.25*b,.1*c),this.drawBalDiaphActBg(a,
.5*b,.6*c),a.translate(.25*-b,.1*-c)):f===mxShapePidValve.prototype.cst.MOTOR||f===mxShapePidValve.prototype.cst.ELECTRO_HYDRAULIC?(a.translate(.325*b,0),this.drawCircleAct(a,.35*b,.7*c,f),a.translate(.325*-b,0)):f===mxShapePidValve.prototype.cst.SPRING?(a.translate(.36*b,0),this.drawSpringAct(a,.28*b,.7*c),a.translate(.36*-b,0)):f===mxShapePidValve.prototype.cst.SOLENOID_MANUAL_RESET?(a.translate(.325*b,0),this.drawSolenoidManResetAct(a,.575*b,.7*c),a.translate(.325*-b,0)):f===mxShapePidValve.prototype.cst.SINGLE_ACTING?
(a.translate(.35*b,0),this.drawSingActingActBg(a,.65*b,.7*c),a.translate(.35*-b,0)):f===mxShapePidValve.prototype.cst.DOUBLE_ACTING?(a.translate(.35*b,0),this.drawDblActingActBg(a,.65*b,.7*c),a.translate(.35*-b,0)):f===mxShapePidValve.prototype.cst.PILOT_CYLINDER?(a.translate(.35*b,0),this.drawPilotCylinderActBg(a,.65*b,.7*c),a.translate(.35*-b,0)):f===mxShapePidValve.prototype.cst.ANGLE_BLOWDOWN&&(a.translate(.5*b,.2*c),this.drawAngleBlowdownAct(a,.4*b,.5*c),a.translate(.5*-b,.2*-c))};
mxShapePidValve.prototype.drawActuatorFg=function(a,d,e,b,c,f){if(f===mxShapePidValve.prototype.cst.BALANCED_DIAPHRAGM)a.translate(.25*b,.1*c),this.drawBalDiaphActFg(a,.5*b,.6*c),a.translate(.25*-b,.1*-c);else if(f===mxShapePidValve.prototype.cst.SINGLE_ACTING||f===mxShapePidValve.prototype.cst.DOUBLE_ACTING||f===mxShapePidValve.prototype.cst.PILOT_CYLINDER)a.translate(.35*b,0),this.drawActingActFg(a,.65*b,.7*c),a.translate(.35*-b,0)};
mxShapePidValve.prototype.drawManAct=function(a,d,e){a.begin();a.moveTo(0,0);a.lineTo(d,0);a.moveTo(.5*d,0);a.lineTo(.5*d,e);a.stroke()};mxShapePidValve.prototype.drawDiaphAct=function(a,d,e){a.begin();a.moveTo(.5*d,.2*e);a.lineTo(.5*d,e);a.stroke();a.begin();a.moveTo(0,.2*e);a.arcTo(.6*d,.4*e,0,0,1,d,.2*e);a.close();a.fillAndStroke()};mxShapePidValve.prototype.drawBalDiaphActBg=function(a,d,e){a.ellipse(0,0,d,.3*e);a.fillAndStroke();a.begin();a.moveTo(.5*d,.3*e);a.lineTo(.5*d,e);a.stroke()};
mxShapePidValve.prototype.drawBalDiaphActFg=function(a,d,e){a.begin();a.moveTo(0,.15*e);a.lineTo(d,.15*e);a.stroke()};
mxShapePidValve.prototype.drawCircleAct=function(a,d,e,b){a.ellipse(0,0,d,.5*e);a.fillAndStroke();a.begin();a.moveTo(.5*d,.5*e);a.lineTo(.5*d,e);a.stroke();var c="";b===mxShapePidValve.prototype.cst.MOTOR?c="M":b===mxShapePidValve.prototype.cst.ELECTRO_HYDRAULIC&&(c="E/H");a.setFontStyle(1);a.setFontFamily("Helvetica");a.setFontSize(.4*Math.min(d,e));a.text(.5*d,.25*e,0,0,c,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxShapePidValve.prototype.drawSpringAct=function(a,d,e){a.begin();a.moveTo(.5*d,0);a.lineTo(.5*d,e);a.moveTo(.32*d,.16*e);a.lineTo(.68*d,.08*e);a.moveTo(.21*d,.32*e);a.lineTo(.79*d,.2*e);a.moveTo(.1*d,.52*e);a.lineTo(.9*d,.36*e);a.moveTo(0,.72*e);a.lineTo(d,.5*e);a.stroke()};
mxShapePidValve.prototype.drawSolenoidManResetAct=function(a,d,e){a.rect(0,0,.61*d,.46*e);a.fillAndStroke();a.begin();a.moveTo(.56*d,.6*e);a.lineTo(.78*d,.5*e);a.lineTo(d,.6*e);a.lineTo(.78*d,.7*e);a.close();a.fillAndStroke();a.begin();a.moveTo(.305*d,.46*e);a.lineTo(.305*d,e);a.moveTo(.305*d,.6*e);a.lineTo(.56*d,.6*e);a.stroke();a.setFontStyle(1);a.setFontFamily("Helvetica");a.setFontSize(.4*Math.min(d,e));a.text(.305*d,.23*e,0,0,"S",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);
a.setFontStyle(0);a.setFontSize(.15*Math.min(d,e));a.text(.78*d,.6*e,0,0,"R",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};mxShapePidValve.prototype.drawSingActingActBg=function(a,d,e){a.rect(0,0,.46*d,.46*e);a.fillAndStroke();a.begin();a.moveTo(.23*d,.46*e);a.lineTo(.23*d,e);a.moveTo(.46*d,.23*e);a.lineTo(d,.23*e);a.moveTo(.77*d,.15*e);a.lineTo(.69*d,.31*e);a.moveTo(.82*d,.15*e);a.lineTo(.74*d,.31*e);a.stroke()};
mxShapePidValve.prototype.drawActingActFg=function(a,d,e){a.begin();a.moveTo(.23*d,.23*e);a.lineTo(.23*d,.46*e);a.moveTo(0,.23*e);a.lineTo(.46*d,.23*e);a.stroke()};
mxShapePidValve.prototype.drawDblActingActBg=function(a,d,e){a.rect(0,0,.46*d,.46*e);a.fillAndStroke();a.begin();a.moveTo(.23*d,.46*e);a.lineTo(.23*d,e);a.moveTo(.46*d,.115*e);a.lineTo(d,.115*e);a.moveTo(.77*d,.035*e);a.lineTo(.69*d,.195*e);a.moveTo(.82*d,.035*e);a.lineTo(.74*d,.195*e);a.moveTo(.46*d,.345*e);a.lineTo(d,.345*e);a.moveTo(.77*d,.265*e);a.lineTo(.69*d,.425*e);a.moveTo(.82*d,.265*e);a.lineTo(.74*d,.425*e);a.stroke()};
mxShapePidValve.prototype.drawPilotCylinderActBg=function(a,d,e){a.rect(0,0,.46*d,.46*e);a.fillAndStroke();a.begin();a.moveTo(.23*d,.46*e);a.lineTo(.23*d,e);a.moveTo(.46*d,.23*e);a.lineTo(.77*d,.23*e);a.stroke();a.rect(.77*d,.115*e,.23*d,.23*e);a.fillAndStroke();a.setFontStyle(0);a.setFontFamily("Helvetica");a.setFontSize(.15*Math.min(d,e));a.text(.885*d,.23*e,0,0,"P",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxShapePidValve.prototype.drawAngleBlowdownAct=function(a,d,e){a.begin();a.moveTo(.34*d,0);a.lineTo(d,.405*e);a.moveTo(0,e);a.lineTo(.665*d,.205*e);a.stroke()};
mxShapePidValve.prototype.drawSquareAct=function(a,d,e,b){a.rect(0,0,d,.5*e);a.fillAndStroke();a.begin();a.moveTo(.5*d,.5*e);a.lineTo(.5*d,e);a.stroke();var c="";b===mxShapePidValve.prototype.cst.PILOT?c="P":b===mxShapePidValve.prototype.cst.SOLENOID?c="S":b===mxShapePidValve.prototype.cst.DIGITAL?c="D":b===mxShapePidValve.prototype.cst.WEIGHT?c="W":b===mxShapePidValve.prototype.cst.KEY&&(c="K");a.setFontStyle(1);a.setFontFamily("Helvetica");a.setFontSize(.4*Math.min(d,e));a.text(.5*d,.25*e,0,0,c,
mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
mxShapePidValve.prototype.drawGateVariantFg=function(a,d,e,b,c,f,g,h){mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.DEFAULT_STATE,"open");g=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");var k=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");f===mxShapePidValve.prototype.cst.BALL?(a.ellipse(d+.3*b,e+h+.18*(c-h),.4*b,.64*(c-h)),a.fillAndStroke()):f===mxShapePidValve.prototype.cst.GLOBE?(a.ellipse(d+.3*b,e+h+.18*(c-h),.4*b,.64*(c-h)),a.setFillColor(k),
a.fillAndStroke(),a.setFillColor(g)):f===mxShapePidValve.prototype.cst.PLUG?this.drawPlug(a,d+.4*b,e+h+.25*(c-h),.2*b,.5*(c-h)):f===mxShapePidValve.prototype.cst.NEEDLE?this.drawNeedle(a,d+.45*b,e+h+.1*(c-h),.1*b,.9*(c-h)):f===mxShapePidValve.prototype.cst.SELF_DRAINING&&this.drawDrain(a,d+.48*b,e+h+.5*(c-h),.04*b,.49*(c-h))};
mxShapePidValve.prototype.drawAngleVariantFg=function(a,d,e,b,c,f,g,h){mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.DEFAULT_STATE,"open");d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");f===mxShapePidValve.prototype.cst.ANGLE_GLOBE&&("none"===g?a.ellipse(.34*b,.175*c,.32*b,.4*c):a.ellipse(.34*b,.45*c,.32*b,.2667*c),a.setFillColor(e),a.fillAndStroke(),a.setFillColor(d))};
mxShapePidValve.prototype.drawGateVariantBg=function(a,d,e,b,c,f,g,h){f===mxShapePidValve.prototype.cst.GATE?this.drawGateValve(a,d,e+h,b,c-h):f===mxShapePidValve.prototype.cst.BALL||f===mxShapePidValve.prototype.cst.GLOBE?(a.ellipse(d+.3*b,e+h+.18*(c-h),.4*b,.64*(c-h)),a.fillAndStroke(),this.drawGateValve(a,d,e+h,b,c-h)):f===mxShapePidValve.prototype.cst.PLUG?(this.drawPlug(a,d+.4*b,e+h+.25*(c-h),.2*b,.5*(c-h)),this.drawGateValve(a,d,e+h,b,c-h)):f===mxShapePidValve.prototype.cst.NEEDLE?(this.drawNeedle(a,
d+.45*b,e+h+.1*(c-h),.1*b,.9*(c-h)),this.drawGateValve(a,d,e+h,b,c-h)):f===mxShapePidValve.prototype.cst.SELF_DRAINING&&(this.drawDrain(a,d+.48*b,e+h+.5*(c-h),.04*b,.49*(c-h)),this.drawGateValve(a,d,e+h,b,c-h))};
mxShapePidValve.prototype.drawAngleVariantBg=function(a,d,e,b,c,f,g,h){f===mxShapePidValve.prototype.cst.ANGLE?this.drawAngleValve(a,.2*b,e+h,.8*b,c-h):f===mxShapePidValve.prototype.cst.ANGLE_GLOBE?this.drawAngleGlobeValveBg(a,.2*b,e+h,.8*b,c-h):f===mxShapePidValve.prototype.cst.THREE_WAY?this.drawThreeWayValve(a,0,e+h,b,c-h):f===mxShapePidValve.prototype.cst.ANGLE_BLOWDOWN&&this.drawAngleBlowdownValve(a,d,e+h,b,c-h)};
mxShapePidValve.prototype.drawPlug=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,.5*c);a.lineTo(.5*b,0);a.lineTo(b,.5*c);a.lineTo(.5*b,c);a.close();a.fillAndStroke();a.translate(-d,-e)};
mxShapePidValve.prototype.drawNeedle=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(.5*b,c);a.close();a.setFillColor(g);a.fillAndStroke();a.setFillColor(f);a.translate(-d,-e)};
mxShapePidValve.prototype.drawDrain=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.translate(d,e);a.begin();a.moveTo(.5*b,0);a.lineTo(.5*b,.96*c);a.stroke();a.begin();a.moveTo(0,.9*c);a.lineTo(b,.9*c);a.lineTo(.5*b,c);a.close();a.setFillColor(g);a.fillAndStroke();a.setFillColor(f);a.translate(-d,-e)};
mxShapePidValve.prototype.drawGateValve=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapePidValve.prototype.cst.DEFAULT_STATE,"open"),g=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(.5*b,.5*c);a.lineTo(0,c);a.close();a.moveTo(b,0);a.lineTo(.5*b,.5*c);a.lineTo(b,c);a.close();f===mxShapePidValve.prototype.cst.CLOSED?(a.setFillColor(h),a.fillAndStroke(),
a.setFillColor(g)):a.fillAndStroke();a.translate(-d,-e)};mxShapePidValve.prototype.drawAngleValve=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(.375*b,.375*c);a.lineTo(b,0);a.lineTo(b,.75*c);a.close();a.moveTo(.375*b,.375*c);a.lineTo(.75*b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.translate(-d,-e)};
mxShapePidValve.prototype.drawAngleGlobeValveBg=function(a,d,e,b,c){a.translate(d,e);a.ellipse(.175*b,.175*c,.4*b,.4*c);a.fillAndStroke();a.begin();a.moveTo(.375*b,.375*c);a.lineTo(b,0);a.lineTo(b,.75*c);a.close();a.moveTo(.375*b,.375*c);a.lineTo(.75*b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.translate(-d,-e)};mxShapePidValve.prototype.drawAngleGlobeValveFg=function(a,d,e,b,c){a.translate(d,e);a.ellipse(.275*b,.275*c,.2*b,.2*c);a.fillAndStroke();a.translate(-d,-e)};
mxShapePidValve.prototype.drawThreeWayValve=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(.5*b,.375*c);a.lineTo(0,.75*c);a.close();a.moveTo(b,0);a.lineTo(.5*b,.375*c);a.lineTo(b,.75*c);a.close();a.moveTo(.5*b,.375*c);a.lineTo(.8*b,c);a.lineTo(.2*b,c);a.close();a.fillAndStroke();a.translate(-d,-e)};mxShapePidValve.prototype.drawAngleBlowdownValve=function(a,d,e,b,c){};
mxShapePidValve.prototype.drawButterflyValve=function(a,d,e,b,c,f,g){mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");c-=g;a.translate(d,e+g);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.moveTo(b,0);a.lineTo(b,c);a.moveTo(.05*b,.05*c);a.lineTo(.95*b,.95*c);a.fillAndStroke();a.ellipse(.4*b,.33*c,.2*b,.33*c);a.fillAndStroke();a.translate(-d,-e)};
mxShapePidValve.prototype.drawCheckValve=function(a,d,e,b,c,f,g){f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");var h=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");c-=g;a.translate(d,e+g);a.begin();a.moveTo(0,0);a.lineTo(0,c);a.moveTo(b,0);a.lineTo(b,c);a.moveTo(.05*b,.05*c);a.lineTo(.95*b,.95*c);a.fillAndStroke();a.begin();a.moveTo(.8925*b,.815*c);a.lineTo(.957*b,.955*c);a.lineTo(.85*b,.928*c);a.close();a.setFillColor(h);a.fillAndStroke();a.setFillColor(f);
a.translate(-d,-e)};mxShapePidValve.prototype.isGateVariant=function(a){return a===mxShapePidValve.prototype.cst.GATE||a===mxShapePidValve.prototype.cst.BALL||a===mxShapePidValve.prototype.cst.PLUG||a===mxShapePidValve.prototype.cst.NEEDLE||a===mxShapePidValve.prototype.cst.SELF_DRAINING||a===mxShapePidValve.prototype.cst.GLOBE?!0:!1};
mxShapePidValve.prototype.isAngleVariant=function(a){return a===mxShapePidValve.prototype.cst.ANGLE||a===mxShapePidValve.prototype.cst.ANGLE_GLOBE||a===mxShapePidValve.prototype.cst.THREE_WAY||a===mxShapePidValve.prototype.cst.ANGLE_BLOWDOWN?!0:!1};
mxShapePidValve.prototype.isSquareVariant=function(a){return a===mxShapePidValve.prototype.cst.PILOT||a===mxShapePidValve.prototype.cst.SOLENOID||a===mxShapePidValve.prototype.cst.POWERED||a===mxShapePidValve.prototype.cst.DIGITAL||a===mxShapePidValve.prototype.cst.WEIGHT||a===mxShapePidValve.prototype.cst.KEY?!0:!1};mxCellRenderer.registerShape(mxShapePidValve.prototype.cst.SHAPE_VALVE,mxShapePidValve);
function mxShapePidIntBlockBleedValve(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidIntBlockBleedValve,mxShapePidValve);
mxShapePidIntBlockBleedValve.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxShapePidIntBlockBleedValve.prototype.cst.ACTUATOR,mxShapePidIntBlockBleedValve.prototype.cst.NONE),g=0;"none"!==f&&(g=.2353*c);a.translate(d,e);a.setLineJoin("round");this.background(a,d,e,b,c,f,g);a.setShadow(!1);this.foreground(a,d,e,b,c,f,g)};
mxShapePidIntBlockBleedValve.prototype.background=function(a,d,e,b,c,f,g){f!==mxShapePidIntBlockBleedValve.prototype.cst.NONE&&this.drawActuatorBg(a,d,e,b,c,f);this.drawValveBg(a,0,g,b,c-g)};mxShapePidIntBlockBleedValve.prototype.foreground=function(a,d,e,b,c,f,g){f!==mxShapePidIntBlockBleedValve.prototype.cst.NONE&&this.drawActuatorFg(a,d,e,b,c,f)};
mxShapePidIntBlockBleedValve.prototype.drawValveBg=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(.5*b,.23*c);a.lineTo(0,.46*c);a.close();a.moveTo(.5*b,.23*c);a.lineTo(b,0);a.lineTo(b,.46*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.5*b,.23*c);a.lineTo(.5*b,.5*c);a.stroke();a.setFillColor(g);a.begin();a.moveTo(.3*b,.5*c);a.lineTo(.7*
b,.5*c);a.lineTo(.5*b,.75*c);a.close();a.fillAndStroke();a.begin();a.moveTo(.3*b,c);a.lineTo(.5*b,.75*c);a.lineTo(.7*b,c);a.fillAndStroke();a.setFillColor(f);a.translate(-d,-e)};
mxShapePidIntBlockBleedValve.prototype.drawActuatorBg=function(a,d,e,b,c,f){this.isSquareVariant(f)?(a.translate(.325*b,0),this.drawSquareAct(a,.35*b,.4112*c,f),a.translate(.325*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.MANUAL?(a.translate(.25*b,.0882*c),this.drawManAct(a,.5*b,.323*c),a.translate(.25*-b,.0882*-c)):f===mxShapePidIntBlockBleedValve.prototype.cst.DIAPHRAGM?(a.translate(.25*b,.0588*c),this.drawDiaphAct(a,.5*b,.3524*c),a.translate(.25*-b,.0588*-c)):f===mxShapePidIntBlockBleedValve.prototype.cst.BALANCED_DIAPHRAGM?
(a.translate(.25*b,.0588*c),this.drawBalDiaphActBg(a,.5*b,.3524*c),a.translate(.25*-b,.0588*-c)):f===mxShapePidIntBlockBleedValve.prototype.cst.MOTOR||f===mxShapePidIntBlockBleedValve.prototype.cst.ELECTRO_HYDRAULIC?(a.translate(.325*b,0),this.drawCircleAct(a,.35*b,.4112*c,f),a.translate(.325*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.SPRING?(a.translate(.36*b,0),this.drawSpringAct(a,.28*b,.4112*c),a.translate(.36*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.SOLENOID_MANUAL_RESET?
(a.translate(.325*b,0),this.drawSolenoidManResetAct(a,.575*b,.4112*c),a.translate(.325*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.SINGLE_ACTING?(a.translate(.35*b,0),this.drawSingActingActBg(a,.65*b,.4112*c),a.translate(.35*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.DOUBLE_ACTING?(a.translate(.35*b,0),this.drawDblActingActBg(a,.65*b,.4112*c),a.translate(.35*-b,0)):f===mxShapePidIntBlockBleedValve.prototype.cst.PILOT_CYLINDER&&(a.translate(.35*b,0),this.drawPilotCylinderActBg(a,
.65*b,.4112*c),a.translate(.35*-b,0))};
mxShapePidIntBlockBleedValve.prototype.drawActuatorFg=function(a,d,e,b,c,f){if(f===mxShapePidIntBlockBleedValve.prototype.cst.BALANCED_DIAPHRAGM)a.translate(.25*b,.0588*c),this.drawBalDiaphActFg(a,.5*b,.3524*c),a.translate(.25*-b,.0588*-c);else if(f===mxShapePidIntBlockBleedValve.prototype.cst.SINGLE_ACTING||f===mxShapePidIntBlockBleedValve.prototype.cst.DOUBLE_ACTING||f===mxShapePidIntBlockBleedValve.prototype.cst.PILOT_CYLINDER)a.translate(.35*b,0),this.drawActingActFg(a,.65*b,.4112*c),a.translate(.35*
-b,0)};mxCellRenderer.registerShape("mxgraph.pid2valves.blockBleedValve",mxShapePidIntBlockBleedValve);function mxShapePidAutoRecircValve(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapePidAutoRecircValve,mxShape);
mxShapePidAutoRecircValve.prototype.paintVertexShape=function(a,d,e,b,c){a.setLineJoin("round");a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.08*b,.08*c);a.lineTo(.08*b,.92*c);a.moveTo(.92*b,.08*c);a.lineTo(.92*b,.92*c);a.moveTo(.12*b,.122*c);a.lineTo(.8738*b,.8837*c);a.moveTo(.5*b,0);a.lineTo(.55*b,.05*c);a.lineTo(.45*b,.15*c);a.lineTo(.55*b,.25*c);a.lineTo(.45*b,.35*c);a.lineTo(.55*b,.45*c);a.lineTo(.49*b,.5*c);a.stroke();d=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,
"#ffffff");e=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");a.begin();a.moveTo(.8257*b,.7695*c);a.lineTo(.8797*b,.888*c);a.lineTo(.79*b,.8651*c);a.close();a.setFillColor(e);a.fillAndStroke();a.setFillColor(d)};mxCellRenderer.registerShape("mxgraph.pid2valves.autoRecircValve",mxShapePidAutoRecircValve);function mxRackContainer(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackContainer,mxShape);
mxRackContainer.prototype.unitSize=20;mxRackContainer.prototype.cst={SHAPE_RACK_CONTAINER:"mxgraph.rackGeneral.container",TEXT_COLOR:"textColor",NUMBER_DISPLAY:"numDisp",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend"};
mxRackContainer.prototype.customProperties=[{name:"fillColor2",dispName:"Cabinet Color",type:"color"},{name:"textColor",dispName:"Numbers Color",type:"color"},{name:"numDisp",dispName:"Display Numbers",type:"enum",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}},{name:"rackUnitSize",dispName:"Unit size",type:"int"}];
mxRackContainer.prototype.paintVertexShape=function(a,d,e,b,c){var f=mxUtils.getValue(this.style,mxRackContainer.prototype.cst.NUMBER_DISPLAY,mxRackContainer.prototype.cst.DIR_ASC),g=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.getValue(this.style,"fillColor2","#f4f4f4");f!==mxRackContainer.prototype.cst.OFF?(a.translate(d+24,e),b=Math.max(b-24,0)):a.translate(d,e);a.setFillColor(g);this.background(a,b,c,12);a.setShadow(!1);a.setFillColor(h);this.foreground(a,b,c,12);
f!==mxRackContainer.prototype.cst.OFF&&42<b&&this.sideText(a,b,c,12)};mxRackContainer.prototype.background=function(a,d,e,b){a.rect(0,0,d,e);a.fillAndStroke()};
mxRackContainer.prototype.foreground=function(a,d,e,b){d>18+2*b&&42<e&&(a.rect(0,0,d,21),a.fillAndStroke(),a.rect(0,e-21,d,21),a.fillAndStroke(),a.rect(0,21,9,e-42),a.fillAndStroke(),a.rect(d-9,21,9,e-42),a.fillAndStroke(),a.ellipse(2.5,7.5,6,6),a.stroke(),a.ellipse(d-8.5,7.5,6,6),a.stroke(),a.ellipse(2.5,e-13.5,6,6),a.stroke(),a.ellipse(d-8.5,e-13.5,6,6),a.stroke())};
mxRackContainer.prototype.sideText=function(a,d,e,b){var c=mxUtils.getValue(this.style,mxRackContainer.prototype.cst.TEXT_COLOR,"#666666");d=mxUtils.getValue(this.style,mxRackContainer.prototype.cst.NUMBER_DISPLAY,mxRackContainer.prototype.cst.DIR_ASC);var f=parseFloat(mxUtils.getValue(this.style,"rackUnitSize",mxRackContainer.prototype.unitSize));this.unitSize=f;a.setFontSize(b);a.setFontColor(c);e=Math.floor((Math.abs(e)-42)/f);for(c=0;c<e;c++)a.text(-b,21+.5*f+c*f,0,0,d===mxRackContainer.prototype.cst.DIR_DESC?
(c+1).toString():(e-c).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.begin();for(c=0;c<e+1;c++)a.moveTo(-2*b,21+c*f),a.lineTo(0,21+c*f);a.stroke()};function mxRackPlate(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=1}mxUtils.extend(mxRackPlate,mxShape);mxRackPlate.prototype.cst={SHAPE_RACK_PLATE:"mxgraph.rackGeneral.plate"};
mxRackPlate.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackPlate.prototype.background=function(a,d,e){a.begin();a.rect(0,0,d,e);a.fillAndStroke()};mxRackPlate.prototype.foreground=function(a,d,e){18<d&&(a.save(),a.setFillColor("#000000"),a.setAlpha(.23),a.rect(0,0,9,e),a.fill(),a.rect(d-9,0,9,e),a.fill(),a.restore(),a.rect(0,0,d,e),a.stroke(),a.rect(9,0,d-18,e),a.stroke())};
function mxRackHorCableDuct(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct,mxShape);mxRackHorCableDuct.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT:"mxgraph.rackGeneral.horCableDuct"};mxRackHorCableDuct.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxRackHorCableDuct.prototype.foreground=function(a,d,e){e=Math.floor((d-20)/33);d=10+Math.floor((d-20-33*e)/2);if(0<e)for(var b=0;b<=e;b++)a.rect(d,0,3,7),a.stroke(),a.rect(d,7,3,7.8),a.stroke(),d+=33};function mxRackHorRoutingBank(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorRoutingBank,mxShape);mxRackHorRoutingBank.prototype.cst={SHAPE_RACK_HOR_ROUTING_BANK:"mxgraph.rackGeneral.horRoutingBank"};
mxRackHorRoutingBank.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorRoutingBank.prototype.background=function(a,d,e){a.rect(0,0,d,e);a.fillAndStroke()};
mxRackHorRoutingBank.prototype.foreground=function(a,d,e){var b=Math.floor((d-20-16)/22);e=Math.floor(e/mxRackContainer.unitSize);if(0<b&&0<e)for(var c=0;c<e;c++)for(var f=18+Math.floor((d-20-16-22*b)/2)-8,g=0;g<=b;g++)a.rect(f,4+c*mxRackContainer.unitSize,16,6.8),a.stroke(),f+=22};function mxRackNeatPatch(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackNeatPatch,mxShape);mxRackNeatPatch.prototype.cst={SHAPE_RACK_NEAT_PATCH:"mxgraph.rackGeneral.neatPatch"};
mxRackNeatPatch.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.mainText(a,b,c)};mxRackNeatPatch.prototype.background=function(a,d,e){a.setFillColor("#666666");a.rect(0,0,d,e);a.fillAndStroke()};mxRackNeatPatch.prototype.mainText=function(a,d,e){a.setFontSize("12");a.setFontColor("#ffffff");a.setFontStyle(mxConstants.FONT_BOLD);a.text(d/2,e-6,0,0,"NEAT-PATCH",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};
function mxRackShelf(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackShelf,mxShape);mxRackShelf.prototype.cst={SHAPE_RACK_SHELF:"mxgraph.rackGeneral.shelf"};mxRackShelf.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c)};mxRackShelf.prototype.background=function(a,d,e){a.setStrokeWidth(2);a.begin();a.moveTo(1,0);a.lineTo(1,e-1);a.lineTo(d-1,e-1);a.lineTo(d-1,1);a.fillAndStroke()};
function mxRackRackNumbering(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackNumbering,mxShape);mxRackRackNumbering.prototype.cst={SHAPE_RACK_RACK_NUMBERING:"mxgraph.rackGeneral.rackNumbering",UNIT_NUM:"unitNum",UNIT_HEIGHT:"unitHeight",TEXT_COLOR:"textColor",NUM_DIR:"numDir",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
mxRackRackNumbering.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackNumbering.prototype.cst.UNIT_NUM,"42")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackNumbering.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackNumbering.prototype.cst.TEXT_SIZE,"12"));a.translate(d,e);c=f*g;this.background(a,b,c,h);a.setShadow(!1);this.sideText(a,b,c,f,g,h)};
mxRackRackNumbering.prototype.background=function(a,d,e,b){a.rect(3*b,0,160.9,e);a.fillAndStroke()};
mxRackRackNumbering.prototype.sideText=function(a,d,e,b,c,f){d=mxUtils.getValue(this.style,mxRackRackNumbering.prototype.cst.TEXT_COLOR,"#666666");var g=mxUtils.getValue(this.style,mxRackRackNumbering.prototype.cst.NUM_DIR,mxRackRackNumbering.prototype.cst.DIR_DESC);a.setFontSize(f);a.setFontColor(d);if(g===mxRackRackNumbering.prototype.cst.DIR_ASC)for(d=0;d<b;d++)a.text(f,.5*c+d*c,0,0,(d+1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else for(d=0;d<b;d++)a.text(f,e-
.5*c-d*c,0,0,(d+1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor("#dddddd");a.begin();for(d=0;d<b+1;d++)a.moveTo(0,d*c),a.lineTo(3*f,d*c);a.stroke()};function mxRackRackCabinet(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet,mxShape);
mxRackRackCabinet.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet",UNIT_NUM:"unitNum",UNIT_HEIGHT:"unitHeight",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
mxRackRackCabinet.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"unitHeight",dispName:"Unit height",type:"float",defVal:14.8},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",
dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
mxRackRackCabinet.prototype.paintVertexShape=function(a,d,e,b,c){b=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.UNIT_NUM,"12"));var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.UNIT_HEIGHT,"14.8")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_SIZE,"12")),h=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet.prototype.cst.ON);h!==mxRackRackCabinet.prototype.cst.OFF?a.translate(d+
2*g,e):a.translate(d,e);c=b*f+42;this.background(a,c);a.setShadow(!1);this.foreground(a,c);h!==mxRackRackCabinet.prototype.cst.OFF&&this.sideText(a,c,b,f,g,h)};mxRackRackCabinet.prototype.background=function(a,d){a.setFillColor("#ffffff");a.rect(0,0,180,d);a.fillAndStroke()};
mxRackRackCabinet.prototype.foreground=function(a,d){a.setFillColor("#f4f4f4");a.rect(0,0,180,21);a.fillAndStroke();a.rect(0,d-21,180,21);a.fillAndStroke();a.rect(0,21,9,d-42);a.fillAndStroke();a.rect(171,21,9,d-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(171.5,7.5,6,6);a.stroke();a.ellipse(2.5,d-13.5,6,6);a.stroke();a.ellipse(171.5,d-13.5,6,6);a.stroke()};
mxRackRackCabinet.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet.prototype.cst.DIR_DESC||f===mxRackRackCabinet.prototype.cst.DIR_ON)for(f=0;f<
e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet2,mxShape);
mxRackRackCabinet2.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet2",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
mxRackRackCabinet2.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
mxRackRackCabinet2.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_NUM,"12")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet2.prototype.cst.ON);k!==mxRackRackCabinet2.prototype.cst.OFF?
(a.translate(d+2*h,e),b-=2*h):a.translate(d,e);c=f*g+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet2.prototype.cst.OFF&&this.sideText(a,c,f,g,h,k)};mxRackRackCabinet2.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
mxRackRackCabinet2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
mxRackRackCabinet2.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet2.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet2.prototype.cst.DIR_DESC||f===mxRackRackCabinet2.prototype.cst.DIR_ON)for(f=
0;f<e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet3(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet3,mxShape);
mxRackRackCabinet3.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet3",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",UNIT_DIR_LEFT:"rackUnitDirLeft",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
mxRackRackCabinet3.prototype.customProperties=[{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitDirLeft",dispName:"Numbering on left",type:"boolean",defVal:!0},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
mxRackRackCabinet3.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet3.prototype.cst.UNIT_HEIGHT,"14.8")),g=Math.round((c-42)/f),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet3.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet3.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet3.prototype.cst.ON),l=mxUtils.getValue(this.style,mxRackRackCabinet3.prototype.cst.UNIT_DIR_LEFT,!0);k!==mxRackRackCabinet3.prototype.cst.OFF?
(l?a.translate(d+2*h,e):a.translate(d,e),b-=2*h):a.translate(d,e);c=g*f+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet3.prototype.cst.OFF&&this.sideText(a,c,b,g,f,h,k,l)};mxRackRackCabinet3.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
mxRackRackCabinet3.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
mxRackRackCabinet3.prototype.sideText=function(a,d,e,b,c,f,g,h){var k=mxUtils.getValue(this.style,mxRackRackCabinet3.prototype.cst.TEXT_COLOR,"#666666"),l=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(f);a.setFontColor(k);var m=0;h||(m=e+2*f);if(g===mxRackRackCabinet3.prototype.cst.DIR_ASC)for(e=0;e<b;e++)a.text(m-f,21+.5*c+e*c,0,0,(e+l).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(g===mxRackRackCabinet3.prototype.cst.DIR_DESC||g===mxRackRackCabinet3.prototype.cst.DIR_ON)for(e=
0;e<b;e++)a.text(m-f,d-21-.5*c-e*c,0,0,(e+l).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(k);a.begin();for(e=0;e<b+1;e++)a.moveTo(m-2*f,21+e*c),a.lineTo(m,21+e*c);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
mxRackHorCableDuct1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorCableDuct1U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,7.8);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,7.8);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,7.8);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,7.8);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,7.8);a.stroke()};function mxRackHorCableDuct2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorCableDuct2U,mxShape);mxRackHorCableDuct2U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_2U:"mxgraph.rackGeneral.horCableDuct2U"};mxRackHorCableDuct2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
mxRackHorCableDuct2U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,22.6);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,22.6);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,22.6);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,22.6);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,22.6);a.stroke()};function mxRackHorRoutingBank1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorRoutingBank1U,mxShape);mxRackHorRoutingBank1U.prototype.cst={SHAPE_RACK_HOR_ROUTING_BANK_1U:"mxgraph.rackGeneral.horRoutingBank1U"};mxRackHorRoutingBank1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorRoutingBank1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorRoutingBank1U.prototype.foreground=function(a,d,e){a.rect(10,4,17,6.8);a.stroke();a.rect(31,4,17,6.8);a.stroke();a.rect(52,4,17,6.8);a.stroke();a.rect(73,4,17,6.8);a.stroke();a.rect(94,4,17,6.8);a.stroke();a.rect(115,4,17,6.8);a.stroke();a.rect(136,4,17,6.8);a.stroke()};function mxRackHorRoutingBank2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorRoutingBank2U,mxShape);mxRackHorRoutingBank2U.prototype.cst={SHAPE_RACK_HOR_ROUTING_BANK_2U:"mxgraph.rackGeneral.horRoutingBank2U"};
mxRackHorRoutingBank2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorRoutingBank2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
mxRackHorRoutingBank2U.prototype.foreground=function(a,d,e){a.rect(10,4,17,6.8);a.stroke();a.rect(31,4,17,6.8);a.stroke();a.rect(52,4,17,6.8);a.stroke();a.rect(73,4,17,6.8);a.stroke();a.rect(94,4,17,6.8);a.stroke();a.rect(115,4,17,6.8);a.stroke();a.rect(136,4,17,6.8);a.stroke();a.rect(10,18.8,17,6.8);a.stroke();a.rect(31,18.8,17,6.8);a.stroke();a.rect(52,18.8,17,6.8);a.stroke();a.rect(73,18.8,17,6.8);a.stroke();a.rect(94,18.8,17,6.8);a.stroke();a.rect(115,18.8,17,6.8);a.stroke();a.rect(136,18.8,17,
6.8);a.stroke()};function mxRackNeatPatch2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackNeatPatch2U,mxShape);mxRackNeatPatch2U.prototype.cst={SHAPE_RACK_NEAT_PATCH_2U:"mxgraph.rackGeneral.neatPatch2U"};mxRackNeatPatch2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.mainText(a,b,c)};
mxRackNeatPatch2U.prototype.background=function(a,d,e){a.setFillColor("#666666");a.rect(0,0,160.9,29.6);a.fillAndStroke()};mxRackNeatPatch2U.prototype.mainText=function(a,d,e){a.setFontSize("12");a.setFontColor("#ffffff");a.setFontStyle(mxConstants.FONT_BOLD);a.text(80.45,24,0,0,"NEAT-PATCH",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)};function mxRackShelf1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackShelf1U,mxShape);mxRackShelf1U.prototype.cst={SHAPE_RACK_SHELF_1U:"mxgraph.rackGeneral.shelf1U"};mxRackShelf1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c)};mxRackShelf1U.prototype.background=function(a,d,e){a.setStrokeWidth(2);a.begin();a.moveTo(0,0);a.lineTo(0,14.8);a.lineTo(160.9,14.8);a.lineTo(160.9,0);a.fillAndStroke()};
function mxRackShelf2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackShelf2U,mxShape);mxRackShelf2U.prototype.cst={SHAPE_RACK_SHELF_2U:"mxgraph.rackGeneral.shelf2U"};mxRackShelf2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c)};mxRackShelf2U.prototype.background=function(a,d,e){a.setStrokeWidth(2);a.begin();a.moveTo(0,0);a.lineTo(0,29.6);a.lineTo(160.9,29.6);a.lineTo(160.9,0);a.fillAndStroke()};
function mxRackShelf4U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackShelf4U,mxShape);mxRackShelf4U.prototype.cst={SHAPE_RACK_SHELF_4U:"mxgraph.rackGeneral.shelf4U"};mxRackShelf4U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c)};mxRackShelf4U.prototype.background=function(a,d,e){a.setStrokeWidth(2);a.begin();a.moveTo(0,0);a.lineTo(0,59.2);a.lineTo(160.9,59.2);a.lineTo(160.9,0);a.fillAndStroke()};
function mxRackChannelBase(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackChannelBase,mxShape);mxRackChannelBase.prototype.cst={SHAPE_RACK_CHANNEL_BASE:"mxgraph.rackGeneral.channelBase"};mxRackChannelBase.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};
mxRackChannelBase.prototype.background=function(a,d,e){a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke();a.rect(0,0,d,e-5);a.fillAndStroke()};mxRackChannelBase.prototype.foreground=function(a,d,e){a.setFillColor("#000000");a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke()};function mxRackCabinetLeg(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackCabinetLeg,mxShape);
mxRackCabinetLeg.prototype.cst={SHAPE_RACK_CABINET_LEG:"mxgraph.rackGeneral.cabinetLeg"};mxRackCabinetLeg.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c)};
mxRackCabinetLeg.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e-10);a.lineTo(5,e-10);a.lineTo(5,e-12);a.lineTo(9,e-12);a.lineTo(9,e-10);a.lineTo(d-10,e-10);a.lineTo(d-10,9);a.lineTo(d-12,9);a.lineTo(d-12,5);a.lineTo(d-10,5);a.lineTo(d-10,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxRackRackCabinet3.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet3);
mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER,mxRackContainer);mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet2);mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);
mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);
mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);
mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);
mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
mxStencilRegistry.allowEval = false;
(function()
{
try
{
if (Editor.enableServiceWorker)
{
navigator.serviceWorker.register('/service-worker.js');
}
}
catch (e)
{
if (window.console != null)
{
console.error(e);
}
}
})();
(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();