From 3f1abe08d3e86b47120c63d538a706fe0ddd8a5b Mon Sep 17 00:00:00 2001 From: David Benson Date: Thu, 5 Oct 2023 21:42:19 +0100 Subject: [PATCH] 22.0.3 release --- ChangeLog | 6 + VERSION | 2 +- src/main/webapp/js/app.min.js | 254 +++++------ src/main/webapp/js/diagramly/Editor.js | 3 + src/main/webapp/js/diagramly/Pages.js | 4 +- src/main/webapp/js/diagramly/vsdx/importer.js | 7 +- src/main/webapp/js/extensions.min.js | 215 ++++----- src/main/webapp/js/integrate.min.js | 417 +++++++++--------- src/main/webapp/js/viewer-static.min.js | 192 ++++---- src/main/webapp/js/viewer.min.js | 192 ++++---- src/main/webapp/mxgraph/mxClient.js | 2 +- src/main/webapp/service-worker.js | 2 +- src/main/webapp/service-worker.js.map | 2 +- 13 files changed, 657 insertions(+), 641 deletions(-) diff --git a/ChangeLog b/ChangeLog index 914cab01f..968681ed4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +05-OCT-2023: 22.0.3 + +- Fixes possible NPE in clonePages error handler +- [vsdx] Stops using default theme when theme index not found [DID-9622] +- Fixes tags dialog icons in dark mode [drawio-3910] + 03-OCT-2023: 22.0.2 - Fixes new save dialog for SharePoint [drawio-3900] diff --git a/VERSION b/VERSION index beba42233..6d6924828 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -22.0.2 \ No newline at end of file +22.0.3 \ No newline at end of file diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index e2ad322e0..55976fa18 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.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:"22.0.2",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:"22.0.3",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|| @@ -11213,33 +11213,33 @@ D.setAttribute("value","diagram");mxUtils.write(D,mxResources.get("diagram"));B= y.appendChild(C),y.appendChild(G));D=document.createElement("option");D.setAttribute("value","plantUmlSvg");mxUtils.write(D,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&D.setAttribute("selected","selected");B=document.createElement("option");B.setAttribute("value","plantUmlPng");mxUtils.write(B,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");C=document.createElement("option");C.setAttribute("value","plantUmlTxt");mxUtils.write(C,mxResources.get("plantUml")+ " ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(y.appendChild(D),y.appendChild(B),y.appendChild(C));var I=c();v.value=I;e.appendChild(v);this.init=function(){v.focus()};Graph.fileSupport&&(v.addEventListener("dragover",function(d){d.stopPropagation();d.preventDefault()},!1),v.addEventListener("drop",function(d){d.stopPropagation();d.preventDefault();if(0";if(La||"undefined"===typeof mxMermaidToDrawio)da=ba=wa;wa=m.cloneNode(!0);pa.appendChild(wa);Ma=function(Pa){M=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Oa=function(Pa){M||A(Ta,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Sa,Da)};mxEvent.addGestureListeners(Sa,Ma,null,Oa);mxEvent.addGestureListeners(wa,Ma,null,Oa)},function(wa){b.handleError(wa)})});Ka.setAttribute("disabled","disabled");Ka.className="geBtn gePrimaryBtn";ra=function(){window.setTimeout(function(){""!= +function(){var Ja=oa.value,Ba=ja.value.replace(/([A-Z])/g," $1").toLowerCase();Ja="Write the declaration code for a "+(""!=Ba?Ba:"graph")+' that shows "'+(""!=Ja?Ja:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Ba=""!=ja.value?" ("+mxUtils.trim(mxUtils.getTextContent(ja.options[ja.selectedIndex]))+")":"";var La="gantt"==ja.value||"pie"==ja.value||"timeline"==ja.value||"quadrantchart"==ja.value||"c4context"==ja.value,Ea=oa.value+Ba;"undefined"!== +typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(wa){La||(da=ba=wa)}));b.generateOpenAiMermaidDiagram(Ja,function(wa,Ma,Oa,Xa){pa.innerHTML="";var Sa=document.createElement("img");Sa.setAttribute("title",Ea);Sa.src="data:image/svg+xml;base64,"+Ma.substring(Ma.indexOf(",")+1);Sa.style.cursor="pointer";Sa.style.width="100%";Sa.style.height="100%";pa.appendChild(Sa);wa=b.createMermaidXml("%% Prompt: "+Ea+"\n"+wa,EditorUi.defaultMermaidConfig,Ma,Oa,Xa);var Ta=""+ +Graph.compress(wa)+"";if(La||"undefined"===typeof mxMermaidToDrawio)da=ba=wa;wa=m.cloneNode(!0);pa.appendChild(wa);Ma=function(Pa){M=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Oa=function(Pa){M||A(Ta,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Sa,Ea)};mxEvent.addGestureListeners(Sa,Ma,null,Oa);mxEvent.addGestureListeners(wa,Ma,null,Oa)},function(wa){b.handleError(wa)})});Ka.setAttribute("disabled","disabled");Ka.className="geBtn gePrimaryBtn";ra=function(){window.setTimeout(function(){""!= oa.value?Ka.removeAttribute("disabled"):Ka.setAttribute("disabled","disabled")},0)};na=urlParams["smart-template"];null!=na&&"1"!=na&&(oa.value=decodeURIComponent(na),ra(),"1"==urlParams["smart-template-generate"]&&window.setTimeout(function(){Ka.click()},0));mxEvent.addListener(oa,"change",ra);mxEvent.addListener(oa,"keydown",ra);mxEvent.addListener(oa,"cut",ra);mxEvent.addListener(oa,"paste",ra);mxEvent.addListener(oa,"keydown",function(Ja){13==Ja.keyCode&&Ka.click()});ra=document.createElement("div"); ra.style.height="40px";ra.style.marginTop="4px";ra.style.marginBottom="4px";ra.style.whiteSpace="nowrap";ra.style.overflowX="auto";ra.style.overflowY="hidden";ra.appendChild(ja);ra.appendChild(Ka);ea.appendChild(ra);ea.appendChild(pa);return ea}function J(){if(ha&&null!=d)f||b.hideDialog(),d(ha,Aa,S.value);else if(k)f||b.hideDialog(),k(ba,S.value,za,aa);else{var ea=S.value;null!=ea&&0=Wa.getStatus()&&(Ma=Wa.getText());Ya(Ma,Oa)}))):Ya(Ma,Oa)}function Da(Na,Ya){if(null==ea||x||b.sidebar.currentElt==wa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=H){var Wa=""+Graph.compress('=Wa.getStatus()&&(Ma=Wa.getText());Ya(Ma,Oa)}))):Ya(Ma,Oa)}function Ea(Na,Ya){if(null==ea||x||b.sidebar.currentElt==wa)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=H){var Wa=""+Graph.compress('')+"";A(Wa,mxEvent.getClientX(Na),mxEvent.getClientY(Na),pa,ea)}else b.sidebar.currentElt=wa,x=!0,La(ea,function(ab){if(x&&b.sidebar.currentElt==wa)try{A(ab,mxEvent.getClientX(Na),mxEvent.getClientY(Na),wa,Ya)}catch($a){b.sidebar.currentElt=null,b.handleError($a)}x=!1})}var wa=document.createElement("div");wa.className="geTemplate geAdaptiveAsset";wa.style.position="relative";wa.style.height= -Fa+"px";wa.style.width=qa+"px";wa.style.border="1px solid transparent";var Ma=null,Oa=ea;null!=pa?wa.setAttribute("title",mxResources.get(pa,null,pa)):null!=ra&&0=ia.scrollHeight&&(z(),mxEvent.consume(Da))}));if(0=ia.scrollHeight&&(z(),mxEvent.consume(Ea))}));if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;c=null!=c?c:!1;v=null!=v?v:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";y=null!=y?y:Editor.isDarkMode()?"#fff":"#e6eff8";D=null!=D?D:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";C=null!=C?C:EditorUi.templateFile;var R=document.createElement("div"); R.style.userSelect="none";R.style.height="100%";var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.height="46px";f&&R.appendChild(U);var O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.width="40px";O.style.height="40px";O.style.marginRight="10px";O.style.paddingBottom="4px";O.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||L||!f||U.appendChild(O);f&&mxUtils.write(U,(L?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");O=".drawio"; @@ -11247,18 +11247,18 @@ b.mode==App.MODE_GOOGLE&&null!=b.drive?O=b.drive.extension:b.mode==App.MODE_DROP L?"144px":"244px";this.init=function(){f&&Editor.selectFilename(S);null!=ia.parentNode&&null!=ia.parentNode.parentNode&&mxEvent.addGestureListeners(ia.parentNode.parentNode,mxUtils.bind(this,function(ea){b.sidebar.hideTooltip()}),null,null)};f&&(U.appendChild(S),t?S.style.width=e||L?"350px":"450px":(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,S,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width=e||L?"80px":"180px",U.appendChild(t)),null!=b.editor.fileExtensions&& (L=FilenameDialog.createTypeHint(b,S,b.editor.fileExtensions),L.style.marginTop="12px",U.appendChild(L))));U=!1;var p=0,u=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}),K=mxUtils.button(n||mxResources.get("create"),function(){K.setAttribute("disabled","disabled");J();K.removeAttribute("disabled")});K.className="geBtn gePrimaryBtn";var m=document.createElement("img");m.setAttribute("src",Sidebar.prototype.searchImage); m.setAttribute("title",mxResources.get("preview"));m.className="geActiveButton";m.style.position="absolute";m.style.cursor="default";m.style.padding="8px";m.style.right="0px";m.style.top="0px";var x=!1,H=null,M=!1;if(G||I){var N=[],T=null,Q=null,W=null,X=function(ea){K.setAttribute("disabled","disabled");for(var oa=0;oa=Ja.getStatus()&&(na=Ja.getText());Ka(na)}))):Ka(na)}function ja(ua,Ka,Ja){if(null!=ua&& mxUtils.isAncestorNode(document.body,ea)&&(ua=mxUtils.parseXml(ua),ua=Editor.extractGraphModel(ua.documentElement,!0),null!=ua)){"mxfile"==ua.nodeName&&(ua=Editor.parseDiagramNode(ua.getElementsByTagName("diagram")[0]));var Ba=new mxCodec(ua.ownerDocument),La=new mxGraphModel;Ba.decode(ua,La);ua=La.root.getChildAt(0).children||[];b.sidebar.createTooltip(ea,ua,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight|| -document.body.clientHeight)-80,800),null!=ka.title?mxResources.get(ka.title,null,ka.title):null,!0,new mxPoint(Ka,Ja),!0,null,!0);var Da=document.createElement("div");Da.className="geTempDlgDialogMask";u.appendChild(Da);var wa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Da&&(u.removeChild(Da),Da=null,wa.apply(this,arguments),b.sidebar.hideTooltip=wa)};mxEvent.addListener(Da,"click",function(){b.sidebar.hideTooltip()})}}var na=null;if(qa||b.sidebar.currentElt==ea)b.sidebar.hideTooltip(); +document.body.clientHeight)-80,800),null!=ka.title?mxResources.get(ka.title,null,ka.title):null,!0,new mxPoint(Ka,Ja),!0,null,!0);var Ea=document.createElement("div");Ea.className="geTempDlgDialogMask";u.appendChild(Ea);var wa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ea&&(u.removeChild(Ea),Ea=null,wa.apply(this,arguments),b.sidebar.hideTooltip=wa)};mxEvent.addListener(Ea,"click",function(){b.sidebar.hideTooltip()})}}var na=null;if(qa||b.sidebar.currentElt==ea)b.sidebar.hideTooltip(); else{var xa=function(ua){qa&&b.sidebar.currentElt==ea&&ja(ua,mxEvent.getClientX(pa),mxEvent.getClientY(pa));qa=!1;oa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ea;qa=!0;oa.src="/images/aui-wait.gif";ka.isExt?D(ka,xa,function(){n(mxResources.get("cantLoadPrev"));qa=!1;oa.src="/images/icon-search.svg"}):ra(ka.url,xa)}}function A(ka,ea,oa){if(null!=M){for(var pa=M.className.split(" "),ra=0;ra=ua.getStatus()?pa(ua.getText(),xa):ra()})):pa(b.emptyDiagramXml,xa)},pa=function(xa,ua){g||b.hideDialog(!0);e(xa,ua,na,ea)},ra=function(){n(mxResources.get("cannotLoad")); ja()},ja=function(){N=na;ma.className="geTempDlgCreateBtn";ea&&(ya.className="geTempDlgOpenBtn")},na=N;N=null;"boolean"!==typeof ea&&(ea=na.isExternal&&G);1==ka?B(na.url,na):ea?(ya.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",oa()):(ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ka=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ka=new FilenameDialog(b,b.defaultFilename+".drawio", mxResources.get("ok"),oa,ka,function(xa){var ua=null!=xa&&0ua?mxUtils.htmlEntities(xa.substring(0,ua))+"…":mxUtils.htmlEntities(xa);if(oa){var Da= -document.createElement("tr");Ja=document.createElement("td");var wa=document.createElement("img");wa.src="/images/icon-search.svg";wa.className="geTempDlgDiagramListPreviewBtn";wa.setAttribute("title",mxResources.get("preview"));ra||Ja.appendChild(wa);Ka=document.createElement("span");Ka.className="geTempDlgDiagramTitle";Ka.innerHTML=xa;Ja.appendChild(Ka);Da.appendChild(Ja);Ja=document.createElement("td");Ja.innerText=Ba;Da.appendChild(Ja);Ja=document.createElement("td");Ja.innerText=La;Da.appendChild(Ja); -ja.appendChild(Da);null==M&&(J(ea),A(Da,"geTempDlgDiagramsListGridActive",ka[na]));(function(Sa,Ta,Pa){mxEvent.addListener(Da,"click",function(){M!=Ta&&(J(ea),A(Ta,"geTempDlgDiagramsListGridActive",Sa))});mxEvent.addListener(Da,"dblclick",E);mxEvent.addListener(wa,"click",function(Na){z(Sa,Ta,Pa,Na)})})(ka[na],Da,wa)}else{var Ma=document.createElement("div");Ma.className="geTempDlgDiagramTile";Ma.setAttribute("title",Ka);null==M&&(J(ea),A(Ma,"geTempDlgDiagramTileActive",ka[na]));Ba=document.createElement("div"); +!ea;var ua=ka[na].url,Ka=(xa=ea?mxResources.get(ka[na].title,null,ka[na].title):ka[na].title)||ka[na].url,Ja=ka[na].imgUrl,Ba=ka[na].changedBy||"",La="";ka[na].lastModifiedOn&&(La=b.timeSince(new Date(ka[na].lastModifiedOn)),null==La&&(La=mxResources.get("lessThanAMinute")),La=mxResources.get("timeAgo",[La],"{1} ago"));Ja||(Ja=TEMPLATE_PATH+"/"+ua.substring(0,ua.length-4)+".png");ua=oa?50:15;xa=null!=xa&&xa.length>ua?mxUtils.htmlEntities(xa.substring(0,ua))+"…":mxUtils.htmlEntities(xa);if(oa){var Ea= +document.createElement("tr");Ja=document.createElement("td");var wa=document.createElement("img");wa.src="/images/icon-search.svg";wa.className="geTempDlgDiagramListPreviewBtn";wa.setAttribute("title",mxResources.get("preview"));ra||Ja.appendChild(wa);Ka=document.createElement("span");Ka.className="geTempDlgDiagramTitle";Ka.innerHTML=xa;Ja.appendChild(Ka);Ea.appendChild(Ja);Ja=document.createElement("td");Ja.innerText=Ba;Ea.appendChild(Ja);Ja=document.createElement("td");Ja.innerText=La;Ea.appendChild(Ja); +ja.appendChild(Ea);null==M&&(J(ea),A(Ea,"geTempDlgDiagramsListGridActive",ka[na]));(function(Sa,Ta,Pa){mxEvent.addListener(Ea,"click",function(){M!=Ta&&(J(ea),A(Ta,"geTempDlgDiagramsListGridActive",Sa))});mxEvent.addListener(Ea,"dblclick",E);mxEvent.addListener(wa,"click",function(Na){z(Sa,Ta,Pa,Na)})})(ka[na],Ea,wa)}else{var Ma=document.createElement("div");Ma.className="geTempDlgDiagramTile";Ma.setAttribute("title",Ka);null==M&&(J(ea),A(Ma,"geTempDlgDiagramTileActive",ka[na]));Ba=document.createElement("div"); Ba.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Oa=document.createElement("img");Oa.style.display="none";(function(Sa,Ta,Pa){Oa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Sa.style.display=""};Oa.onerror=function(){this.src!=Pa?this.src=Pa:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Oa,Ba,Ja?Ja.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Oa.src=Ja;Ba.appendChild(Oa);Ma.appendChild(Ba);Ba=document.createElement("div"); Ba.className="geTempDlgDiagramTileLbl";Ba.innerHTML=null!=xa?xa:"";Ma.appendChild(Ba);wa=document.createElement("img");wa.src="/images/icon-search.svg";wa.className="geTempDlgDiagramPreviewBtn";wa.setAttribute("title",mxResources.get("preview"));ra||Ma.appendChild(wa);(function(Sa,Ta,Pa){mxEvent.addListener(Ma,"click",function(){M!=Ta&&(J(ea),A(Ta,"geTempDlgDiagramTileActive",Sa))});mxEvent.addListener(Ma,"dblclick",E);mxEvent.addListener(wa,"click",function(Na){z(Sa,Ta,Pa,Na)})})(ka[na],Ma,wa);ca.appendChild(Ma)}}for(var Xa in pa)ka= pa[Xa],0oa?oa:ka.length;for(var pa=0;pa
'+mxResources.get("newDiagram")+'
'+ mxResources.get("showMore")+'
'+mxResources.get("myDiagrams")+'
'+ mxResources.get("allDiagrams")+'

