mcanoglu/cwe-class-group huggingface dataset:
(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,va)}})}function J(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),V=!1,W=!0,ua.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){A(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function E(fa){if(""==fa)null!=p&&(p.click(),p=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia=
ba[ja];if(null!=ia.tags)for(var ma=ia.tags.toLowerCase().split(";"),qa=0;qa<ma.length;qa++)null==ca[ma[qa]]&&(ca[ma[qa]]=[]),ca[ma[qa]].push(ia)}TemplatesDialog.tagsList[d]=ca}var oa=fa.toLowerCase().split(" ");ca=TemplatesDialog.tagsList[d];if(0<va&&null==ca.__tagsList__){for(Ja in pa)for(ba=pa[Ja],ja=0;ja<ba.length;ja++)for(ia=ba[ja],ma=ia.title.split(" "),ma.push(Ja),qa=0;qa<ma.length;qa++){var na=ma[qa].toLowerCase();null==ca[na]&&(ca[na]=[]);ca[na].push(ia)}ca.__tagsList__=!0}var Ja=[];ba={};
for(ja=ma=0;ja<oa.length;ja++)if(0<oa[ja].length){na=ca[oa[ja]];var Ga={};Ja=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ba[ia.url])&&(Ga[ia.url]=!0,Ja.push(ia));ba=Ga;ma++}0==Ja.length?ua.innerHTML=mxResources.get("noResultsFor",[fa]):B(Ja,!0)}}function H(fa){if(da!=fa||P!=ha)z(),Aa.scrollTop=0,aa.innerHTML="",ua.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',wa=null,Z?E(fa):c&&(fa?(Ea.spin(aa),V=!1,W=!0,c(fa,ra,function(){A(mxResources.get("searchFailed"));

// Vulnerability class: CWE-20
this.unitListener=function(n,y){g.setUnit(y.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(n){k=n;m.style.background=k.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(n,y,K,B){if(l&&4<n.height||
!l&&4<n.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(V){}var F=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=n.y+F.y+e-this.graph.container.scrollTop;var N=0;var J=G+n.height/2;var E=e/2;var H=G+n.height;var S=0;var U=v.getImageData(N,G-1,e,
3);A(N,G,e,G);G--;var Q=v.getImageData(E,J-1,e,3);A(E,J,e,J);J--;var W=v.getImageData(S,H-1,e,3);A(S,H,e,H);H--}else G=0,N=n.x+F.x+e-this.graph.container.scrollLeft,J=e/2,E=N+n.width/2,H=0,S=N+n.width,U=v.getImageData(N-1,G,3,e),A(N,G,N,e),N--,Q=v.getImageData(E-1,J,3,e),A(E,J,E,e),E--,W=v.getImageData(S-1,H,3,e),A(S,H,S,e),S--;if(null==g.guidePart||g.guidePart.x1!=N||g.guidePart.y1!=G)g.guidePart={imgData1:U,x1:N,y1:G,imgData2:Q,x2:E,y2:J,imgData3:W,x3:S,y3:H}}catch(V){}}else F=g.origGuideMove.apply(this,
arguments);return F};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var n=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(y){}return n}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;

// Vulnerability class: CWE-20
function getter(obj, path, bindFnToScope) {
  if (!path) return obj;
  var keys = path.split('.');
  var key;
  var lastInstance = obj;
  var len = keys.length;

  for (var i = 0; i < len; i++) {
    key = keys[i];
    if (obj) {
      obj = (lastInstance = obj)[key];
    }
  }
  if (!bindFnToScope && isFunction(obj)) {
    return bind(lastInstance, obj);
  }
  return obj;
}

// Vulnerability class: CWE-74
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,
null);null!=J&&Graph.addFont(J,decodeURIComponent(E))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=

// Vulnerability class: CWE-20
arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,E){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);J&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
J&&E(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(J)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);J&&E(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,E,J,

// Vulnerability class: CWE-20
4)&&!!(a%100)||!(a%400)};d.isSameDay=function(a,c){return a.toDateString()===c.toDateString()};d.locale=function(a,c){c?u(a,{res:v,formatter:w,parser:x},c):"function"===typeof a?m=a(d):a&&(q&&!q.date&&console.warn("This method of changing the locale is deprecated. See documentation for details."),m=a);return m};d.extend=function(a){var c=a.extender||{},b;for(b in c)d[b]||(d[b]=c[b]);(a.formatter||a.parser||a.res)&&u(m,t[m],a)};d.plugin=function(a,c){"function"===typeof a?d.extend(r[a(d)]):(r[a]=r[a]||
c,!c&&r[a]&&(d.extend(r[a]),q&&!q.date&&console.warn("This method of applying plugins is deprecated. See documentation for details.")))};d.locale(m,{});"object"===typeof module&&"object"===typeof module.exports?module.exports=d:"function"===typeof define&&define.amd?define([],function(){return d}):q.date=d})(this);

