diff --git a/ChangeLog b/ChangeLog index 29fc6b930..905172b37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +02-MAR-2024: 24.0.1 + +- Updates DOMPurify from 3.0.8 to 3.0.9 +- Adds contrast URL parameter [drawio-3701] +- Fixes preview of SVG export with embedded fonts +- [conf cloud] Adds migration support for pageInfo parameter, templateUrl to re-indexing, improves tinyUrl parsing regex +- [conf cloud] Adds support for templateUrl with pageInfo in viewer +- [conf cloud] Shows custom contents based on macros in the page instead of page custom contents (easier deletion and no re-indexing) + 29-FEB-2024: 24.0.0 - Adds shape shadow style option [drawio-1671] diff --git a/VERSION b/VERSION index 942bb7eac..517a3f076 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.0.0 \ No newline at end of file +24.0.1 \ No newline at end of file diff --git a/etc/dependencies/package.json b/etc/dependencies/package.json index e7b738ff7..1f7298243 100644 --- a/etc/dependencies/package.json +++ b/etc/dependencies/package.json @@ -15,7 +15,7 @@ "mermaid": "10.0.2", "pako": "2.1.0", "crypto-js": "3.1.2", - "dompurify": "3.0.8", + "dompurify": "3.0.9", "spin.js": "2.0.0", "roughjs": "4.4.1", "mathjax": "3.2.2", diff --git a/src/main/mxgraph/util/mxSvgCanvas2D.js b/src/main/mxgraph/util/mxSvgCanvas2D.js index 49a199bce..47526ff30 100644 --- a/src/main/mxgraph/util/mxSvgCanvas2D.js +++ b/src/main/mxgraph/util/mxSvgCanvas2D.js @@ -1160,7 +1160,7 @@ mxSvgCanvas2D.prototype.createDashPattern = function(scale) { for (var i = 0; i < dash.length; i++) { - pat[i] = Number(dash[i]) * scale; + pat[i] = Math.round(Number(dash[i]) * scale * 100) / 100; } } } diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 5a26ac9a5..cf837fbf8 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -1,7 +1,7 @@ //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',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>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:p;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 S(e){for(let t=0;t/gm),z=a(/\${[\w\W]*}/gm),B=a(/^data-[\-\w.\u00B7-\uFFFF]/),W=a(/^aria-[\-\w]+$/),G=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=a(/^(?:\w+script|data):/i),j=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i);var X=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:H,TMPLIT_EXPR:z,DATA_ATTR:B,ARIA_ATTR:W,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:j,DOCTYPE_NAME:q});const K=function(){return"undefined"==typeof window?null:window},V=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}};var $=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.0.8",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:_,Node:b,Element:S,NodeFilter:F,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:B,trustedTypes:W}=n,Y=S.prototype,j=w(Y,"cloneNode"),$=w(Y,"nextSibling"),Z=w(Y,"childNodes"),J=w(Y,"parentNode");if("function"==typeof _){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ie}=a;let ae={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:pe}=X;let{IS_ALLOWED_URI:de}=X,he=null;const ge=N({},[...D,...L,...v,...k,...O]);let Te=null;const ye=N({},[...I,...M,...U,...P]);let Ee=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}})),Ae=null,_e=null,be=!0,Ne=!0,Se=!1,Re=!0,we=!1,De=!1,Le=!1,ve=!1,xe=!1,ke=!1,Ce=!1,Oe=!0,Ie=!1;const Me="user-content-";let Ue=!0,Pe=!1,Fe={},He=null;const ze=N({},["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 Be=null;const We=N({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ke=Xe,Ve=!1,$e=null;const Ze=N({},[je,qe,Xe],d);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=R(e),Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?d:p,he="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,tt):ge,Te="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,tt):ye,$e="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):Ze,Ge="ADD_URI_SAFE_ATTR"in e?N(R(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,Be="ADD_DATA_URI_TAGS"in e?N(R(We),e.ADD_DATA_URI_TAGS,tt):We,He="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,tt):ze,Ae="FORBID_TAGS"in e?N({},e.FORBID_TAGS,tt):{},_e="FORBID_ATTR"in e?N({},e.FORBID_ATTR,tt):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,be=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,we=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ie=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||G,Ke=e.NAMESPACE||Xe,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(Ne=!1),ke&&(xe=!0),Fe&&(he=N({},O),Te=[],!0===Fe.html&&(N(he,D),N(Te,I)),!0===Fe.svg&&(N(he,L),N(Te,M),N(Te,P)),!0===Fe.svgFilters&&(N(he,v),N(Te,M),N(Te,P)),!0===Fe.mathMl&&(N(he,k),N(Te,U),N(Te,P))),e.ADD_TAGS&&(he===ge&&(he=R(he)),N(he,e.ADD_TAGS,tt)),e.ADD_ATTR&&(Te===ye&&(Te=R(Te)),N(Te,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&N(Ge,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(He===ze&&(He=R(He)),N(He,e.FORBID_CONTENTS,tt)),Ue&&(he["#text"]=!0),De&&N(he,["html","head","body"]),he.table&&(N(he,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=V(W,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},at=N({},["mi","mo","mn","ms","mtext"]),lt=N({},["foreignobject","desc","title","annotation-xml"]),ct=N({},["title","style","font","a","script"]),st=N({},[...L,...v,...x]),ut=N({},[...k,...C]),mt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!$e[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===je?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(st[n]):e.namespaceURI===je?t.namespaceURI===Xe?"math"===n:t.namespaceURI===qe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===Xe?!(t.namespaceURI===qe&&!lt[o])&&(!(t.namespaceURI===je&&!at[o])&&(!ut[n]&&(ct[n]||!st[n]))):!("application/xhtml+xml"!==Je||!$e[e.namespaceURI]))},ft=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=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&&!Te[e])if(xe||ke)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(ve)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Je&&Ke===Xe&&(e=''+e+"");const o=Q?Q.createHTML(e):e;if(Ke===Xe)try{t=(new B).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ke===Xe?re.call(t,De?"html":"body")[0]:De?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null)},gt=function(e){return e instanceof z&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(e){return"function"==typeof b&&e instanceof b},yt=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(o,t,n,nt)}))},Et=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ft(e),!0;const n=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:n,allowedTags:he}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ft(e),!0;if(!he[n]||Ae[n]){if(!Ae[n]&&_t(n)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))return!1}if(Ue&&!He[n]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(j(n[o],!0),$(e))}}return ft(e),!0}return e instanceof S&&!mt(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(we&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ft(e),!0)},At=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Ne&&!_e[t]&&E(ue,t));else if(be&&E(me,t));else if(!Te[t]||_e[t]){if(!(_t(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Ge[t]);else if(E(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Be[e]){if(Se&&!E(fe,g(n,pe,"")));else if(n)return!1}else;return!0},_t=function(e){return e.indexOf("-")>0},bt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=tt(a);let f="value"===a?c:y(c);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(pt(a,e),!n.keepAttr)continue;if(!Re&&E(/\/>/i,f)){pt(a,e);continue}we&&u([le,ce,se],(e=>{f=g(f,e," ")}));const p=tt(e.nodeName);if(At(p,s,f)){if(!Ie||"id"!==s&&"name"!==s||(pt(a,e),f=Me+f),Q&&"object"==typeof W&&"function"==typeof W.getAttributeType)if(l);else switch(W.getAttributeType(p,s)){case"TrustedHTML":f=Q.createHTML(f);break;case"TrustedScriptURL":f=Q.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),m(o.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},Nt=function e(t){let n=null;const o=ht(t);for(yt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)yt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof s&&e(n.content),bt(n));yt("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(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Tt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Le||it(t),o.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||Ae[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!xe&&!we&&!De&&-1===e.indexOf("<"))return Q&&Ce?Q.createHTML(e):e;if(n=dt(e),!n)return xe?null:Ce?ee:""}n&&ve&&ft(n.firstChild);const c=ht(Pe?e:n);for(;i=c.nextNode();)Et(i)||(i.content instanceof s&&Nt(i.content),bt(i));if(Pe)return e;if(xe){if(ke)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Te.shadowroot||Te.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let m=De?n.outerHTML:n.innerHTML;return De&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(q,n.ownerDocument.doctype.name)&&(m="\n"+m),we&&u([le,ce,se],(e=>{m=g(m,e," ")})),Q&&Ce?Q.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};it(e),Le=!0},o.clearConfig=function(){nt=null,Le=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return At(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],f(ae[e],t))},o.removeHook=function(e){if(ae[e])return m(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}();return $})); +/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/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=N(Array.prototype.forEach),m=N(Array.prototype.pop),f=N(Array.prototype.push),p=N(String.prototype.toLowerCase),d=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),T=N(String.prototype.indexOf),y=N(String.prototype.trim),E=N(Object.prototype.hasOwnProperty),A=N(RegExp.prototype.test),_=(b=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:p;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 R(e){for(let t=0;t/gm),B=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),q=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=a(/^html$/i);var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:B,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:q,DOCTYPE_NAME:X});const V=function(){return"undefined"==typeof window?null:window},$=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}};var Z=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V();const o=e=>t(e);if(o.version="3.0.9",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:b,Node:N,Element:R,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,q=D(j,"cloneNode"),Z=D(j,"nextSibling"),J=D(j,"childNodes"),Q=D(j,"parentNode");if("function"==typeof b){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:ae}=a;let le={};o.isSupported="function"==typeof e&&"function"==typeof Q&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:ue,DATA_ATTR:me,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de}=K;let{IS_ALLOWED_URI:he}=K,ge=null;const Te=S({},[...L,...x,...v,...k,...I]);let ye=null;const Ee=S({},[...M,...U,...P,...F]);let Ae=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}})),_e=null,be=null,Ne=!0,Se=!0,Re=!1,we=!0,De=!1,Le=!1,xe=!1,ve=!1,Ce=!1,ke=!1,Oe=!1,Ie=!0,Me=!1;const Ue="user-content-";let Pe=!0,Fe=!1,He={},ze=null;const Be=S({},["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 We=null;const Ge=S({},["audio","video","img","source","image","track"]);let Ye=null;const je=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Ve=Ke,$e=!1,Ze=null;const Je=S({},[qe,Xe,Ke],d);let Qe=null;const et=["application/xhtml+xml","text/html"],tt="text/html";let nt=null,ot=null;const rt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ot||ot!==e){if(e&&"object"==typeof e||(e={}),e=w(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,nt="application/xhtml+xml"===Qe?d:p,ge=E(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,nt):Te,ye=E(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,nt):Ee,Ze=E(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,d):Je,Ye=E(e,"ADD_URI_SAFE_ATTR")?S(w(je),e.ADD_URI_SAFE_ATTR,nt):je,We=E(e,"ADD_DATA_URI_TAGS")?S(w(Ge),e.ADD_DATA_URI_TAGS,nt):Ge,ze=E(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,nt):Be,_e=E(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,nt):{},be=E(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,nt):{},He=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Ie=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||Y,Ve=e.NAMESPACE||Ke,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Se=!1),ke&&(Ce=!0),He&&(ge=S({},I),ye=[],!0===He.html&&(S(ge,L),S(ye,M)),!0===He.svg&&(S(ge,x),S(ye,U),S(ye,F)),!0===He.svgFilters&&(S(ge,v),S(ye,U),S(ye,F)),!0===He.mathMl&&(S(ge,k),S(ye,P),S(ye,F))),e.ADD_TAGS&&(ge===Te&&(ge=w(ge)),S(ge,e.ADD_TAGS,nt)),e.ADD_ATTR&&(ye===Ee&&(ye=w(ye)),S(ye,e.ADD_ATTR,nt)),e.ADD_URI_SAFE_ATTR&&S(Ye,e.ADD_URI_SAFE_ATTR,nt),e.FORBID_CONTENTS&&(ze===Be&&(ze=w(ze)),S(ze,e.FORBID_CONTENTS,nt)),Pe&&(ge["#text"]=!0),Le&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=$(G,c)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));i&&i(e),ot=e}},lt=S({},["mi","mo","mn","ms","mtext"]),ct=S({},["foreignobject","desc","title","annotation-xml"]),st=S({},["title","style","font","a","script"]),ut=S({},[...x,...v,...C]),mt=S({},[...k,...O]),ft=function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(ut[n]):e.namespaceURI===qe?t.namespaceURI===Ke?"math"===n:t.namespaceURI===Xe?"math"===n&&ct[o]:Boolean(mt[n]):e.namespaceURI===Ke?!(t.namespaceURI===Xe&&!ct[o])&&(!(t.namespaceURI===qe&&!lt[o])&&(!mt[n]&&(st[n]||!ut[n]))):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))},pt=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=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&&!ye[e])if(Ce||ke)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ht=function(e){let t=null,n=null;if(ve)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&Ve===Ke&&(e=''+e+"");const o=ee?ee.createHTML(e):e;if(Ve===Ke)try{t=(new W).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=$e?te:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ve===Ke?ie.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},gt=function(e){return oe.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT,null)},Tt=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},yt=function(e){return"function"==typeof N&&e instanceof N},Et=function(e,t,n){le[e]&&u(le[e],(e=>{e.call(o,t,n,ot)}))},At=function(e){let t=null;if(Et("beforeSanitizeElements",e,null),Tt(e))return pt(e),!0;const n=nt(e.nodeName);if(Et("uponSanitizeElement",e,{tagName:n,allowedTags:ge}),e.hasChildNodes()&&!yt(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[n]||_e[n]){if(!_e[n]&&bt(n)){if(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(Pe&&!ze[n]){const t=Q(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(q(n[o],!0),Z(e))}}return pt(e),!0}return e instanceof R&&!ft(e)?(pt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,u([ce,se,ue],(e=>{t=g(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Et("afterSanitizeElements",e,null),!1):(pt(e),!0)},_t=function(e,t,n){if(Ie&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Se&&!be[t]&&A(me,t));else if(Ne&&A(fe,t));else if(!ye[t]||be[t]){if(!(bt(e)&&(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&A(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&A(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(Ye[t]);else if(A(he,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!We[e]){if(Re&&!A(pe,g(n,de,"")));else if(n)return!1}else;return!0},bt=function(e){return"annotation-xml"!==e&&e.indexOf("-")>0},Nt=function(e){Et("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=nt(a);let f="value"===a?c:y(c);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Et("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(dt(a,e),!n.keepAttr)continue;if(!we&&A(/\/>/i,f)){dt(a,e);continue}De&&u([ce,se,ue],(e=>{f=g(f,e," ")}));const p=nt(e.nodeName);if(_t(p,s,f)){if(!Me||"id"!==s&&"name"!==s||(dt(a,e),f=Ue+f),ee&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(p,s)){case"TrustedHTML":f=ee.createHTML(f);break;case"TrustedScriptURL":f=ee.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),m(o.removed)}catch(e){}}}Et("afterSanitizeAttributes",e,null)},St=function e(t){let n=null;const o=gt(t);for(Et("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Et("uponSanitizeShadowNode",n,null),At(n)||(n.content instanceof s&&e(n.content),Nt(n));Et("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($e=!e,$e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!yt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||at(t),o.removed=[],"string"==typeof e&&(Fe=!1),Fe){if(e.nodeName){const t=nt(e.nodeName);if(!ge[t]||_e[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=ht("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Ce&&!De&&!Le&&-1===e.indexOf("<"))return ee&&Oe?ee.createHTML(e):e;if(n=ht(e),!n)return Ce?null:Oe?te:""}n&&ve&&pt(n.firstChild);const c=gt(Fe?e:n);for(;i=c.nextNode();)At(i)||(i.content instanceof s&&St(i.content),Nt(i));if(Fe)return e;if(Ce){if(ke)for(l=re.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ae.call(a,l,!0)),l}let m=Le?n.outerHTML:n.innerHTML;return Le&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(X,n.ownerDocument.doctype.name)&&(m="\n"+m),De&&u([ce,se,ue],(e=>{m=g(m,e," ")})),ee&&Oe?ee.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};at(e),xe=!0},o.clearConfig=function(){ot=null,xe=!1},o.isValidAttribute=function(e,t,n){ot||at({});const o=nt(e),r=nt(t);return _t(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(le[e]=le[e]||[],f(le[e],t))},o.removeHook=function(e){if(le[e])return m(le[e])},o.removeHooks=function(e){le[e]&&(le[e]=[])},o.removeAllHooks=function(){le={}},o}();return Z})); /* CryptoJS v3.1.2 code.google.com/p/crypto-js @@ -146,7 +146,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url "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);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"24.0.0",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/"), +window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.1",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&&2navigator.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|| @@ -484,7 +484,7 @@ mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.f 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;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var 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(0V&&null!=Ja&&!mxEvent.isShiftDown(Qa)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE|| mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(ia.model.isVertex(Ja.cell)&&null!=w||ia.model.isEdge(Ja.cell)&&ia.model.isEdge(f[0]))){if(ia.isCellEditable(Ja.cell)){K=Ja;var ta=ia.model.isEdge(Ja.cell)?ia.view.getPoint(Ja): new mxPoint(Ja.getCenterX(),Ja.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);aa.style.left=Math.floor(ta.x)+"px";aa.style.top=Math.floor(ta.y)+"px";null==ea&&(ia.container.appendChild(aa),ea=aa.parentNode);n(va,za,ta,aa)}}else null==K||!mxUtils.contains(K,va,za)||1500mxUtils.indexOf(e,a[g].nodeName))&&0h.name?1:0});for(g= 0;g"+mxUtils.htmlEntities(f[g].name)+": ":"")+mxUtils.htmlEntities(f[g].value)+"\n");0'+b+""))}return b}; +Graph.prototype.addFlowAnimation=function(a,b,e,f){var g=a.getAttribute("stroke-dasharray");if(""==g||null==g){var d=String(mxUtils.getValue(b,mxConstants.STYLE_DASH_PATTERN,"8")).split(" ");g=1==mxUtils.getValue(b,mxConstants.STYLE_FIX_DASH,!1)||null==b.dashPattern?1:mxUtils.getNumber(b,mxConstants.STYLE_STROKEWIDTH,1);if(0'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14); +Graph.prototype.getFlowAnimationStyleCss=function(a){return"@keyframes "+a+" {\n to {\n stroke-dashoffset: 0;\n }\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)}; +Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;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=mxClient.IS_SVG?Graph.createSvgImage(18,28,''):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14); HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,''):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,''):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14); HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,''):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,''):new mxImage(IMAGE_PATH+"/round-drop.png",26,26); HoverIcons.prototype.refreshTarget=new mxImage(mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjM2cHgiIGhlaWdodD0iMzZweCI+PGVsbGlwc2UgZmlsbD0iIzI5YjZmMiIgY3g9IjEyIiBjeT0iMTIiIHJ4PSIxMiIgcnk9IjEyIi8+PHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjgpIHRyYW5zbGF0ZSgyLjQsIDIuNCkiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iI2ZmZiIgZD0iTTEyIDZ2M2w0LTQtNC00djNjLTQuNDIgMC04IDMuNTgtOCA4IDAgMS41Ny40NiAzLjAzIDEuMjQgNC4yNkw2LjcgMTQuOGMtLjQ1LS44My0uNy0xLjc5LS43LTIuOCAwLTMuMzEgMi42OS02IDYtNnptNi43NiAxLjc0TDE3LjMgOS4yYy40NC44NC43IDEuNzkuNyAyLjggMCAzLjMxLTIuNjkgNi02IDZ2LTNsLTQgNCA0IDR2LTNjNC40MiAwIDgtMy41OCA4LTggMC0xLjU3LS40Ni0zLjAzLTEuMjQtNC4yNnoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+Cg==": @@ -2821,19 +2823,19 @@ p.length&&0D||Math.abs(ea.y-J.y)>D)&&(Math.abs(ea.x-I.x)>D||Math.abs(ea.y-I.y)>D)&&(null==da||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,da.x,da.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,aa.x,aa.y)>D)&&(null==K||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,K.x,K.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,Q.x,Q.y)>D)){K=ea.x-J.x;da=ea.y-J.y;ea={distSq:K*K+da*da,x:ea.x,y:ea.y};for(K=0;K< -O.length;K++)if(O[K].distSq>ea.distSq){O.splice(K,0,ea);ea=null;break}null==ea||0!=O.length&&O[O.length-1].x===ea.x&&O[O.length-1].y===ea.y||O.push(ea)}da=aa}}}for(S=0;SE*E&&0E*E&&(da=new mxPoint(X.x-K.x,X.y-K.y),S=new mxPoint(X.x+K.x,X.y+K.y),O.push(da),this.addPoints(p,O,z,C,!1,null,G),O=0>Math.round(K.x)||0==Math.round(K.x)&&0>=Math.round(K.y)?1:-1,G=!1,"sharp"==D?(p.lineTo(da.x- -K.y*O,da.y+K.x*O),p.lineTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x,S.y)):"line"==D?(p.moveTo(da.x+K.y*O,da.y-K.x*O),p.lineTo(da.x-K.y*O,da.y+K.x*O),p.moveTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x+K.y*O,S.y-K.x*O),p.moveTo(S.x,S.y)):"arc"==D?(O*=1.3,p.curveTo(da.x-K.y*O,da.y+K.x*O,S.x-K.y*O,S.y+K.x*O,S.x,S.y)):(p.moveTo(S.x,S.y),G=!0),O=[S],da=!0))}else K=null;da||(O.push(X),I=X)}this.addPoints(p,O,z,C,!1,null,G);p.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint= -function(p,w,z,C){return null!=w&&"centerPerimeter"==w.style[mxConstants.STYLE_PERIMETER]?new mxPoint(w.getCenterX(),w.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(p,w,z,C){if(null==w||null==p||"1"!=w.style.snapToPoint&&"1"!=p.style.snapToPoint)n.apply(this,arguments);else{w=this.getTerminalPort(p,w,C);var E=this.getNextPoint(p,z,C),D=this.graph.isOrthogonal(p),G=mxUtils.toRadians(Number(w.style[mxConstants.STYLE_ROTATION]|| -"0")),I=new mxPoint(w.getCenterX(),w.getCenterY());if(0!=G){var J=Math.cos(-G),O=Math.sin(-G);E=mxUtils.getRotatedPoint(E,J,O,I)}J=parseFloat(p.style[mxConstants.STYLE_PERIMETER_SPACING]||0);J+=parseFloat(p.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(w,E,0==G&&D,J);0!=G&&(J=Math.cos(G),O=Math.sin(G),E=mxUtils.getRotatedPoint(E,J,O,I));p.setAbsoluteTerminalPoint(this.snapToAnchorPoint(p,w,z,C,E),C)}};mxGraphView.prototype.snapToAnchorPoint= -function(p,w,z,C,E){if(null!=w&&null!=p){p=this.graph.getAllConnectionConstraints(w);C=z=null;if(null!=p)for(var D=0;DD||Math.abs(ea.y-J.y)>D)&&(Math.abs(ea.x-I.x)>D||Math.abs(ea.y-I.y)>D)&&(null==da||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,da.x,da.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,aa.x,aa.y)>D)&&(null==K||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,K.x,K.y)>D||mxUtils.ptLineDist(J.x,J.y,I.x,I.y,Q.x,Q.y)>D)){K=ea.x-J.x;da=ea.y-J.y;ea={distSq:K*K+da*da,x:ea.x,y:ea.y};for(K=0;Kea.distSq){O.splice(K,0,ea);ea=null;break}null==ea||0!= +O.length&&O[O.length-1].x===ea.x&&O[O.length-1].y===ea.y||O.push(ea)}da=aa}}}for(S=0;SE*E&&0E*E&&(da=new mxPoint(X.x-K.x,X.y-K.y),S=new mxPoint(X.x+K.x,X.y+K.y),O.push(da),this.addPoints(p,O,z,C,!1,null,G),O=0>Math.round(K.x)||0==Math.round(K.x)&&0>=Math.round(K.y)?1:-1,G=!1,"sharp"==D?(p.lineTo(da.x-K.y*O,da.y+K.x*O),p.lineTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x,S.y)):"line"==D?(p.moveTo(da.x+ +K.y*O,da.y-K.x*O),p.lineTo(da.x-K.y*O,da.y+K.x*O),p.moveTo(S.x-K.y*O,S.y+K.x*O),p.lineTo(S.x+K.y*O,S.y-K.x*O),p.moveTo(S.x,S.y)):"arc"==D?(O*=1.3,p.curveTo(da.x-K.y*O,da.y+K.x*O,S.x-K.y*O,S.y+K.x*O,S.x,S.y)):(p.moveTo(S.x,S.y),G=!0),O=[S],da=!0))}else K=null;da||(O.push(X),I=X)}this.addPoints(p,O,z,C,!1,null,G);p.stroke()}};var h=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(p,w,z,C){return null!=w&&"centerPerimeter"==w.style[mxConstants.STYLE_PERIMETER]? +new mxPoint(w.getCenterX(),w.getCenterY()):h.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(p,w,z,C){if(null==w||null==p||"1"!=w.style.snapToPoint&&"1"!=p.style.snapToPoint)n.apply(this,arguments);else{w=this.getTerminalPort(p,w,C);var E=this.getNextPoint(p,z,C),D=this.graph.isOrthogonal(p),G=mxUtils.toRadians(Number(w.style[mxConstants.STYLE_ROTATION]||"0")),I=new mxPoint(w.getCenterX(),w.getCenterY());if(0!= +G){var J=Math.cos(-G),O=Math.sin(-G);E=mxUtils.getRotatedPoint(E,J,O,I)}J=parseFloat(p.style[mxConstants.STYLE_PERIMETER_SPACING]||0);J+=parseFloat(p.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(w,E,0==G&&D,J);0!=G&&(J=Math.cos(G),O=Math.sin(G),E=mxUtils.getRotatedPoint(E,J,O,I));p.setAbsoluteTerminalPoint(this.snapToAnchorPoint(p,w,z,C,E),C)}};mxGraphView.prototype.snapToAnchorPoint=function(p,w,z,C,E){if(null!=w&&null!= +p){p=this.graph.getAllConnectionConstraints(w);C=z=null;if(null!=p)for(var D=0;D=d.getStatus()&&eval.call(window,d.getText())}}catch(h){null!=window.console&&console.log("error in getStencil:",a,e,b,g,h)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b}; @@ -2863,8 +2865,8 @@ if(null!=Ia){var Ma=this.getCurrentCellStyle(Ia);null!=Ma&&"1"==Ma.snapToPoint&& function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(P.push(ja),ja==F)L=P.length-1;else if(u&&null==F&&0L||!u&&0xa)for(ya=0;ya>xa;ya--)this.model.remove(Oa[Oa.length+ya-1]);Oa=this.model.getChildCells(u[ca],!0);for(ya=0;yaxa)for(ya=0;ya>xa;ya--)this.model.remove(Oa[Oa.length+ya-1]);Oa=this.model.getChildCells(u[ca],!0);for(ya=0;yamxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(u[F],"")}else{if(this.isTableRow(u[F])&&(P=this.model.getParent(u[F]),0>mxUtils.indexOf(u,P)&&0>mxUtils.indexOf(B,P))){for(var W=this.model.getChildCells(P,!0),ja=0,ca=0;cam&&k++;t++}c.lengthmxUtils.indexOf(F,P)&&F.push(P);break}else P=P.parentNode;return F};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(u=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u= -this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,A,B){for(;null!=u&&u.nodeName!=A;){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,A,B){for(;null!=u&&!(0<=mxUtils.indexOf(A, -u.nodeName));){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(u);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(u=A.createRange(),u.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",u),B.select())};Graph.prototype.flipEdgePoints=function(u,A,B){var F=this.getCellGeometry(u);if(null!=F){F= -F.clone();if(null!=F.points)for(var L=0;L=P.length)A.remove(B);else{var W= -P.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(P,u));for(F=u=0;F=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);u=0;var P=this.getCellGeometry(F);null!=P&&(u=P.height);var W=this.getCellGeometry(B);null!=W&&(W=W.clone(),W.height-=u,A.setGeometry(B,W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(u,A){for(var B=u.tBodies[0],F=B.rows[0].cells,L=u=0;LA&&u[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret= -function(u){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=u;u=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=u.appendChild(F);A.insertNode(u)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u,A,B){function F(P,W){P.length>W&&(P=P.substring(0,Math.round(W/2))+"..."+P.substring(P.length- -Math.round(W/4)));return P}u=null!=u?u:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(u)?this.getLinkTitle(u):u;var L=document.createElement("a");L.setAttribute("rel",this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(u));L.setAttribute("title",F(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(u)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(u, -B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(P,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(P){P=u.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null==P.getState()){var W=this.getCellAt(P.graphX,P.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W, -P.graphX,P.graphY)||(P.state=this.view.getState(W),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,W,ja){P==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp= -mxUtils.bind(this,function(P,W){var ja=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ja&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ca){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ha=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ -ha.x+1,W.getY()+ha.y+1,ca,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[P,W,ja])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection(): -document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u,A){var B=this.graph.getView().getState(this.editingCell);B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION, -mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(W){L||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||F)&&this.graph.cellEditor.setAlign(u)}F||document.execCommand("justify"+u.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u= -window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,F=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ca=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY); -var F=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)== -mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ca*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&& -(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g, -"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ca=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ca*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u); -if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=u.text?u.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height= -Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g, -"
"),0"==A.substring(A.length-5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue; -mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor= -function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText= -function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);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 S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var F=this.graph.model.getParent(u), -L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(F,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells= -function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state); -this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F'); +Ia=A/Va;Ma=L?-.5:0;var Sa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(ya.width*Ia)+2*B)+(ha&&0==B?5:0),Math.max(1,Math.ceil(ya.height*Ia)+2*B)+(ha&&0==B?5:0),F),Ra=Sa.ownerDocument;if(null!=u){var Wa=mxUtils.createElementNs(Ra,mxConstants.NS_SVG,"rect");Wa.setAttribute("fill",u);Wa.setAttribute("width","100%");Wa.setAttribute("height","100%");Wa.setAttribute("x","0");Wa.setAttribute("y","0");Sa.appendChild(Wa)}var ab=mxUtils.createElementNs(Ra,mxConstants.NS_SVG,"g");Sa.appendChild(ab);var Za= +this.createSvgCanvas(ab);Za.foOffset=L?-.5:0;Za.textOffset=L?-.5:0;Za.imageOffset=L?-.5:0;Za.translate(Math.floor(B/A-ya.x/Va),Math.floor(B/A-ya.y/Va));var qb=document.createElement("div"),ub=Za.getAlternateText;Za.getAlternateText=function($a,ib,bb,nb,fb,Ya,Ta,jb,mb,rb,sb,xb,yb){if(null!=Ya&&0m&&k++;t++}c.lengthmxUtils.indexOf(F, +P)&&F.push(P);break}else P=P.parentNode;return F};Graph.prototype.getSelectedElement=function(){var u=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(u=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(u=document.selection.createRange().parentElement());return u};Graph.prototype.getSelectedEditingElement=function(){for(var u=this.getSelectedElement();null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.parentNode;null!=u&&u==this.cellEditor.textarea&& +1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(u=this.cellEditor.textarea.firstChild);return u};Graph.prototype.getParentByName=function(u,A,B){for(;null!=u&&u.nodeName!=A;){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.getParentByNames=function(u,A,B){for(;null!=u&&!(0<=mxUtils.indexOf(A,u.nodeName));){if(u==B)return null;u=u.parentNode}return u};Graph.prototype.selectNode=function(u){var A=null;if(window.getSelection){if(A= +window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(u);A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(u=A.createRange(),u.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",u),B.select())};Graph.prototype.flipEdgePoints=function(u,A,B){var F=this.getCellGeometry(u);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L=P.length)A.remove(B);else{var W=P.length-1;this.isTableCell(u)&&(W=mxUtils.indexOf(P,u));for(F=u=0;F=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);u=0;var P=this.getCellGeometry(F);null!=P&&(u=P.height);var W=this.getCellGeometry(B); +null!=W&&(W=W.clone(),W.height-=u,A.setGeometry(B,W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(u,A){for(var B=u.tBodies[0],F=B.rows[0].cells,L=u=0;LA&&u[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div"); +B.innerHTML=u;u=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=u.appendChild(F);A.insertNode(u)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(u)};Graph.prototype.createLinkForHint=function(u,A,B){function F(P,W){P.length>W&&(P=P.substring(0,Math.round(W/2))+"..."+P.substring(P.length-Math.round(W/4)));return P}u=null!=u?u:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(u)?this.getLinkTitle(u):u;var L=document.createElement("a");L.setAttribute("rel", +this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(u));L.setAttribute("title",F(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(u)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(u,B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first}; +this.addListener(mxEvent.START_EDITING,function(P,W){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(P){P=u.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null==P.getState()){var W=this.getCellAt(P.graphX,P.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,P.graphX,P.graphY)||(P.state=this.view.getState(W),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&& +this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,W,ja){P==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(P,W){var ja=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null== +W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ja&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ja=!A||ja?null:mxUtils.bind(this,function(ca){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ha=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ha.x+1,W.getY()+ha.y+1,ca,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[P,W,ja])})};mxCellEditor.prototype.isContentEditing= +function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var A= +this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);u=Graph.createTabNode(u);B.insertNode(u);B.setStartAfter(u);B.setEndAfter(u);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(u,A){var B=this.graph.getView().getState(this.editingCell);B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var P= +!0;this.graph.processElements(this.textarea,function(W){L||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):P=!1});(P||F)&&this.graph.cellEditor.setAlign(u)}F||document.execCommand("justify"+u.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var u=window.getSelection();if(u.getRangeAt&&u.rangeCount){for(var A=[],B=0,F=u.rangeCount;B"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ca=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD, +P=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ca*mxConstants.LINE_HEIGHT)+"px": +mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ca=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? +Math.round(ca*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ca)+"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!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&& +this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=u.text?u.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style, +mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return B=Graph.sanitizeHtml(B,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue; +mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(u.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"
").replace(/\n/g,"
"),0"==A.substring(A.length-5)||"
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K= +mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&& +this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale; +return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint= +a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);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 S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var F=this.graph.model.getParent(u),L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border)); +B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(F,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],P=0;Pu;u++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR); +A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();u=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(u,A)};var V=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var u=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&& +mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F'); Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle= Graph.createSvgImage(18,18,'');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,''); HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'u.width&&2>u.height&&null!=u.text&&null!=u.text.boundingBox?(A=u.text.unrotatedBoundingBox||u.text.boundingBox,new mxRectangle(Math.round(A.x), -Math.round(A.y),Math.round(A.width),Math.round(A.height))):Xa.apply(this,arguments)};var ib=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(u,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ib.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var u= +Math.round(A.y),Math.round(A.width),Math.round(A.height))):Xa.apply(this,arguments)};var hb=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(u,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&hb.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var u= mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&u==mxConstants.NONE&&A==mxConstants.NONE?(u=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,u,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var eb=mxVertexHandler.prototype.mouseMove; mxVertexHandler.prototype.mouseMove=function(u,A){eb.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 kb=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(u,A){kb.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display= 1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(u,A){try{if(null==u&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=u||null!=A&&0"+f.cellEditor.textarea.innerHTML+"

"),Ha=[f.cellEditor.textarea.firstChild]);for(var Ba=0;Baha.length+1)return ca.substring(ca.length-ha.length-1,ca.length)=="-"+ha}return!1},Ha=function(ca){if(null!=f.getParentByName(fa,ca,f.cellEditor.textarea))return!0;for(var ha=fa;null!=ha&&1==ha.childNodes.length;)if(ha=ha.childNodes[0],ha.nodeName==ca)return!0;return!1},Ba=function(ca){ca=null!=ca?ca.fontSize:null;return null!= ca&&"px"==ca.substring(ca.length-2)?parseFloat(ca):mxConstants.DEFAULT_FONTSIZE},u=function(ca,ha,sa){return null!=sa.style&&null!=ha?(ha=ha.lineHeight,null!=sa.style.lineHeight&&"%"==sa.style.lineHeight.substring(sa.style.lineHeight.length-1)?parseInt(sa.style.lineHeight)/100:"px"==ha.substring(ha.length-2)?parseFloat(ha)/ca:parseInt(ha)):""},A=mxUtils.getCurrentStyle(fa),B=Ba(A),F=u(B,A,fa),L=fa.getElementsByTagName("*");if(0x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(m-v,0),c.lineTo(m,v),c.lineTo(v, v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,q),c.lineTo(0,q-v),c.close(),c.fill()),c.begin(),c.moveTo(v,q),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(m,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube", -f);var Ta=Math.tan(mxUtils.toRadians(30)),Ra=(.5-Ta)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, +f);var Sa=Math.tan(mxUtils.toRadians(30)),Ra=(.5-Sa)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=t&&t();null!=m&&m()};mxCellRenderer.registerShape("wire",g);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(c,k,t,m,q){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(k+.5*(m-v),t+.5*(q-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(k,t,m,q);c.fill()};mxCellRenderer.registerShape("waypoint", -d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Ta);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Ra);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Ra)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Ta));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Ra)*k),c.lineTo(k,.25*k),c.moveTo(.5* +d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Sa);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Ra);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Ra)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Sa));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Ra)*k),c.lineTo(k,.25*k),c.moveTo(.5* k,(.5-Ra)*k),c.lineTo(.5*k,(1-Ra)*k)):(c.translate((m-k)/2,(q-k)/2),c.moveTo(0,.25*k),c.lineTo(.5*k,k*Ra),c.lineTo(k,.25*k),c.lineTo(k,.75*k),c.lineTo(.5*k,(1-Ra)*k),c.lineTo(0,.75*k),c.close());c.end()};mxCellRenderer.registerShape("isoCube",n);mxUtils.extend(r,mxCylinder);r.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(q/2,Math.round(q/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0, k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,-k);v||(c.moveTo(0,k),c.curveTo(0,-k/3,m,-k/3,m,k),c.lineTo(m,q-k),c.curveTo(m,q+k/3,0,q+k/3,0,q-k),c.close())};r.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",r);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity= 0;l.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(k,t);c.begin();c.moveTo(0,0);c.lineTo(m-v,0);c.lineTo(m,v);c.lineTo(m,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"), @@ -3372,9 +3373,9 @@ S.prototype.size=.5;S.prototype.redrawPath=function(c,k,t,m,q){c.setFillColor(nu X.prototype.redrawPath=function(c,k,t,m,q){c.setStrokeWidth(1);c.setFillColor(this.stroke);k=m/5;c.rect(0,0,k,q);c.fillAndStroke();c.rect(2*k,0,k,q);c.fillAndStroke();c.rect(4*k,0,k,q);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",X);da.prototype.moveTo=function(c,k){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;this.firstX=c;this.firstY=k};da.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)};da.prototype.quadTo=function(c,k,t,m){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=m};da.prototype.curveTo=function(c,k,t,m,q,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=v};da.prototype.arcTo=function(c,k,t,m,q,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=x};da.prototype.lineTo=function(c,k){if(null!=this.lastX&&null!=this.lastY){var t=function(N){return"number"=== typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},m=Math.abs(c-this.lastX),q=Math.abs(k-this.lastY),v=Math.sqrt(m*m+q*q);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*m/x;t=t(k-this.lastY)*q/x;m/=v;q/=v;for(v=0;v";if(Ea||"undefined"===typeof mxMermaidToDrawio)na=ba=wa;wa=n.cloneNode(!0);sa.appendChild(wa);Oa=function(La){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ka=function(La){P||A(Sa,mxEvent.getClientX(La), -mxEvent.getClientY(La),Xa,Ca)};mxEvent.addGestureListeners(Xa,Oa,null,Ka);mxEvent.addGestureListeners(wa,Oa,null,Ka)},function(wa){mxMermaidToDrawio.resetListeners();b.handleError(wa)})});Ma.setAttribute("disabled","disabled");Ma.className="geBtn gePrimaryBtn";ua=function(){window.setTimeout(function(){""!=ra.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};xa=urlParams["smart-template"];null!=xa&&"1"!=xa&&(ra.value=decodeURIComponent(xa),ua(),"1"==urlParams["smart-template-generate"]&& -window.setTimeout(function(){Ma.click()},0));mxEvent.addListener(ra,"change",ua);mxEvent.addListener(ra,"keydown",ua);mxEvent.addListener(ra,"cut",ua);mxEvent.addListener(ra,"paste",ua);mxEvent.addListener(ra,"keydown",function(Ta){13==Ta.keyCode&&Ma.click()});ua=document.createElement("div");ua.style.height="40px";ua.style.marginTop="4px";ua.style.marginBottom="4px";ua.style.whiteSpace="nowrap";ua.style.overflowX="auto";ua.style.overflowY="hidden";ua.appendChild(ta);ua.appendChild(Ma);fa.appendChild(ua); -fa.appendChild(sa);return fa}function L(){if(ja&&null!=d)f||b.hideDialog(),d(ja,ka,K.value);else if(c)f||b.hideDialog(),c(ba,K.value,ca,aa);else{var fa=K.value;null!=fa&&0=Wa.getStatus()&&(Oa=Wa.getText());Qa(Oa,Ka)}))):Qa(Oa,Ka)}function Ca(Pa,Qa){if(null== -fa||z||b.sidebar.currentElt==wa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=J){var Wa=""+Graph.compress('')+"";A(Wa,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),sa,fa)}else b.sidebar.currentElt= -wa,z=!0,Ea(fa,function(Va){if(z&&b.sidebar.currentElt==wa)try{A(Va,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),wa,Qa)}catch(ab){b.sidebar.currentElt=null,b.handleError(ab)}z=!1})}var wa=document.createElement("div");wa.className="geTemplate geAdaptiveAsset";wa.style.position="relative";wa.style.height=qa+"px";wa.style.width=ya+"px";wa.style.border="1px solid transparent";var Oa=null,Ka=fa;null!=sa?wa.setAttribute("title",mxResources.get(sa,null,sa)):null!=ua&&0";if(Ea||"undefined"===typeof mxMermaidToDrawio)na=ba=wa;wa=n.cloneNode(!0);qa.appendChild(wa);Oa=function(La){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ka=function(La){P||A(Sa,mxEvent.getClientX(La), +mxEvent.getClientY(La),Xa,Ca)};mxEvent.addGestureListeners(Xa,Oa,null,Ka);mxEvent.addGestureListeners(wa,Oa,null,Ka)},function(wa){mxMermaidToDrawio.resetListeners();b.handleError(wa)})});Ma.setAttribute("disabled","disabled");Ma.className="geBtn gePrimaryBtn";ta=function(){window.setTimeout(function(){""!=sa.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};xa=urlParams["smart-template"];null!=xa&&"1"!=xa&&(sa.value=decodeURIComponent(xa),ta(),"1"==urlParams["smart-template-generate"]&& +window.setTimeout(function(){Ma.click()},0));mxEvent.addListener(sa,"change",ta);mxEvent.addListener(sa,"keydown",ta);mxEvent.addListener(sa,"cut",ta);mxEvent.addListener(sa,"paste",ta);mxEvent.addListener(sa,"keydown",function(Ta){13==Ta.keyCode&&Ma.click()});ta=document.createElement("div");ta.style.height="40px";ta.style.marginTop="4px";ta.style.marginBottom="4px";ta.style.whiteSpace="nowrap";ta.style.overflowX="auto";ta.style.overflowY="hidden";ta.appendChild(ua);ta.appendChild(Ma);fa.appendChild(ta); +fa.appendChild(qa);return fa}function L(){if(ja&&null!=d)f||b.hideDialog(),d(ja,ka,K.value);else if(c)f||b.hideDialog(),c(ba,K.value,ca,aa);else{var fa=K.value;null!=fa&&0=Wa.getStatus()&&(Oa=Wa.getText());Qa(Oa,Ka)}))):Qa(Oa,Ka)}function Ca(Pa,Qa){if(null== +fa||z||b.sidebar.currentElt==wa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=J){var Wa=""+Graph.compress('')+"";A(Wa,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),qa,fa)}else b.sidebar.currentElt= +wa,z=!0,Ea(fa,function(Va){if(z&&b.sidebar.currentElt==wa)try{A(Va,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),wa,Qa)}catch(ab){b.sidebar.currentElt=null,b.handleError(ab)}z=!1})}var wa=document.createElement("div");wa.className="geTemplate geAdaptiveAsset";wa.style.position="relative";wa.style.height=ra+"px";wa.style.width=ya+"px";wa.style.border="1px solid transparent";var Oa=null,Ka=fa;null!=qa?wa.setAttribute("title",mxResources.get(qa,null,qa)):null!=ta&&0= -la.scrollHeight&&(y(),mxEvent.consume(Ca))}));if(0= +la.scrollHeight&&(y(),mxEvent.consume(Ca))}));if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;q=null!=q?q:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";u=null!=u?u:Editor.isDarkMode()?"#fff":"#e6eff8";E=null!=E?E:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var x=document.createElement("div");x.style.userSelect="none";x.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height= "46px";f&&x.appendChild(H);var C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="40px";C.style.height="40px";C.style.marginRight="10px";C.style.paddingBottom="4px";C.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg": b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||m||!f||H.appendChild(C);f&&mxUtils.write(H,(m?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");C=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?C=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?C=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&& null!=b.oneDrive?C=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?C=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?C=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(C=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+C);K.style.marginLeft="10px";K.style.width=e||m?"144px":"244px";this.init=function(){f&&Editor.selectFilename(K);null!=la.parentNode&&null!=la.parentNode.parentNode&&mxEvent.addGestureListeners(la.parentNode.parentNode, mxUtils.bind(this,function(fa){b.sidebar.hideTooltip()}),null,null)};f&&(H.appendChild(K),v?K.style.width=e||m?"350px":"450px":null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width=e||m?"80px":"180px",H.appendChild(v)));m=!1;var O=0,N=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),U=mxUtils.button(l||mxResources.get("create"),function(){U.setAttribute("disabled", "disabled");L();U.removeAttribute("disabled")});U.className="geBtn gePrimaryBtn";var n=document.createElement("img");n.setAttribute("src",Editor.magnifyImage);n.setAttribute("title",mxResources.get("preview"));n.className="geAdaptiveAsset geActiveButton";n.style.position="absolute";n.style.cursor="default";n.style.padding="6px";n.style.opacity="0.5";n.style.height="16px";n.style.right="0px";n.style.top="0px";var z=!1,J=null,P=!1;if(M||I){var Q=[],T=null,S=null,W=null,X=function(fa){U.setAttribute("disabled", -"disabled");for(var ra=0;ramxUtils.indexOf(c,H))if(N=null!=N?N:b.getTitleForService(H),0<=mxUtils.indexOf(G,H)||null!=b.getServiceForName(H)){n=document.createElement("option");if("pick"==U)n.innerHTML=mxUtils.htmlEntities(N)+"  –  "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",n.setAttribute("value","pickFolder-"+H),n.setAttribute("title",N+" - "+mxResources.get("pickFolder")+"...");else{var z=H+(null!= K?"-"+K:""),J=m[z];null!=J&&null!=J.option&&J.option.parentNode.removeChild(J.option);J=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));J=C;if(H!=App.MODE_GITHUB&&H==App.MODE_GITLAB){var P=J.lastIndexOf("/");0<=P&&(J=J.substring(P+1))}40%position%
Email\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'; +defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{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(n){return"1"==mxUtils.getValue(n.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(n){return"1"==mxUtils.getValue(n.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(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n, +z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,z){n=z.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTable(n.vertices[0])}},{name:"resizeLast", +dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,z){n=z.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast","0")},isVisible:function(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTable(n.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(n,z){return z.editorUi.editor.graph.isCellConnectable(0< +n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,z){return 0%position%
Email\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(n){var z=rough.canvas({getContext:function(){return n}});z.draw=function(J){var P=J.sets||[];J=J.options||this.getDefaultOptions();for(var Q=0;QY&&(Y=Q.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(Q.fill||"");n.setStrokeWidth(Y);n.setDashed(!1);this._drawToContext(J,P,Q);n.setDashed(X);n.setStrokeWidth(S);n.setStrokeColor(T);n.setStrokeAlpha(W)};z._drawToContext=function(J,P,Q){J.begin();for(var T=0;TP.indexOf("mxPageSelector")&&0k;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)? 3988292384^p>>>1:p>>>1,Editor.crcTable[k]=p;Editor.updateCRC=function(n,z,J,P){for(var Q=0;Q>>8;return n};Editor.crc32=function(n){for(var z=-1,J=0;J>>8^Editor.crcTable[(z^n.charCodeAt(J))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(n,z,J,P,Q){function T(Z,aa){var ia=X;X+=aa;return Z.substring(ia,X)}function S(Z){Z=T(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function W(Z){return String.fromCharCode(Z>> 24&255,Z>>16&255,Z>>8&255,Z&255)}n=n.substring(n.indexOf(",")+1);n=window.atob?atob(n):Base64.decode(n,!0);var X=0;if(T(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=Q&&Q();else if(T(n,4),"IHDR"!=T(n,4))null!=Q&&Q();else{T(n,17);Q=n.substring(0,X);do{var Y=S(n);if("IDAT"==T(n,4)){Q=n.substring(0,X-8);"pHYs"==z&&"dpi"==J?(J=Math.round(P/.0254),J=W(J)+W(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+P;P=4294967295;P=Editor.updateCRC(P, @@ -11857,33 +11860,33 @@ stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradien null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),P(Q.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{P(JSON.parse(n))}catch(T){}}};var I=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init= function(){var n=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0pa.size&&(Ga=Ga.slice(0,pa.size));oa=Ga.join(",");null!=pa.countProperty&&(aa.setCellStyles(pa.countProperty,Ga.length,aa.getSelectionCells()),Aa.push(pa.countProperty), -Da.push(Ga.length))}aa.setCellStyles(ea,oa,aa.getSelectionCells());Aa.push(ea);Da.push(oa);if(null!=pa.dependentProps)for(ea=0;eaoa)Ra=Ra.slice(0,oa);else for(var Na=Ra.length;Napa.size&&(Fa=Fa.slice(0,pa.size));oa=Fa.join(",");null!=pa.countProperty&&(aa.setCellStyles(pa.countProperty,Fa.length,aa.getSelectionCells()),Aa.push(pa.countProperty), +Da.push(Fa.length))}aa.setCellStyles(ea,oa,aa.getSelectionCells());Aa.push(ea);Da.push(oa);if(null!=pa.dependentProps)for(ea=0;eaoa)Ra=Ra.slice(0,oa);else for(var Na=Ra.length;Napa.max&&(ra=pa.max);ra=encodeURIComponent(("int"==Ga?parseInt(ra): -ra)+"");P(ea,ra,pa)}var fa=document.createElement("input");Q(Ia,fa,!0);fa.value=decodeURIComponent(oa);fa.className="gePropEditor";"int"!=Ga&&"float"!=Ga||pa.allowAuto||(fa.type="number",fa.step="int"==Ga?"1":"any",null!=pa.min&&(fa.min=parseFloat(pa.min)),null!=pa.max&&(fa.max=parseFloat(pa.max)));n.appendChild(fa);mxEvent.addListener(fa,"keypress",function(ra){13==ra.keyCode&&Na()});fa.focus();mxEvent.addListener(fa,"blur",function(){Na()})})));pa.isDeletable&&(Aa=mxUtils.button("-",mxUtils.bind(Z, -function(Na){P(ea,"",pa,pa.index);mxEvent.consume(Na)})),Aa.style.height="16px",Aa.style.width="25px",Aa.style.float="right",Aa.className="geColorBtn",Ia.appendChild(Aa));Ha.appendChild(Ia);return Ha}var Z=this,aa=this.editorUi.editor.graph,ia=[];n.style.position="relative";n.style.padding="0";var ba=document.createElement("table");ba.className="geProperties";ba.style.whiteSpace="nowrap";ba.style.width="100%";var da=document.createElement("tr");da.className="gePropHeader";var ja=document.createElement("th"); -ja.className="gePropHeaderCell";var ca=document.createElement("img");ca.src=Sidebar.prototype.expandedImage;ca.style.verticalAlign="middle";ja.appendChild(ca);mxUtils.write(ja,mxResources.get("property"));da.style.cursor="pointer";var ka=function(){var ea=ba.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ca.src=Sidebar.prototype.collapsedImage;var oa="none";for(var pa=n.childNodes.length-1;0<=pa;pa--)try{var Ba=n.childNodes[pa],Aa=Ba.nodeName.toUpperCase();"INPUT"!=Aa&& -"SELECT"!=Aa||n.removeChild(Ba)}catch(Da){}}else ca.src=Sidebar.prototype.expandedImage,oa="";for(pa=0;pa=this.defaultColorSchemes.length?"24px":"30px";na.style.margin="0px 6px 6px 0px";if(null!=ka){var la= -Editor.isDarkMode()?"2px solid":"1px solid";null!=ka.border&&(la=ka.border);null!=ka.gradient?mxClient.IS_IE&&10>document.documentMode?na.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ka.fill+"', EndColorStr='"+ka.gradient+"', GradientType=0)":na.style.backgroundImage="linear-gradient("+ka.fill+" 0px,"+ka.gradient+" 100%)":ka.fill==mxConstants.NONE?na.style.background="url('"+Dialog.prototype.noColorImage+"')":na.style.backgroundColor=""==ka.fill?mxUtils.getValue(P.defaultVertexStyle, -mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ka.fill||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");na.style.border=ka.stroke==mxConstants.NONE?la+" transparent":""==ka.stroke?la+" "+mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):la+" "+(ka.stroke||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()? -"#ffffff":Editor.darkColor));null!=ka.title&&na.setAttribute("title",ka.title)}else{la=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ma=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");na.style.backgroundColor=la;na.style.border="1px solid "+ma}na.style.borderRadius="0";Q.appendChild(na)});Q.innerText="";for(var ca=0;ca=this.defaultColorSchemes.length?28:8;var ia=document.createElement("div");ia.style.cssText="position:absolute;left:10px;top:8px;bottom:"+X+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +if("color"==Fa)Ia.appendChild(T(ea,oa,pa));else if("bool"==Fa||"boolean"==Fa)Ia.appendChild(X(ea,oa,pa));else if("enum"==Fa){var Ra=pa.enumList;for(Aa=0;Aapa.max&&(sa=pa.max);var qa=null;try{qa="numbers"== +Fa?sa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Fa?parseInt(sa):sa)+"")}catch(ta){}P(ea,qa,pa)}var fa=document.createElement("input");Q(Ia,fa,!0);fa.value=decodeURIComponent(oa);fa.className="gePropEditor";"int"!=Fa&&"float"!=Fa||pa.allowAuto||(fa.type="number",fa.step="int"==Fa?"1":"any",null!=pa.min&&(fa.min=parseFloat(pa.min)),null!=pa.max&&(fa.max=parseFloat(pa.max)));n.appendChild(fa);mxEvent.addListener(fa,"keypress",function(sa){13==sa.keyCode&&Na()});fa.focus();mxEvent.addListener(fa, +"blur",function(){Na()})})));pa.isDeletable&&(Aa=mxUtils.button("-",mxUtils.bind(Z,function(Na){P(ea,"",pa,pa.index);mxEvent.consume(Na)})),Aa.style.height="16px",Aa.style.width="25px",Aa.style.float="right",Aa.className="geColorBtn",Ia.appendChild(Aa));Ha.appendChild(Ia);return Ha}var Z=this,aa=this.editorUi.editor.graph,ia=[];n.style.position="relative";n.style.padding="0";var ba=document.createElement("table");ba.className="geProperties";ba.style.whiteSpace="nowrap";ba.style.width="100%";var da= +document.createElement("tr");da.className="gePropHeader";var ja=document.createElement("th");ja.className="gePropHeaderCell";var ca=document.createElement("img");ca.src=Sidebar.prototype.expandedImage;ca.style.verticalAlign="middle";ja.appendChild(ca);mxUtils.write(ja,mxResources.get("property"));da.style.cursor="pointer";var ka=function(){var ea=ba.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){ca.src=Sidebar.prototype.collapsedImage;var oa="none";for(var pa=n.childNodes.length- +1;0<=pa;pa--)try{var Ba=n.childNodes[pa],Aa=Ba.nodeName.toUpperCase();"INPUT"!=Aa&&"SELECT"!=Aa||n.removeChild(Ba)}catch(Da){}}else ca.src=Sidebar.prototype.expandedImage,oa="";for(pa=0;pa=this.defaultColorSchemes.length?"24px":"30px";na.style.margin="0px 6px 6px 0px";if(null!=ka){var la=Editor.isDarkMode()?"2px solid":"1px solid";null!=ka.border&&(la=ka.border);null!=ka.gradient?mxClient.IS_IE&&10>document.documentMode?na.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ka.fill+"', EndColorStr='"+ka.gradient+"', GradientType=0)":na.style.backgroundImage="linear-gradient("+ka.fill+" 0px,"+ka.gradient+" 100%)":ka.fill== +mxConstants.NONE?na.style.background="url('"+Dialog.prototype.noColorImage+"')":na.style.backgroundColor=""==ka.fill?mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ka.fill||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");na.style.border=ka.stroke==mxConstants.NONE?la+" transparent":""==ka.stroke?la+" "+mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, +Editor.isDarkMode()?"#ffffff":Editor.darkColor):la+" "+(ka.stroke||mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ka.title&&na.setAttribute("title",ka.title)}else{la=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ma=mxUtils.getValue(P.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");na.style.backgroundColor=la;na.style.border="1px solid "+ma}na.style.borderRadius="0";Q.appendChild(na)}); +Q.innerText="";for(var ca=0;ca=this.defaultColorSchemes.length?28:8;var ia=document.createElement("div");ia.style.cssText="position:absolute;left:10px;top:8px;bottom:"+X+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+X+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; 1=this.defaultColorSchemes.length&&n.appendChild(S)}return n}}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(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||n.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.rewriteGoogleFontUrl=function(n){null!=n&&n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(n=Editor.GOOGLE_FONTS_CSS2+n.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return n};Graph.createFontElement= @@ -11896,12 +11899,12 @@ z};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this. T.marginTop||0;S.marginBottom=T.marginBottom||0;S.allowGaps=T.allowGaps||0;S.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return P.apply(this,arguments)};this.updateGlobalUrlVariables()};var l=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,z){return Graph.processFontStyle(l.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,z,J,P,Q,T,S,W,X,Y, Z,aa){t.apply(this,arguments);Graph.processFontAttributes(aa)};var v=mxText.prototype.redraw;mxText.prototype.redraw=function(){v.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,z,J,P){function Q(){for(var ja=W.getSelectionCells(),ca=[],ka=0;kamxUtils.indexOf(W.hiddenTags,ma),za=document.createElement("tr"), -qa=document.createElement("td");qa.style.align="center";qa.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(va?"hideIt":"show",[ma]));mxUtils.setOpacity(ya,va?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";qa.appendChild(ya);mxEvent.addListener(ya,"click",function(oa){mxEvent.isShiftDown(oa)? -T(0<=mxUtils.indexOf(W.hiddenTags,ma)):(W.toggleHiddenTag(ma),Q(),W.refresh());mxEvent.consume(oa)});za.appendChild(qa);qa=document.createElement("td");qa.style.align="center";qa.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,va?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter= -"invert(100%)";mxEvent.addListener(ya,"click",function(oa){T(!0);ha();mxEvent.consume(oa)});qa.appendChild(ya);za.appendChild(qa);qa=document.createElement("td");qa.style.overflow="hidden";qa.style.whiteSpace="nowrap";qa.style.textOverflow="ellipsis";qa.style.verticalAlign="middle";qa.style.cursor="pointer";qa.setAttribute("title",ma);a=document.createElement("a");mxUtils.write(a,ma);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,va?100:40);qa.appendChild(a);mxEvent.addListener(qa, -"click",function(oa){if(mxEvent.isShiftDown(oa))T(!0),ha();else if(va&&0mxUtils.indexOf(X,ja[ca])&&X.push(ja[ca]);X.sort();W.isSelectionEmpty()?S(X):S(X,W.getCommonTagsForCells(W.getSelectionCells()))}});W.selectionModel.addListener(mxEvent.CHANGE,ba);W.model.addListener(mxEvent.CHANGE,ba);W.addListener(mxEvent.REFRESH,ba);var da=document.createElement("div");da.style.display="flex";da.style.alignItems="center";da.style.boxSizing="border-box";da.style.whiteSpace="nowrap";da.style.position= @@ -11912,7 +11915,7 @@ Graph.prototype.getGlobalVariable=function(n){var z=A.apply(this,arguments);null Graph.getSvgFromDataUri(n.src);if(null!=J){var P=(new DOMParser).parseFromString(J,"text/xml"),Q=P.getElementsByTagName("style"),T=mxUtils.htmlEntities(Graph.createSvgDarkModeCss(),!1);for(J=0;J'+mxUtils.htmlEntities(n)+""};mxGraphView.prototype.redrawEnumerationState=function(n){var z="1"==mxUtils.getValue(n.style,"enumerate",0);z&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect= @@ -11955,7 +11958,7 @@ mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+ [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.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"]; mxMarker.getPackageForType=function(n){var z=null;null!=n&&0'), Za.writeln("@media print {"),Za.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Za.writeln("}"),Za.writeln(""));null!=n.editor.fontCss&&(Za.writeln('"));for(var cb=Ea.getCustomFonts(),bb=0;bb'): @@ -11963,26 +11966,26 @@ Za.writeln("@media print {"),Za.writeln(".MathJax svg { shape-rendering: crispEd this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Qa=null;Wa=Q.shapeForegroundColor;$a=Q.shapeBackgroundColor;Va=Q.enableFlowAnimation;Q.enableFlowAnimation=!1;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(Qa=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());Ca.open(null,null,wa,!0,Oa);Q.enableFlowAnimation=Va;null!=Qa&&(Q.shapeForegroundColor=Wa,Q.shapeBackgroundColor=$a,Q.stylesheet= Qa,Q.refresh())}else{Va=Ea.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Ca.backgroundColor=Va;Ca.autoOrigin=$a;Ca.appendGraph(Ea,ab,Qa,Wa,wa,!0,Oa);wa=Ea.getCustomFonts();if(null!=Ca.wnd)for(Qa=0;Qa'):(Ca.wnd.document.writeln('"))}Ka&&(Ea.useCssTransforms=Ka,Ea.currentTranslate=Ya,Ea.currentScale=Xa,Ea.view.translate=Sa,Ea.view.scale=La);return Ca}var Ha=parseInt(Aa.value)/100;isNaN(Ha)&&(Ha=1,Aa.value="100 %");mxClient.IS_SF&&(Ha*=.75);var Ia=null,Ra=Q.shapeForegroundColor,Na=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(Ia=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor= -"#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var fa=aa.value,ra=ia.value,sa=!Y.checked,ua=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,Y.checked,fa,ra,ka.checked,oa.value,pa.value,parseInt(ca.value)/100,parseInt(Aa.value)/100,Ba.get());else{sa&&(sa=ba.checked||fa==X&&ra==X);if(!sa&&null!=n.pages&&n.pages.length){var ta=0;sa=n.pages.length-1;Y.checked||(ta=parseInt(fa)-1,sa=parseInt(ra)-1);for(var xa=ta;xa<=sa;xa++){var Fa=n.pages[xa];fa=Fa==n.currentPage?Q:null;if(null==fa){fa= -n.createTemporaryGraph(Q.stylesheet);fa.shapeForegroundColor=Q.shapeForegroundColor;fa.shapeBackgroundColor=Q.shapeBackgroundColor;ra=!0;ta=!1;var Ja=null,Ma=null;null==Fa.viewState&&null==Fa.root&&n.updatePageRoot(Fa);null!=Fa.viewState&&(ra=Fa.viewState.pageVisible,ta=Fa.viewState.mathEnabled,Ja=Fa.viewState.background,Ma=Fa.viewState.backgroundImage,fa.extFonts=Fa.viewState.extFonts);null!=Ma&&null!=Ma.originalSrc&&(Ma=n.createImageForPageLink(Ma.originalSrc,Fa));fa.background=Ja;fa.backgroundImage= -null!=Ma?new mxImage(Ma.src,Ma.width,Ma.height,Ma.x,Ma.y):null;fa.pageVisible=ra;fa.mathEnabled=ta;var Ta=fa.getGraphBounds;fa.getGraphBounds=function(){var Ea=Ta.apply(this,arguments),Ca=this.backgroundImage;if(null!=Ca&&null!=Ca.width&&null!=Ca.height){var wa=this.view.translate,Oa=this.view.scale;Ea=mxRectangle.fromRectangle(Ea);Ea.add(new mxRectangle((wa.x+Ca.x)*Oa,(wa.y+Ca.y)*Oa,Ca.width*Oa,Ca.height*Oa))}return Ea};var Ua=fa.getGlobalVariable;fa.getGlobalVariable=function(Ea){return"page"== -Ea?Fa.getName():"pagenumber"==Ea?xa+1:"pagecount"==Ea?null!=n.pages?n.pages.length:1:Ua.apply(this,arguments)};document.body.appendChild(fa.container);n.updatePageRoot(Fa);fa.model.setRoot(Fa.root)}ua=Ga(fa,ua,xa!=sa,Fa.getId());fa!=Q&&fa.container.parentNode.removeChild(fa.container)}}else ua=Ga(Q);null==ua||null==ua.wnd?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(ua.mathEnabled&&(sa=ua.wnd.document,Da&&(ua.wnd.IMMEDIATE_PRINT=!0),sa.writeln('