mcanoglu/cwe-class-group huggingface dataset:
l.style.verticalAlign="middle";l.className="geBtn";M.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&M.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(n){if(n.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=n.docs;var y=n.docs[0].url;"application/mxe"==n.docs[0].mimeType||null!=n.docs[0].mimeType&&
"application/vnd.jgraph."==n.docs[0].mimeType.substring(0,23)?y="https://www.draw.io/#G"+n.docs[0].id:"application/vnd.google-apps.folder"==n.docs[0].mimeType&&(y="https://drive.google.com/#folders/"+n.docs[0].id);k.value=y;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,

// Vulnerability class: CWE-20
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,

// Vulnerability class: CWE-20
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");
null==ca.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);
M.appendChild(T);ca.appendChild(z);M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);

// Vulnerability class: CWE-20
ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Qa=this.getCellGeometry(ya);null!=Oa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Oa.height,T.setGeometry(ya,Qa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=

// Vulnerability class: CWE-20
x){q=null!=q?q:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=x&&A.setAttribute("name",x);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");q&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,
e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";k=document.createElement("option");k.setAttribute("value","blank");mxUtils.write(k,mxResources.get("makeCopy"));q.appendChild(k);
k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom")+"...");q.appendChild(k);c.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var v=new FilenameDialog(this,m,mxResources.get("ok"),function(x){null!=x?m=x:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(v.container,300,80,!0,!1);v.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(x.style.border="1px solid black",

// Vulnerability class: CWE-20
this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var E=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ea=mxUtils.getOffset(this.editorUi.picker);ea.x+=this.editorUi.picker.offsetWidth+4;ea.y+=O.offsetTop-X.height/2+16;return ea}var ka=E.apply(this,arguments);ea=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ka.x+=
ea.x-16;ka.y+=ea.y;return ka};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,X,ea){var ka=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ka.isEnabled()&&(O.addSeparator(),1==ka.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,ea)):1==ka.getSelectionCount()?(ka.isCellFoldable(ka.getSelectionCell())&&this.addMenuItems(O,ka.isCellCollapsed(X)?["expand"]:["collapse"],null,ea),this.addMenuItems(O,["collapsible",

// Vulnerability class: CWE-20
[];for(G=0;G<d.length;G++)C.push(d[G]);d=C;this.confirmImageResize(function(K){L=K;P()},A)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():

// Vulnerability class: CWE-20
m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(u);c.appendChild(e);D.appendChild(c);t.appendChild(D);this.container=t},CustomDialog=function(b,f,l,d,u,t,D,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=D&&q.appendChild(D);b.isOffline()||
null==t||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(t)}),f.className="geBtn",q.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&q.appendChild(e);u=mxUtils.button(u||mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,
null,this.container)}));q.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,A){v=mxUtils.button(v,function(z){x(z)});null!=A&&v.setAttribute("title",A);v.className="geBtn";q.appendChild(v)})(k[c][0],k[c][1],k[c][2]);m.appendChild(q);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,D,c,e,g,k,m,q,v,x){function A(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block";

// Vulnerability class: CWE-20
Sa.dy?Sa.dy:0);Ga.insert(Ha)}ta.push(Ga);mxUtils.remove(qa.invert?ia:Ja,za)}}}});pa(xa,xa,ka);if(null!=v[xa.id])for(Ka=0;Ka<v[xa.id].length;Ka++)pa(xa,v[xa.id][Ka],ka)}}if(null!=da)for(aa=0;aa<k.length;aa++)for(xa=k[aa],Ka=0;Ka<da.length;Ka++)A.setAttributeForCell(xa,mxUtils.trim(da[Ka]),null);if(0<q.length){var sa=new mxParallelEdgeLayout(A);sa.spacing=Q;sa.checkOverlap=!0;var ya=function(){0<sa.spacing&&sa.execute(A.getDefaultParent());for(var ia=0;ia<q.length;ia++){var ma=A.getCellGeometry(q[ia]);
ma.x=Math.round(A.snap(ma.x));ma.y=Math.round(A.snap(ma.y));"auto"==E&&(ma.width=Math.round(A.snap(ma.width)));"auto"==H&&(ma.height=Math.round(A.snap(ma.height)))}};if("["==O.charAt(0)){var va=p;A.view.validate();this.executeLayoutList(JSON.parse(O),function(){ya();va()});p=null}else if("circle"==O){var ra=new mxCircleLayout(A);ra.disableEdgeStyle=!1;ra.resetEdges=!1;var wa=ra.isVertexIgnored;ra.isVertexIgnored=function(ia){return wa.apply(this,arguments)||0>mxUtils.indexOf(q,ia)};this.executeLayout(function(){ra.execute(A.getDefaultParent());

// Vulnerability class: CWE-20
p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||
null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,
null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,A){x=mxUtils.button(x,function(B){y(B)});null!=A&&x.setAttribute("title",A);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function A(ha){Fa.innerHTML=mxUtils.htmlEntities(ha);Fa.style.display="block";

// Vulnerability class: CWE-20
function(y){this.spinner.stop();this.handleError(y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,A,k,q,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,q){};EditorUi.prototype.pickFolder=function(c,

// Vulnerability class: CWE-20
d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function C(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var D=l.createVertexHandler;l.createVertexHandler=function(){var J=D.apply(this,
arguments);J.livePreview=!1;return J};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,P=g.width,K=g.height,F=(300-P)/2,H=(300-K)/2,S=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(S[0]),M=parseFloat(S[1]),W=parseFloat(S[2]),U=parseFloat(S[3]);isFinite(V)&&isFinite(M)&&isFinite(W)&&isFinite(U)?(G.x=U/100*P+F,G.y=V/100*K+H,G.width=(100-M)/100*P+F-G.x,G.height=(100-W)/100*K+H-G.y,"round"==S[4]?"50%"==S[5]?I.setAttribute("checked","checked"):(q=parseInt(S[5]),t.value=q,B.setAttribute("checked",

// Vulnerability class: CWE-20
c,q,n,v),k&&!l?q.y=A.y:l&&!k&&(q.x=A.x),A.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;D(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,

// Vulnerability class: CWE-20
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea,

// Vulnerability class: CWE-20
if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}

// Vulnerability class: CWE-20
T){var N=Graph.customFontElements[T];null!=N&&N.url!=E&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=E,"http:"==E.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(E)),N={name:u,url:E,elt:Graph.createFontElement(u,N)},Graph.customFontElements[T]=N,Graph.recentCustomFonts[T]=N,E=document.getElementsByTagName("head")[0],null!=J&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=J,N.elt.onerror=J):J()),null!=E&&E.appendChild(N.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();
return u};Graph.getFontUrl=function(u,E){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(E=u.url);return E};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var E=0;E<u.length;E++){var J=u[E].getAttribute("data-font-src");if(null!=J){var T="FONT"==u[E].nodeName?u[E].getAttribute("face"):u[E].style.fontFamily;null!=T&&Graph.addFont(T,J)}}};Graph.processFontStyle=function(u){if(null!=u){var E=mxUtils.getValue(u,"fontSource",null);if(null!=E){var J=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,

// Vulnerability class: CWE-20
Auth.verifyToken = async function (token, done) {
	let { tokens = [] } = await meta.settings.get('core.api');
	tokens = tokens.reduce((memo, cur) => {
		memo[cur.token] = cur.uid;
		return memo;
	}, {});

	const uid = tokens[token];

	if (uid !== undefined) {
		if (parseInt(uid, 10) > 0) {
			done(null, {
				uid: uid,
			});
		} else {
			done(null, {
				master: true,
			});
		}
	} else {
		done(false);
	}
};

// Vulnerability class: CWE-287
20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ya);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Ua);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Ua)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(F,mxCylinder);F.prototype.size=20;F.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ya));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Ua)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Ua)*l),c.lineTo(.5*l,(1-Ua)*l)):(c.translate((p-
l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Ua),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Ua)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",F);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),

// Vulnerability class: CWE-20
this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(c,e){for(var g=this.editor.graph,k=g.getSelectionCells(),m=0;m<c.length;m++){var q=new window[c[m].layout](g);if(null!=c[m].config)for(var v in c[m].config)q[v]=c[m].config[v];this.executeLayout(function(){q.execute(g.getDefaultParent(),0==k.length?null:k)},m==c.length-1,e)}};EditorUi.prototype.importCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],q=[],v={};if(0<g.length){var x={},

// Vulnerability class: CWE-20
(W.removeAttribute("disabled"),W.checked=!u.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};K=200;var F=1,G=null;if(d.pdfPageExport&&!n){var N=function(){U.value=Math.max(1,Math.min(F,Math.max(parseInt(U.value),parseInt(H.value))));H.value=Math.max(1,Math.min(F,Math.min(parseInt(U.value),parseInt(H.value))))},J=d.addRadiobox(y,"pages",mxResources.get("allPages"),!0),E=d.addRadiobox(y,"pages",mxResources.get("pages")+":",!1,null,!0),H=document.createElement("input");H.style.cssText=

// Vulnerability class: CWE-20
internals.Socket.prototype._authenticate = function () {

    const config = this._listener._settings.auth;
    if (!config) {
        return;
    }

    if (config.timeout) {
        this.auth._timeout = setTimeout(() => this.disconnect(), config.timeout);
    }

    const cookies = this._ws.upgradeReq.headers.cookie;
    if (!cookies) {
        return;
    }

    this._listener._connection.states.parse(cookies, (ignoreErr, state, failed) => {

        const auth = state[config.cookie];
        if (auth) {
            this.auth._error = this._setCredentials(auth.credentials, auth.artifacts);
        }
    });
};

// Vulnerability class: CWE-287
function(){function O(za,wa,Ea){var Da=U.menus.get(za),La=R.addMenu(mxResources.get(za),mxUtils.bind(this,function(){Da.funct.apply(this,arguments)}),Q);La.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";La.style.display="inline-block";La.style.boxSizing="border-box";La.style.top="6px";La.style.marginRight="6px";La.style.height="30px";La.style.paddingTop="6px";La.style.paddingBottom="6px";La.style.cursor="pointer";La.setAttribute("title",mxResources.get(za));U.menus.menuCreated(Da,
La,"geMenuItem");null!=Ea?(La.style.backgroundImage="url("+Ea+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):wa||(La.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",La.style.backgroundPosition="right 6px center",La.style.backgroundRepeat="no-repeat",La.style.paddingRight="22px");return La}function X(za,wa,Ea,Da,La,Ya){var Ua=document.createElement("a");Ua.className=

// Vulnerability class: CWE-20
const globalLibvipsVersion = function () {
  if (process.platform !== 'win32') {
    const globalLibvipsVersion = spawnSync(`PKG_CONFIG_PATH="${pkgConfigPath()}" pkg-config --modversion vips-cpp`, spawnSyncOptions).stdout;
    /* istanbul ignore next */
    return (globalLibvipsVersion || '').trim();
  } else {
    return '';
  }
};

// Vulnerability class: CWE-77
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);

// Vulnerability class: CWE-20
[H],"{1} ago"));F.setAttribute("title",K.toLocaleDateString()+" "+K.toLocaleTimeString())}function k(K){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";K.appendChild(F);K.busyImg=F}function l(K){K.style.border="1px solid red";K.removeChild(K.busyImg)}function p(K){K.style.border="";K.removeChild(K.busyImg)}function q(K,F,H,S,V){function M(N,Q,R){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);

// Vulnerability class: CWE-20
this.useCanvasForExport||".png"!=z||(z=".drawio"),".svg"===z||".xml"===z||".html"===z||".png"===z||".drawio"===z)&&(x=A+z)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,