'+ (I?''+mxResources.get("linkToDiagramHint")+'":"")+(G?'
'+mxResources.get("open")+"
":"")+'
'+mxResources.get("create")+'
'+mxResources.get("cancel")+"
",u=document.createElement("div");u.innerHTML=p;u.className= "geTemplateDlg";this.container=u;k=null!=k?k:TEMPLATE_PATH+"/index.xml";c=null!=c?c:NEW_DIAGRAM_CATS_PATH+"/index.xml";var K=!1,m=!1,x=null,H=null,M=null,N=null,T=!1,Q=!0,W=!1,X=[],Z=null,Y,aa,fa=!1,ba=u.querySelector(".geTempDlgShowAllBtn"),ca=u.querySelector(".geTempDlgDiagramsTiles"),ha=u.querySelector(".geTempDlgDiagramsListTitle"),za=u.querySelector(".geTempDlgDiagramsListBtns"),Aa=u.querySelector(".geTempDlgContent"),da=u.querySelector(".geTempDlgDiagramsList"),ia=u.querySelector(".geTempDlgNewDiagramCat"), -la=u.querySelector(".geTempDlgNewDiagramCatList"),ma=u.querySelector(".geTempDlgCreateBtn"),ya=u.querySelector(".geTempDlgOpenBtn"),Ca=u.querySelector(".geTempDlgSearchBox"),ta=u.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(u.querySelector(".geTempDlgBack"),"click",function(){q();fa=!1;u.querySelector(".geTemplatesList").style.display="none";Aa.style.width= -"100%";ia.style.display="";da.style.minHeight="calc(100% - 280px)";Ca.style.display=y?"":"none";Ca.value="";Y=null;R(Q)});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==Y?R(Q):O(Y))});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", +la=u.querySelector(".geTempDlgNewDiagramCatList"),ma=u.querySelector(".geTempDlgCreateBtn"),ya=u.querySelector(".geTempDlgOpenBtn"),Da=u.querySelector(".geTempDlgSearchBox"),ta=u.querySelector(".geTempDlgErrMsg"),Ca=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(u.querySelector(".geTempDlgBack"),"click",function(){q();fa=!1;u.querySelector(".geTemplatesList").style.display="none";Aa.style.width= +"100%";ia.style.display="";da.style.minHeight="calc(100% - 280px)";Da.style.display=y?"":"none";Da.value="";Y=null;R(Q)});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){t(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==Y?R(Q):O(Y))});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){t(this,"geTempDlgMyDiagramsBtnImg","my-diagrams", "allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==Y?R(Q):O(Y))});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){t(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(W=!0,F(X,!1,W,Z))});mxEvent.addListener(u.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){t(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(W=!1,F(X,!1,W,Z))});var qa=!1;mxEvent.addListener(ba, -"click",function(){T?(ia.style.height="280px",la.style.height="190px",ba.innerText=mxResources.get("showMore"),V(Ha)):(ia.style.height="440px",la.style.height="355px",ba.innerText=mxResources.get("showLess"),V(Ha,!0));T=!T});var sa=!1,va=!1,Ga={},Ea={},Qa={},Ha=[],Ra=1,Ia=0;null!=C?C(function(ka,ea){Qa=ka;Ia=ea;L()},L):L();mxUtils.get(c,function(ka){if(!va){va=!0;for(ka=ka.getXml().documentElement.firstChild;null!=ka;)"undefined"!==typeof ka.getAttribute&&null!=ka.getAttribute("title")&&Ha.push({img:ka.getAttribute("img"), -libs:ka.getAttribute("libs"),clibs:ka.getAttribute("clibs"),title:ka.getAttribute("title")}),ka=ka.nextSibling;V(Ha)}});var Va=function(ka,ea,oa){za.style.display="";Fa.stop();K=!1;if(m)m=!1;else if(ea)ca.innerText=ea;else{oa=oa||{};ea=0;for(var pa in oa)ea+=oa[pa].length;0==ka.length&&0==ea?ca.innerText=mxResources.get("noDiagrams"):F(ka,!1,W,0==ea?null:oa)}};R(Q);var Ua=null;mxEvent.addListener(Ca,"keyup",S);mxEvent.addListener(Ca,"search",S);mxEvent.addListener(Ca,"input",S);mxEvent.addListener(ma, +"click",function(){T?(ia.style.height="280px",la.style.height="190px",ba.innerText=mxResources.get("showMore"),V(Ha)):(ia.style.height="440px",la.style.height="355px",ba.innerText=mxResources.get("showLess"),V(Ha,!0));T=!T});var sa=!1,va=!1,Ga={},Fa={},Qa={},Ha=[],Ra=1,Ia=0;null!=C?C(function(ka,ea){Qa=ka;Ia=ea;L()},L):L();mxUtils.get(c,function(ka){if(!va){va=!0;for(ka=ka.getXml().documentElement.firstChild;null!=ka;)"undefined"!==typeof ka.getAttribute&&null!=ka.getAttribute("title")&&Ha.push({img:ka.getAttribute("img"), +libs:ka.getAttribute("libs"),clibs:ka.getAttribute("clibs"),title:ka.getAttribute("title")}),ka=ka.nextSibling;V(Ha)}});var Va=function(ka,ea,oa){za.style.display="";Ca.stop();K=!1;if(m)m=!1;else if(ea)ca.innerText=ea;else{oa=oa||{};ea=0;for(var pa in oa)ea+=oa[pa].length;0==ka.length&&0==ea?ca.innerText=mxResources.get("noDiagrams"):F(ka,!1,W,0==ea?null:oa)}};R(Q);var Ua=null;mxEvent.addListener(Da,"keyup",S);mxEvent.addListener(Da,"search",S);mxEvent.addListener(Da,"input",S);mxEvent.addListener(ma, "click",function(ka){E(!1,!1)});G&&mxEvent.addListener(ya,"click",function(ka){E(!1,!0)});I&&mxEvent.addListener(u.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ka){E(!0)});mxEvent.addListener(u.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();g||b.hideDialog(!0)})};TemplatesDialog.tagsList={}; var BtnDialog=function(b,e,f,k){var c=document.createElement("div");c.style.textAlign="center";var l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("done"));var v="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox? (v=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}")); @@ -11688,10 +11688,10 @@ function(){0==M&&this.embedCssFonts(H.join(""),m)}),T=0;TM.indexOf("mxPageSelector")&&0c;c++)for(var l=c,v=0;8>v;v++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[c]=l;Editor.updateCRC=function(m,x,H,M){for(var N=0;N>>8;return m};Editor.crc32=function(m){for(var x=-1,H=0;H>>8^Editor.crcTable[(x^m.charCodeAt(H))&255];return(x^-1)>>>0};Editor.writeGraphModelToPng=function(m,x,H,M,N){function T(Y,aa){var fa= +0,0);m(Da,ia)},0):(qa.drawImage(la,0,0),m(Da,ia))},Da=document.createElement("canvas"),ta=parseInt(ia.getAttribute("width")),Ca=parseInt(ia.getAttribute("height"));W=null!=W?W:1;null!=x&&(W=T?Math.min(1,Math.min(3*x/(4*Ca),x/ta)):x/ta);W=this.getMaxCanvasScale(ta,Ca,W);ta=Math.ceil(W*ta);Ca=Math.ceil(W*Ca);Da.setAttribute("width",ta);Da.setAttribute("height",Ca);var qa=Da.getContext("2d");null!=da&&(qa.beginPath(),qa.rect(0,0,ta,Ca),qa.fillStyle=da,qa.fill());1!=W&&qa.scale(W,W);if(ca){var sa=aa.view, +va=sa.scale;sa.scale=1;var Ga=btoa(unescape(encodeURIComponent(sa.createSvgGrid(sa.gridColor))));sa.scale=va;Ga="data:image/svg+xml;base64,"+Ga;var Fa=aa.gridSize*sa.gridSteps*W,Qa=aa.getGraphBounds(),Ha=sa.translate.x*va,Ra=sa.translate.y*va,Ia=Ha+(Qa.x-Ha)/va-fa,Va=Ra+(Qa.y-Ra)/va-fa,Ua=new Image;Ua.onload=function(){try{for(var ka=-Math.round(Fa-mxUtils.mod((Ha-Ia)*W,Fa)),ea=-Math.round(Fa-mxUtils.mod((Ra-Va)*W,Fa));kac;c++)for(var l=c,v=0;8>v;v++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[c]=l;Editor.updateCRC=function(m,x,H,M){for(var N=0;N>>8;return m};Editor.crc32=function(m){for(var x=-1,H=0;H>>8^Editor.crcTable[(x^m.charCodeAt(H))&255];return(x^-1)>>>0};Editor.writeGraphModelToPng=function(m,x,H,M,N){function T(Y,aa){var fa= X;X+=aa;return Y.substring(fa,X)}function Q(Y){Y=T(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+(Y.charCodeAt(0)<<24)}function W(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var X=0;if(T(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(T(m,4),"IHDR"!=T(m,4))null!=N&&N();else{T(m,17);N=m.substring(0,X);do{var Z=Q(m);if("IDAT"==T(m,4)){N= m.substring(0,X-8);"pHYs"==x&&"dpi"==H?(H=Math.round(M/.0254),H=W(H)+W(H)+String.fromCharCode(1)):H=H+String.fromCharCode(0)+("zTXt"==x?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,x,0,4);M=Editor.updateCRC(M,H,0,H.length);N+=W(H.length)+x+H+W(M^4294967295);N+=m.substring(X-8,m.length);break}N+=m.substring(X-8,X-4+Z);T(m,Z);T(m,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats"; var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,x){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var D=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,x){var H=null;null!=m.editor.graph.getModel().getParent(x)?H=x.getId(): @@ -11724,30 +11724,30 @@ font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"# function(m,x,H){if(null!=x){var M=function(T){if(null!=T)if(H)for(var Q=0;Qva.size&&(Ha=Ha.slice(0,va.size));sa=Ha.join(",");null!=va.countProperty&&(aa.setCellStyles(va.countProperty,Ha.length,aa.getSelectionCells()),Ea.push(va.countProperty),Qa.push(Ha.length))}aa.setCellStyles(qa,sa,aa.getSelectionCells());Ea.push(qa);Qa.push(sa);if(null!=va.dependentProps)for(qa=0;qasa)Va= -Va.slice(0,sa);else for(var Ua=Va.length;Uava.size&&(Ha=Ha.slice(0,va.size));sa=Ha.join(",");null!=va.countProperty&&(aa.setCellStyles(va.countProperty,Ha.length,aa.getSelectionCells()),Fa.push(va.countProperty),Qa.push(Ha.length))}aa.setCellStyles(qa,sa,aa.getSelectionCells());Fa.push(qa);Qa.push(sa);if(null!=va.dependentProps)for(qa=0;qasa)Va= +Va.slice(0,sa);else for(var Ua=Va.length;Uava.max&&(ea=va.max);ea=encodeURIComponent(("int"==Ha?parseInt(ea):ea)+"");M(qa,ea,va)}var ka=document.createElement("input");N(Ia,ka,!0);ka.value=decodeURIComponent(sa);ka.className="gePropEditor";"int"!=Ha&&"float"!=Ha||va.allowAuto|| -(ka.type="number",ka.step="int"==Ha?"1":"any",null!=va.min&&(ka.min=parseFloat(va.min)),null!=va.max&&(ka.max=parseFloat(va.max)));m.appendChild(ka);mxEvent.addListener(ka,"keypress",function(ea){13==ea.keyCode&&Ua()});ka.focus();mxEvent.addListener(ka,"blur",function(){Ua()})})));va.isDeletable&&(Ea=mxUtils.button("-",mxUtils.bind(Y,function(Ua){M(qa,"",va,va.index);mxEvent.consume(Ua)})),Ea.style.height="16px",Ea.style.width="25px",Ea.style.float="right",Ea.className="geColorBtn",Ia.appendChild(Ea)); +(ka.type="number",ka.step="int"==Ha?"1":"any",null!=va.min&&(ka.min=parseFloat(va.min)),null!=va.max&&(ka.max=parseFloat(va.max)));m.appendChild(ka);mxEvent.addListener(ka,"keypress",function(ea){13==ea.keyCode&&Ua()});ka.focus();mxEvent.addListener(ka,"blur",function(){Ua()})})));va.isDeletable&&(Fa=mxUtils.button("-",mxUtils.bind(Y,function(Ua){M(qa,"",va,va.index);mxEvent.consume(Ua)})),Fa.style.height="16px",Fa.style.width="25px",Fa.style.float="right",Fa.className="geColorBtn",Ia.appendChild(Fa)); Ra.appendChild(Ia);return Ra}var Y=this,aa=this.editorUi.editor.graph,fa=[];m.style.position="relative";m.style.padding="0";var ba=document.createElement("table");ba.className="geProperties";ba.style.whiteSpace="nowrap";ba.style.width="100%";var ca=document.createElement("tr");ca.className="gePropHeader";var ha=document.createElement("th");ha.className="gePropHeaderCell";var za=document.createElement("img");za.src=Sidebar.prototype.expandedImage;za.style.verticalAlign="middle";ha.appendChild(za); -mxUtils.write(ha,mxResources.get("property"));ca.style.cursor="pointer";var Aa=function(){var qa=ba.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){za.src=Sidebar.prototype.collapsedImage;var sa="none";for(var va=m.childNodes.length-1;0<=va;va--)try{var Ga=m.childNodes[va],Ea=Ga.nodeName.toUpperCase();"INPUT"!=Ea&&"SELECT"!=Ea||m.removeChild(Ga)}catch(Qa){}}else za.src=Sidebar.prototype.expandedImage,sa="";for(va=0;va=this.defaultColorSchemes.length?"24px":"30px";da.style.margin="0px 6px 6px 0px";if(null!=Aa){var ia=Editor.isDarkMode()?"2px solid":"1px solid";null!=Aa.border&&(ia=Aa.border);null!=Aa.gradient?mxClient.IS_IE&&10>document.documentMode?da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Aa.fill+"', EndColorStr='"+ +mxUtils.bind(this,function(ma){M.getModel().beginUpdate();try{for(var ya=H.getSelectionState().cells,Da=0;Da=this.defaultColorSchemes.length?"24px":"30px";da.style.margin="0px 6px 6px 0px";if(null!=Aa){var ia=Editor.isDarkMode()?"2px solid":"1px solid";null!=Aa.border&&(ia=Aa.border);null!=Aa.gradient?mxClient.IS_IE&&10>document.documentMode?da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Aa.fill+"', EndColorStr='"+ Aa.gradient+"', GradientType=0)":da.style.backgroundImage="linear-gradient("+Aa.fill+" 0px,"+Aa.gradient+" 100%)":Aa.fill==mxConstants.NONE?da.style.background="url('"+Dialog.prototype.noColorImage+"')":da.style.backgroundColor=""==Aa.fill?mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Aa.fill||mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");da.style.border=Aa.stroke== mxConstants.NONE?ia+" transparent":""==Aa.stroke?ia+" "+mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):ia+" "+(Aa.stroke||mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Aa.title&&da.setAttribute("title",Aa.title)}else{ia=mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var la=mxUtils.getValue(M.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, "#000000");da.style.backgroundColor=ia;da.style.border="1px solid "+la}da.style.borderRadius="0";N.appendChild(da)});N.innerText="";for(var za=0;za=this.defaultColorSchemes.length?28:8;var fa=document.createElement("div");fa.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=);"; @@ -11762,41 +11762,41 @@ m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.co parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=T.marginLeft||0;Q.marginRight=T.marginRight||0;Q.marginTop=T.marginTop||0;Q.marginBottom=T.marginBottom||0;Q.allowGaps=T.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var n=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,x){return Graph.processFontStyle(n.apply(this, arguments))};var q=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,x,H,M,N,T,Q,W,X,Z,Y){q.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,x,H,M){function N(){for(var ha=W.getSelectionCells(),za=[],Aa=0;AamxUtils.indexOf(W.hiddenTags,la),Ca=document.createElement("tr"),ta=document.createElement("td");ta.style.align="center";ta.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",ya?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",mxResources.get(ya?"hideIt":"show",[la]));mxUtils.setOpacity(Fa,ya?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(x||Editor.isDarkMode())Fa.style.filter= -"invert(100%)";ta.appendChild(Fa);mxEvent.addListener(Fa,"click",function(sa){mxEvent.isShiftDown(sa)?T(0<=mxUtils.indexOf(W.hiddenTags,la)):(W.toggleHiddenTag(la),N(),W.refresh());mxEvent.consume(sa)});Ca.appendChild(ta);ta=document.createElement("td");ta.style.align="center";ta.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.selectImage);Fa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Fa,ya?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor= -"pointer";Fa.style.width="16px";if(x||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(sa){T(!0);ma();mxEvent.consume(sa)});ta.appendChild(Fa);Ca.appendChild(ta);ta=document.createElement("td");ta.style.overflow="hidden";ta.style.whiteSpace="nowrap";ta.style.textOverflow="ellipsis";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.setAttribute("title",la);a=document.createElement("a");mxUtils.write(a,la);a.style.textOverflow="ellipsis";a.style.position= -"relative";mxUtils.setOpacity(a,ya?100:40);ta.appendChild(a);mxEvent.addListener(ta,"click",function(sa){if(mxEvent.isShiftDown(sa))T(!0),ma();else if(ya&&0mxUtils.indexOf(X,ha[za])&&X.push(ha[za]);X.sort();W.isSelectionEmpty()?Q(X):Q(X,W.getCommonTagsForCells(W.getSelectionCells()))}});W.selectionModel.addListener(mxEvent.CHANGE,ba);W.model.addListener(mxEvent.CHANGE,ba);W.addListener(mxEvent.REFRESH,ba);var ca=document.createElement("div");ca.style.display="flex";ca.style.alignItems="center";ca.style.boxSizing="border-box"; -ca.style.whiteSpace="nowrap";ca.style.position="absolute";ca.style.overflow="hidden";ca.style.bottom="6px";ca.style.height="42px";ca.style.right="10px";ca.style.left="10px";W.isEnabled()&&(ca.appendChild(aa),ca.appendChild(fa),Z.appendChild(ca));null!=M&&ca.appendChild(M);return{div:Z,refresh:ba}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var x in Graph.customFontElements){var H=Graph.customFontElements[x];m.push({name:H.name,url:H.url})}return m};Graph.prototype.setFont= -function(m,x){Graph.addFont(m,x);document.execCommand("fontname",!1,m);if(null!=x){var H=this.cellEditor.textarea.getElementsByTagName("font");x=Graph.getFontUrl(m,x);for(var M=0;M'+mxUtils.htmlEntities(m)+""};mxGraphView.prototype.redrawEnumerationState=function(m){var x="1"==mxUtils.getValue(m.style,"enumerate",0);x&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML, -this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):x||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);x=m.secondLabel;if(null!=x){var H=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*H,m.y+4*H,0,0):mxRectangle.fromPoint(m.view.getPoint(m));x.bounds.equals(m)&&x.value==M&&x.scale==H||(x.bounds=m,x.value=M,x.scale=H,x.redraw())}};var P=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage= -function(){P.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var m=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&& -this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",m.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,m.ownerSVGElement))}};var L=Graph.prototype.refresh;Graph.prototype.refresh=function(){L.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!= -this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var R=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){R.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,x){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,x))};Graph.prototype.executeCustomActions= -function(m,x,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,N=0,T=0,Q=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),W=mxUtils.bind(this,function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0< -N&&N--;0==N&&Z()}),Z=mxUtils.bind(this,function(){if(TmxUtils.indexOf(aa.tags.visible,ha[ba])&&0>mxUtils.indexOf(ca,ha[ba])&&ca.push(ha[ba])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0m.excludeCells.indexOf(x[M].id)&&H.push(x[M]);x=H}return x};Graph.prototype.getCellsById=function(m){var x=[];if(null!=m)for(var H=0;Hx?this.hiddenTags.push(m):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; +W.highlightCells(sa,null,null,70)}var ya=0>mxUtils.indexOf(W.hiddenTags,la),Da=document.createElement("tr"),ta=document.createElement("td");ta.style.align="center";ta.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",ya?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title",mxResources.get(ya?"hideIt":"show",[la]));mxUtils.setOpacity(Ca,ya?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(x|| +Editor.isDarkMode())Ca.style.filter="invert(100%)";ta.appendChild(Ca);mxEvent.addListener(Ca,"click",function(sa){mxEvent.isShiftDown(sa)?T(0<=mxUtils.indexOf(W.hiddenTags,la)):(W.toggleHiddenTag(la),N(),W.refresh());mxEvent.consume(sa)});Da.appendChild(ta);ta=document.createElement("td");ta.style.align="center";ta.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.selectImage);Ca.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ca,ya?75:25);Ca.className= +"geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(x||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(sa){T(!0);ma();mxEvent.consume(sa)});ta.appendChild(Ca);Da.appendChild(ta);ta=document.createElement("td");ta.style.overflow="hidden";ta.style.whiteSpace="nowrap";ta.style.textOverflow="ellipsis";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.setAttribute("title",la);a=document.createElement("a"); +mxUtils.write(a,la);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ya?100:40);ta.appendChild(a);mxEvent.addListener(ta,"click",function(sa){if(mxEvent.isShiftDown(sa))T(!0),ma();else if(ya&&0mxUtils.indexOf(X,ha[za])&&X.push(ha[za]);X.sort();W.isSelectionEmpty()?Q(X):Q(X,W.getCommonTagsForCells(W.getSelectionCells()))}});W.selectionModel.addListener(mxEvent.CHANGE,ba);W.model.addListener(mxEvent.CHANGE,ba);W.addListener(mxEvent.REFRESH, +ba);var ca=document.createElement("div");ca.style.display="flex";ca.style.alignItems="center";ca.style.boxSizing="border-box";ca.style.whiteSpace="nowrap";ca.style.position="absolute";ca.style.overflow="hidden";ca.style.bottom="6px";ca.style.height="42px";ca.style.right="10px";ca.style.left="10px";W.isEnabled()&&(ca.appendChild(aa),ca.appendChild(fa),Z.appendChild(ca));null!=M&&ca.appendChild(M);return{div:Z,refresh:ba}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice(): +[];for(var x in Graph.customFontElements){var H=Graph.customFontElements[x];m.push({name:H.name,url:H.url})}return m};Graph.prototype.setFont=function(m,x){Graph.addFont(m,x);document.execCommand("fontname",!1,m);if(null!=x){var H=this.cellEditor.textarea.getElementsByTagName("font");x=Graph.getFontUrl(m,x);for(var M=0;M'+mxUtils.htmlEntities(m)+""};mxGraphView.prototype.redrawEnumerationState=function(m){var x="1"==mxUtils.getValue(m.style,"enumerate",0);x&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT, +mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):x||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);x=m.secondLabel;if(null!=x){var H=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*H,m.y+4*H,0,0):mxRectangle.fromPoint(m.view.getPoint(m));x.bounds.equals(m)&&x.value==M&&x.scale==H||(x.bounds= +m,x.value=M,x.scale=H,x.redraw())}};var P=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){P.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var m=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName|| +this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",m.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,m.ownerSVGElement))}};var L=Graph.prototype.refresh;Graph.prototype.refresh=function(){L.apply(this, +arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var R=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){R.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,x){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)), +null!=m.actions&&this.executeCustomActions(m.actions,null,x))};Graph.prototype.executeCustomActions=function(m,x,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!1,N=0,T=0,Q=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}), +W=mxUtils.bind(this,function(){M&&(M=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0mxUtils.indexOf(aa.tags.visible,ha[ba])&&0>mxUtils.indexOf(ca,ha[ba])&&ca.push(ha[ba])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0m.excludeCells.indexOf(x[M].id)&&H.push(x[M]);x=H}return x};Graph.prototype.getCellsById=function(m){var x=[];if(null!=m)for(var H=0;Hx?this.hiddenTags.push(m):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var x=0;xmxUtils.indexOf(this.hiddenTags,m[x]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,x,H,M){var N=[];if(null!=m){x=null!=x?x:this.model.getDescendants(this.model.getRoot());for(var T=0,Q={},W=0;W=m.length)){for(var Y=Z=0;Y'),Za.writeln("@media print {"),Za.writeln(".MathJax svg { shape-rendering: crispEdges; }"), Za.writeln("}"),Za.writeln(""));null!=m.editor.fontCss&&(Za.writeln('"));for(var cb=Ba.getCustomFonts(),bb=0;bb'):(Za.writeln('"))}};if(Editor.enableCssDarkMode){var ib=La.getBackgroundImage;La.getBackgroundImage=function(){return N.adaptBackgroundPage(ib.apply(this,arguments))}}if("undefined"!==typeof MathJax){var jb=La.renderPage;La.renderPage=function(Za,cb,bb,eb,db,lb){var kb=mxClient.NO_FO,fb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Na=null;Ya=N.shapeForegroundColor;$a=N.shapeBackgroundColor; -Wa=N.enableFlowAnimation;N.enableFlowAnimation=!1;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Na=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());La.open(null,null,Da,!0,wa);N.enableFlowAnimation=Wa;null!=Na&&(N.shapeForegroundColor=Ya,N.shapeBackgroundColor=$a,N.stylesheet=Na,N.refresh())}else{Wa=Ba.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";La.backgroundColor=Wa;La.autoOrigin=$a;La.appendGraph(Ba, -ab,Na,Ya,Da,!0,wa);Da=Ba.getCustomFonts();if(null!=La.wnd)for(Na=0;Na'):(La.wnd.document.writeln('"))}Ma&&(Ba.useCssTransforms= -Ma,Ba.currentTranslate=Oa,Ba.currentScale=Xa,Ba.view.translate=Sa,Ba.view.scale=Ta);return La}var Ra=parseInt(Ea.value)/100;isNaN(Ra)&&(Ra=1,Ea.value="100 %");mxClient.IS_SF&&(Ra*=.75);var Ia=null,Va=N.shapeForegroundColor,Ua=N.shapeBackgroundColor;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Ia=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());var ka=aa.value,ea=fa.value,oa=!Z.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(m, -Z.checked,ka,ea,Aa.checked,sa.value,va.value,parseInt(za.value)/100,parseInt(Ea.value)/100,Ga.get());else{oa&&(oa=ba.checked||ka==X&&ea==X);if(!oa&&null!=m.pages&&m.pages.length){var ra=0;oa=m.pages.length-1;Z.checked||(ra=parseInt(ka)-1,oa=parseInt(ea)-1);for(var ja=ra;ja<=oa;ja++){var na=m.pages[ja];ka=na==m.currentPage?N:null;if(null==ka){ka=m.createTemporaryGraph(N.stylesheet);ka.shapeForegroundColor=N.shapeForegroundColor;ka.shapeBackgroundColor=N.shapeBackgroundColor;ea=!0;ra=!1;var xa=null, +Wa=N.enableFlowAnimation;N.enableFlowAnimation=!1;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Na=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());La.open(null,null,Ea,!0,wa);N.enableFlowAnimation=Wa;null!=Na&&(N.shapeForegroundColor=Ya,N.shapeBackgroundColor=$a,N.stylesheet=Na,N.refresh())}else{Wa=Ba.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";La.backgroundColor=Wa;La.autoOrigin=$a;La.appendGraph(Ba, +ab,Na,Ya,Ea,!0,wa);Ea=Ba.getCustomFonts();if(null!=La.wnd)for(Na=0;Na'):(La.wnd.document.writeln('"))}Ma&&(Ba.useCssTransforms= +Ma,Ba.currentTranslate=Oa,Ba.currentScale=Xa,Ba.view.translate=Sa,Ba.view.scale=Ta);return La}var Ra=parseInt(Fa.value)/100;isNaN(Ra)&&(Ra=1,Fa.value="100 %");mxClient.IS_SF&&(Ra*=.75);var Ia=null,Va=N.shapeForegroundColor,Ua=N.shapeBackgroundColor;null!=N.themes&&"darkTheme"==N.defaultThemeName&&(Ia=N.stylesheet,N.stylesheet=N.getDefaultStylesheet(),N.shapeForegroundColor="#000000",N.shapeBackgroundColor="#ffffff",N.refresh());var ka=aa.value,ea=fa.value,oa=!Z.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(m, +Z.checked,ka,ea,Aa.checked,sa.value,va.value,parseInt(za.value)/100,parseInt(Fa.value)/100,Ga.get());else{oa&&(oa=ba.checked||ka==X&&ea==X);if(!oa&&null!=m.pages&&m.pages.length){var ra=0;oa=m.pages.length-1;Z.checked||(ra=parseInt(ka)-1,oa=parseInt(ea)-1);for(var ja=ra;ja<=oa;ja++){var na=m.pages[ja];ka=na==m.currentPage?N:null;if(null==ka){ka=m.createTemporaryGraph(N.stylesheet);ka.shapeForegroundColor=N.shapeForegroundColor;ka.shapeBackgroundColor=N.shapeBackgroundColor;ea=!0;ra=!1;var xa=null, ua=null;null==na.viewState&&null==na.root&&m.updatePageRoot(na);null!=na.viewState&&(ea=na.viewState.pageVisible,ra=na.viewState.mathEnabled,xa=na.viewState.background,ua=na.viewState.backgroundImage,ka.extFonts=na.viewState.extFonts);null!=ua&&null!=ua.originalSrc&&(ua=m.createImageForPageLink(ua.originalSrc,na));ka.background=xa;ka.backgroundImage=null!=ua?new mxImage(ua.src,ua.width,ua.height,ua.x,ua.y):null;ka.pageVisible=ea;ka.mathEnabled=ra;var Ka=ka.getGraphBounds;ka.getGraphBounds=function(){var Ba= -Ka.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Da=this.view.translate,wa=this.view.scale;Ba=mxRectangle.fromRectangle(Ba);Ba.add(new mxRectangle((Da.x+La.x)*wa,(Da.y+La.y)*wa,La.width*wa,La.height*wa))}return Ba};var Ja=ka.getGlobalVariable;ka.getGlobalVariable=function(Ba){return"page"==Ba?na.getName():"pagenumber"==Ba?ja+1:"pagecount"==Ba?null!=m.pages?m.pages.length:1:Ja.apply(this,arguments)};document.body.appendChild(ka.container);m.updatePageRoot(na); +Ka.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Ea=this.view.translate,wa=this.view.scale;Ba=mxRectangle.fromRectangle(Ba);Ba.add(new mxRectangle((Ea.x+La.x)*wa,(Ea.y+La.y)*wa,La.width*wa,La.height*wa))}return Ba};var Ja=ka.getGlobalVariable;ka.getGlobalVariable=function(Ba){return"page"==Ba?na.getName():"pagenumber"==Ba?ja+1:"pagecount"==Ba?null!=m.pages?m.pages.length:1:Ja.apply(this,arguments)};document.body.appendChild(ka.container);m.updatePageRoot(na); ka.model.setRoot(na.root)}pa=Ha(ka,pa,ja!=oa,na.getId());ka!=N&&ka.container.parentNode.removeChild(ka.container)}}else pa=Ha(N);null==pa||null==pa.wnd?m.handleError({message:mxResources.get("errorUpdatingPreview")}):(pa.mathEnabled&&(oa=pa.wnd.document,Qa&&(pa.wnd.IMMEDIATE_PRINT=!0),oa.writeln('