UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 29.2 kB
function mxShapeMockupPlaybackControls(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupProgressBar(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1,this.barPos=20}function mxShapeMockupShoppingCart(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupRating(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupMail(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupVolumeSlider(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1,this.barPos=80}function mxShapeMockupEdit(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupPrint(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupShare(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupTrashcan(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupCopyright(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupRegistered(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupVolume(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupRuler(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupRuler2(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupRevisionTable(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupStatusBar(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupPin(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupMiscRRect(e,t,o,l){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=l?l:1}function mxShapeMockupMiscAnchor(e,t,o,l){mxShape.call(this),this.bounds=e}mxUtils.extend(mxShapeMockupPlaybackControls,mxShape),mxShapeMockupPlaybackControls.prototype.cst={SHAPE_PLAYBACK_CONTROLS:"mxgraph.mockup.misc.playbackControls",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR3:"fillColor3",STROKE_COLOR3:"strokeColor3"},mxShapeMockupPlaybackControls.prototype.customProperties=[{name:"fillColor2",dispName:"Outline Color",type:"color"},{name:"fillColor3",dispName:"Symbol Color",type:"color"},{name:"strokeColor2",dispName:"Outline Stroke Color",type:"color"},{name:"strokeColor3",dispName:"Symbol Stroke Color",type:"color"}],mxShapeMockupPlaybackControls.prototype.paintVertexShape=function(e,t,o,l,i){i=Math.max(i,30),l=Math.max(225,l),e.translate(t,o),this.background(e,l,i,30),e.setShadow(!1),this.foreground(e,l,i,30,22)},mxShapeMockupPlaybackControls.prototype.background=function(e,t,o,l){e.rect(0,.5*(o-l),t,l),e.fillAndStroke()},mxShapeMockupPlaybackControls.prototype.foreground=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.FILL_COLOR2,"#99ddff"),a=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.STROKE_COLOR2,"none"),p=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.FILL_COLOR3,"#ffffff"),r=mxUtils.getValue(this.style,mxShapeMockupPlaybackControls.prototype.cst.STROKE_COLOR3,"none");e.setStrokeColor(a),e.setFillColor(s),e.ellipse(10,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(40,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(70,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(100,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(130,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(160,.5*o-.5*i,i,i),e.fillAndStroke(),e.ellipse(190,.5*o-.5*i,i,i),e.fillAndStroke(),e.setStrokeColor(r),e.setFillColor(p);var n=.5*o-.5*l;e.begin(),e.moveTo(16,n+10),e.lineTo(16,n+20),e.lineTo(18,n+20),e.lineTo(18,n+10),e.close(),e.moveTo(20,n+15),e.lineTo(25,n+20),e.lineTo(25,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(44,n+15),e.lineTo(49,n+20),e.lineTo(49,n+10),e.close(),e.moveTo(51,n+15),e.lineTo(56,n+20),e.lineTo(56,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(77,n+15),e.lineTo(82,n+20),e.lineTo(82,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(108,n+10),e.lineTo(108,n+20),e.lineTo(110,n+20),e.lineTo(110,n+10),e.close(),e.moveTo(117,n+15),e.lineTo(112,n+20),e.lineTo(112,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(144,n+15),e.lineTo(139,n+20),e.lineTo(139,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(171,n+15),e.lineTo(166,n+20),e.lineTo(166,n+10),e.close(),e.moveTo(178,n+15),e.lineTo(173,n+20),e.lineTo(173,n+10),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(203,n+10),e.lineTo(203,n+20),e.lineTo(205,n+20),e.lineTo(205,n+10),e.close(),e.moveTo(201,n+15),e.lineTo(196,n+20),e.lineTo(196,n+10),e.close(),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupPlaybackControls.prototype.cst.SHAPE_PLAYBACK_CONTROLS,mxShapeMockupPlaybackControls),mxUtils.extend(mxShapeMockupProgressBar,mxShape),mxShapeMockupProgressBar.prototype.cst={SHAPE_PROGRESS_BAR:"mxgraph.mockup.misc.progressBar",BAR_POS:"barPos",FILL_COLOR2:"fillColor2"},mxShapeMockupProgressBar.prototype.customProperties=[{name:"fillColor2",dispName:"Outline Color",type:"color"},{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:80}],mxShapeMockupProgressBar.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),this.background(e,l,i),e.setShadow(!1),this.foreground(e,l,i)},mxShapeMockupProgressBar.prototype.background=function(e,t,o){e.roundrect(0,.5*o-5,t,10,5,5),e.fillAndStroke()},mxShapeMockupProgressBar.prototype.foreground=function(e,t,o){var l=mxUtils.getValue(this.style,mxShapeMockupProgressBar.prototype.cst.FILL_COLOR2,"#ddeeff"),i=mxUtils.getValue(this.style,mxShapeMockupProgressBar.prototype.cst.BAR_POS,"80");i=Math.min(i,100);var s=0+(t-0)*(i=Math.max(i,0))/100;e.setFillColor(l),e.roundrect(0,.5*o-5,s,10,5,5),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupProgressBar.prototype.cst.SHAPE_PROGRESS_BAR,mxShapeMockupProgressBar),Graph.handleFactory[mxShapeMockupProgressBar.prototype.cst.SHAPE_PROGRESS_BAR]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(e.x+t*e.width/100,e.y+.5*e.height)}),(function(e,t){this.state.style.barPos=Math.round(1e3*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/1e3}))]},mxUtils.extend(mxShapeMockupShoppingCart,mxShape),mxShapeMockupShoppingCart.prototype.cst={SHAPE_SHOPPING_CART:"mxgraph.mockup.misc.shoppingCart"},mxShapeMockupShoppingCart.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e.translate(t,o),e.setStrokeWidth(3),e.begin(),e.moveTo(.975*l,.025*i),e.lineTo(.82*l,.055*i),e.lineTo(.59*l,.66*i),e.lineTo(.7*l,.765*i),e.arcTo(.06*l,.06*i,0,0,1,.665*l,.86*i),e.lineTo(.05*l,.86*i),e.moveTo(.74*l,.26*i),e.lineTo(.03*l,.28*i),e.lineTo(.065*l,.61*i),e.lineTo(.59*l,.66*i),e.stroke(),e.setStrokeWidth(1),e.begin(),e.moveTo(.15*l,.28*i),e.lineTo(.15*l,.62*i),e.moveTo(.265*l,.275*i),e.lineTo(.265*l,.63*i),e.moveTo(.38*l,.27*i),e.lineTo(.38*l,.64*i),e.moveTo(.495*l,.265*i),e.lineTo(.495*l,.65*i),e.moveTo(.61*l,.265*i),e.lineTo(.61*l,.61*i),e.stroke(),e.begin(),e.moveTo(.69*l,.405*i),e.lineTo(.045*l,.405*i),e.moveTo(.645*l,.52*i),e.lineTo(.055*l,.52*i),e.stroke(),e.setFillColor(s),e.ellipse(.075*l,.89*i,.1*l,.1*i),e.fillAndStroke(),e.ellipse(.62*l,.89*i,.1*l,.1*i),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupShoppingCart.prototype.cst.SHAPE_SHOPPING_CART,mxShapeMockupShoppingCart),mxUtils.extend(mxShapeMockupRating,mxShape),mxShapeMockupRating.prototype.cst={SHAPE_RATING:"mxgraph.mockup.misc.rating",RATING_STYLE:"ratingStyle",RATING_SCALE:"ratingScale",RATING_HEART:"heart",RATING_STAR:"star",EMPTY_FILL_COLOR:"emptyFillColor",GRADE:"grade"},mxShapeMockupRating.prototype.customProperties=[{name:"ratingStyle",dispName:"Style",type:"enum",enumList:[{val:"heart",dispName:"Heart"},{val:"star",dispName:"Star"}]},{name:"ratingScale",dispName:"Max. Rating",type:"int"},{name:"grade",dispName:"Current Rating",type:"int"},{name:"emptyFillColor",dispName:"Fill2 Color",type:"color"}],mxShapeMockupRating.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.RATING_STYLE,mxShapeMockupRating.prototype.cst.RATING_STAR),a=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.GRADE,"5"),p=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.RATING_SCALE,"10");if(e.translate(t,o),s===mxShapeMockupRating.prototype.cst.RATING_STAR)for(var r=0;r<a;r++)e.begin(),e.moveTo(r*i*1.5,.33*i),e.lineTo(r*i*1.5+.364*i,.33*i),e.lineTo(r*i*1.5+.475*i,0),e.lineTo(r*i*1.5+.586*i,.33*i),e.lineTo(r*i*1.5+.95*i,.33*i),e.lineTo(r*i*1.5+.66*i,.551*i),e.lineTo(r*i*1.5+.775*i,.9*i),e.lineTo(r*i*1.5+.475*i,.684*i),e.lineTo(r*i*1.5+.175*i,.9*i),e.lineTo(r*i*1.5+.29*i,.551*i),e.close(),e.fillAndStroke();else if(s===mxShapeMockupRating.prototype.cst.RATING_HEART)for(r=0;r<a;r++)e.begin(),e.moveTo(r*i*1.5+.519*i,.947*i),e.curveTo(r*i*1.5+.558*i,.908*i,r*i*1.5+.778*i,.682*i,r*i*1.5+.916*i,.54*i),e.curveTo(r*i*1.5+1.039*i,.414*i,r*i*1.5+1.036*i,.229*i,r*i*1.5+.924*i,.115*i),e.curveTo(r*i*1.5+.812*i,0,r*i*1.5+.631*i,0,r*i*1.5+.519*i,.115*i),e.curveTo(r*i*1.5+.408*i,0,r*i*1.5+.227*i,0,r*i*1.5+.115*i,.115*i),e.curveTo(r*i*1.5+.03*i,.229*i,r*i*1.5,.414*i,r*i*1.5+.123*i,.54*i),e.close(),e.fillAndStroke();var n=mxUtils.getValue(this.style,mxShapeMockupRating.prototype.cst.EMPTY_FILL_COLOR,"#ffffff");if(e.setFillColor(n),s===mxShapeMockupRating.prototype.cst.RATING_STAR)for(r=a;r<p;r++)e.begin(),e.moveTo(r*i*1.5,.33*i),e.lineTo(r*i*1.5+.364*i,.33*i),e.lineTo(r*i*1.5+.475*i,0),e.lineTo(r*i*1.5+.586*i,.33*i),e.lineTo(r*i*1.5+.95*i,.33*i),e.lineTo(r*i*1.5+.66*i,.551*i),e.lineTo(r*i*1.5+.775*i,.9*i),e.lineTo(r*i*1.5+.475*i,.684*i),e.lineTo(r*i*1.5+.175*i,.9*i),e.lineTo(r*i*1.5+.29*i,.551*i),e.close(),e.fillAndStroke();else if(s===mxShapeMockupRating.prototype.cst.RATING_HEART)for(r=a;r<p;r++)e.begin(),e.moveTo(r*i*1.5+.519*i,.947*i),e.curveTo(r*i*1.5+.558*i,.908*i,r*i*1.5+.778*i,.682*i,r*i*1.5+.916*i,.54*i),e.curveTo(r*i*1.5+1.039*i,.414*i,r*i*1.5+1.036*i,.229*i,r*i*1.5+.924*i,.115*i),e.curveTo(r*i*1.5+.812*i,0,r*i*1.5+.631*i,0,r*i*1.5+.519*i,.115*i),e.curveTo(r*i*1.5+.408*i,0,r*i*1.5+.227*i,0,r*i*1.5+.115*i,.115*i),e.curveTo(r*i*1.5+.03*i,.229*i,r*i*1.5,.414*i,r*i*1.5+.123*i,.54*i),e.close(),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupRating.prototype.cst.SHAPE_RATING,mxShapeMockupRating),mxUtils.extend(mxShapeMockupMail,mxShape),mxShapeMockupMail.prototype.cst={SHAPE_MAIL:"mxgraph.mockup.misc.mail2"},mxShapeMockupMail.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),e.rect(0,0,l,i),e.fillAndStroke(),e.setShadow(!1),e.begin(),e.moveTo(0,0),e.lineTo(.5*l,.5*i),e.lineTo(l,0),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupMail.prototype.cst.SHAPE_MAIL,mxShapeMockupMail),mxUtils.extend(mxShapeMockupVolumeSlider,mxShape),mxShapeMockupVolumeSlider.prototype.cst={SHAPE_VOLUME_SLIDER:"mxgraph.mockup.misc.volumeSlider",BAR_POS:"barPos",FILL_COLOR2:"fillColor2"},mxShapeMockupVolumeSlider.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"barPos",dispName:"Handle Position",type:"float"}],mxShapeMockupVolumeSlider.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o);var s=mxUtils.getValue(this.style,mxShapeMockupVolumeSlider.prototype.cst.BAR_POS,"80"),a=mxUtils.getValue(this.style,mxShapeMockupVolumeSlider.prototype.cst.FILL_COLOR2,"#ddeeff");mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999"),s=Math.min(s,100),s=Math.max(s,0);var p=25,r=(i=Math.max(i,p),(l=Math.max(l,87.5))-p),n=.5*(i-p);e.begin(),e.moveTo(r+1.25,n+8.75),e.lineTo(r+3.75,n+8.75),e.lineTo(r+7.5,n+5),e.lineTo(r+7.5,n+20),e.lineTo(r+3.75,n+16.25),e.lineTo(r+1.25,n+16.25),e.close(),e.fill();var h=0+(s=(l-32.5-0)*s/100),c=l-p,m=.5*(i-p);e.begin(),e.moveTo(c+10,m+8.75),e.arcTo(5,7.5,0,0,1,c+10,m+16.25),e.moveTo(c+10.625,m+6.25),e.arcTo(5.625,8.75,0,0,1,c+10.625,m+18.75),e.moveTo(c+12.5,m+5),e.arcTo(6.25,10,0,0,1,c+12.5,m+20),e.fillAndStroke();var u=.5*(i-p),S=l-32.5;e.roundrect(0,u+8.75,S,7.5,5,5),e.fill(),e.setShadow(!1),e.setFillColor(a),e.roundrect(0,u+8.75,h,7.5,5,5),e.fill(),e.ellipse(h-6.25,u+6.25,12.5,12.5),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupVolumeSlider.prototype.cst.SHAPE_VOLUME_SLIDER,mxShapeMockupVolumeSlider),Graph.handleFactory[mxShapeMockupVolumeSlider.prototype.cst.SHAPE_VOLUME_SLIDER]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"barPos",this.barPos))));return new mxPoint(e.x+t*(e.width-32.5)/100,e.y+.5*e.height)}),(function(e,t){this.state.style.barPos=Math.round(1e3*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/1e3}))]},mxUtils.extend(mxShapeMockupEdit,mxShape),mxShapeMockupEdit.prototype.cst={SHAPE_EDIT:"mxgraph.mockup.misc.editIcon"},mxShapeMockupEdit.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.roundrect(0,0,l,i,.05*l,.05*i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.11*l,.8*i),e.lineTo(.2*l,.89*i),e.lineTo(.05*l,.95*i),e.close(),e.moveTo(.74*l,.16*i),e.lineTo(.84*l,.26*i),e.lineTo(.22*l,.88*i),e.lineTo(.12*l,.78*i),e.close(),e.moveTo(.755*l,.145*i),e.lineTo(.82*l,.08*i),e.lineTo(.92*l,.18*i),e.lineTo(.855*l,.245*i),e.close(),e.fill()},mxCellRenderer.registerShape(mxShapeMockupEdit.prototype.cst.SHAPE_EDIT,mxShapeMockupEdit),mxUtils.extend(mxShapeMockupPrint,mxShape),mxShapeMockupPrint.prototype.cst={SHAPE_PRINT:"mxgraph.mockup.misc.printIcon"},mxShapeMockupPrint.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.roundrect(0,0,l,i,.05*l,.05*i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.15*l,.58*i),e.arcTo(.03*l,.03*i,0,0,1,.18*l,.55*i),e.lineTo(.82*l,.55*i),e.arcTo(.03*l,.03*i,0,0,1,.85*l,.58*i),e.lineTo(.85*l,.82*i),e.arcTo(.03*l,.03*i,0,0,1,.82*l,.85*i),e.lineTo(.18*l,.85*i),e.arcTo(.03*l,.03*i,0,0,1,.15*l,.82*i),e.close(),e.moveTo(.7*l,.52*i),e.lineTo(.3*l,.52*i),e.lineTo(.3*l,.15*i),e.lineTo(.55*l,.15*i),e.lineTo(.55*l,.3*i),e.lineTo(.7*l,.3*i),e.close(),e.moveTo(.57*l,.15*i),e.lineTo(.7*l,.28*i),e.lineTo(.57*l,.28*i),e.close(),e.fill()},mxCellRenderer.registerShape(mxShapeMockupPrint.prototype.cst.SHAPE_PRINT,mxShapeMockupPrint),mxUtils.extend(mxShapeMockupShare,mxShape),mxShapeMockupShare.prototype.cst={SHAPE_SHARE:"mxgraph.mockup.misc.shareIcon"},mxShapeMockupShare.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.roundrect(0,0,l,i,.05*l,.05*i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.15*l,.18*i),e.arcTo(.03*l,.03*i,0,0,1,.18*l,.15*i),e.lineTo(.82*l,.15*i),e.arcTo(.03*l,.03*i,0,0,1,.85*l,.18*i),e.lineTo(.85*l,.82*i),e.arcTo(.03*l,.03*i,0,0,1,.82*l,.85*i),e.lineTo(.18*l,.85*i),e.arcTo(.03*l,.03*i,0,0,1,.15*l,.82*i),e.close(),e.fill();var a=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");e.setFillColor(a),e.begin(),e.moveTo(.563*l,.34*i),e.arcTo(.095*l,.095*i,0,1,1,.603*l,.42*i),e.lineTo(.44*l,.5*i),e.lineTo(.602*l,.582*i),e.arcTo(.095*l,.095*i,0,1,1,.563*l,.653*i),e.lineTo(.403*l,.575*i),e.arcTo(.095*l,.095*i,0,1,1,.4*l,.42*i),e.close(),e.fill()},mxCellRenderer.registerShape(mxShapeMockupShare.prototype.cst.SHAPE_SHARE,mxShapeMockupShare),mxUtils.extend(mxShapeMockupTrashcan,mxShape),mxShapeMockupTrashcan.prototype.cst={SHAPE_TRASHCAN:"mxgraph.mockup.misc.trashcanIcon"},mxShapeMockupTrashcan.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.roundrect(0,0,l,i,.05*l,.05*i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.24*l,.24*i),e.arcTo(.04*l,.04*i,0,0,1,.24*l,.16*i),e.lineTo(.4*l,.16*i),e.lineTo(.4*l,.12*i),e.lineTo(.6*l,.12*i),e.lineTo(.6*l,.16*i),e.lineTo(.76*l,.16*i),e.arcTo(.04*l,.04*i,0,0,1,.76*l,.24*i),e.close(),e.fill(),e.roundrect(.26*l,.3*i,.1*l,.6*i,.06*l,.06*i),e.fill(),e.roundrect(.44*l,.3*i,.1*l,.6*i,.06*l,.06*i),e.fill(),e.roundrect(.62*l,.3*i,.1*l,.6*i,.06*l,.06*i),e.fill()},mxCellRenderer.registerShape(mxShapeMockupTrashcan.prototype.cst.SHAPE_TRASHCAN,mxShapeMockupTrashcan),mxUtils.extend(mxShapeMockupCopyright,mxShape),mxShapeMockupCopyright.prototype.cst={SHAPE_COPYRIGHT:"mxgraph.mockup.misc.copyrightIcon"},mxShapeMockupCopyright.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.ellipse(0,0,l,i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.713*l,.288*i),e.arcTo(.3*l,.3*i,0,1,0,.713*l,.712*i),e.lineTo(.784*l,.783*i),e.arcTo(.4*l,.4*i,0,1,1,.784*l,.217*i),e.close(),e.fill()},mxCellRenderer.registerShape(mxShapeMockupCopyright.prototype.cst.SHAPE_COPYRIGHT,mxShapeMockupCopyright),mxUtils.extend(mxShapeMockupRegistered,mxShape),mxShapeMockupRegistered.prototype.cst={SHAPE_REGISTERED:"mxgraph.mockup.misc.registeredIcon"},mxShapeMockupRegistered.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.ellipse(0,0,l,i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.29*l,.9*i),e.lineTo(.29*l,.09*i),e.lineTo(.5*l,.09*i),e.arcTo(.2195*l,.2195*i,0,0,1,.545*l,.525*i),e.lineTo(.738*l,.91*i),e.lineTo(.674*l,.91*i),e.lineTo(.4825*l,.53*i),e.lineTo(.35*l,.53*i),e.lineTo(.35*l,.9*i),e.close(),e.moveTo(.35*l,.47*i),e.lineTo(.5*l,.47*i),e.arcTo(.15*l,.15*i,0,0,0,.5*l,.15*i),e.lineTo(.35*l,.15*i),e.close(),e.fill()},mxCellRenderer.registerShape(mxShapeMockupRegistered.prototype.cst.SHAPE_REGISTERED,mxShapeMockupRegistered),mxUtils.extend(mxShapeMockupVolume,mxShape),mxShapeMockupVolume.prototype.cst={SHAPE_VOLUME:"mxgraph.mockup.misc.volumeIcon"},mxShapeMockupVolume.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#999999");e.translate(t,o),e.roundrect(0,0,l,i,.05*l,.05*i),e.fillAndStroke(),e.setShadow(!1),e.setFillColor(s),e.begin(),e.moveTo(.1*l,.3*i),e.lineTo(.3*l,.3*i),e.lineTo(.5*l,.15*i),e.lineTo(.5*l,.85*i),e.lineTo(.3*l,.7*i),e.lineTo(.1*l,.7*i),e.close(),e.fill(),e.begin(),e.moveTo(.6*l,.4*i),e.arcTo(.2*l,.2*i,0,0,1,.6*l,.6*i),e.moveTo(.7*l,.3*i),e.arcTo(.3*l,.3*i,0,0,1,.7*l,.7*i),e.moveTo(.8*l,.2*i),e.arcTo(.4*l,.4*i,0,0,1,.8*l,.8*i),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupVolume.prototype.cst.SHAPE_VOLUME,mxShapeMockupVolume),mxUtils.extend(mxShapeMockupRuler,mxShape),mxShapeMockupRuler.prototype.cst={SHAPE_RULER:"mxgraph.mockup.misc.ruler",ORIENTATION:"rulerOrient",UNIT_SIZE:"unitSize",FACE_UP:"up",FACE_DOWN:"down"},mxShapeMockupRuler.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),this.background(e,l,i),e.setShadow(!1),this.foreground(e,l,i)},mxShapeMockupRuler.prototype.background=function(e,t,o){e.rect(0,0,t,o),e.fillAndStroke()},mxShapeMockupRuler.prototype.foreground=function(e,t,o){var l=mxUtils.getValue(this.style,mxShapeMockupRuler.prototype.cst.ORIENTATION,mxShapeMockupRuler.prototype.cst.FACE_DOWN),i=mxUtils.getValue(this.style,mxShapeMockupRuler.prototype.cst.UNIT_SIZE,"10"),s=i=Math.max(i,1),a=1;if(l===mxShapeMockupRuler.prototype.cst.FACE_DOWN){for(e.begin();s<t;)0==(p=a%10)?(e.moveTo(s,.5*o),e.lineTo(s,o)):5===p?(e.moveTo(s,.7*o),e.lineTo(s,o)):(e.moveTo(s,.8*o),e.lineTo(s,o)),s+=i,a+=1;e.stroke()}else if(l===mxShapeMockupRuler.prototype.cst.FACE_UP){for(e.begin();s<t;){var p;0==(p=a%10)?(e.moveTo(s,.5*o),e.lineTo(s,0)):5===p?(e.moveTo(s,.3*o),e.lineTo(s,0)):(e.moveTo(s,.2*o),e.lineTo(s,0)),s+=i,a+=1}e.stroke()}},mxCellRenderer.registerShape(mxShapeMockupRuler.prototype.cst.SHAPE_RULER,mxShapeMockupRuler),mxUtils.extend(mxShapeMockupRuler2,mxShape),mxShapeMockupRuler2.prototype.cst={SHAPE_RULER:"mxgraph.mockup.misc.ruler2",ORIENTATION:"rulerOrient",UNIT_SIZE:"dx",FACE_UP:"up",FACE_DOWN:"down"},mxShapeMockupRuler2.prototype.customProperties=[{name:"rulerOrient",dispName:"Orientation",defVal:"up",type:"enum",enumList:[{val:"up",dispName:"Up"},{val:"down",dispName:"Down"}]},{name:"dx",dispName:"Unit Size",type:"float",min:0,defVal:100}],mxShapeMockupRuler2.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),this.background(e,l,i),e.setShadow(!1),this.foreground(e,t,o,l,i)},mxShapeMockupRuler2.prototype.background=function(e,t,o){e.rect(0,0,t,o),e.fillAndStroke()},mxShapeMockupRuler2.prototype.foreground=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxShapeMockupRuler2.prototype.cst.ORIENTATION,mxShapeMockupRuler2.prototype.cst.FACE_DOWN),a=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000"),p=mxUtils.getValue(this.style,"dx","100"),r=p/10;this.state.style.spacingLeft=Math.round(1e3*Math.max(0,Math.min(l,p)))/1e3-4,r=Math.max(r,1),e.setFontColor(a);var n=r,h=1;if(s===mxShapeMockupRuler2.prototype.cst.FACE_DOWN){for(e.begin();n<l;){if(0==(u=h%10)){e.moveTo(n,i-10),e.lineTo(n,i);var c=this.state.view.graph.getLabel(this.state.cell);if(!isNaN(c)){e.stroke();var m=h*Math.round(100*c)/1e3;10!=h&&0!=m&&e.text(n,.5*(i-10),0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.begin()}}else 5===u?(e.moveTo(n,i-6),e.lineTo(n,i)):(e.moveTo(n,i-4),e.lineTo(n,i));n+=r,h+=1}e.stroke()}else if(s===mxShapeMockupRuler2.prototype.cst.FACE_UP){for(e.begin();n<l;){var u;0==(u=h%10)?(e.moveTo(n,10),e.lineTo(n,0),c=this.state.view.graph.getLabel(this.state.cell),isNaN(c)||(e.stroke(),m=h*Math.round(100*c)/1e3,10!=h&&0!=m&&e.text(n,.5*(i+10),0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.begin())):5===u?(e.moveTo(n,6),e.lineTo(n,0)):(e.moveTo(n,4),e.lineTo(n,0)),n+=r,h+=1}e.stroke()}},mxCellRenderer.registerShape(mxShapeMockupRuler2.prototype.cst.SHAPE_RULER,mxShapeMockupRuler2),Graph.handleFactory[mxShapeMockupRuler2.prototype.cst.SHAPE_RULER]=function(e){return[Graph.createHandle(e,["dx","spacingLeft","align","varticalAlign","spacingBottom","spacingTop","spacingRight","spacing"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(e.x+t,e.y+e.height-10)}),(function(e,t){this.state.style.dx=Math.round(1e3*Math.max(0,Math.min(e.width,t.x-e.x)))/1e3,this.state.style.spacingLeft=Math.round(1e3*Math.max(0,Math.min(e.width,t.x-e.x)))/1e3-4,this.state.style.align="left",this.state.style.verticalAlign="middle","down"==mxUtils.getValue(this.state.style,"rulerOrient","1")?(this.state.style.spacingBottom=10,this.state.style.spacingTop=0):(this.state.style.spacingBottom=0,this.state.style.spacingTop=10),this.state.style.spacingRight=0,this.state.style.spacing=0}))]},mxUtils.extend(mxShapeMockupRevisionTable,mxShape),mxShapeMockupRevisionTable.prototype.cst={SHAPE_REVISION_TABLE:"mxgraph.mockup.misc.revisionTable",MAIN_TEXT:"mainText",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize"},mxShapeMockupRevisionTable.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),this.background(e,l,i),e.setShadow(!1),this.foreground(e,l,i)},mxShapeMockupRevisionTable.prototype.background=function(e,t,o){e.rect(0,0,t,o),e.fillAndStroke()},mxShapeMockupRevisionTable.prototype.foreground=function(e,t,o){var l=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.MAIN_TEXT,"").toString().split(","),i=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.TEXT_COLOR,"#999999"),s=mxUtils.getValue(this.style,mxShapeMockupRevisionTable.prototype.cst.TEXT_SIZE,"17");e.begin(),e.moveTo(0,.33*o),e.lineTo(t,.33*o),e.moveTo(0,.67*o),e.lineTo(t,.67*o),e.moveTo(.125*t,.33*o),e.lineTo(.125*t,o),e.moveTo(.5*t,.33*o),e.lineTo(.5*t,o),e.stroke(),e.setFontSize(s),e.setFontColor(i),e.text(.5*t,.165*o,0,0,l[0],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.0625*t,.5*o,0,0,l[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.3125*t,.5*o,0,0,l[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.75*t,.5*o,0,0,l[3],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.0625*t,.835*o,0,0,l[4],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.3125*t,.835*o,0,0,l[5],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(.75*t,.835*o,0,0,l[6],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape(mxShapeMockupRevisionTable.prototype.cst.SHAPE_REVISION_TABLE,mxShapeMockupRevisionTable),mxUtils.extend(mxShapeMockupStatusBar,mxShape),mxShapeMockupStatusBar.prototype.cst={SHAPE_STATUS_BAR:"mxgraph.mockup.misc.statusBar",MAIN_TEXT:"mainText",FILL_COLOR2:"fillColor2",STROKE_COLOR2:"strokeColor2",TEXT_COLOR:"textColor",TEXT_SIZE:"textSize"},mxShapeMockupStatusBar.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o),l=Math.max(l,105),this.background(e,l,i),e.setShadow(!1),this.foreground(e,l,i)},mxShapeMockupStatusBar.prototype.background=function(e,t,o){e.rect(0,.5*o-15,t,30),e.fillAndStroke()},mxShapeMockupStatusBar.prototype.foreground=function(e,t,o){var l=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.FILL_COLOR2,"#ddeeff"),i=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.STROKE_COLOR2,"#008cff"),s=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.MAIN_TEXT,"").toString().split(","),a=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.TEXT_COLOR,"#999999"),p=mxUtils.getValue(this.style,mxShapeMockupStatusBar.prototype.cst.TEXT_SIZE,"17");e.setFillColor(l),e.roundrect(5,.5*o-10,.46*(t-75),20,5,5),e.fill(),e.roundrect(10+.46*(t-75),.5*o-10,.23*(t-75),20,5,5),e.fill(),e.roundrect(15+.69*(t-75),.5*o-10,.276*(t-75),20,5,5),e.fill(),e.setFontSize(p),e.setFontColor(a),e.text(10,.5*o,0,0,s[0],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(10+.575*(t-75),.5*o,0,0,s[1],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.text(15+.828*(t-75),.5*o,0,0,s[2],mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.setStrokeColor(i),e.ellipse(t-25,.5*o-10,20,20),e.stroke(),e.begin(),e.moveTo(t-55,.5*o+10),e.lineTo(t-35,.5*o+10),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupStatusBar.prototype.cst.SHAPE_STATUS_BAR,mxShapeMockupStatusBar),mxUtils.extend(mxShapeMockupPin,mxShape),mxShapeMockupPin.prototype.cst={SHAPE_PIN:"mxgraph.mockup.misc.pin",FILL_COLOR2:"fillColor2",FILL_COLOR3:"fillColor3"},mxShapeMockupPin.prototype.customProperties=[{name:"fillColor2",dispName:"Fill2 Color",type:"color"},{name:"fillColor3",dispName:"Fill3 Color",type:"color"}],mxShapeMockupPin.prototype.paintVertexShape=function(e,t,o,l,i){var s=mxUtils.getValue(this.style,mxShapeMockupPin.prototype.cst.FILL_COLOR2,"#000000"),a=mxUtils.getValue(this.style,mxShapeMockupPin.prototype.cst.FILL_COLOR3,"#000000"),p=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e.setShadow(!1),e.translate(t,o),e.setStrokeWidth(3),e.setStrokeColor("#666666"),e.begin(),e.moveTo(.5*l,.4*i),e.lineTo(.5*l,i),e.stroke(),e.setStrokeWidth(2),e.setStrokeColor(p),e.setGradient(s,a,0,0,l,.4*i,mxConstants.DIRECTION_SOUTH,1,1),e.setAlpha(.9),e.ellipse(0,0,l,.4*i),e.fillAndStroke(),e.setFillColor("#ffffff"),e.setAlpha(.5),e.ellipse(.2*l,.08*i,.3*l,.12*i),e.fill()},mxCellRenderer.registerShape(mxShapeMockupPin.prototype.cst.SHAPE_PIN,mxShapeMockupPin),mxUtils.extend(mxShapeMockupMiscRRect,mxShape),mxShapeMockupMiscRRect.prototype.cst={RRECT:"mxgraph.mockup.misc.rrect",R_SIZE:"rSize"},mxShapeMockupMiscRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeMockupMiscRRect.prototype.paintVertexShape=function(e,t,o,l,i){e.translate(t,o);var s=parseInt(mxUtils.getValue(this.style,mxShapeMockupMiscRRect.prototype.cst.R_SIZE,"10"));e.roundrect(0,0,l,i,s),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupMiscRRect.prototype.cst.RRECT,mxShapeMockupMiscRRect),mxUtils.extend(mxShapeMockupMiscAnchor,mxShape),mxShapeMockupMiscAnchor.prototype.cst={ANCHOR:"mxgraph.mockup.misc.anchor"},mxShapeMockupMiscAnchor.prototype.paintVertexShape=function(e,t,o,l,i){},mxCellRenderer.registerShape(mxShapeMockupMiscAnchor.prototype.cst.ANCHOR,mxShapeMockupMiscAnchor);