diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 1d0c00d804..4314cd6fdf 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -2807,60 +2807,61 @@ V.height-=u,z.setGeometry(A,V))}}finally{z.endUpdate()}};Graph.prototype.insertR A.rows[D].appendChild(G);mxUtils.br(G)}u=u.tBodies[0];for(A=0;Az&&u[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(u){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div"); A.innerHTML=u;u=document.createDocumentFragment();for(var D;D=A.firstChild;)lastNode=u.appendChild(D);z.insertNode(u)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(u)};Graph.prototype.getCentrenMapImagePath=function(u){return window.localStorage.getItem("centreon-url")+"/modules/centreon-map4-web-client/img/"+u};Graph.prototype.setCellDimensions=function(u,z,A){var D=this.getCellGeometry(u);null!=D&&(D=D.clone(),z&&(D.width=z),A&&(D.height=A),this.getModel().setGeometry(u, D))};Graph.prototype.handleCentreonStyleChangeForCells=function(u,z){var A=this;u.forEach(function(D){var G=A.getModel().getStyle(D);A.handleCentreonStyleChange(D,G,z)})};Graph.prototype.handleCentreonStyleChange=function(u,z,A){"GEOMETRIC"!==A||z.includes("style=GEOMETRIC;")?"GEOMETRIC"!==A&&z.includes("style=GEOMETRIC;")&&this.setCellDimensions(u,84,84):this.setCellDimensions(u,20,20);"WEATHER"!==A||z.includes("style=WEATHER;")?"WEATHER"!==A&&z.includes("style=WEATHER;")&&this.removeWeatherIconToResource(u): -this.addWeatherIconToResource(u)};Graph.prototype.getValueByCell=function(u,z){var A=u.getAttribute("type");u=this.getCellStyle(u).style;return"WIDGET"===A&&84>z?84:(A="RESOURCE"===A||"CONTAINER"===A)&&u&&"GEOMETRIC"!==u&&84>=z||A&&u&&"GEOMETRIC"===u&&84z?20:z};Graph.prototype.addWeatherIconToResource=function(u){var z=this.getCentrenMapImagePath("weather/weather.svg");z=new mxImage(z,30,30);z=new mxCellOverlay(z,"Weather",null,mxConstants.ALIGN_TOP);this.addCellOverlay(u, -z)};Graph.prototype.removeWeatherIconToResource=function(u){this.removeCellOverlay(u)};Graph.prototype.createLinkForHint=function(u,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length-Math.round(L/4)));return G}u=null!=u?u:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(u)?this.getLinkTitle(u):u;var D=document.createElement("a");D.setAttribute("rel",this.linkRelation);D.setAttribute("href",this.getAbsoluteUrl(u));D.setAttribute("title",A(this.isCustomLink(u)? -this.getLinkTitle(u):u,80));null!=this.linkTarget&&D.setAttribute("target",this.linkTarget);mxUtils.write(D,A(z,40));this.isCustomLink(u)&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(G){this.customLinkClicked(u);mxEvent.consume(G)}));return D};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,V){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent; -this.updateMouseEvent=function(L){L=u.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var V=this.getCellAt(L.graphX,L.graphY);null!=V&&this.isSwimlane(V)&&this.hitsSwimlaneContent(V,L.graphX,L.graphY)||(L.state=this.view.getState(V),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,D=!1,G=this.fireMouseEvent;this.fireMouseEvent= -function(L,V,ea){L==mxEvent.MOUSE_DOWN&&(V=this.updateMouseEvent(V),z=this.isCellSelected(V.getCell()),A=this.isSelectionEmpty(),D=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(L,V){var ea=mxEvent.isMouseEvent(V.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==V.getState()||!V.isSource(V.getState().control))&&(this.popupMenuHandler.popupTrigger||!D&&!ea&&(A&&null==V.getCell()&&this.isSelectionEmpty()|| -z&&this.isCellSelected(V.getCell())));ea=!z||ea?null:mxUtils.bind(this,function(ba){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var fa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(V.getX()+fa.x+1,V.getY()+fa.y+1,ba,V.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[L,V,ea])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected= -function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text);return""!=u};mxCellEditor.prototype.insertTab=function(u){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),D="\t";if(null!=u)for(D="";0")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var u=this.graph.view.getState(this.editingCell);if(null!=u){var z=null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ea=mxUtils.extractTextWithWhitespace(this.textarea.childNodes); -0"):ea,!0);this.textarea.className="mxCellEditor geContentEditable";ba=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var D=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)& -mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,V=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&V.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&V.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT? -Math.round(ba*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ba)+"px";this.textarea.style.textDecoration=V.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=D;this.textarea.style.padding="0px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange= -0
"));ea=Graph.sanitizeHtml(z?ea.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ea,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ba=mxConstants.DEFAULT_FONTSIZE; -this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ba*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ba)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML= -ea);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var A=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*A;this.bounds.height= -60*A;var D=null!=u.text?u.text.margin:null;null==D&&(D=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=D.x*this.bounds.width;this.bounds.y+=D.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight< -this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth"));return A=Graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return z="1"==mxUtils.getValue(u.style,"nl2Br","1")?z.replace(/\r\n/g,"
").replace(/\n/g,"
"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing; -mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&& -this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){var z=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=u.cell.geometry&&0ea.x+ea.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-ea.x-ea.width),this.unscaledBounds.y+this.unscaledBounds.height>ea.y+ea.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBounds.height-ea.y-ea.height)));G=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x: -L.x*V)+this.unscaledBounds.x*V,(null!=this.parentState?this.parentState.y:L.y*V)+this.unscaledBounds.y*V,this.unscaledBounds.width*V,this.unscaledBounds.height*V);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);ea=Math.cos(D);ba=Math.sin(D);z=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());fa=z.x-A.x;ra=z.y-A.y;A=ea*fa-ba*ra-fa;z=ba*fa+ea*ra-ra;L=this.bounds.x-this.state.x;fa=this.bounds.y-this.state.y; -D=ea*L-ba*fa;ea=ba*L+ea*fa;this.bounds.x+=A;this.bounds.y+=z;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+A/V);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+z/V);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)||0==A&&0==z?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+D,this.childOffsetY=this.state.y- -this.bounds.y+ea);G.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())};var Y=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)? -this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(u){return u.tableHandle||la.apply(this,arguments)&& -(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var W=null,N=mxVertexHandler.prototype.createCustomHandles; -mxVertexHandler.prototype.createCustomHandles=function(){null==W&&(W=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Ka,za,wa){for(var Ca=[],Ta=0;Taz?84:(A="RESOURCE"===A||"CONTAINER"===A)&&u&&"GEOMETRIC"!==u&&84>=z||A&&u&&"GEOMETRIC"===u&&84z?20:z};Graph.prototype.addWeatherIconToResource=function(u){var z= +this.getCentrenMapImagePath("weather/weather.svg");z=new mxImage(z,30,30);z=new mxCellOverlay(z,"Weather",null,mxConstants.ALIGN_TOP);this.addCellOverlay(u,z)};Graph.prototype.removeWeatherIconToResource=function(u){this.removeCellOverlay(u)};Graph.prototype.createLinkForHint=function(u,z){function A(G,L){G.length>L&&(G=G.substring(0,Math.round(L/2))+"..."+G.substring(G.length-Math.round(L/4)));return G}u=null!=u?u:"javascript:void(0);";if(null==z||0==z.length)z=this.isCustomLink(u)?this.getLinkTitle(u): +u;var D=document.createElement("a");D.setAttribute("rel",this.linkRelation);D.setAttribute("href",this.getAbsoluteUrl(u));D.setAttribute("title",A(this.isCustomLink(u)?this.getLinkTitle(u):u,80));null!=this.linkTarget&&D.setAttribute("target",this.linkTarget);mxUtils.write(D,A(z,40));this.isCustomLink(u)&&mxEvent.addListener(D,"click",mxUtils.bind(this,function(G){this.customLinkClicked(u);mxEvent.consume(G)}));return D};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled= +function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,V){this.popupMenuHandler.hideMenu()});var u=this.updateMouseEvent;this.updateMouseEvent=function(L){L=u.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var V=this.getCellAt(L.graphX,L.graphY);null!=V&&this.isSwimlane(V)&&this.hitsSwimlaneContent(V,L.graphX,L.graphY)||(L.state=this.view.getState(V),null!=L.state&&null!=L.state.shape&&(this.container.style.cursor= +L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,D=!1,G=this.fireMouseEvent;this.fireMouseEvent=function(L,V,ea){L==mxEvent.MOUSE_DOWN&&(V=this.updateMouseEvent(V),z=this.isCellSelected(V.getCell()),A=this.isSelectionEmpty(),D=this.popupMenuHandler.isMenuShowing());G.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(L,V){var ea=mxEvent.isMouseEvent(V.getEvent());this.popupMenuHandler.popupTrigger= +!this.isEditing()&&this.isEnabled()&&(null==V.getState()||!V.isSource(V.getState().control))&&(this.popupMenuHandler.popupTrigger||!D&&!ea&&(A&&null==V.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(V.getCell())));ea=!z||ea?null:mxUtils.bind(this,function(ba){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var fa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(V.getX()+fa.x+1,V.getY()+fa.y+1,ba,V.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, +[L,V,ea])})};mxCellEditor.prototype.isContentEditing=function(){var u=this.graph.view.getState(this.editingCell);return null!=u&&1==u.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var u="";window.getSelection?u=window.getSelection():document.getSelection?u=document.getSelection():document.selection&&(u=document.selection.createRange().text); +return""!=u};mxCellEditor.prototype.insertTab=function(u){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),D="\t";if(null!=u)for(D="";0")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var u=this.graph.view.getState(this.editingCell);if(null!=u){var z= +null!=u&&"0"!=mxUtils.getValue(u.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ea=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0"):ea,!0);this.textarea.className="mxCellEditor geContentEditable";ba=mxUtils.getValue(u.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(u.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY); +var D=mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),G=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,V=[];(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&V.push("underline");(mxUtils.getValue(u.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)== +mxConstants.FONT_STRIKETHROUGH&&V.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ba*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ba)+"px";this.textarea.style.textDecoration=V.join(" ");this.textarea.style.fontWeight=G?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=D;this.textarea.style.padding="0px";this.textarea.innerHTML!=ea&& +(this.textarea.innerHTML=ea,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0
"));ea=Graph.sanitizeHtml(z?ea.replace(/\n/g,"").replace(/<br\s*.?>/g, +"
"):ea,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ba=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ba*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ba)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width= +"";this.textarea.style.padding="2px";this.textarea.innerHTML!=ea&&(this.textarea.innerHTML=ea);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,z){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var A=u.view.scale;this.bounds=mxRectangle.fromRectangle(u); +if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*A;this.bounds.height=60*A;var D=null!=u.text?u.text.margin:null;null==D&&(D=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=D.x*this.bounds.width;this.bounds.y+=D.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height= +Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight"));return A=Graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(u){if("0"==mxUtils.getValue(u.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return z="1"==mxUtils.getValue(u.style,"nl2Br","1")?z.replace(/\r\n/g, +"
").replace(/\n/g,"
"):z.replace(/\r\n/g,"").replace(/\n/g,"")};var S=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();S.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&& +this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){var z=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=u.cell.geometry&&0ea.x+ea.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-ea.x-ea.width),this.unscaledBounds.y+this.unscaledBounds.height>ea.y+ea.height&&(this.unscaledBounds.height-= +this.unscaledBounds.y+this.unscaledBounds.height-ea.y-ea.height)));G=this.bounds;this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:L.x*V)+this.unscaledBounds.x*V,(null!=this.parentState?this.parentState.y:L.y*V)+this.unscaledBounds.y*V,this.unscaledBounds.width*V,this.unscaledBounds.height*V);z.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);ea=Math.cos(D);ba=Math.sin(D);z=new mxPoint(this.bounds.getCenterX(), +this.bounds.getCenterY());fa=z.x-A.x;ra=z.y-A.y;A=ea*fa-ba*ra-fa;z=ba*fa+ea*ra-ra;L=this.bounds.x-this.state.x;fa=this.bounds.y-this.state.y;D=ea*L-ba*fa;ea=ba*L+ea*fa;this.bounds.x+=A;this.bounds.y+=z;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+A/V);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+z/V);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);this.graph.isCellCollapsed(this.state.cell)|| +0==A&&0==z?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+D,this.childOffsetY=this.state.y-this.bounds.y+ea);G.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(u),null!=this.preview?this.drawPreview():this.updateParentHighlight())};var Y=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&& +!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible; +mxVertexHandler.prototype.isCustomHandleVisible=function(u){return u.tableHandle||la.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var u=0;this.graph.isTableRow(this.state.cell)?u=1:this.graph.isTableCell(this.state.cell)&&(u=2);return u};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())}; +var W=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==W&&(W=mxCellRenderer.defaultShapes.tableLine);var u=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var z=function(Ka,za,wa){for(var Ca=[],Ta=0;Ta=Sa.getStatus()&&(Ia=Sa.getText());Ta(Ia,Pa)}))):Ta(Ia,Pa)}function ba(Ha,Ta,Sa){if(null!=Ha&&mxUtils.isAncestorNode(document.body,ka)){Ha=mxUtils.parseXml(Ha);Ha=Editor.parseDiagramNode(Ha.documentElement);var Wa=new mxCodec(Ha.ownerDocument),$a=new mxGraphModel; Wa.decode(Ha,$a);Ha=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ka,Ha,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!=ra?mxResources.get(ra,null,ra):null,!0,new mxPoint(Ta,Sa),!0,function(){Ua=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;G(ka,null,null,ja,da,wa)},!0,!1)}}function ia(Ha,Ta){null==ja||Va|| b.sidebar.currentElt==ka?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ga?(Ta=''+Graph.compress('')+"",ba(Ta,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha))):(b.sidebar.currentElt= -ka,Va=!0,Ea(ja,function(Sa){Va&&b.sidebar.currentElt==ka&&ba(Sa,mxEvent.getClientX(Ha),mxEvent.getClientY(Ha));Va=!1})))}var ka=document.createElement("div");ka.className="geTemplate geAdaptiveAsset";ka.style.position="relative";ka.style.height=ya+"px";ka.style.width=xa+"px";var Ia=null,Pa=ja;null!=ra?ka.setAttribute("title",mxResources.get(ra,null,ra)):null!=ta&&0=ca.scrollHeight&&(D(),mxEvent.consume(ia))})); -if(0=ca.scrollHeight&&(D(),mxEvent.consume(ia))})); +if(0(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;u=null!=u?u:"#ebf2f9";x=null!=x?x:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";C=null!=C?C:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";z=null!=z?z:EditorUi.templateFile;var v=document.createElement("div"); v.style.userSelect="none";v.style.height="100%";var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";f&&v.appendChild(E);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE? @@ -10936,17 +10938,17 @@ b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROP n?"144px":"244px";this.init=function(){f&&(M.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null));null!=ca.parentNode&&null!=ca.parentNode.parentNode&&mxEvent.addGestureListeners(ca.parentNode.parentNode,mxUtils.bind(this,function(ja){b.sidebar.hideTooltip()}),null,null)};f&&(E.appendChild(M),y?M.style.width=e||n?"350px":"450px":(null!=b.editor.diagramFileTypes&&(y=FilenameDialog.createFileTypes(b,M,b.editor.diagramFileTypes),y.style.marginLeft= "6px",y.style.width=e||n?"80px":"180px",E.appendChild(y)),null!=b.editor.fileExtensions&&(n=FilenameDialog.createTypeHint(b,M,b.editor.fileExtensions),n.style.marginTop="12px",E.appendChild(n))));E=!1;var K=0,L=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),R=mxUtils.button(q||mxResources.get("create"),function(){R.setAttribute("disabled","disabled");F();R.removeAttribute("disabled")});R.className="geBtn gePrimaryBtn"; if(H||d){var Q=[],V=null,X=null,p=null,B=function(ja){R.setAttribute("disabled","disabled");for(var ua=0;ua=Pa.getStatus()&&(ba=Pa.getText());Ia(ba)}))):Ia(ba)}function Ea(ka,Ia,Pa){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0])); var Va=new mxCodec(ka.ownerDocument),Ga=new mxGraphModel;Va.decode(ka,Ga);ka=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(la,ka,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!=da.title?mxResources.get(da.title,null,da.title):null,!0,new mxPoint(Ia,Pa),!0,null,!0);var Ma=document.createElement("div");Ma.className="geTempDlgDialogMask"; @@ -11162,16 +11164,16 @@ wa=[],Ea=0;Ea