// Vulnerability class: CWE-20
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function y(fa,ca){if(null!=I){var ba=function(oa){qa.isExternal?e(qa,function(na){ja(na,oa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?ja(na.getText(),oa):ia()})):ja(b.emptyDiagramXml,oa)},ja=function(oa,na){x||b.hideDialog(!0);f(oa,na,qa,ca)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){I=qa;Ba.className="geTempDlgCreateBtn";ca&&(Ka.className="geTempDlgOpenBtn")},

// Vulnerability class: CWE-20
!0,!0):m(!1,k)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var k=new FileReader;k.onload=mxUtils.bind(this,function(){this.parseFileData(k.result,e,g)});k.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var k=new XMLHttpRequest;k.open("POST",OPEN_URL);k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.onreadystatechange=function(){e(k)};k.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,q,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,q))try{var z=Math.max(x/m,A/m);if(1<z){var L=Math.round(x/z),M=Math.round(A/z),n=document.createElement("canvas");n.width=L;n.height=M;n.getContext("2d").drawImage(c,0,0,L,M);var y=

// Vulnerability class: CWE-20
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,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!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,
Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;

// Vulnerability class: CWE-20
function setupWebSocketProxy (fastify, options) {
  const server = new WebSocket.Server({
    path: options.prefix,
    server: fastify.server,
    ...options.wsServerOptions
  })

  fastify.addHook('onClose', (instance, done) => server.close(done))

  // To be able to close the HTTP server,
  // all WebSocket clients need to be disconnected.
  // Fastify is missing a pre-close event, or the ability to
  // add a hook before the server.close call. We need to resort
  // to monkeypatching for now.
  const oldClose = fastify.server.close
  fastify.server.close = function (done) {
    for (const client of server.clients) {
      client.close()
    }
    oldClose.call(this, done)
  }

  server.on('error', (err) => {
    fastify.log.error(err)
  })

  server.on('connection', (source, request) => {
    const url = createWebSocketUrl(options, request)

    const target = new WebSocket(url, options.wsClientOptions)

    fastify.log.debug({ url: url.href }, 'proxy websocket')
    proxyWebSockets(source, target)
  })
}

// Vulnerability class: CWE-20
this.getTagsForCell(E[Y]),ea=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=u.length)){for(var Z=ea=0;Z<ba.length&&ea<Q;Z++)null!=R[ba[Z]]&&ea++;ea=ea==Q}ea&&(1!=T||this.isCellVisible(E[Y]))&&N.push(E[Y])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var E=null,J=[],T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);J=[];if(0<N.length){N=N.split(" ");for(var Q={},
R=0;R<N.length;R++)if(null==E||null!=E[N[R]])Q[N[R]]=!0,J.push(N[R]);E=Q}else return[]}return J};Graph.prototype.getTagsForCells=function(u){for(var E=[],J={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==J[N[Q]]&&(J[N[Q]]=!0,E.push(N[Q]))}}return E};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate();