// Vulnerability class: CWE-400
var I=y.removeCells;y.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 V=[],M=0;M<H.length;M++){var W=H[M];A.isEdge(W)&&n(W)&&(V.push(W),W=A.getTerminal(W,!1));if(c(W)){var U=[];y.traverse(W,!0,function(X,u){var E=null!=u&&y.isTreeEdge(u);E&&U.push(u);(null==u||E)&&U.push(X);return null==u||E});0<U.length&&(V=V.concat(U),W=y.getIncomingTreeEdges(H[M]),H=H.concat(W))}else null!=W&&V.push(H[M])}H=
V;return I.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,S,V){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,V))};var O=y.duplicateCells;y.duplicateCells=function(H,S){H=null!=H?H:this.getSelectionCells();for(var V=H.slice(0),M=0;M<V.length;M++){var W=y.view.getState(V[M]);if(null!=W&&c(W.cell)){var U=y.getIncomingTreeEdges(W.cell);for(W=0;W<U.length;W++)mxUtils.remove(U[W],H)}}this.model.beginUpdate();try{var X=O.call(this,H,S);if(X.length==H.length)for(M=0;M<H.length;M++)if(c(H[M])){var u=

// Vulnerability class: CWE-20
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments);

// Vulnerability class: CWE-20
Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,La,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!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;y(na,null,null,pa,fa,ia)},!0,!1)}}function oa(La,Ta){null==pa||Ra||
b.sidebar.currentElt==na?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
na,Ra=!0,ma(pa,function(Ua){Ra&&b.sidebar.currentElt==na&&qa(Ua,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var na=document.createElement("div");na.className="geTemplate";na.style.position="relative";na.style.height=Fa+"px";na.style.width=xa+"px";var Ja=null,Ga=pa;Editor.isDarkMode()&&(na.style.filter="invert(100%)");null!=ya?na.setAttribute("title",mxResources.get(ya,null,ya)):null!=va&&0<va.length&&na.setAttribute("title",va);var Ra=!1,Sa=null;if(null!=wa){na.style.display="inline-flex";

// Vulnerability class: CWE-20
Installer.prototype.readLocalPackageData = function (cb) {
  validate('F', arguments)
  log.silly('install', 'readLocalPackageData')
  var self = this
  correctMkdir(this.where, iferr(cb, function () {
    readPackageTree(self.where, iferr(cb, function (currentTree) {
      self.currentTree = currentTree
      self.currentTree.warnings = []
      if (currentTree.error && currentTree.error.code === 'EJSONPARSE') {
        return cb(currentTree.error)
      }
      if (!self.noPackageJsonOk && !currentTree.package) {
        log.error('install', "Couldn't read dependencies")
        var er = new Error("ENOENT, open '" + path.join(self.where, 'package.json') + "'")
        er.code = 'ENOPACKAGEJSON'
        er.errno = 34
        return cb(er)
      }
      if (!currentTree.package) currentTree.package = {}
      readShrinkwrap(currentTree, function (err) {
        if (err) {
          cb(err)
        } else {
          self.loadArgMetadata(cb)
        }
      })
    }))
  }))
}

// Vulnerability class: CWE-732
function g(D){D.dataTransfer.dropEffect=null!=B?"move":"copy";D.stopPropagation();D.preventDefault()}function k(D){D.stopPropagation();D.preventDefault();z=!1;I=v(D);if(null!=B)null!=I&&I<x.children.length?(l.splice(I>B?I-1:I,0,l.splice(B,1)[0]),x.insertBefore(x.children[B],x.children[I])):(l.push(l.splice(B,1)[0]),x.appendChild(x.children[B]));else if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,0,0,b.maxImageSize,L(D));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var G=

// Vulnerability class: CWE-20
Ua.style.cursor="pointer"):(Ua.setAttribute("disabled","disabled"),Ua.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Ua}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
for(var Da=0;Da<za.length;Da++)null!=za[Da]&&("1"==urlParams.sketch&&(za[Da].style.padding="10px 8px",za[Da].style.width="30px"),za[Da].style.margin="0px",za[Da].style.boxShadow="none",Ea.appendChild(za[Da]));null!=wa&&mxUtils.setOpacity(Ea,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ea,U.statusContainer):V.appendChild(Ea);return Ea}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za=

// Vulnerability class: CWE-20
new FileReader;m.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var q=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile=
null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var x=mxUtils.parseXml(c);null!=x&&(this.editor.setGraphXml(x.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,k,m))});if(null!=c&&0<c.length)null==q||!q.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)?v():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)&&null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,
mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=

