0){if(isNaN(p[0]))break;var m,y,_,b,x,w,S,k,C,O,P=null,T=[],A=u,E=c;switch(h){case"l":u+=p.shift(),c+=p.shift(),P="L",T.push(u,c);break;case"L":u=p.shift(),c=p.shift(),T.push(u,c);break;case"m":var j=p.shift(),M=p.shift();if(u+=j,c+=M,P="M",a.length>2&&"z"===a[a.length-1].command)for(var D=a.length-2;D>=0;D--)if("M"===a[D].command){u=a[D].points[0]+j,c=a[D].points[1]+M;break}T.push(u,c),h="l";break;case"M":u=p.shift(),c=p.shift(),P="M",T.push(u,c),h="L";break;case"h":u+=p.shift(),P="L",T.push(u,c);break;case"H":u=p.shift(),P="L",T.push(u,c);break;case"v":c+=p.shift(),P="L",T.push(u,c);break;case"V":c=p.shift(),P="L",T.push(u,c);break;case"C":T.push(p.shift(),p.shift(),p.shift(),p.shift()),u=p.shift(),c=p.shift(),T.push(u,c);break;case"c":T.push(u+p.shift(),c+p.shift(),u+p.shift(),c+p.shift()),u+=p.shift(),c+=p.shift(),P="C",T.push(u,c);break;case"S":y=u,_=c,m=a[a.length-1],"C"===m.command&&(y=u+(u-m.points[2]),_=c+(c-m.points[3])),T.push(y,_,p.shift(),p.shift()),u=p.shift(),c=p.shift(),P="C",T.push(u,c);break;case"s":y=u,_=c,m=a[a.length-1],"C"===m.command&&(y=u+(u-m.points[2]),_=c+(c-m.points[3])),T.push(y,_,u+p.shift(),c+p.shift()),u+=p.shift(),c+=p.shift(),P="C",T.push(u,c);break;case"Q":T.push(p.shift(),p.shift()),u=p.shift(),c=p.shift(),T.push(u,c);break;case"q":T.push(u+p.shift(),c+p.shift()),u+=p.shift(),c+=p.shift(),P="Q",T.push(u,c);break;case"T":y=u,_=c,m=a[a.length-1],"Q"===m.command&&(y=u+(u-m.points[0]),_=c+(c-m.points[1])),u=p.shift(),c=p.shift(),P="Q",T.push(y,_,u,c);break;case"t":y=u,_=c,m=a[a.length-1],"Q"===m.command&&(y=u+(u-m.points[0]),_=c+(c-m.points[1])),u+=p.shift(),c+=p.shift(),P="Q",T.push(y,_,u,c);break;case"A":b=p.shift(),x=p.shift(),w=p.shift(),S=p.shift(),k=p.shift(),C=u,O=c,u=p.shift(),c=p.shift(),P="A",T=this.convertEndpointToCenterParameterization(C,O,u,c,S,k,b,x,w);break;case"a":b=p.shift(),x=p.shift(),w=p.shift(),S=p.shift(),k=p.shift(),C=u,O=c,u+=p.shift(),c+=p.shift(),P="A",T=this.convertEndpointToCenterParameterization(C,O,u,c,S,k,b,x,w);break}a.push({command:P||h,points:T,start:{x:A,y:E},pathLength:this.calcLength(A,E,P||h,T)})}"z"!==h&&"Z"!==h||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a},e.calcLength=function(t,n,r,i){var o,a,s,u,c=e;switch(r){case"L":return c.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=c.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)s=c.getPointOnCubicBezier(u,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=c.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)s=c.getPointOnQuadraticBezier(u,t,n,i[0],i[1],i[2],i[3]),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var l=i[4],f=i[5],h=i[4]+f,p=Math.PI/180;if(Math.abs(l-h)h;u-=p)s=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),o+=c.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(u=l+p;u1&&(a*=Math.sqrt(h),s*=Math.sqrt(h));var p=Math.sqrt((a*a*(s*s)-a*a*(f*f)-s*s*(l*l))/(a*a*(f*f)+s*s*(l*l)));i===o&&(p*=-1),isNaN(p)&&(p=0);var d=p*a*f/s,v=p*-s*l/a,g=(t+n)/2+Math.cos(c)*d-Math.sin(c)*v,m=(e+r)/2+Math.sin(c)*d+Math.cos(c)*v,y=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},_=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(y(t)*y(e))},b=function(t,e){return(t[0]*e[1]=1&&(k=0),0===o&&k>0&&(k-=2*Math.PI),1===o&&k<0&&(k+=2*Math.PI),[g,m,a,s,x,k,c,o]},e}(a.Shape);e.Path=u,u.prototype.className="Path",u.prototype._attrsAffectingSize=["data"],s._registerNode(u),o.Factory.addGetterSetter(u,"data"),i.Collection.mapMethods(u)},5155:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;var i=n(4060),o=n(4892),a=n(4723),s=n(8871),u=n(5483),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._sceneFunc=function(t){var e=this.cornerRadius(),n=this.width(),r=this.height();if(t.beginPath(),e){var i=0,o=0,a=0,s=0;"number"===typeof e?i=o=a=s=Math.min(e,n/2,r/2):(i=Math.min(e[0]||0,n/2,r/2),o=Math.min(e[1]||0,n/2,r/2),s=Math.min(e[2]||0,n/2,r/2),a=Math.min(e[3]||0,n/2,r/2)),t.moveTo(i,0),t.lineTo(n-o,0),t.arc(n-o,o,o,3*Math.PI/2,0,!1),t.lineTo(n,r-s),t.arc(n-s,r-s,s,0,Math.PI/2,!1),t.lineTo(a,r),t.arc(a,r-a,a,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,3*Math.PI/2,!1)}else t.rect(0,0,n,r);t.closePath(),t.fillStrokeShape(this)},e}(a.Shape);e.Rect=c,c.prototype.className="Rect",s._registerNode(c),o.Factory.addGetterSetter(c,"cornerRadius",0,u.getNumberOrArrayOfNumbersValidator(4)),i.Collection.mapMethods(c)},9131:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;var i=n(4060),o=n(4892),a=n(4723),s=n(5483),u=n(8871),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._sceneFunc=function(t){var e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var n=1;n=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t='"'+t+'"'),t})).join(", ")}function $(){return f||(f=i.Util.createCanvasElement().getContext(g),f)}function I(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function L(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function N(t){return t=t||{},t.fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}var F=function(t){function e(e){var n=t.call(this,N(e))||this;n._partialTextX=0,n._partialTextY=0;for(var r=0;r1&&(b+=a)}}},e.prototype._hitFunc=function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)},e.prototype.setText=function(t){var e=i.Util._isString(t)?t:null===t||void 0===t?"":t+"";return this._setAttr(_,e),this},e.prototype.getWidth=function(){var t=this.attrs.width===h||void 0===this.attrs.width;return t?this.getTextWidth()+2*this.padding():this.attrs.width},e.prototype.getHeight=function(){var t=this.attrs.height===h||void 0===this.attrs.height;return t?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height},e.prototype.getTextWidth=function(){return this.textWidth},e.prototype.getTextHeight=function(){return i.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight},e.prototype.measureSize=function(t){var e,n=$(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:r}},e.prototype._getContextFont=function(){return s.Konva.UA.isIE?this.fontStyle()+O+this.fontSize()+C+this.fontFamily():this.fontStyle()+O+this.fontVariant()+O+(this.fontSize()+C)+R(this.fontFamily())},e.prototype._addTextLine=function(t){this.align()===d&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e})},e.prototype._getTextWidth=function(t){var e=this.letterSpacing(),n=t.length;return $().measureText(t).width+(n?e*(n-1):0)},e.prototype._setTextData=function(){var t=this.text().split("\n"),e=+this.fontSize(),n=0,r=this.lineHeight()*e,i=this.attrs.width,o=this.attrs.height,a=i!==h&&void 0!==i,s=o!==h&&void 0!==o,u=this.padding(),c=i-2*u,l=o-2*u,f=0,p=this.wrap(),d=p!==E,v=p!==A&&d,g=this.ellipsis();this.textArr=[],$().font=this._getContextFont();for(var y=g?this._getTextWidth(j):0,_=0,b=t.length;_c)while(x.length>0){var S=0,k=x.length,C="",P=0;while(S>>1,M=x.slice(0,T+1),D=this._getTextWidth(M)+y;D<=c?(S=T+1,C=M,P=D):k=T}if(!C)break;if(v){var R,I=x[C.length],L=I===O||I===m;R=L&&P<=c?C.length:Math.max(C.lastIndexOf(O),C.lastIndexOf(m))+1,R>0&&(S=R,C=C.slice(0,S),P=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,P),f+=r,!d||s&&f+r>l){var N=this.textArr[this.textArr.length-1];if(N&&g){var F=this._getTextWidth(N.text+j)0&&(w=this._getTextWidth(x),w<=c)){this._addTextLine(x),f+=r,n=Math.max(n,w);break}}else this._addTextLine(x),f+=r,n=Math.max(n,w);if(s&&f+r>l)break}this.textHeight=e,this.textWidth=n},e.prototype.getStrokeScaleEnabled=function(){return!0},e}(a.Shape);e.Text=F,F.prototype._fillFunc=I,F.prototype._strokeFunc=L,F.prototype.className=b,F.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],c._registerNode(F),o.Factory.overWriteSetter(F,"width",u.getNumberOrAutoValidator()),o.Factory.overWriteSetter(F,"height",u.getNumberOrAutoValidator()),o.Factory.addGetterSetter(F,"fontFamily","Arial"),o.Factory.addGetterSetter(F,"fontSize",12,u.getNumberValidator()),o.Factory.addGetterSetter(F,"fontStyle",k),o.Factory.addGetterSetter(F,"fontVariant",k),o.Factory.addGetterSetter(F,"padding",0,u.getNumberValidator()),o.Factory.addGetterSetter(F,"align",y),o.Factory.addGetterSetter(F,"verticalAlign",x),o.Factory.addGetterSetter(F,"lineHeight",1,u.getNumberValidator()),o.Factory.addGetterSetter(F,"wrap",T),o.Factory.addGetterSetter(F,"ellipsis",!1,u.getBooleanValidator()),o.Factory.addGetterSetter(F,"letterSpacing",0,u.getNumberValidator()),o.Factory.addGetterSetter(F,"text","",u.getStringValidator()),o.Factory.addGetterSetter(F,"textDecoration",""),i.Collection.mapMethods(F)},8137:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;var i=n(4060),o=n(4892),a=n(4723),s=n(1486),u=n(1958),c=n(5483),l=n(8871),f="",h="normal";function p(t){t.fillText(this.partialText,0,0)}function d(t){t.strokeText(this.partialText,0,0)}var v=function(t){function e(e){var n=t.call(this,e)||this;return n.dummyCanvas=i.Util.createCanvasElement(),n.dataArray=[],n.dataArray=s.Path.parsePathData(n.attrs.data),n.on("dataChange.konva",(function(){this.dataArray=s.Path.parsePathData(this.attrs.data),this._setTextData()})),n.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva",n._setTextData),e&&e["getKerning"]&&(i.Util.warn('getKerning TextPath API is deprecated. Please use "kerningFunc" instead.'),n.kerningFunc(e["getKerning"])),n._setTextData(),n}return r(e,t),e.prototype._sceneFunc=function(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===e&&t.beginPath();for(var o=0;o=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=t.dataArray[c].pathLength);var l=0;"center"===r&&(l=Math.max(0,a/2-o/2)),"right"===r&&(l=Math.max(0,a-o));for(var f,h,p,d=u.stringToArray(this.text()),v=this.text().split(" ").length-1,g=-1,m=0,y=function(){m=0;for(var e=t.dataArray,n=g+1;n0)return g=n,e[n];"M"===e[n].command&&(f={x:e[n].points[0],y:e[n].points[1]})}return{}},_=function(e){var i=t._getTextSize(e).width+n;" "===e&&"justify"===r&&(i+=(a-o)/v);var u=0,c=0;h=void 0;while(Math.abs(i-u)/i>.01&&c<20){c++;var l=u;while(void 0===p)p=y(),p&&l+p.pathLengthi?h=s.Path.getPointOnLine(i,f.x,f.y,p.points[0],p.points[1],f.x,f.y):p=void 0;break;case"A":var g=p.points[4],_=p.points[5],b=p.points[4]+_;0===m?m=g+1e-8:i>u?m+=Math.PI/180*_/Math.abs(_):m-=Math.PI/360*_/Math.abs(_),(_<0&&m=0&&m>b)&&(m=b,d=!0),h=s.Path.getPointOnEllipticalArc(p.points[0],p.points[1],p.points[2],p.points[3],m,p.points[6]);break;case"C":0===m?m=i>p.pathLength?1e-8:i/p.pathLength:i>u?m+=(i-u)/p.pathLength/2:m=Math.max(m-(u-i)/p.pathLength/2,0),m>1&&(m=1,d=!0),h=s.Path.getPointOnCubicBezier(m,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3],p.points[4],p.points[5]);break;case"Q":0===m?m=i/p.pathLength:i>u?m+=(i-u)/p.pathLength:m-=(u-i)/p.pathLength,m>1&&(m=1,d=!0),h=s.Path.getPointOnQuadraticBezier(m,p.start.x,p.start.y,p.points[0],p.points[1],p.points[2],p.points[3]);break}void 0!==h&&(u=s.Path.getLineLength(f.x,f.y,h.x,h.y)),d&&(d=!1,p=void 0)}},b="C",x=t._getTextSize(b).width+n,w=l/x-1,S=0;Sp.x?-1:1,v=this.findOne(".top-left").y()>p.y?-1:1;e=r*this.cos*d,n=r*this.sin*v,this.findOne(".top-left").x(p.x-e),this.findOne(".top-left").y(p.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){if(l){p=h?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(i.x()-p.x,2)+Math.pow(p.y-i.y(),2));d=this.findOne(".top-right").x()p.y?-1:1;e=r*this.cos*d,n=r*this.sin*v,this.findOne(".top-right").x(p.x+e),this.findOne(".top-right").y(p.y-n)}var g=i.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(i.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(i.x());else if("bottom-left"===this._movingAnchorName){if(l){p=h?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(p.x-i.x(),2)+Math.pow(i.y()-p.y,2));d=p.x=0){var u=s.point({x:2*-this.padding(),y:0});if(t.x+=u.x,t.y+=u.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,!a)return void this.update()}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){u=s.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.width+=2*this.padding(),!a)return void this.update()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){u=s.point({x:0,y:2*-this.padding()});if(t.x+=u.x,t.y+=u.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=2*this.padding(),!a)return void this.update()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){u=s.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=u.x,this._anchorDragOffset.y-=u.y,t.height+=2*this.padding(),!a)return void this.update()}if(this.boundBoxFunc()){var c=this.boundBoxFunc()(r,t);c?t=c:o.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}var l=1e7,h=new o.Transform;h.translate(r.x,r.y),h.rotate(r.rotation),h.scale(r.width/l,r.height/l);var p=new o.Transform;p.translate(t.x,t.y),p.rotate(t.rotation),p.scale(t.width/l,t.height/l);var d=p.multiply(h.invert());this._nodes.forEach((function(t){var r,i=t.getParent().getAbsoluteTransform(),a=t.getTransform().copy();a.translate(t.offsetX(),t.offsetY());var s=new o.Transform;s.multiply(i.copy().invert()).multiply(d).multiply(i).multiply(a);var u=s.decompose();t.setAttrs(u),n._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t}),null===(r=t.getLayer())||void 0===r||r.batchDraw()})),this.rotation(o.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}},e.prototype.forceUpdate=function(){this._resetTransformCache(),this.update()},e.prototype._batchChangeChild=function(t,e){var n=this.findOne(t);n.setAttrs(e)},e.prototype.update=function(){var t,e=this,n=this._getNodeRect();this.rotation(o.Util._getRotation(n.rotation));var r=n.width,i=n.height,a=this.enabledAnchors(),s=this.resizeEnabled(),u=this.padding(),c=this.anchorSize();this.find("._anchor").each((function(t){t.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:e.anchorStroke(),strokeWidth:e.anchorStrokeWidth(),fill:e.anchorFill(),cornerRadius:e.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+u,offsetY:c/2+u,visible:s&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+u,visible:s&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-u,offsetY:c/2+u,visible:s&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+u,visible:s&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:c/2-u,visible:s&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:c/2-u,visible:s&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:c/2-u,offsetY:c/2-u,visible:s&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*o.Util._sign(i)-u,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(t=this.getLayer())||void 0===t||t.batchDraw()},e.prototype.isTransforming=function(){return this._transforming},e.prototype.stopTransform=function(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}},e.prototype.destroy=function(){return this.getStage()&&this._cursorChange&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this},e.prototype.toObject=function(){return s.Node.prototype.toObject.call(this)},e}(l.Group);function T(t){return t instanceof Array||o.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach((function(t){-1===x.indexOf(t)&&o.Util.warn("Unknown anchor name: "+t+". Available names are: "+x.join(", "))})),t||[]}e.Transformer=P,P.prototype.className="Transformer",p._registerNode(P),a.Factory.addGetterSetter(P,"enabledAnchors",x,T),a.Factory.addGetterSetter(P,"resizeEnabled",!0),a.Factory.addGetterSetter(P,"anchorSize",10,h.getNumberValidator()),a.Factory.addGetterSetter(P,"rotateEnabled",!0),a.Factory.addGetterSetter(P,"rotationSnaps",[]),a.Factory.addGetterSetter(P,"rotateAnchorOffset",50,h.getNumberValidator()),a.Factory.addGetterSetter(P,"rotationSnapTolerance",5,h.getNumberValidator()),a.Factory.addGetterSetter(P,"borderEnabled",!0),a.Factory.addGetterSetter(P,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(P,"anchorStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(P,"anchorFill","white"),a.Factory.addGetterSetter(P,"anchorCornerRadius",0,h.getNumberValidator()),a.Factory.addGetterSetter(P,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(P,"borderStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(P,"borderDash"),a.Factory.addGetterSetter(P,"keepRatio",!0),a.Factory.addGetterSetter(P,"centeredScaling",!1),a.Factory.addGetterSetter(P,"ignoreStroke",!1),a.Factory.addGetterSetter(P,"padding",0,h.getNumberValidator()),a.Factory.addGetterSetter(P,"node"),a.Factory.addGetterSetter(P,"nodes"),a.Factory.addGetterSetter(P,"boundBoxFunc"),a.Factory.addGetterSetter(P,"shouldOverdrawWholeArea",!1),a.Factory.backCompat(P,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),o.Collection.mapMethods(P)},8001:function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;var i=n(4060),o=n(4892),a=n(4723),s=n(8871),u=n(5483),c=n(8871),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._sceneFunc=function(t){t.beginPath(),t.arc(0,0,this.radius(),0,s.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)},e.prototype.getWidth=function(){return 2*this.radius()},e.prototype.getHeight=function(){return 2*this.radius()},e.prototype.setWidth=function(t){this.radius(t/2)},e.prototype.setHeight=function(t){this.radius(t/2)},e}(a.Shape);e.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],c._registerNode(l),o.Factory.addGetterSetter(l,"radius",0,u.getNumberValidator()),o.Factory.addGetterSetter(l,"angle",0,u.getNumberValidator()),o.Factory.addGetterSetter(l,"clockwise",!1),o.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),i.Collection.mapMethods(l)},5580:function(t,e,n){var r=n(6110),i=n(9325),o=r(i,"DataView");t.exports=o},1549:function(t,e,n){var r=n(2032),i=n(1481),o=n(6721),a=n(2749),s=n(5749);function u(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e-1}t.exports=i},9905:function(t){function e(t,e,n){var r=-1,i=null==t?0:t.length;while(++r=c&&(h=u,p=!1,e=new r(e));t:while(++f0&&n(l)?e>1?o(l,e-1,n,a,s):r(s,l):a||(s[s.length]=l)}return s}t.exports=o},6649:function(t,e,n){var r=n(3221),i=r();t.exports=i},641:function(t,e,n){var r=n(6649),i=n(5950);function o(t,e){return t&&r(t,e,i)}t.exports=o},7422:function(t,e,n){var r=n(1769),i=n(7797);function o(t,e){e=r(e,t);var n=0,o=e.length;while(null!=t&&n1?n[o-1]:void 0,s=o>2?n[2]:void 0;a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);while(++rh))return!1;var d=l.get(t),v=l.get(e);if(d&&v)return d==e&&v==t;var g=-1,m=!0,y=n&s?new r:void 0;l.set(t,e),l.set(e,t);while(++g-1&&t%1==0&&t-1}t.exports=i},1175:function(t,e,n){var r=n(6025);function i(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}t.exports=i},3040:function(t,e,n){var r=n(1549),i=n(79),o=n(8223);function a(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}t.exports=a},7670:function(t,e,n){var r=n(2651);function i(t){var e=r(this,t)["delete"](t);return this.size-=e?1:0,e}t.exports=i},289:function(t,e,n){var r=n(2651);function i(t){return r(this,t).get(t)}t.exports=i},4509:function(t,e,n){var r=n(2651);function i(t){return r(this,t).has(t)}t.exports=i},2949:function(t,e,n){var r=n(2651);function i(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}t.exports=i},317:function(t){function e(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}t.exports=e},7197:function(t){function e(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}t.exports=e},2224:function(t,e,n){var r=n(104),i=500;function o(t){var e=r(t,(function(t){return n.size===i&&n.clear(),t})),n=e.cache;return e}t.exports=o},1042:function(t,e,n){var r=n(6110),i=r(Object,"create");t.exports=i},3650:function(t,e,n){var r=n(4335),i=r(Object.keys,Object);t.exports=i},181:function(t){function e(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=e},6009:function(t,e,n){t=n.nmd(t);var r=n(4840),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=u},9350:function(t){var e=Object.prototype,n=e.toString;function r(t){return n.call(t)}t.exports=r},4335:function(t){function e(t,e){return function(n){return t(e(n))}}t.exports=e},6757:function(t,e,n){var r=n(1033),i=Math.max;function o(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);while(++a0){if(++i>=e)return arguments[0]}else i=0;return t.apply(void 0,arguments)}}t.exports=i},7410:function(t,e,n){var r=n(3195);function i(t,e){var n=-1,i=t.length,o=i-1;e=void 0===e?i:e;while(++n-1&&t%1==0&&t<=e}t.exports=n},3805:function(t){function e(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=e},346:function(t){function e(t){return null!=t&&"object"==typeof t}t.exports=e},1331:function(t,e,n){var r=n(2552),i=n(8879),o=n(346),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);function h(t){if(!o(t)||r(t)!=a)return!1;var e=i(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f}t.exports=h},4394:function(t,e,n){var r=n(2552),i=n(346),o="[object Symbol]";function a(t){return"symbol"==typeof t||i(t)&&r(t)==o}t.exports=a},7167:function(t,e,n){var r=n(4901),i=n(7301),o=n(6009),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},5950:function(t,e,n){var r=n(695),i=n(8984),o=n(4894);function a(t){return o(t)?r(t):i(t)}t.exports=a},9622:function(t,e,n){var r=n(695),i=n(2903),o=n(4894);function a(t){return o(t)?r(t,!0):i(t)}t.exports=a},2543:function(t,e,n){var r;
+/**
+ * @license
+ * Lodash
+ * Copyright OpenJS Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */t=n.nmd(t),function(){var i,o="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,d=2,v=4,g=1,m=2,y=1,_=2,b=4,x=8,w=16,S=32,k=64,C=128,O=256,P=512,T=30,A="...",E=800,j=16,M=1,D=2,R=3,$=1/0,I=9007199254740991,L=17976931348623157e292,N=NaN,F=4294967295,U=F-1,B=F>>>1,G=[["ary",C],["bind",y],["bindKey",_],["curry",x],["curryRight",w],["flip",P],["partial",S],["partialRight",k],["rearg",O]],z="[object Arguments]",V="[object Array]",H="[object AsyncFunction]",W="[object Boolean]",q="[object Date]",K="[object DOMException]",Y="[object Error]",X="[object Function]",J="[object GeneratorFunction]",Z="[object Map]",Q="[object Number]",tt="[object Null]",et="[object Object]",nt="[object Promise]",rt="[object Proxy]",it="[object RegExp]",ot="[object Set]",at="[object String]",st="[object Symbol]",ut="[object Undefined]",ct="[object WeakMap]",lt="[object WeakSet]",ft="[object ArrayBuffer]",ht="[object DataView]",pt="[object Float32Array]",dt="[object Float64Array]",vt="[object Int8Array]",gt="[object Int16Array]",mt="[object Int32Array]",yt="[object Uint8Array]",_t="[object Uint8ClampedArray]",bt="[object Uint16Array]",xt="[object Uint32Array]",wt=/\b__p \+= '';/g,St=/\b(__p \+=) '' \+/g,kt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ct=/&(?:amp|lt|gt|quot|#39);/g,Ot=/[&<>"']/g,Pt=RegExp(Ct.source),Tt=RegExp(Ot.source),At=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,jt=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dt=/^\w*$/,Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$t=/[\\^$.*+?()[\]{}|]/g,It=RegExp($t.source),Lt=/^\s+/,Nt=/\s/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ut=/\{\n\/\* \[wrapped with (.+)\] \*/,Bt=/,? & /,Gt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/[()=,{}\[\]\/\s]/,Vt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Kt=/^0b[01]+$/i,Yt=/^\[object .+?Constructor\]$/,Xt=/^0o[0-7]+$/i,Jt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qt=/($^)/,te=/['\n\r\u2028\u2029\\]/g,ee="\\ud800-\\udfff",ne="\\u0300-\\u036f",re="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",oe=ne+re+ie,ae="\\u2700-\\u27bf",se="a-z\\xdf-\\xf6\\xf8-\\xff",ue="\\xac\\xb1\\xd7\\xf7",ce="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",le="\\u2000-\\u206f",fe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="A-Z\\xc0-\\xd6\\xd8-\\xde",pe="\\ufe0e\\ufe0f",de=ue+ce+le+fe,ve="['’]",ge="["+ee+"]",me="["+de+"]",ye="["+oe+"]",_e="\\d+",be="["+ae+"]",xe="["+se+"]",we="[^"+ee+de+_e+ae+se+he+"]",Se="\\ud83c[\\udffb-\\udfff]",ke="(?:"+ye+"|"+Se+")",Ce="[^"+ee+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="["+he+"]",Ae="\\u200d",Ee="(?:"+xe+"|"+we+")",je="(?:"+Te+"|"+we+")",Me="(?:"+ve+"(?:d|ll|m|re|s|t|ve))?",De="(?:"+ve+"(?:D|LL|M|RE|S|T|VE))?",Re=ke+"?",$e="["+pe+"]?",Ie="(?:"+Ae+"(?:"+[Ce,Oe,Pe].join("|")+")"+$e+Re+")*",Le="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fe=$e+Re+Ie,Ue="(?:"+[be,Oe,Pe].join("|")+")"+Fe,Be="(?:"+[Ce+ye+"?",ye,Oe,Pe,ge].join("|")+")",Ge=RegExp(ve,"g"),ze=RegExp(ye,"g"),Ve=RegExp(Se+"(?="+Se+")|"+Be+Fe,"g"),He=RegExp([Te+"?"+xe+"+"+Me+"(?="+[me,Te,"$"].join("|")+")",je+"+"+De+"(?="+[me,Te+Ee,"$"].join("|")+")",Te+"?"+Ee+"+"+Me,Te+"+"+De,Ne,Le,_e,Ue].join("|"),"g"),We=RegExp("["+Ae+ee+oe+pe+"]"),qe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ke=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,Xe={};Xe[pt]=Xe[dt]=Xe[vt]=Xe[gt]=Xe[mt]=Xe[yt]=Xe[_t]=Xe[bt]=Xe[xt]=!0,Xe[z]=Xe[V]=Xe[ft]=Xe[W]=Xe[ht]=Xe[q]=Xe[Y]=Xe[X]=Xe[Z]=Xe[Q]=Xe[et]=Xe[it]=Xe[ot]=Xe[at]=Xe[ct]=!1;var Je={};Je[z]=Je[V]=Je[ft]=Je[ht]=Je[W]=Je[q]=Je[pt]=Je[dt]=Je[vt]=Je[gt]=Je[mt]=Je[Z]=Je[Q]=Je[et]=Je[it]=Je[ot]=Je[at]=Je[st]=Je[yt]=Je[_t]=Je[bt]=Je[xt]=!0,Je[Y]=Je[X]=Je[ct]=!1;var Ze={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Qe={"&":"&","<":"<",">":">",'"':""","'":"'"},tn={"&":"&","<":"<",">":">",""":'"',"'":"'"},en={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nn=parseFloat,rn=parseInt,on="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,an="object"==typeof self&&self&&self.Object===Object&&self,sn=on||an||Function("return this")(),un=e&&!e.nodeType&&e,cn=un&&t&&!t.nodeType&&t,ln=cn&&cn.exports===un,fn=ln&&on.process,hn=function(){try{var t=cn&&cn.require&&cn.require("util").types;return t||fn&&fn.binding&&fn.binding("util")}catch(e){}}(),pn=hn&&hn.isArrayBuffer,dn=hn&&hn.isDate,vn=hn&&hn.isMap,gn=hn&&hn.isRegExp,mn=hn&&hn.isSet,yn=hn&&hn.isTypedArray;function _n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function bn(t,e,n,r){var i=-1,o=null==t?0:t.length;while(++i-1}function On(t,e,n){var r=-1,i=null==t?0:t.length;while(++r-1);return n}function Qn(t,e){var n=t.length;while(n--&&Ln(e,t[n],0)>-1);return n}function tr(t,e){var n=t.length,r=0;while(n--)t[n]===e&&++r;return r}var er=Gn(Ze),nr=Gn(Qe);function rr(t){return"\\"+en[t]}function ir(t,e){return null==t?i:t[e]}function or(t){return We.test(t)}function ar(t){return qe.test(t)}function sr(t){var e,n=[];while(!(e=t.next()).done)n.push(e.value);return n}function ur(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cr(t,e){return function(n){return t(e(n))}}function lr(t,e){var n=-1,r=t.length,i=0,o=[];while(++n