// Vulnerability class: CWE-20
module.exports = function newline(state, silent) {
  var pmax, max, pos = state.pos;

  if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }

  pmax = state.pending.length - 1;
  max = state.posMax;

  // '  \n' -> hardbreak
  // Lookup in pending chars is bad practice! Don't copy to other rules!
  // Pending string is stored in concat mode, indexed lookups will cause
  // convertion to flat mode.
  if (!silent) {
    if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
      if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
        state.pending = state.pending.replace(/ +$/, '');
        state.push('hardbreak', 'br', 0);
      } else {
        state.pending = state.pending.slice(0, -1);
        state.push('softbreak', 'br', 0);
      }

    } else {
      state.push('softbreak', 'br', 0);
    }
  }

  pos++;

  // skip heading spaces for next line
  while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }

  state.pos = pos;
  return true;
};

// Vulnerability class: CWE-400
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(C,
D){null!=D.shortcut&&900>c&&!mxClient.IS_IOS?C.firstChild.nextSibling.setAttribute("title",D.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.apply(this,arguments);if(null!=this.userElement){var C=this.userElement;C.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+C.style.display;C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.userImage+")";C.style.backgroundPosition="center center";

// Vulnerability class: CWE-20
c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),zb=new mxPoint(1,0),Bb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(Bb),Math.sin(Bb));var Ab=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,$a=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=($a*Ga-na*Ha)/(K*$a-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*$a);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+$a*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+$a*Ga),v.push(db)),
db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints=