// Vulnerability class: CWE-20
(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function K(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
ca[la];if(null!=ia.tags)for(var ma=ia.tags.toLowerCase().split(";"),qa=0;qa<ma.length;qa++)null==da[ma[qa]]&&(da[ma[qa]]=[]),da[ma[qa]].push(ia)}TemplatesDialog.tagsList[c]=da}var pa=ha.toLowerCase().split(" ");da=TemplatesDialog.tagsList[c];if(0<wa&&null==da.__tagsList__){for(Ka in oa)for(ca=oa[Ka],la=0;la<ca.length;la++)for(ia=ca[la],ma=ia.title.split(" "),ma.push(Ka),qa=0;qa<ma.length;qa++){var na=ma[qa].toLowerCase();null==da[na]&&(da[na]=[]);da[na].push(ia)}da.__tagsList__=!0}var Ka=[];ca={};
for(la=ma=0;la<pa.length;la++)if(0<pa[la].length){na=da[pa[la]];var Ia={};Ka=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ca[ia.url])&&(Ia[ia.url]=!0,Ka.push(ia));ca=Ia;ma++}0==Ka.length?va.innerHTML=mxResources.get("noResultsFor",[ha]):C(Ka,!0)}}function H(ha){if(ba!=ha||N!=ea)B(),Ba.scrollTop=0,aa.innerHTML="",va.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',xa=null,Z?F(ha):d&&(ha?(Ea.spin(aa),U=!1,W=!0,d(ha,ua,function(){A(mxResources.get("searchFailed"));

// Vulnerability class: CWE-20
ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",ea.getSelectionCells()))}finally{ea.getModel().endUpdate()}}function P(za,ta,ka){var pa=mxUtils.getOffset(p,!0),sa=mxUtils.getOffset(za,!0);ta.style.position="absolute";ta.style.left=sa.x-pa.x+"px";ta.style.top=sa.y-pa.y+"px";ta.style.width=za.offsetWidth+"px";ta.style.height=za.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function O(za,ta,ka){var pa=document.createElement("div");pa.style.width="32px";pa.style.height=
"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function R(za,ta,ka,pa,sa,ya,va){null!=ta&&(ta=ta.split(","),

// Vulnerability class: CWE-20
P)this.editPlantUmlData(D,G,P);else if(P=this.graph.getAttributeForCell(D,"mermaidData"),null!=P)this.editMermaidData(D,G,P);else{var K=g.getCellStyle(D);"1"==mxUtils.getValue(K,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this,

// Vulnerability class: CWE-20
y.y,n.width/K,n.height/K,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(y){if(0<y.length)try{var K=function(J){function E(I){if(null==C[I]){if(C[I]=!0,null!=U[I]){for(;0<U[I].length;){var T=U[I].pop();E(T)}delete U[I]}}else mxLog.debug(H+": Visited: "+I)}var H=J.parentNode.id,S=J.childNodes;J={};

// Vulnerability class: CWE-20
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),z.innerHTML=A,x.appendChild(z),m.status=z),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),z=!0);return z};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};

