@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 24.8 kB
JavaScript
function mxShapeBootstrapRRect(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapTopButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapBottomButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapRightButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapLeftButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapLeftButtonStriped(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapRoundedButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapArrow(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapTabTop(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapImage(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapCheckbox(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapCheckbox2(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapRadioButton(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapRadioButton2(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapHorLines(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapUserTwo(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapRating(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBoostrapAnchor(t,e,o,a){mxShape.call(this),this.bounds=t}function mxShapeBootstrapRangeInput(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1,this.dx=.3}function mxShapeBootstrapSwitch(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeBootstrapX(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1}function mxShapeInfographicPopover(t,e,o,a){mxShape.call(this),this.bounds=t,this.fill=e,this.stroke=o,this.strokewidth=null!=a?a:1,this.dx=.5,this.dy=.5}mxUtils.extend(mxShapeBootstrapRRect,mxShape),mxShapeBootstrapRRect.prototype.cst={PACKAGE:"mxgraph.bootstrap.rrect",R_SIZE:"rSize"},mxShapeBootstrapRRect.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeBootstrapRRect.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapRRect.prototype.cst.R_SIZE,"10"));t.roundrect(0,0,a,r,p),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapRRect.prototype.cst.PACKAGE,mxShapeBootstrapRRect),mxUtils.extend(mxShapeBootstrapTopButton,mxShape),mxShapeBootstrapTopButton.prototype.cst={TOP_BUTTON:"mxgraph.bootstrap.topButton",R_SIZE:"rSize"},mxShapeBootstrapTopButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeBootstrapTopButton.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10"));t.begin(),t.moveTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r),t.lineTo(0,r),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapTopButton.prototype.cst.TOP_BUTTON,mxShapeBootstrapTopButton),mxUtils.extend(mxShapeBootstrapBottomButton,mxShape),mxShapeBootstrapBottomButton.prototype.cst={BOTTOM_BUTTON:"mxgraph.bootstrap.bottomButton",R_SIZE:"rSize"},mxShapeBootstrapBottomButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeBootstrapBottomButton.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapBottomButton.prototype.cst.R_SIZE,"10"));t.begin(),t.moveTo(0,0),t.lineTo(a,0),t.lineTo(a,r-p),t.arcTo(p,p,0,0,1,a-p,r),t.lineTo(p,r),t.arcTo(p,p,0,0,1,0,r-p),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapBottomButton.prototype.cst.BOTTOM_BUTTON,mxShapeBootstrapBottomButton),mxUtils.extend(mxShapeBootstrapRightButton,mxShape),mxShapeBootstrapRightButton.prototype.cst={RIGHT_BUTTON:"mxgraph.bootstrap.rightButton",R_SIZE:"rSize"},mxShapeBootstrapRightButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeBootstrapRightButton.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapRightButton.prototype.cst.R_SIZE,"10"));t.begin(),t.moveTo(0,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r-p),t.arcTo(p,p,0,0,1,a-p,r),t.lineTo(0,r),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapRightButton.prototype.cst.RIGHT_BUTTON,mxShapeBootstrapRightButton),mxUtils.extend(mxShapeBootstrapLeftButton,mxShape),mxShapeBootstrapLeftButton.prototype.cst={LEFT_BUTTON:"mxgraph.bootstrap.leftButton",R_SIZE:"rSize"},mxShapeBootstrapLeftButton.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10}],mxShapeBootstrapLeftButton.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapLeftButton.prototype.cst.R_SIZE,"10"));t.begin(),t.moveTo(a,0),t.lineTo(a,r),t.lineTo(p,r),t.arcTo(p,p,0,0,1,0,r-p),t.lineTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapLeftButton.prototype.cst.LEFT_BUTTON,mxShapeBootstrapLeftButton),mxUtils.extend(mxShapeBootstrapLeftButtonStriped,mxShape),mxShapeBootstrapLeftButtonStriped.prototype.cst={LEFT_BUTTON_STRIPED:"mxgraph.bootstrap.leftButtonStriped"},mxShapeBootstrapLeftButtonStriped.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),rSize=5,t.begin(),t.moveTo(a,0),t.lineTo(a,r),t.lineTo(rSize,r),t.arcTo(rSize,rSize,0,0,1,0,r-rSize),t.lineTo(0,rSize),t.arcTo(rSize,rSize,0,0,1,rSize,0),t.close(),t.fill(),t.setAlpha("0.2");var p=.5*r;t.setFillColor("#ffffff"),t.begin(),t.moveTo(0,.75*r),t.lineTo(0,.25*r),t.lineTo(.75*r,r),t.lineTo(.25*r,r),t.close(),t.fill();for(var s=!1,i=.5*p;!s;)t.begin(),t.moveTo(i,0),i+p>=a?(t.lineTo(a,0),t.lineTo(a,a-i)):(t.lineTo(i+p,0),i+p+r>a?(t.lineTo(a,a-i-p),a-i>r?(t.lineTo(a,r),t.lineTo(i+r,r)):t.lineTo(a,a-i)):(t.lineTo(i+p+r,r),t.lineTo(i+r,r))),t.close(),t.fill(),(i+=2*p)>a&&(s=!0)},mxCellRenderer.registerShape(mxShapeBootstrapLeftButtonStriped.prototype.cst.LEFT_BUTTON_STRIPED,mxShapeBootstrapLeftButtonStriped),mxUtils.extend(mxShapeBootstrapRoundedButton,mxShape),mxShapeBootstrapRoundedButton.prototype.cst={ROUNDED_BUTTON:"mxgraph.bootstrap.roundedButton"},mxShapeBootstrapRoundedButton.prototype.paintVertexShape=function(t,e,o,a,r){if(t.translate(e,o),a>r){var p=.5*r;t.begin(),t.moveTo(a-p,0),t.arcTo(p,p,0,0,1,a-p,r),t.lineTo(p,r),t.arcTo(p,p,0,0,1,p,0),t.close(),t.fillAndStroke()}else p=.5*a,t.begin(),t.moveTo(0,r-p),t.arcTo(p,p,0,0,0,a,r-p),t.lineTo(a,p),t.arcTo(p,p,0,0,0,0,p),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapRoundedButton.prototype.cst.ROUNDED_BUTTON,mxShapeBootstrapRoundedButton),mxUtils.extend(mxShapeBootstrapArrow,mxShape),mxShapeBootstrapArrow.prototype.cst={ARROW:"mxgraph.bootstrap.arrow"},mxShapeBootstrapArrow.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),t.begin(),t.moveTo(0,.5*r),t.lineTo(a,.5*r),t.moveTo(.9*a,0),t.lineTo(a,.5*r),t.lineTo(.9*a,r),t.stroke()},mxCellRenderer.registerShape(mxShapeBootstrapArrow.prototype.cst.ARROW,mxShapeBootstrapArrow),mxUtils.extend(mxShapeBootstrapTabTop,mxShape),mxShapeBootstrapTabTop.prototype.cst={TAB_TOP:"mxgraph.bootstrap.tabTop",R_SIZE:"rSize"},mxShapeBootstrapTabTop.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}],mxShapeBootstrapTabTop.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10")),s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),i=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff");t.setStrokeColor(i),t.begin(),t.moveTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r),t.lineTo(0,r),t.close(),t.fillAndStroke(),t.setStrokeColor(s),t.begin(),t.moveTo(0,r),t.lineTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r),t.stroke()},mxCellRenderer.registerShape(mxShapeBootstrapTabTop.prototype.cst.TAB_TOP,mxShapeBootstrapTabTop),mxUtils.extend(mxShapeBootstrapImage,mxShape),mxShapeBootstrapImage.prototype.cst={IMAGE:"mxgraph.bootstrap.image",R_SIZE:"rSize"},mxShapeBootstrapImage.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:5}],mxShapeBootstrapImage.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=Math.max(0,parseInt(mxUtils.getValue(this.style,mxShapeBootstrapTopButton.prototype.cst.R_SIZE,"10")));mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000"),mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#ffffff"),t.begin(),t.moveTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r-p),t.arcTo(p,p,0,0,1,a-p,r),t.lineTo(p,r),t.arcTo(p,p,0,0,1,0,r-p),t.close(),t.stroke();var s=.5*p;t.translate(s,s),a=Math.max(0,a-p),r=Math.max(0,r-p),t.begin(),t.moveTo(0,s),t.arcTo(s,s,0,0,1,s,0),t.lineTo(a-s,0),t.arcTo(s,s,0,0,1,a,s),t.lineTo(a,r-s),t.arcTo(s,s,0,0,1,a-s,r),t.lineTo(s,r),t.arcTo(s,s,0,0,1,0,r-s),t.close(),t.fill()},mxCellRenderer.registerShape(mxShapeBootstrapImage.prototype.cst.IMAGE,mxShapeBootstrapImage),mxUtils.extend(mxShapeBootstrapCheckbox,mxShape),mxShapeBootstrapCheckbox.prototype.cst={CHECKBOX:"mxgraph.bootstrap.checkbox"},mxShapeBootstrapCheckbox.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),t.roundrect(0,0,a,r,3,3),t.fillAndStroke(),t.setStrokeWidth("3"),t.begin(),t.moveTo(.8*a,.2*r),t.lineTo(.4*a,.8*r),t.lineTo(.25*a,.6*r),t.stroke()},mxCellRenderer.registerShape(mxShapeBootstrapCheckbox.prototype.cst.CHECKBOX,mxShapeBootstrapCheckbox),mxUtils.extend(mxShapeBootstrapCheckbox2,mxShape),mxShapeBootstrapCheckbox2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}],mxShapeBootstrapCheckbox2.prototype.cst={CHECKBOX2:"mxgraph.bootstrap.checkbox2"},mxShapeBootstrapCheckbox2.prototype.paintVertexShape=function(t,e,o,a,r){var p=mxUtils.getValue(this.style,"checked",!1),s=mxUtils.getValue(this.style,"checkedFill","#ffffff"),i=mxUtils.getValue(this.style,"checkedStroke","#000000");t.translate(e,o),p?(t.setFillColor(s),t.setStrokeColor(i),t.roundrect(0,0,a,r,2,2),t.fill(),t.setStrokeWidth("2"),t.begin(),t.moveTo(.8*a,.2*r),t.lineTo(.4*a,.75*r),t.lineTo(.25*a,.6*r),t.stroke()):(t.roundrect(0,0,a,r,2,2),t.fillAndStroke())},mxCellRenderer.registerShape(mxShapeBootstrapCheckbox2.prototype.cst.CHECKBOX2,mxShapeBootstrapCheckbox2),mxUtils.extend(mxShapeBootstrapRadioButton,mxShape),mxShapeBootstrapRadioButton.prototype.cst={RADIO_BUTTON:"mxgraph.bootstrap.radioButton"},mxShapeBootstrapRadioButton.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");t.ellipse(0,0,a,r),t.fillAndStroke(),t.setFillColor(p),t.ellipse(.25*a,.25*r,.5*a,.5*r),t.fill()},mxCellRenderer.registerShape(mxShapeBootstrapRadioButton.prototype.cst.RADIO_BUTTON,mxShapeBootstrapRadioButton),mxUtils.extend(mxShapeBootstrapRadioButton2,mxShape),mxShapeBootstrapRadioButton2.prototype.customProperties=[{name:"checked",dispName:"Checked",type:"bool",defVal:!1},{name:"checkedFill",dispName:"Checked Fill Color",type:"color",defVal:"#ffffff"},{name:"checkedStroke",dispName:"Checked Stroke Color",type:"color",defVal:"#000000"}],mxShapeBootstrapRadioButton2.prototype.cst={RADIO_BUTTON2:"mxgraph.bootstrap.radioButton2"},mxShapeBootstrapRadioButton2.prototype.paintVertexShape=function(t,e,o,a,r){var p=mxUtils.getValue(this.style,"checked",!1),s=mxUtils.getValue(this.style,"checkedFill","#ffffff"),i=mxUtils.getValue(this.style,"checkedStroke","#000000");t.translate(e,o),p?(t.setFillColor(s),t.setStrokeColor(s),t.ellipse(0,0,a,r),t.fillAndStroke(),t.setFillColor(i),t.ellipse(.2*a,.2*r,.6*a,.6*r),t.fill()):(t.ellipse(0,0,a,r),t.fillAndStroke())},mxCellRenderer.registerShape(mxShapeBootstrapRadioButton2.prototype.cst.RADIO_BUTTON2,mxShapeBootstrapRadioButton2),mxUtils.extend(mxShapeBootstrapHorLines,mxShape),mxShapeBootstrapHorLines.prototype.cst={HOR_LINES:"mxgraph.bootstrap.horLines"},mxShapeBootstrapHorLines.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),t.rect(0,0,a,r),t.fill(),t.begin(),t.moveTo(0,0),t.lineTo(a,0),t.moveTo(0,r),t.lineTo(a,r),t.stroke()},mxCellRenderer.registerShape(mxShapeBootstrapHorLines.prototype.cst.HOR_LINES,mxShapeBootstrapHorLines),mxUtils.extend(mxShapeBootstrapUserTwo,mxShape),mxShapeBootstrapUserTwo.prototype.cst={USER2:"mxgraph.bootstrap.user2"},mxShapeBootstrapUserTwo.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),t.begin(),t.moveTo(0,.95*r),t.arcTo(.3*a,.3*r,0,0,1,.02*a,.87*r),t.arcTo(.1*a,.1*r,0,0,1,.08*a,.812*r),t.arcTo(3*a,3*r,0,0,1,.29*a,.732*r),t.arcTo(.15*a,.15*r,0,0,0,.385*a,.607*r),t.arcTo(.11*a,.11*r,0,0,0,.355*a,.53*r),t.arcTo(.3*a,.3*r,0,0,1,.305*a,.44*r),t.arcTo(.33*a,.38*r,0,0,1,.312*a,.15*r),t.arcTo(.218*a,.218*r,0,0,1,.688*a,.15*r),t.arcTo(.33*a,.38*r,0,0,1,.693*a,.44*r),t.arcTo(.25*a,.25*r,0,0,1,.645*a,.53*r),t.arcTo(.1*a,.1*r,0,0,0,.612*a,.6*r),t.arcTo(.15*a,.15*r,0,0,0,.7*a,.726*r),t.arcTo(3*a,3*r,0,0,1,.92*a,.812*r),t.arcTo(.1*a,.1*r,0,0,1,.97*a,.865*r),t.arcTo(.2*a,.2*r,0,0,1,.995*a,.952*r),t.close(),t.fill()},mxCellRenderer.registerShape(mxShapeBootstrapUserTwo.prototype.cst.USER2,mxShapeBootstrapUserTwo),mxUtils.extend(mxShapeBootstrapRating,mxShape),mxShapeBootstrapRating.prototype.cst={RATING:"mxgraph.bootstrap.rating",RATING_STYLE:"ratingStyle",RATING_SCALE:"ratingScale",RATING_HEART:"heart",RATING_STAR:"star",EMPTY_FILL_COLOR:"emptyFillColor",GRADE:"grade"},mxShapeBootstrapRating.prototype.customProperties=[{name:"ratingStyle",dispName:"Rating Style",type:"enum",enumList:[{val:"heart",dispName:"Heart"},{val:"star",dispName:"Star"}]},{name:"ratingScale",dispName:"Rating Scale",type:"int",min:1,defVal:5},{name:"emptyFillColor",dispName:"Inactive Color",type:"color",defVal:"none"},{name:"grade",dispName:"Grade",type:"int",min:1,defVal:3}],mxShapeBootstrapRating.prototype.paintVertexShape=function(t,e,o,a,r){var p=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.RATING_STYLE,mxShapeBootstrapRating.prototype.cst.RATING_STAR),s=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.GRADE,"5"),i=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.RATING_SCALE,"10");if(t.translate(e,o),p===mxShapeBootstrapRating.prototype.cst.RATING_STAR)for(var n=0;n<s;n++)t.begin(),t.moveTo(n*r*1.2,.33*r),t.lineTo(n*r*1.2+.364*r,.33*r),t.lineTo(n*r*1.2+.475*r,0),t.lineTo(n*r*1.2+.586*r,.33*r),t.lineTo(n*r*1.2+.95*r,.33*r),t.lineTo(n*r*1.2+.66*r,.551*r),t.lineTo(n*r*1.2+.775*r,.9*r),t.lineTo(n*r*1.2+.475*r,.684*r),t.lineTo(n*r*1.2+.175*r,.9*r),t.lineTo(n*r*1.2+.29*r,.551*r),t.close(),t.fillAndStroke();else if(p===mxShapeBootstrapRating.prototype.cst.RATING_HEART)for(n=0;n<s;n++)t.begin(),t.moveTo(n*r*1.2+.519*r,.947*r),t.curveTo(n*r*1.2+.558*r,.908*r,n*r*1.2+.778*r,.682*r,n*r*1.2+.916*r,.54*r),t.curveTo(n*r*1.2+1.039*r,.414*r,n*r*1.2+1.036*r,.229*r,n*r*1.2+.924*r,.115*r),t.curveTo(n*r*1.2+.812*r,0,n*r*1.2+.631*r,0,n*r*1.2+.519*r,.115*r),t.curveTo(n*r*1.2+.408*r,0,n*r*1.2+.227*r,0,n*r*1.2+.115*r,.115*r),t.curveTo(n*r*1.2+.03*r,.229*r,n*r*1.2,.414*r,n*r*1.2+.123*r,.54*r),t.close(),t.fillAndStroke();var l=mxUtils.getValue(this.style,mxShapeBootstrapRating.prototype.cst.EMPTY_FILL_COLOR,"#ffffff");if(t.setFillColor(l),p===mxShapeBootstrapRating.prototype.cst.RATING_STAR)for(n=s;n<i;n++)t.begin(),t.moveTo(n*r*1.2,.33*r),t.lineTo(n*r*1.2+.364*r,.33*r),t.lineTo(n*r*1.2+.475*r,0),t.lineTo(n*r*1.2+.586*r,.33*r),t.lineTo(n*r*1.2+.95*r,.33*r),t.lineTo(n*r*1.2+.66*r,.551*r),t.lineTo(n*r*1.2+.775*r,.9*r),t.lineTo(n*r*1.2+.475*r,.684*r),t.lineTo(n*r*1.2+.175*r,.9*r),t.lineTo(n*r*1.2+.29*r,.551*r),t.close(),t.fillAndStroke();else if(p===mxShapeBootstrapRating.prototype.cst.RATING_HEART)for(n=s;n<i;n++)t.begin(),t.moveTo(n*r*1.2+.519*r,.947*r),t.curveTo(n*r*1.2+.558*r,.908*r,n*r*1.2+.778*r,.682*r,n*r*1.2+.916*r,.54*r),t.curveTo(n*r*1.2+1.039*r,.414*r,n*r*1.2+1.036*r,.229*r,n*r*1.2+.924*r,.115*r),t.curveTo(n*r*1.2+.812*r,0,n*r*1.2+.631*r,0,n*r*1.2+.519*r,.115*r),t.curveTo(n*r*1.2+.408*r,0,n*r*1.2+.227*r,0,n*r*1.2+.115*r,.115*r),t.curveTo(n*r*1.2+.03*r,.229*r,n*r*1.2,.414*r,n*r*1.2+.123*r,.54*r),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeBootstrapRating.prototype.cst.RATING,mxShapeBootstrapRating),mxUtils.extend(mxShapeBoostrapAnchor,mxShape),mxShapeBoostrapAnchor.prototype.cst={ANCHOR:"mxgraph.bootstrap.anchor"},mxShapeBoostrapAnchor.prototype.paintVertexShape=function(t,e,o,a,r){},mxCellRenderer.registerShape(mxShapeBoostrapAnchor.prototype.cst.ANCHOR,mxShapeBoostrapAnchor),mxUtils.extend(mxShapeBootstrapRangeInput,mxShape),mxShapeBootstrapRangeInput.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3},{name:"rangeStyle",dispName:"Range Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"rounded",dispName:"Rounded"}]},{name:"handleStyle",dispName:"Handle Style",type:"enum",enumList:[{val:"rect",dispName:"Rectangle"},{val:"circle",dispName:"Circle"}]}],mxShapeBootstrapRangeInput.prototype.cst={RANGE_INPUT:"mxgraph.bootstrap.rangeInput"},mxShapeBootstrapRangeInput.prototype.paintVertexShape=function(t,e,o,a,r){var p=a*Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),s=mxUtils.getValue(this.style,"gradientColor","none"),i=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),n=mxUtils.getValue(this.state.style,"strokeColor","#000000"),l=mxUtils.getValue(this.state.style,"gradientDirection","south"),h=mxUtils.getValue(this.state.style,"rangeStyle","rounded"),m=mxUtils.getValue(this.state.style,"handleStyle","circle"),x=Math.min(.5*r,.5*a),S=.5*x;if(t.translate(e,o),"rect"==h){var c=parseFloat(mxUtils.getValue(this.style,"opacity","100")),u=c,T=c;"none"==i&&(u=0),"none"==s&&(T=0),t.setGradient(i,i,0,0,a,r,l,u,T),t.rect(0,.5*r-2,a,4),t.fill()}else"rounded"==h&&(t.begin(),t.moveTo(0,.5*r),t.arcTo(S,S,0,0,1,S,.5*r-S),t.lineTo(a-S,.5*r-S),t.arcTo(S,S,0,0,1,a,.5*r),t.arcTo(S,S,0,0,1,a-S,.5*r+S),t.lineTo(S,.5*r+S),t.arcTo(S,S,0,0,1,0,.5*r),t.close(),t.fill());if("rect"==m){t.setGradient(i,s,0,0,a,r,l,u,T);var d=.5*r;t.rect(p-.5*d,0,d,r),t.fillAndStroke(),t.begin(),t.moveTo(p-.25*d,.3*r),t.lineTo(p+.25*d,.3*r),t.moveTo(p-.25*d,.5*r),t.lineTo(p+.25*d,.5*r),t.moveTo(p-.25*d,.7*r),t.lineTo(p+.25*d,.7*r),t.stroke()}else"circle"==m&&(t.setFillColor(n),t.ellipse(p-x,0,2*x,2*x),t.fill())},mxCellRenderer.registerShape(mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT,mxShapeBootstrapRangeInput),mxShapeBootstrapRangeInput.prototype.constraints=null,Graph.handleFactory[mxShapeBootstrapRangeInput.prototype.cst.RANGE_INPUT]=function(t){return[Graph.createHandle(t,["dx"],(function(t){var e=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(t.x+e*t.width,t.y+t.height/2)}),(function(t,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(e.x-t.x)/t.width)))/100}))]},mxUtils.extend(mxShapeBootstrapSwitch,mxShape),mxShapeBootstrapSwitch.prototype.customProperties=[{name:"buttonState",dispName:"Button State",type:"bool",defVal:!0},{name:"onStrokeColor",dispName:"On Stroke Color",type:"color"},{name:"onFillColor",dispName:"On Fill Color",type:"color"}],mxShapeBootstrapSwitch.prototype.cst={SHAPE_SWITCH:"mxgraph.bootstrap.switch"},mxShapeBootstrapSwitch.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),a=Math.max(a,2*r);var p=mxUtils.getValue(this.style,"buttonState",!0);this.background(t,e,o,a,r,p),t.setShadow(!1),this.foreground(t,e,o,a,r,p)},mxShapeBootstrapSwitch.prototype.background=function(t,e,o,a,r,p){1==p?(t.setStrokeColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),t.setFillColor(mxUtils.getValue(this.style,"onFillColor","#0085FC")),t.roundrect(0,0,a,r,.5*r,.5*r),t.fill()):(t.roundrect(0,0,a,r,.5*r,.5*r),t.fillAndStroke())},mxShapeBootstrapSwitch.prototype.foreground=function(t,e,o,a,r,p){var s=.8*r;1==p?(t.setFillColor(mxUtils.getValue(this.style,"onStrokeColor","#ffffff")),t.ellipse(a-.9*r,.1*r,s,s),t.fill()):(t.setFillColor(mxUtils.getValue(this.style,"strokeColor","#000000")),t.ellipse(.1*r,.1*r,s,s),t.fill())},mxCellRenderer.registerShape(mxShapeBootstrapSwitch.prototype.cst.SHAPE_SWITCH,mxShapeBootstrapSwitch),mxUtils.extend(mxShapeBootstrapX,mxShape),mxShapeBootstrapX.prototype.cst={SHAPE_X:"mxgraph.bootstrap.x"},mxShapeBootstrapX.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o),t.begin(),t.moveTo(0,0),t.lineTo(a,r),t.moveTo(a,0),t.lineTo(0,r),t.stroke()},mxCellRenderer.registerShape(mxShapeBootstrapX.prototype.cst.SHAPE_X,mxShapeBootstrapX),mxUtils.extend(mxShapeInfographicPopover,mxActor),mxShapeInfographicPopover.prototype.cst={SHAPE_POPOVER:"mxgraph.bootstrap.popover"},mxShapeInfographicPopover.prototype.customProperties=[{name:"rSize",dispName:"Arc Size",type:"float",min:0,defVal:10},{name:"dx",dispName:"Callout Position",min:0,defVal:100},{name:"dy",dispName:"Callout Size",min:0,defVal:30}],mxShapeInfographicPopover.prototype.paintVertexShape=function(t,e,o,a,r){t.translate(e,o);var p=parseInt(mxUtils.getValue(this.style,"rSize","10")),s=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),i=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy)))),n=Math.max(s-i,0),l=Math.min(s+i,a);t.begin(),t.moveTo(p,0),t.lineTo(a-p,0),t.arcTo(p,p,0,0,1,a,p),t.lineTo(a,r-i-p),t.arcTo(p,p,0,0,1,a-p,r-i),t.lineTo(l,r-i),t.lineTo(s,r),t.lineTo(n,r-i),t.lineTo(p,r-i),t.arcTo(p,p,0,0,1,0,r-i-p),t.lineTo(0,p),t.arcTo(p,p,0,0,1,p,0),t.close(),t.fillAndStroke()},mxCellRenderer.registerShape(mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER,mxShapeInfographicPopover),mxShapeInfographicPopover.prototype.constraints=null,Graph.handleFactory[mxShapeInfographicPopover.prototype.cst.SHAPE_POPOVER]=function(t){return[Graph.createHandle(t,["dx","dy"],(function(t){var e=Math.max(0,Math.min(t.width,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx)))),o=Math.max(0,Math.min(t.height,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(t.x+e,t.y+t.height-o)}),(function(t,e){this.state.style.dx=Math.round(100*Math.max(0,Math.min(t.width,e.x-t.x)))/100,this.state.style.dy=Math.round(100*Math.max(0,Math.min(t.height,t.y+t.height-e.y)))/100}))]},mxShapeInfographicPopover.prototype.getConstraints=function(t,e,o){var a=[],r=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));return Math.max(r-.35*p,0),Math.min(r+.35*p,e),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*(o-p))),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,o-p)),a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1,null,0,o-p)),a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1,null,0,o-p)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,o)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,o-p)),a};