Language: JavaScript
Label: safe
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
"1"!=urlParams.sketch&&B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],V);J.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,V){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var J=this.get("insert"),V=J.funct;J.funct=function(U,
X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(U,["insertTemplate"],X),B.menus.addMenuItems(U,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertAdvanced",U,X,mxResources.get("advanced")),B.menus.addSubmenu("layout",U,X)):(V.apply(this,arguments),B.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(J,V,U,X){J.addItem(U,null,mxUtils.bind(this,function(){var t=