// Vulnerability class: CWE-20
!0);V.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(y){d.spinner.stop();null!=y?(y=new EmbedDialog(d,'<img src="'+(n.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+n.getId())+'"/>'),d.showDialog(y.container,450,240,!0,!0),y.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",

// Vulnerability class: CWE-20
e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,
function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,q,v,x,A,z,L){m=null!=m?m:!0;q=null!=q?q:!1;var M=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var n=null!=M.themes&&"darkTheme"==M.defaultThemeName;z=!1;if(n||null!=this.pages&&this.currentPage!=this.pages[0]){var y=M.getGlobalVariable;M=this.createTemporaryGraph(n?M.getDefaultStylesheet():M.getStylesheet());

// Vulnerability class: CWE-20
F.substring(0,11)){var J=F.indexOf(",");0<J&&(F=F.substring(0,J)+";base64,"+F.substring(J+1))}c(F,null,0,0,G,N);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(F,G,N,J){b.saveLibrary(F,G,N,J)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=M&&(M(),M=null);this.saveBtnClickHandler(q.value,k,u,t)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);

// Vulnerability class: CWE-20
parseInt(u.getAttribute("height"))+6),E=u.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,u.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};

// Vulnerability class: CWE-20
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,va){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var wa=0;wa<sa;wa++)ra[wa]=null!=ta[wa]?ta[wa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:va,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za,

// Vulnerability class: CWE-20
res.writeHead(200, _getServerHeaders({ "Content-Type": Array.isArray(mime)?mime[0]:mime, "Content-Encoding": "gzip" }, stats));
				rawStream.pipe(zlib.createGzip()).pipe(res)
				.on("error", err => _sendError(req, res, 500, `500: ${req.url}, Server error: ${err}`))
				.on("end", _ => res.end());
			} else {
				res.writeHead(200, mime ? _getServerHeaders({"Content-Type":Array.isArray(mime)?mime[0]:mime}, stats) : _getServerHeaders({}, stats));
				rawStream.on("data", chunk => res.write(chunk, "binary"))
					.on("error", err => _sendError(req, res, 500, `500: ${req.url}, Server error: ${err}`))
					.on("end", _ => res.end());
			}
		}
	});
}

// Vulnerability class: CWE-116
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),n+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=n&&x.setAttribute("style",n),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=

// Vulnerability class: CWE-20
"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(ua);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(ua);R&&R()},function(la){Z();k(ua);
b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,ua,function(la){ha()},!0)}var ea=W().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var ua=q(aa,J.replies,ea,S+1);O?Z():ha()}if(U||!J.isResolved){n.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&

// Vulnerability class: CWE-20
throwError: function(error, start, end) {
    end = end || this.index;
    var colStr = (isDefined(start)
            ? 's ' + start +  '-' + this.index + ' [' + this.text.substring(start, end) + ']'
            : ' ' + end);
    throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
        error, colStr, this.text);
  },

// Vulnerability class: CWE-74
function getNgAttribute(element, ngAttr) {
  var attr, i, ii = ngAttrPrefixes.length;
  for (i = 0; i < ii; ++i) {
    attr = ngAttrPrefixes[i] + ngAttr;
    if (isString(attr = element.getAttribute(attr))) {
      return attr;
    }
  }
  return null;
}

// Vulnerability class: CWE-74
$.fn.addConfigMenu = function(options, callback) {
    var dropdown = $(this).find('#widget-dropdown');

    var target = $('<span class="gear-img-container fa fa-cog fa-lg"></span>')
    .height(18).width(18);
    target.appendTo(dropdown);
    var ul = $('<ul class="closed widget-gear-menu"></ul>').appendTo(dropdown);

    for (var key in options){
        $('<div class="widget-gear-option" value="'+key+'">'+options[key]+'</div>').
        appendTo(ul).
        click( function(element) {
            return callback(element);
        });
    }


    // Handle opening and closing of the menu
    target.on('click', function(){
        if( ul.hasClass('open') ){
            ul.addClass('closed');
            ul.removeClass('open');
        } else {
            ul.removeClass('closed');
            ul.addClass('open');
        }
        
    });

    return dropdown;

};