// Vulnerability class: CWE-20
RestQuery.prototype.runFind = function (options = {}) {
  if (this.findOptions.limit === 0) {
    this.response = { results: [] };
    return Promise.resolve();
  }
  const findOptions = Object.assign({}, this.findOptions);
  if (this.keys) {
    findOptions.keys = this.keys.map(key => {
      return key.split('.')[0];
    });
  }
  if (options.op) {
    findOptions.op = options.op;
  }
  return this.config.database
    .find(this.className, this.restWhere, findOptions, this.auth)
    .then(results => {
      if (this.className === '_User' && findOptions.explain !== true) {
        for (var result of results) {
          cleanResultAuthData(result);
        }
      }

      this.config.filesController.expandFilesInObject(this.config, results);

      if (this.redirectClassName) {
        for (var r of results) {
          r.className = this.redirectClassName;
        }
      }
      this.response = { results: results };
    });
};

// Vulnerability class: CWE-755
_normalizeAddress(address) {
        address = (address || '').toString().trim();

        let lastAt = address.lastIndexOf('@');
        if (lastAt < 0) {
            // Bare username
            return address;
        }
        let user = address.substr(0, lastAt);
        let domain = address.substr(lastAt + 1);

        // Usernames are not touched and are kept as is even if these include unicode
        // Domains are punycoded by default
        // 'jõgeva.ee' will be converted to 'xn--jgeva-dua.ee'
        // non-unicode domains are left as is

        return user + '@' + punycode.toASCII(domain.toLowerCase());
    }