// Vulnerability class: CWE-20
typeof ha.getAttribute&&null!=ha.getAttribute("title")&&sa.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;D(sa)}});var ua=function(ha,da,ca){ja.style.display="";Ea.stop();W=!1;if(U)U=!1;else if(da)aa.innerHTML=da;else{ca=ca||{};da=0;for(var la in ca)da+=ca[la].length;0==ha.length&&0==da?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):C(ha,!1,Q,0==da?null:ca)}};K(N);var xa=null;mxEvent.addListener(Na,

// Vulnerability class: CWE-20
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(D){mxEvent.getSource(D)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(da,ca,la){var ia=F.menus.get(da),ma=M.addMenu(mxResources.get(da),
mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}),V);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(da));F.menus.menuCreated(ia,ma,"geMenuItem");null!=la?(ma.style.backgroundImage="url("+la+")",ma.style.backgroundPosition=
"center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerHTML=""):ca||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function D(da,ca,la,ia,ma,qa){var pa=document.createElement("a");pa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";pa.style.display="inline-block";pa.style.boxSizing=

// Vulnerability class: CWE-20
var F=this.editorUi,G=F.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(J,E){F.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:J?"1":null},G.getVerticesAndEdges())},{install:function(J){this.listener=function(){J(Editor.sketchMode)};F.addListener("sketchModeChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});B.appendChild(N)}return B};

// Vulnerability class: CWE-20
PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(B){var I=new Image;I.onload=
function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),D=mxUtils.parseXml(C).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();

// Vulnerability class: CWE-20
document.createElement("span");y.style["float"]="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-4px";y.appendChild(n);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(F){mxEvent.getSource(F)!=n&&(n.checked=!n.checked)});header=y}var K=localStorage.getItem(Editor.configurationKey);y=[[mxResources.get("reset"),function(F,G){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(F)?(localStorage.removeItem(Editor.settingsKey),
localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(N){d.handleError(N)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");null!=B&&"1"==urlParams.sketch&&y.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||y.push([mxResources.get("share"),function(F,G){if(0<G.value.length)try{var N=JSON.parse(G.value),J=window.location.protocol+"//"+window.location.host+

// Vulnerability class: CWE-20
EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=m.spin;m.spin=function(x,A){var z=!1;this.active||(q.call(this,x),this.active=!0,null!=A&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),z=document.createElement("div"),
z.style.position="absolute",z.style.whiteSpace="nowrap",z.style.background="#4B4243",z.style.color="white",z.style.fontFamily=Editor.defaultHtmlFont,z.style.fontSize="9pt",z.style.padding="6px",z.style.paddingLeft="10px",z.style.paddingRight="10px",z.style.zIndex=2E9,z.style.left=Math.max(0,c)+"px",z.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(z.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(z.style,
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),z.innerHTML=A,x.appendChild(z),m.status=z),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),z=!0);return z};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};

// Vulnerability class: CWE-20
for(var I=0;I<X.length;I++)if("label"!=X[I].nodeName){var T=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=T.indexOf(p)||!C&&T.substring(0,p.length)===p)||null!=V&&V.test(T))return!0}}return!1}function c(){v&&K.value?(S.removeAttribute("disabled"),U.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));K.value&&y.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function e(V,

// Vulnerability class: CWE-20
function copyElement(source) {
    // Simple values
    if (!isObject(source)) {
      return source;
    }

    // Already copied values
    var index = stackSource.indexOf(source);
    if (index !== -1) {
      return stackDest[index];
    }

    if (isWindow(source) || isScope(source)) {
      throw ngMinErr('cpws',
        'Can\'t copy! Making copies of Window or Scope instances is not supported.');
    }

    var needsRecurse = false;
    var destination = copyType(source);

    if (destination === undefined) {
      destination = isArray(source) ? [] : Object.create(getPrototypeOf(source));
      needsRecurse = true;
    }

    stackSource.push(source);
    stackDest.push(destination);

    return needsRecurse
      ? copyRecurse(source, destination)
      : destination;
  }

// Vulnerability class: CWE-74
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
Y+");\n");N()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var E=document.getElementsByTagName("style"),J=0;J<E.length;J++){var T=mxUtils.getTextContent(E[J]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(E[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,E){E=null!=

// Vulnerability class: CWE-20
Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";R.title=Q.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==D&&null!=S&&(N.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);B=v(Z);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,

// Vulnerability class: CWE-20
1E3<=F&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=F||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var M=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=M.apply(this,arguments);

// Vulnerability class: CWE-20
T.type&&N.filled?J.fill():J.stroke()};return E};(function(){function u(Q,R,Y){this.canvas=Q;this.rc=R;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,u.prototype.fillAndStroke);
this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,R){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ea=0;ea<ba.length;ea++)Y=(Y<<5)-Y+ba.charCodeAt(ea)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":

// Vulnerability class: CWE-20
MathJax.Hub.Register.StartupHook("Begin",function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])})}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(R,
Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};J=document.getElementsByTagName("script");if(null!=J&&0<J.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",u);J[0].parentNode.appendChild(N)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(R){}}};

// Vulnerability class: CWE-20
m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,q-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,

// Vulnerability class: CWE-20
this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,q,v,x,A,z){A=this.createUrlParameters(c,e,g,k,m,q,A);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));z&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,q,v,x,A,z,L,M){this.getBasenames();var n={};""!=

// Vulnerability class: CWE-20
"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(D,G,P){var K=G.getAttribute("href");if(null==K||!g.isCustomLink(K)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(K),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()?
G.getTitle():D);return D};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,

// Vulnerability class: CWE-20
N.message?N.message:mxResources.get("disconnected")));mxEvent.consume(E)}));G.setAttribute("title",F);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerHTML="";B.style.backgroundImage="url("+
Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var B=document.createElement("div");

// Vulnerability class: CWE-20
ra=F.actions.get("zoomOut"),Ca=F.actions.get("resetView");u=F.actions.get("fullscreen");var za=F.actions.get("undo"),Ga=F.actions.get("redo"),Na=D("",za.funct,null,mxResources.get("undo")+" ("+za.shortcut+")",za,Editor.undoImage),Fa=D("",Ga.funct,null,mxResources.get("redo")+" ("+Ga.shortcut+")",Ga,Editor.redoImage),Ea=D("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=T){E=function(){ta.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?
"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Ea.parentNode.removeChild(Ea);var Da=F.actions.get("delete"),La=D("",Da.funct,null,mxResources.get("delete"),Da,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La);

// Vulnerability class: CWE-20
const pkgConfigPath = function () {
  if (process.platform !== 'win32') {
    const brewPkgConfigPath = spawnSync('which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR', spawnSyncOptions).stdout || '';
    return [
      brewPkgConfigPath.trim(),
      env.PKG_CONFIG_PATH,
      '/usr/local/lib/pkgconfig',
      '/usr/lib/pkgconfig',
      '/usr/local/libdata/pkgconfig',
      '/usr/libdata/pkgconfig'
    ].filter(Boolean).join(':');
  } else {
    return '';
  }
};

// Vulnerability class: CWE-77
0>M?(H=M*V.width,M=0):1<M&&(H=(M-1)*V.width,M=1);0>F?(S=F*V.height,F=0):1<F&&(S=(F-1)*V.height,F=1);return{x:M,y:F,dx:parseInt(H),dy:parseInt(S)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);D.value=100*F.x;P.value=100*F.y;G.value=F.dx;K.value=F.dy;C.style.visibility=""}else C.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";

// Vulnerability class: CWE-20
Manager.prototype.handleHandshake = function (data, req, res) {
  var self = this
    , origin = req.headers.origin
    , headers = {
        'Content-Type': 'text/plain'
    };

  function writeErr (status, message) {
    if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) {
      res.writeHead(200, { 'Content-Type': 'application/javascript' });
      res.end('io.j[' + data.query.jsonp + '](new Error("' + message + '"));');
    } else {
      res.writeHead(status, headers);
      res.end(message);
    }
  };

  function error (err) {
    writeErr(500, 'handshake error');
    self.log.warn('handshake error ' + err);
  };

  if (!this.verifyOrigin(req)) {
    writeErr(403, 'handshake bad origin');
    return;
  }

  var handshakeData = this.handshakeData(data);

  if (origin) {
    // https://developer.mozilla.org/En/HTTP_Access_Control
    headers['Access-Control-Allow-Origin'] = origin;
    headers['Access-Control-Allow-Credentials'] = 'true';
  }

  this.authorize(handshakeData, function (err, authorized, newData) {
    if (err) return error(err);

    if (authorized) {
      var id = self.generateId()
        , hs = [
              id
            , self.enabled('heartbeats') ? self.get('heartbeat timeout') || '' : ''
            , self.get('close timeout') || ''
            , self.transports(data).join(',')
          ].join(':');

      if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) {
        hs = 'io.j[' + data.query.jsonp + '](' + JSON.stringify(hs) + ');';
        res.writeHead(200, { 'Content-Type': 'application/javascript' });
      } else {
        res.writeHead(200, headers);
      }

      res.end(hs);

      self.onHandshake(id, newData || handshakeData);
      self.store.publish('handshake', id, newData || handshakeData);

      self.log.info('handshake authorized', id);
    } else {
      writeErr(403, 'handshake unauthorized');
      self.log.info('handshake unauthorized');
    }
  })
};

// Vulnerability class: CWE-330