// Vulnerability class: CWE-74
var L=x.removeCells;x.removeCells=function(H,S){S=null!=S?S:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));S&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var U=[],Q=0;Q<H.length;Q++){var W=H[Q];A.isEdge(W)&&t(W)&&(U.push(W),W=A.getTerminal(W,!1));if(d(W)){var V=[];x.traverse(W,!0,function(X,p){var C=null!=p&&x.isTreeEdge(p);C&&V.push(p);(null==p||C)&&V.push(X);return null==p||C});0<V.length&&(U=U.concat(V),W=x.getIncomingTreeEdges(H[Q]),H=H.concat(W))}else null!=W&&U.push(H[Q])}H=
U;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(H,S,U){return d(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,U))};var M=x.duplicateCells;x.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var U=H.slice(0),Q=0;Q<U.length;Q++){var W=x.view.getState(U[Q]);if(null!=W&&d(W.cell)){var V=x.getIncomingTreeEdges(W.cell);for(W=0;W<V.length;W++)mxUtils.remove(V[W],H)}}this.model.beginUpdate();try{var X=M.call(this,H,S);if(X.length==H.length)for(Q=0;Q<H.length;Q++)if(d(H[Q])){var p=

// Vulnerability class: CWE-20
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var q=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(q,v,x,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k=

// Vulnerability class: CWE-20
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");

// Vulnerability class: CWE-20
0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var x=v.lastIndexOf(".");0<x&&(v=v.substring(x+1,v.length));null==e[v]&&(e[v]=!0)}}var k=this.editor.graph,m=k.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));k.model.isEdge(c)&&

// Vulnerability class: CWE-20
this.createImageDataUri(y,K,"png");A(y)}),null,null,null,mxUtils.bind(this,function(y){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),z.width*z.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var M="";g&&(M="&w="+Math.round(2*z.width)+"&h="+Math.round(2*z.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+M+"&xml="+encodeURIComponent(e));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&

// Vulnerability class: CWE-20
function addAttribute(mainTemplate, elName, source, chunk) {
    const outputOptions = this.compilation.outputOptions || mainTemplate.outputOptions;
    if (!outputOptions.crossOriginLoading) {
      this.sriPlugin.errorOnce(
        this.compilation,
        'webpack option output.crossOriginLoading not set, code splitting will not work!'
      );
    }
    return (Template.asString || mainTemplate.asString)([
      source,
      elName + '.integrity = __webpack_require__.sriHashes[' + (chunk ? `'${chunk.id}'` : 'chunkId') + '];',
      elName + '.crossOrigin = ' + JSON.stringify(outputOptions.crossOriginLoading) + ';',
    ]);
  };

// Vulnerability class: CWE-345
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,k,m,q,v){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(q,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=

// Vulnerability class: CWE-20
eval: function (env) {
        var that = this;
        var value = this.value.replace(/`([^`]+)`/g, function (_, exp) {
            return new(tree.JavaScript)(exp, that.index, true).eval(env).value;
        }).replace(/@\{([\w-]+)\}/g, function (_, name) {
            var v = new(tree.Variable)('@' + name, that.index, that.currentFileInfo).eval(env, true);
            return (v instanceof tree.Quoted) ? v.value : v.toCSS();
        });
        return new(tree.Quoted)(this.quote + value + this.quote, value, this.escaped, this.index, this.currentFileInfo);
    },

// Vulnerability class: CWE-74
try{for(var J=0;J<u.length;J++){for(var T=this.getTagsForCell(u[J]),N=T.split(" "),Q=!1,R=0;R<E.length;R++){var Y=mxUtils.trim(E[R]);""!=Y&&0>mxUtils.indexOf(N,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(u[J],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate();try{for(var J=0;J<u.length;J++){var T=this.getTagsForCell(u[J]);if(0<T.length){for(var N=T.split(" "),Q=!1,R=0;R<E.length;R++){var Y=

// Vulnerability class: CWE-20
"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,R,Y,ba,ea){null!=Q.handJiggle&&Q.handJiggle.passThrough||J.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var R=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
var ba=this.fill,ea=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,fa=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};Y||null==ba||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=fa;this.configurePointerEvents=Z;this.stroke=ea;this.fill=ba;Q.restore();Y&&null!=ba&&(Q.addTolerance=function(){})}T.apply(this,arguments);
Q.addTolerance=R};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,R,Y,ba,ea,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?

// Vulnerability class: CWE-20
function(){g.checked&&(null==e||e.checked)?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===q.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return q}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=q&&q!=mxConstants.NONE?(x.style.border="1px solid black",

// Vulnerability class: CWE-20
q))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(k=
0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,q,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,q,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||

// Vulnerability class: CWE-20
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(ea,Z,fa){M(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<B){var aa=L&&this.isResampleImageSize(X.size,I)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),L,l,I,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else J=E.target.result,p(J,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){M(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){M(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?u.readAsDataURL(X):u.readAsText(X)}})(W)});if(C){C=

// Vulnerability class: CWE-20
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return y.apply(this,arguments)};

// Vulnerability class: CWE-20
'ternary?:': function(test, alternate, consequent, context) {
    return function(scope, locals, assign, inputs) {
      var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);
      return context ? {value: arg} : arg;
    };
  },

// Vulnerability class: CWE-74