PageSourceSearch

https://app.hoicko.ai/_next/static/chunks/87296-3323e29179f8cfbc.js

js hoicko.ai collected 2026-10-05 13:48:00 UTC 59,398 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkboard=self.webpackChunkboard||[]).push([[87296],{978453:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0});let r=i(173215);t.exports=r.Konva},73104:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;let r=i(255167),a=i(542960),n=i(800194),s=i(221710),o=i(800194);class h extends a.Shape{_sceneFunc(t){let e=n.Konva.getAngle(this.angle()),i=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,i),t.arc(0,0,this.innerRadius(),e,0,!i),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){let t=this.innerRadius(),e=this.outerRadius(),i=this.clockwise(),r=n.Konva.getAngle(i?360-this.angle():this.angle()),a=Math.cos(Math.min(r,Math.PI)),s=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),o=Math.sin(Math.min(r,Math.PI/2)),h=a*(a>0?t:e),l=s*(s>0?t:e),d=o*(o>0?e:t);return{x:h,y:i?-1*d:l,width:1*e-h,height:d-l}}}e.Arc=h,h.prototype._centroid=!0,h.prototype.className="Arc",h.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"innerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"outerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"clockwise",!1,(0,s.getBooleanValidator)())},619297:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;let r=i(255167),a=i(239540),n=i(221710),s=i(800194),o=i(698817);class h extends a.Line{_sceneFunc(t){let e,i;super._sceneFunc(t);let r=2*Math.PI,a=this.points(),n=a,s=0!==this.tension()&&a.length>4;s&&(n=this.getTensionPoints());let h=this.pointerLength(),l=a.length;if(s){let t=[n[n.length-4],n[n.length-3],n[n.length-2],n[n.length-1],a[l-2],a[l-1]],r=o.Path.calcLength(n[n.length-4],n[n.length-3],"C",t),s=o.Path.getPointOnQuadraticBezier(Math.min(1,1-h/r),t[0],t[1],t[2],t[3],t[4],t[5]);e=a[l-2]-s.x,i=a[l-1]-s.y}else e=a[l-2]-a[l-4],i=a[l-1]-a[l-3];let d=(Math.atan2(i,e)+r)%r,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(a[l-2],a[l-1]),t.rotate(d),t.moveTo(0,0),t.lineTo(-h,g/2),t.lineTo(-h,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(a[0],a[1]),s?(e=(n[0]+n[2])/2-a[0],i=(n[1]+n[3])/2-a[1]):(e=a[2]-a[0],i=a[3]-a[1]),t.rotate((Math.atan2(-i,-e)+r)%r),t.moveTo(0,0),t.lineTo(-h,g/2),t.lineTo(-h,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){let e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){let t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x,y:t.y-e,width:t.width,height:t.height+2*e}}}e.Arrow=h,h.prototype.className="Arrow",(0,s._registerNode)(h),r.Factory.addGetterSetter(h,"pointerLength",10,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"pointerWidth",10,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"pointerAtBeginning",!1),r.Factory.addGetterSetter(h,"pointerAtEnding",!0)},971706:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;let r=i(255167),a=i(542960),n=i(221710),s=i(800194);class o extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}e.Circle=o,o.prototype._centroid=!0,o.prototype.className="Circle",o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,n.getNumberValidator)())},189690:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;let r=i(255167),a=i(542960),n=i(221710),s=i(800194);class o extends a.Shape{_sceneFunc(t){let e=this.radiusX(),i=this.radiusY();t.beginPath(),t.save(),e!==i&&t.scale(1,i/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(
1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}e.Ellipse=o,o.prototype.className="Ellipse",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,s._registerNode)(o),r.Factory.addComponentsGetterSetter(o,"radius",["x","y"]),r.Factory.addGetterSetter(o,"radiusX",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"radiusY",0,(0,n.getNumberValidator)())},832229:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;let r=i(286181),a=i(255167),n=i(542960),s=i(800194),o=i(221710);class h extends n.Shape{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",t=>{this._removeImageLoad(t.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let t=this.image();t&&t.complete||t&&4===t.readyState||!t||!t.addEventListener||t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){let t=!!this.cornerRadius(),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas(!0)}_sceneFunc(t){let e;let i=this.getWidth(),a=this.getHeight(),n=this.cornerRadius(),s=this.attrs.image;if(s){let t=this.attrs.cropWidth,r=this.attrs.cropHeight;e=t&&r?[s,this.cropX(),this.cropY(),t,r,0,0,i,a]:[s,0,0,i,a]}(this.hasFill()||this.hasStroke()||n)&&(t.beginPath(),n?r.Util.drawRoundedRectPath(t,i,a,n):t.rect(0,0,i,a),t.closePath(),t.fillStrokeShape(this)),s&&(n&&t.clip(),t.drawImage.apply(t,e))}_hitFunc(t){let e=this.width(),i=this.height(),a=this.cornerRadius();t.beginPath(),a?r.Util.drawRoundedRectPath(t,e,i,a):t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(t,e,i=null){let a=r.Util.createImageElement();a.onload=function(){e(new h({image:a}))},a.onerror=i,a.crossOrigin="Anonymous",a.src=t}}e.Image=h,h.prototype.className="Image",(0,s._registerNode)(h),a.Factory.addGetterSetter(h,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4)),a.Factory.addGetterSetter(h,"image"),a.Factory.addComponentsGetterSetter(h,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(h,"cropX",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropY",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropWidth",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(h,"cropHeight",0,(0,o.getNumberValidator)())},992870:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;let r=i(255167),a=i(542960),n=i(357770),s=i(221710),o=i(800194),h=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],l="right",d="down",g="left",c=h.length;class u extends n.Group{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let e=this,i,r=function(){e._sync()};for(i=0;i<c;i++)t.on(h[i]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),e=this.getTag(),i,r,a,n,s,o,h;if(t&&e){switch(i=t.width(),r=t.height(),a=e.pointerDirection(),n=e.pointerWidth(),h=e.pointerHeight(),s=0,o=0,a){case"up":s=i/2,o=-1*h;break;case l:s=i+n,o=r/2;break;case d:s=i/2,o=r+h;break;case g:s=-1*n,o=r/2}e.setAttrs({x:-1*s,y:-1*o,width:i,height:r}),t.setAttrs({x:-1*s,y:-1*o})}}}e.Label=u,u.prototype.className="Label",(0,o._registerNode)(u);class f extends a.Shape{_sceneFunc(t){let e=this.width(),i=this.height(),r=this.pointerDirection(),a=this.pointerWidth(),n=this.pointerHeight(),s=this.cornerRadius(),o=0,h=0,c=0,u=0;"number"==typeof s?o=h=c=u=Math.min(s,e/2,i/2):(o=Math.min(s[0]||0,e/2,i/2),h=Math.min(s[1]||0,e/2,i/2),u=Math.min(s[2]||0,e/2,i/2),c=Math.min(s[3]||0,e/2,i/2)),t.beginPath(),t.moveTo(o,0),"up"===r&&(t.lineTo((e-a)/2,0),t.lineTo(e/2,-1*n),t.lineTo((e+a)/2,0)),t.lineTo(e-h,0),t.arc(e-h,h,h,3*Math.PI/2,0,!1),r===l&&(t.lineTo(e,(i-n)/2),t.lineTo(e+a,i/2),t.lineTo(e,(i+n)/2)),t.lineTo(e,i-u),t.arc(e-u,i-u,u,0,Math.PI/2,!1),r===d&&(t.lineTo((e+a)/2,i),t.lineTo(e/2,i+n),t.lineTo((e-a)/2,i)),t.lineTo(c,i),t.arc(c,i-c,c,Math.PI/2,Math.PI,!1),r===g&&(t.lineTo(0,(i+n)/2),t.lineTo(-1*a,i/2),t.lineTo(0,(i-n)/2)),t.lineTo(0,o),t.arc(o,o,o,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,e=0,i=this.pointerWidth(),r=this.pointerHeight(),a=this.pointerDirection(),n=this.width(),s=this.height();return"up"===a?(e-=r,s+=r):a===d?s+=r:a===g?(t-=1.5*i,n+=i):a===l&&(n+=1.5*i),{x:t,y:e,width:n,height:s}}}e.Tag=f,f.prototype.className="Tag",(0,o._registerNode)(f),r.Factory.addGetterSetter(f,"pointerDirection","none"),r.Factory.addGetterSetter(f,"pointerWidth",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(f,"pointerHeight",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(f,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))}
1,239540:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;let r=i(255167),a=i(800194),n=i(542960),s=i(221710);function o(t,e,i,r,a,n,s){let o=Math.sqrt(Math.pow(i-t,2)+Math.pow(r-e,2)),h=Math.sqrt(Math.pow(a-i,2)+Math.pow(n-r,2)),l=s*o/(o+h),d=s*h/(o+h);return[i-l*(a-t),r-l*(n-e),i+d*(a-t),r+d*(n-e)]}function h(t,e){let i=t.length,r=[];for(let a=2;a<i-2;a+=2){let i=o(t[a-2],t[a-1],t[a],t[a+1],t[a+2],t[a+3],e);isNaN(i[0])||(r.push(i[0]),r.push(i[1]),r.push(t[a]),r.push(t[a+1]),r.push(i[2]),r.push(i[3]))}return r}class l extends n.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){let e=this.points(),i=e.length,r=this.tension(),a=this.closed(),n=this.bezier();if(!i)return;let s=0;if(t.beginPath(),t.moveTo(e[0],e[1]),0!==r&&i>4){let r=this.getTensionPoints(),n=r.length;for(s=a?0:4,a||t.quadraticCurveTo(r[0],r[1],r[2],r[3]);s<n-2;)t.bezierCurveTo(r[s++],r[s++],r[s++],r[s++],r[s++],r[s++]);a||t.quadraticCurveTo(r[n-2],r[n-1],e[i-2],e[i-1])}else if(n)for(s=2;s<i;)t.bezierCurveTo(e[s++],e[s++],e[s++],e[s++],e[s++],e[s++]);else for(s=2;s<i;s+=2)t.lineTo(e[s],e[s+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():h(this.points(),this.tension())}_getTensionPointsClosed(){let t=this.points(),e=t.length,i=this.tension(),r=o(t[e-2],t[e-1],t[0],t[1],t[2],t[3],i),a=o(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],i),n=h(t,i);return[r[2],r[3]].concat(n).concat([a[0],a[1],t[e-2],t[e-1],a[2],a[3],r[0],r[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t,e,i=this.points();if(i.length<4)return{x:i[0]||0,y:i[1]||0,width:0,height:0};let r=(i=0!==this.tension()?[i[0],i[1],...this._getTensionPoints(),i[i.length-2],i[i.length-1]]:this.points())[0],a=i[0],n=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),a=Math.max(a,t),n=Math.min(n,e),s=Math.max(s,e);return{x:r,y:n,width:a-r,height:s-n}}}e.Line=l,l.prototype.className="Line",l.prototype._attrsAffectingSize=["points","bezier","tension"],(0,a._registerNode)(l),r.Factory.addGetterSetter(l,"closed",!1),r.Factory.addGetterSetter(l,"bezier",!1),r.Factory.addGetterSetter(l,"tension",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"points",[],(0,s.getNumberArrayValidator)())},698817:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;let r=i(255167),a=i(800194),n=i(542960),s=i(504621);class o extends n.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=o.parsePathData(this.data()),this.pathLength=o.getPathLength(this.dataArray)}_sceneFunc(t){let e=this.dataArray;t.beginPath();let i=!1;for(let r=0;r<e.length;r++){let a=e[r].command,n=e[r].points;switch(a){case"L":t.lineTo(n[0],n[1]);break;case"M":t.moveTo(n[0],n[1]);break;case"C":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"Q":t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case"A":let s=n[0],o=n[1],h=n[2],l=n[3],d=n[4],g=n[5],c=n[6],u=n[7],f=h>l?h:l,p=h>l?1:h/l,m=h>l?l/h:1;t.translate(s,o),t.rotate(c),t.scale(p,m),t.arc(0,0,f,d,d+g,1-u),t.scale(1/p,1/m),t.rotate(-c),t.translate(-s,-o);break;case"z":i=!0,t.closePath()}}i||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){let t,e,i=[];this.dataArray.forEach(function(t){if("A"===t.command){let e=t.points[4],r=t.points[5],a=t.points[4]+r,n=Math.PI/180;if(Math.abs(e-a)<n&&(n=Math.abs(e-a)),r<0)for(let r=e-n;r>a;r-=n){let e=o.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}else for(let r=e+n;r<a;r+=n){let e=o.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}}else if("C"===t.command)for(let e=0;e<=1;e+=.01){let r=o.getPointOnCubicBezier(e,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);i.push(r.x,r.y)}else i=i.concat(t.points)});let r=i[0],a=i[0],n=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],isNaN(t)||(r=Math.min(r,t),a=Math.max(a,t)),isNaN(e)||(n=Math.min(n,e),s=Math.max(s,e));return{x:r,y:n,width:a-r,height:s-n}}getLength(){return this.pathLength}getPointAtLength(t){return o.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}static getPathLength(t){let e=0;for(let i=0;i<t.length;++i)e+=t[i].pathLength;return e}static getPointAtLengthOfDataArray(t,e){let i,r=0,a=e.length;if(!a)return null;for(;r<a&&t>e[r].pathLength;)t-=e[r].pathLength,++r;if(r===a)return{x:(i=e[r-1].points.slice(-2))[0],y:i[1]};if(t<.01)return"M"===e[r].command?{x:(i=e[r].points.slice(0,2))[0],y:i[1]}:{x:e[r].start.x,y:e[r].start.y};let n=e[r],h=n.points;switch(n.command){case"L":return o.getPointOnLine(t,n.start.x,n.start.y,h[0],h[1]);case"C":return o.getPointOnCubicBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getCubicArcLength)([n.start.x,h[0],h[2],h[4]],[n.start.y,h[1],h[3],h[5]],t)),n.start.x,n.start.y,h[0],h[1],h[2],h[3],h[4],h[5]);case"Q":return o.getPointOnQuadraticBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getQuadraticArcLength)([n.start.x,h[0],h[2]],[n.start.y,h[1],h[3]],t)),n.start.x,n.start.y,h[0],h[1],h[2],h[3]);case"A":let l=h[0],d=h[1],g=h[2],c=h[3],u=h[5],f=h[6],p=h[4];return p+=u*t/n.pathLength,o.getPointOnEllipticalArc(l,d,g,c,p,f)}return null}static getPointOnLine(t,e,i,r,a,n,s){n=null!=n?n:e,s=null!=s?s:i;let o=this.getLineLength(e,i,r,a);if(o<1e-10)return{x:e,y:i};if(r===e)return{x:n,y:s+(a>i?t:-t)};
1let h=(a-i)/(r-e),l=Math.sqrt(t*t/(1+h*h))*(r<e?-1:1);if(1e-10>Math.abs(s-i-h*(n-e)))return{x:n+l,y:s+h*l};let d=((n-e)*(r-e)+(s-i)*(a-i))/(o*o),g=e+d*(r-e),c=i+d*(a-i),u=this.getLineLength(n,s,g,c),f=Math.sqrt(t*t-u*u),p=Math.sqrt(f*f/(1+h*h))*(r<e?-1:1);return{x:g+p,y:c+h*p}}static getPointOnCubicBezier(t,e,i,r,a,n,s,o,h){function l(t){return 3*t*(1-t)*(1-t)}return{x:t*t*t*o+3*t*t*(1-t)*n+r*l(t)+(1-t)*(1-t)*(1-t)*e,y:t*t*t*h+3*t*t*(1-t)*s+a*l(t)+(1-t)*(1-t)*(1-t)*i}}static getPointOnQuadraticBezier(t,e,i,r,a,n,s){return{x:t*t*n+2*t*(1-t)*r+(1-t)*(1-t)*e,y:t*t*s+2*t*(1-t)*a+(1-t)*(1-t)*i}}static getPointOnEllipticalArc(t,e,i,r,a,n){let s=Math.cos(n),o=Math.sin(n),h={x:i*Math.cos(a),y:r*Math.sin(a)};return{x:t+(h.x*s-h.y*o),y:e+(h.x*o+h.y*s)}}static parsePathData(t){let e;if(!t)return[];let i=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(RegExp(" ","g"),",");for(let t=0;t<r.length;t++)i=i.replace(RegExp(r[t],"g"),"|"+r[t]);let a=i.split("|"),n=[],s=[],o=0,h=0,l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(let t=1;t<a.length;t++){let i=a[t],r=i.charAt(0);for(i=i.slice(1),s.length=0;e=l.exec(i);)s.push(e[0]);let d=[];for(let t=0,e=s.length;t<e;t++){if("00"===s[t]){d.push(0,0);continue}let e=parseFloat(s[t]);isNaN(e)?d.push(0):d.push(e)}for(;d.length>0;){let t,e,i,a,s,l,g,c,u,f;if(isNaN(d[0]))break;let p="",m=[],y=o,x=h;switch(r){case"l":o+=d.shift(),h+=d.shift(),p="L",m.push(o,h);break;case"L":o=d.shift(),h=d.shift(),m.push(o,h);break;case"m":let _=d.shift(),b=d.shift();if(o+=_,h+=b,p="M",n.length>2&&"z"===n[n.length-1].command){for(let t=n.length-2;t>=0;t--)if("M"===n[t].command){o=n[t].points[0]+_,h=n[t].points[1]+b;break}}m.push(o,h),r="l";break;case"M":o=d.shift(),h=d.shift(),p="M",m.push(o,h),r="L";break;case"h":o+=d.shift(),p="L",m.push(o,h);break;case"H":o=d.shift(),p="L",m.push(o,h);break;case"v":h+=d.shift(),p="L",m.push(o,h);break;case"V":h=d.shift(),p="L",m.push(o,h);break;case"C":m.push(d.shift(),d.shift(),d.shift(),d.shift()),o=d.shift(),h=d.shift(),m.push(o,h);break;case"c":m.push(o+d.shift(),h+d.shift(),o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="C",m.push(o,h);break;case"S":e=o,i=h,"C"===(t=n[n.length-1]).command&&(e=o+(o-t.points[2]),i=h+(h-t.points[3])),m.push(e,i,d.shift(),d.shift()),o=d.shift(),h=d.shift(),p="C",m.push(o,h);break;case"s":e=o,i=h,"C"===(t=n[n.length-1]).command&&(e=o+(o-t.points[2]),i=h+(h-t.points[3])),m.push(e,i,o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="C",m.push(o,h);break;case"Q":m.push(d.shift(),d.shift()),o=d.shift(),h=d.shift(),m.push(o,h);break;case"q":m.push(o+d.shift(),h+d.shift()),o+=d.shift(),h+=d.shift(),p="Q",m.push(o,h);break;case"T":e=o,i=h,"Q"===(t=n[n.length-1]).command&&(e=o+(o-t.points[0]),i=h+(h-t.points[1])),o=d.shift(),h=d.shift(),p="Q",m.push(e,i,o,h);break;case"t":e=o,i=h,"Q"===(t=n[n.length-1]).command&&(e=o+(o-t.points[0]),i=h+(h-t.points[1])),o+=d.shift(),h+=d.shift(),p="Q",m.push(e,i,o,h);break;case"A":a=d.shift(),s=d.shift(),l=d.shift(),g=d.shift(),c=d.shift(),u=o,f=h,o=d.shift(),h=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(u,f,o,h,g,c,a,s,l);break;case"a":a=d.shift(),s=d.shift(),l=d.shift(),g=d.shift(),c=d.shift(),u=o,f=h,o+=d.shift(),h+=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(u,f,o,h,g,c,a,s,l)}n.push({command:p||r,points:m,start:{x:y,y:x},pathLength:this.calcLength(y,x,p||r,m)})}("z"===r||"Z"===r)&&n.push({command:"z",points:[],start:void 0,pathLength:0})}return n}static calcLength(t,e,i,r){let a,n,h,l;switch(i){case"L":return o.getLineLength(t,e,r[0],r[1]);case"C":return(0,s.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,s.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":a=0;let d=r[4],g=r[5],c=r[4]+g,u=Math.PI/180;if(Math.abs(d-c)<u&&(u=Math.abs(d-c)),n=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),g<0)for(l=d-u;l>c;l-=u)h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),a+=o.getLineLength(n.x,n.y,h.x,h.y),n=h;else for(l=d+u;l<c;l+=u)h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),a+=o.getLineLength(n.x,n.y,h.x,h.y),n=h;return h=o.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),a+=o.getLineLength(n.x,n.y,h.x,h.y)}return 0}
1static convertEndpointToCenterParameterization(t,e,i,r,a,n,s,o,h){let l=Math.PI/180*h,d=Math.cos(l)*(t-i)/2+Math.sin(l)*(e-r)/2,g=-1*Math.sin(l)*(t-i)/2+Math.cos(l)*(e-r)/2,c=d*d/(s*s)+g*g/(o*o);c>1&&(s*=Math.sqrt(c),o*=Math.sqrt(c));let u=Math.sqrt((s*s*(o*o)-s*s*(g*g)-o*o*(d*d))/(s*s*(g*g)+o*o*(d*d)));a===n&&(u*=-1),isNaN(u)&&(u=0);let f=u*s*g/o,p=-(u*o)*d/s,m=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},y=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(m(t)*m(e))},x=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(y(t,e))},_=x([1,0],[(d-f)/s,(g-p)/o]),b=[(d-f)/s,(g-p)/o],S=[(-1*d-f)/s,(-1*g-p)/o],v=x(b,S);return -1>=y(b,S)&&(v=Math.PI),y(b,S)>=1&&(v=0),0===n&&v>0&&(v-=2*Math.PI),1===n&&v<0&&(v+=2*Math.PI),[(t+i)/2+Math.cos(l)*f-Math.sin(l)*p,(e+r)/2+Math.sin(l)*f+Math.cos(l)*p,s,o,_,v,l,n]}}e.Path=o,o.prototype.className="Path",o.prototype._attrsAffectingSize=["data"],(0,a._registerNode)(o),r.Factory.addGetterSetter(o,"data")},296268:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;let r=i(255167),a=i(542960),n=i(800194),s=i(286181),o=i(221710);class h extends a.Shape{_sceneFunc(t){let e=this.cornerRadius(),i=this.width(),r=this.height();t.beginPath(),e?s.Util.drawRoundedRectPath(t,i,r,e):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)}}e.Rect=h,h.prototype.className="Rect",(0,n._registerNode)(h),r.Factory.addGetterSetter(h,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))},864420:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;let r=i(255167),a=i(542960),n=i(221710),s=i(800194);class o extends a.Shape{_sceneFunc(t){let e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let i=1;i<e.length;i++)t.lineTo(e[i].x,e[i].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){let t=this.attrs.sides,e=this.attrs.radius||0,i=[];for(let r=0;r<t;r++)i.push({x:e*Math.sin(2*r*Math.PI/t),y:-1*e*Math.cos(2*r*Math.PI/t)});return i}getSelfRect(){let t=this._getPoints(),e=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y;return t.forEach(t=>{e=Math.min(e,t.x),i=Math.max(i,t.x),r=Math.min(r,t.y),a=Math.max(a,t.y)}),{x:e,y:r,width:i-e,height:a-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.RegularPolygon=o,o.prototype.className="RegularPolygon",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"sides",0,(0,n.getNumberValidator)())},480744:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;let r=i(255167),a=i(542960),n=i(221710),s=i(800194),o=2*Math.PI;class h extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,o,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),o,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Ring=h,h.prototype.className="Ring",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(h),r.Factory.addGetterSetter(h,"innerRadius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(h,"outerRadius",0,(0,n.getNumberValidator)())},636203:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;let r=i(255167),a=i(542960),n=i(463459),s=i(221710),o=i(800194);class h extends a.Shape{constructor(t){super(t),this._updated=!0,this.anim=new n.Animation(()=>{let t=this._updated;return this._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){let e=this.animation(),i=this.frameIndex(),r=4*i,a=this.animations()[e],n=this.frameOffsets(),s=a[r+0],o=a[r+1],h=a[r+2],l=a[r+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,h,l),t.closePath(),t.fillStrokeShape(this)),d){if(n){let r=n[e],a=2*i;t.drawImage(d,s,o,h,l,r[a+0],r[a+1],h,l)}else t.drawImage(d,s,o,h,l,0,0,h,l)}}_hitFunc(t){let e=this.animation(),i=this.frameIndex(),r=4*i,a=this.animations()[e],n=this.frameOffsets(),s=a[r+2],o=a[r+3];if(t.beginPath(),n){let r=n[e],a=2*i;t.rect(r[a+0],r[a+1],s,o)}else t.rect(0,0,s,o);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){let t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}
1start(){if(this.isRunning())return;let t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){let t=this.frameIndex(),e=this.animation();t<this.animations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}}e.Sprite=h,h.prototype.className="Sprite",(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"animation"),r.Factory.addGetterSetter(h,"animations"),r.Factory.addGetterSetter(h,"frameOffsets"),r.Factory.addGetterSetter(h,"image"),r.Factory.addGetterSetter(h,"frameIndex",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"frameRate",17,(0,s.getNumberValidator)()),r.Factory.backCompat(h,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},804170:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;let r=i(255167),a=i(542960),n=i(221710),s=i(800194);class o extends a.Shape{_sceneFunc(t){let e=this.innerRadius(),i=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-i);for(let a=1;a<2*r;a++){let n=a%2==0?i:e,s=n*Math.sin(a*Math.PI/r),o=-1*n*Math.cos(a*Math.PI/r);t.lineTo(s,o)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Star=o,o.prototype.className="Star",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"numPoints",5,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"innerRadius",0,(0,n.getNumberValidator)()),r.Factory.addGetterSetter(o,"outerRadius",0,(0,n.getNumberValidator)())},761177:function(t,e,i){let r;Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0,e.stringToArray=d;let a=i(286181),n=i(255167),s=i(542960),o=i(800194),h=i(221710),l=i(800194);function d(t){return[...t].reduce((t,e,i,r)=>{if(/\p{Emoji}/u.test(e)){let a=r[i+1];a&&/\p{Emoji_Modifier}|\u200D/u.test(a)?(t.push(e+a),r[i+1]=""):t.push(e)}else/\p{Regional_Indicator}{2}/u.test(e+(r[i+1]||""))?t.push(e+r[i+1]):i>0&&/\p{Mn}|\p{Me}|\p{Mc}/u.test(e)?t[t.length-1]+=e:e&&t.push(e);return t},[])}let g="auto",c="inherit",u="justify",f="left",p="middle",m="normal",y="none",x=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],_=x.length;function b(){return r||(r=a.Util.createCanvasElement().getContext("2d"))}class S extends s.Shape{constructor(t){var e;super(((e=(e=t)||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e)),this._partialTextX=0,this._partialTextY=0;for(let t=0;t<_;t++)this.on(x[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){let e=this.textArr,i=e.length;if(!this.text())return;let r=this.padding(),a=this.fontSize(),n=this.lineHeight()*a,s=this.verticalAlign(),h=this.direction(),l=0,g=this.align(),m=this.getWidth(),y=this.letterSpacing(),x=this.fill(),_=this.textDecoration(),b=-1!==_.indexOf("underline"),S=-1!==_.indexOf("line-through"),v;h=h===c?t.direction:h;let A=n/2,M=p;if(o.Konva._fixTextRendering){let t=this.measureSize("M");M="alphabetic",A=(t.fontBoundingBoxAscent-t.fontBoundingBoxDescent)/2+n/2}for("rtl"===h&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",M),t.setAttr("textAlign",f),s===p?l=(this.getHeight()-i*n-2*r)/2:"bottom"===s&&(l=this.getHeight()-i*n-2*r),t.translate(r,l+r),v=0;v<i;v++){let s=0,l=e[v],c=l.text,f=l.width,p=l.lastInParagraph;if(t.save(),"right"===g?s+=m-f-2*r:"center"===g&&(s+=(m-f-2*r)/2),b){t.save(),t.beginPath();let e=o.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2),i=s,n=A+0+e;t.moveTo(i,n);let h=g!==u||p?f:m-2*r;t.lineTo(i+Math.round(h),n),t.lineWidth=a/15;let l=this._getLinearGradient();t.strokeStyle=l||x,t.stroke(),t.restore()}if(S){t.save(),t.beginPath();let e=o.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(s,A+0+e);let i=g!==u||p?f:m-2*r;t.lineTo(s+Math.round(i),A+0+e),t.lineWidth=a/15;let n=this._getLinearGradient();
1t.strokeStyle=n||x,t.stroke(),t.restore()}if("rtl"!==h&&(0!==y||g===u)){let e=c.split(" ").length-1,i=d(c);for(let a=0;a<i.length;a++){let n=i[a];" "!==n||p||g!==u||(s+=(m-2*r-f)/e),this._partialTextX=s,this._partialTextY=A+0,this._partialText=n,t.fillStrokeShape(this),s+=this.measureSize(n).width+y}}else 0!==y&&t.setAttr("letterSpacing",`${y}px`),this._partialTextX=s,this._partialTextY=A+0,this._partialText=c,t.fillStrokeShape(this);t.restore(),i>1&&(A+=n)}}_hitFunc(t){let e=this.getWidth(),i=this.getHeight();t.beginPath(),t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}setText(t){let e=a.Util._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}getWidth(){return this.attrs.width===g||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===g||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return a.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,i,r,a,n,s,o,h,l,d,g;let c=b(),u=this.fontSize(),f;c.save(),c.font=this._getContextFont(),f=c.measureText(t),c.restore();let p=u/100;return{actualBoundingBoxAscent:null!==(e=f.actualBoundingBoxAscent)&&void 0!==e?e:71.58203125*p,actualBoundingBoxDescent:null!==(i=f.actualBoundingBoxDescent)&&void 0!==i?i:0,actualBoundingBoxLeft:null!==(r=f.actualBoundingBoxLeft)&&void 0!==r?r:-7.421875*p,actualBoundingBoxRight:null!==(a=f.actualBoundingBoxRight)&&void 0!==a?a:75.732421875*p,alphabeticBaseline:null!==(n=f.alphabeticBaseline)&&void 0!==n?n:0,emHeightAscent:null!==(s=f.emHeightAscent)&&void 0!==s?s:100*p,emHeightDescent:null!==(o=f.emHeightDescent)&&void 0!==o?o:-20*p,fontBoundingBoxAscent:null!==(h=f.fontBoundingBoxAscent)&&void 0!==h?h:91*p,fontBoundingBoxDescent:null!==(l=f.fontBoundingBoxDescent)&&void 0!==l?l:21*p,hangingBaseline:null!==(d=f.hangingBaseline)&&void 0!==d?d:72.80000305175781*p,ideographicBaseline:null!==(g=f.ideographicBaseline)&&void 0!==g?g:-21*p,width:f.width,height:u}}_getContextFont(){return this.fontStyle()+" "+this.fontVariant()+" "+this.fontSize()+"px "+this.fontFamily().split(",").map(t=>{let e=(t=t.trim()).indexOf(" ")>=0,i=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!i&&(t=`"${t}"`),t}).join(", ")}_addTextLine(t){this.align()===u&&(t=t.trim());let e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){let e=this.letterSpacing(),i=t.length;return b().measureText(t).width+e*i}_setTextData(){let t=this.text().split("\n"),e=+this.fontSize(),i=0,r=this.lineHeight()*e,a=this.attrs.width,n=this.attrs.height,s=a!==g&&void 0!==a,o=n!==g&&void 0!==n,h=this.padding(),l=a-2*h,c=n-2*h,u=0,f=this.wrap(),p="char"!==f&&f!==y,m=this.ellipsis();this.textArr=[],b().font=this._getContextFont();let x=m?this._getTextWidth("…"):0;for(let e=0,a=t.length;e<a;++e){let n=t[e],h=this._getTextWidth(n);if(s&&h>l)for(;n.length>0;){let t=0,e=d(n).length,a="",s=0;for(;t<e;){let i=t+e>>>1,h=d(n).slice(0,i+1).join(""),g=this._getTextWidth(h);(m&&o&&u+r>c?g+x:g)<=l?(t=i+1,a=h,s=g):e=i}if(a){if(p){let e;let i=d(n),r=d(a),o=i[r.length];(e=(" "===o||"-"===o)&&s<=l?r.length:Math.max(r.lastIndexOf(" "),r.lastIndexOf("-"))+1)>0&&(t=e,a=i.slice(0,t).join(""),s=this._getTextWidth(a))}if(a=a.trimRight(),this._addTextLine(a),i=Math.max(i,s),u+=r,this._shouldHandleEllipsis(u)){this._tryToAddEllipsisToLastLine();break}if((n=d(n).slice(t).join("").trimLeft()).length>0&&(h=this._getTextWidth(n))<=l){this._addTextLine(n),u+=r,i=Math.max(i,h);break}}else break}else this._addTextLine(n),u+=r,i=Math.max(i,h),this._shouldHandleEllipsis(u)&&e<a-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),o&&u+r>c)break}this.textHeight=e,this.textWidth=i}_shouldHandleEllipsis(t){let e=+this.fontSize(),i=this.lineHeight()*e,r=this.attrs.height,a=this.padding();return!(this.wrap()!==y)||r!==g&&void 0!==r&&t+i>r-2*a}_tryToAddEllipsisToLastLine(){let t=this.attrs.width,e=this.padding(),i=this.ellipsis(),r=this.textArr[this.textArr.length-1];r&&i&&(t===g||void 0===t||this._getTextWidth(r.text+"…")<t-2*e||(r.text=r.text.slice(0,r.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(r.text
1+"…"))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){let t=-1!==this.textDecoration().indexOf("underline")||-1!==this.textDecoration().indexOf("line-through"),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas()}}e.Text=S,S.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype.className="Text",S.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(S),n.Factory.overWriteSetter(S,"width",(0,h.getNumberOrAutoValidator)()),n.Factory.overWriteSetter(S,"height",(0,h.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(S,"direction",c),n.Factory.addGetterSetter(S,"fontFamily","Arial"),n.Factory.addGetterSetter(S,"fontSize",12,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(S,"fontStyle",m),n.Factory.addGetterSetter(S,"fontVariant",m),n.Factory.addGetterSetter(S,"padding",0,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(S,"align",f),n.Factory.addGetterSetter(S,"verticalAlign","top"),n.Factory.addGetterSetter(S,"lineHeight",1,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(S,"wrap","word"),n.Factory.addGetterSetter(S,"ellipsis",!1,(0,h.getBooleanValidator)()),n.Factory.addGetterSetter(S,"letterSpacing",0,(0,h.getNumberValidator)()),n.Factory.addGetterSetter(S,"text","",(0,h.getStringValidator)()),n.Factory.addGetterSetter(S,"textDecoration","")},176062:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;let r=i(286181),a=i(255167),n=i(542960),s=i(698817),o=i(761177),h=i(221710),l=i(800194),d="normal";function g(t){t.fillText(this.partialText,0,0)}function c(t){t.strokeText(this.partialText,0,0)}class u extends n.Shape{constructor(t){super(t),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncCh
1ange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return s.Path.getPathLength(this.dataArray)}_getPointAtLength(t){return!this.attrs.data||t-1>this.pathLength?null:s.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=s.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();let e=this.textDecoration(),i=this.fill(),r=this.fontSize(),a=this.glyphInfo;"underline"===e&&t.beginPath();for(let i=0;i<a.length;i++){t.save();let n=a[i].p0;t.translate(n.x,n.y),t.rotate(a[i].rotation),this.partialText=a[i].text,t.fillStrokeShape(this),"underline"===e&&(0===i&&t.moveTo(0,r/2+1),t.lineTo(r,r/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=i,t.lineWidth=r/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();let e=this.glyphInfo;if(e.length>=1){let i=e[0].p0;t.moveTo(i.x,i.y)}for(let i=0;i<e.length;i++){let r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return o.Text.prototype.setText.call(this,t)}_getContextFont(){return o.Text.prototype._getContextFont.call(this)}_getTextSize(t){let e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();let i=e.measureText(t);return e.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){let{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;let i=this.letterSpacing(),r=this.align(),a=this.kerningFunc(),n=Math.max(this.textWidth+((this.attrs.text||"").length-1)*i,0),h=0;"center"===r&&(h=Math.max(0,this.pathLength/2-n/2)),"right"===r&&(h=Math.max(0,this.pathLength-n));let l=(0,o.stringToArray)(this.text()),d=h;for(let t=0;t<l.length;t++){let e=this._getPointAtLength(d);if(!e)return;let o=this._getTextSize(l[t]).width+i;if(" "===l[t]&&"justify"===r){let t=this.text().split(" ").length-1;o+=(this.pathLength-n)/t}let h=this._getPointAtLength(d+o);if(!h)return;let g=s.Path.getLineLength(e.x,e.y,h.x,h.y),c=0;if(a)try{c=a(l[t-1],l[t])*this.fontSize()}catch(t){c=0}e.x+=c,h.x+=c,this.textWidth+=c;let u=s.Path.getPointOnLine(c+g/2,e.x,e.y,h.x,h.y),f=Math.atan2(h.y-e.y,h.x-e.x);this.glyphInfo.push({transposeX:u.x,transposeY:u.y,text:l[t],rotation:f,p0:e,p1:h}),d+=o}}getSelfRect(){let t,e;if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let i=[];this.glyphInfo.forEach(function(t){i.push(t.p0.x),i.push(t.p0.y),i.push(t.p1.x),i.push(t.p1.y)});let r=i[0]||0,a=i[0]||0,n=i[1]||0,s=i[1]||0;for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),a=Math.max(a,t),n=Math.min(n,e),s=Math.max(s,e);let o=this.fontSize();return{x:r-o/2,y:n-o/2,width:a-r+o,height:s-n+o}}destroy(){return r.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}e.TextPath=u,u.prototype._fillFunc=g,u.prototype._strokeFunc=c,u.prototype._fillFuncHit=g,u.prototype._strokeFuncHit=c,u.prototype.className="TextPath",u.prototype._attrsAffectingSize=["text","fontSize","data"],(0,l._registerNode)(u),a.Factory.addGetterSetter(u,"data"),a.Factory.addGetterSetter(u,"fontFamily","Arial"),a.Factory.addGetterSetter(u,"fontSize",12,(0,h.getNumberValidator)()),a.Factory.addGetterSetter(u,"fontStyle",d),a.Factory.addGetterSetter(u,"align","left"),a.Factory.addGetterSetter(u,"letterSpacing",0,(0,h.getNumberValidator)()),a.Factory.addGetterSetter(u,"textBaseline","middle"),a.Factory.addGetterSetter(u,"fontVariant",d),a.Factory.addGetterSetter(u,"text",""),a.Factory.addGetterSetter(u,"textDecoration",""),a.Factory.addGetterSetter(u,"kerningFunc",void 0)},486903:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;let r=i(286181),a=i(255167),n=i(153341),s=i(542960),o=i(296268),h=i(357770),l=i(800194),d=i(221710),g=i(800194),c="tr-konva",u=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${c}`).join(" "),f="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},y="ontouchstart"in l.Konva._global,x=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];
1function _(t,e,i){let r=i.x+(t.x-i.x)*Math.cos(e)-(t.y-i.y)*Math.sin(e),a=i.y+(t.x-i.x)*Math.sin(e)+(t.y-i.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:a}}let b=0;class S extends h.Group{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(u,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return c+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();let e=t.filter(t=>!t.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1));return this._nodes=t=e,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{let e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()};if(t._attrsAffectingSize.length){let i=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(i,e)}t.on(p.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,i=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(i,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!e)return;let r=t.getAbsolutePosition(),a=r.x-e.x,n=r.y-e.y;this.nodes().forEach(e=>{if(e===t||e.isDragging())return;let r=e.getAbsolutePosition();e.setAbsolutePosition({x:r.x+a,y:r.y+n}),e.startDrag(i)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(f),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(f,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),i){let r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=t.getAbsoluteScale(i),n=t.getAbsolutePosition(i),s=r.x*a.x-t.offsetX()*a.x,o=r.y*a.y-t.offsetY()*a.y,h=(l.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return _({x:n.x+s*Math.cos(h)+o*Math.sin(-h),y:n.y+o*Math.cos(h)+s*Math.sin(h),width:r.width*a.x,height:r.height*a.y,rotation:h},-l.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let t=[];this.nodes().map(e=>{let i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],a=e.getAbsoluteTransform();r.forEach(function(e){let i=a.point(e);t.push(i)})});let e=new r.Transform;e.rotate(-l.Konva.getAngle(this.rotation()));let i=1/0,a=1/0,n=-1/0,s=-1/0;t.forEach(function(t){let r=e.point(t);void 0===i&&(i=n=r.x,a=s=r.y),i=Math.min(i,r.x),a=Math.min(a,r.y),n=Math.max(n,r.x),s=Math.max(s,r.y)}),e.invert();let o=e.point({x:i,y:a});return{x:o.x,y:o.y,width:n-i,height:s-a,rotation:l.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),x.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){let e=new o.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:y?10:"auto"}),i=this;e.on("mousedown touchstart",function(t){i._handleMouseDown(t)}),e.on("dragstart",t=>
1{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{let i=function(t,e,i){if("rotater"===t)return i;e+=r.Util.degToRad(m[t]||0);let a=(r.Util.radToDeg(e)%360+360)%360;if(r.Util._inRange(a,337.5,360)||r.Util._inRange(a,0,22.5))return"ns-resize";if(r.Util._inRange(a,22.5,67.5))return"nesw-resize";if(r.Util._inRange(a,67.5,112.5))return"ew-resize";if(r.Util._inRange(a,112.5,157.5))return"nwse-resize";if(r.Util._inRange(a,157.5,202.5))return"ns-resize";if(r.Util._inRange(a,202.5,247.5))return"nesw-resize";if(r.Util._inRange(a,247.5,292.5))return"ew-resize";else if(r.Util._inRange(a,292.5,337.5))return"nwse-resize";else return r.Util.error("Transformer has unknown angle for cursor detection: "+a),"pointer"}(t,l.Konva.getAngle(this.rotation()),this.rotateAnchorCursor());e.getStage().content&&(e.getStage().content.style.cursor=i),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){let t=new s.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,e){let i=e.getParent(),a=i.padding();t.beginPath(),t.rect(-a,-a,e.width()+2*a,e.height()+2*a),t.moveTo(e.width()/2,-a),i.rotateEnabled()&&i.rotateLineVisible()&&t.lineTo(e.width()/2,-i.rotateAnchorOffset()*r.Util._sign(e.height())-a),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(!this.shouldOverdrawWholeArea())return;let i=this.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.fillStrokeShape(e)}});this.add(t),this._proxyDrag(t),t.on("dragstart",t=>{t.cancelBubble=!0}),t.on("dragmove",t=>{t.cancelBubble=!0}),t.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];let e=this._getNodeRect(),i=e.width,r=e.height,a=Math.sqrt(Math.pow(i,2)+Math.pow(r,2));this.sin=Math.abs(r/a),this.cos=Math.abs(i/a),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;let n=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-n.x,y:s.y-n.y},b++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t.evt,target:e})})}_handleMouseMove(t){let e,i,r,a;let n=this.findOne("."+this._movingAnchorName),s=n.getStage();s.setPointersPositions(t);let o=s.getPointerPosition(),h={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},d=n.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(d,h,t)),n.setAbsolutePosition(h);let g=n.getAbsolutePosition();if(d.x===g.x&&d.y===g.y)return;if("rotater"===this._movingAnchorName){let r=this._getNodeRect();e=n.x()-r.width/2;let a=Math.atan2(-(i=-n.y()+r.height/2),e)+Math.PI/2;r.height<0&&(a-=Math.PI);let s=l.Konva.getAngle(this.rotation())+a,o=l.Konva.getAngle(this.rotationSnapTolerance()),h=function(t,e,i){let r=e;for(let a=0;a<t.length;a++){let n=l.Konva.getAngle(t[a]),s=Math.abs(n-e)%(2*Math.PI);Math.min(s,2*Math.PI-s)<i&&(r=n)}return r}(this.rotationSnaps(),s,o)-r.rotation,d=function(t,e){let i={x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)};return _(t,e,i)}(r,h);this._fitNodesInto(d,t);return}let c=this.shiftBehavior();a="inverted"===c?this.keepRatio()&&!t.shiftKey:"none"===c?this.keepRatio():this.keepRatio()||t.shiftKey;let u=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(a){let t=u?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(t.x-n.x(),2)+Math.pow(t.y-n.y(),2));let a=this.findOne(".top-left").x()>t.x?-1:1,s=this.findOne(".top-left").y()>t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".top-left").x(t.x-e),this.findOne(".top-left").y(t.y-i)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(n.y());else if("top-right"===this._movingAnchorName){if(a){let t=u?{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(n.x()-t.x,2)+Math.pow(t.y-n.y(),2));let a=this.findOne(".top-right").x()<t.x?-1:1,s=this.findOne(".top-right").y()>t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".top-right").x(t.x+e),this.findOne(".top-right").y(t.y-i)}var f=n.position();this.findOne(".top-left").y(f.y),this.findOne(".bottom-right").x(f.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(n.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(n.x());else if("bottom-left"===this._movingAnchorName){if(a){let t=u?{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(t.x-n.x(),2)+Math.pow(n.y()-t.y,2));let a=t.x<n.x()?-1:1,s=n.y()<t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,n.x(t.x-e),n.y(t.y+i)}f=n.position(),this.findOne(".top-left").x(f.x),this.findOne(".bottom-right").y(f.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(n.y());else if("bottom-right"===this._movingAnchorName){if(a){let t=u?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(n.x()-t.x,2)+Math.pow(n.y()-t.y,2));let a=this.findOne(".bottom-right").x()<t.x?-1:1,s=this.findOne(".bottom-right").y()<t.y?-1:1;e=r*this.cos*a,i=r*this.sin*s,this.findOne(".bottom-right").x(t.x+e),this.findOne(".bottom-right").y(t.y+i)}}else console.error(Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(u=this.centeredScaling()||t.altKey){let t=this.findOne(".top-left"),e=this.findOne(".bottom-right"),i=t.x(),r=t.y(),a=this.getWidth()-e.x(),n=this.getHeight()-e.y();e.move({x:-i,y:-r}),t.move({x:a,y:n})}let p=this.findOne(".top-left").getAbsolutePosition();e=p.x,i=p.y;let m=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:i,width:m,height:y,rotation:l.Konva.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var e;if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));let i=this.getNode();b--,this._fire("transformend",{evt:t,target:i}),null===(e=this.getLayer())||void 0===e||e.batchDraw(),i&&this._nodes.forEac
1h(e=>{var i;e._fire("transformend",{evt:t,target:e}),null===(i=e.getLayer())||void 0===i||i.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,e){let i=this._getNodeRect();if(r.Util._inRange(t.width,-(2*this.padding())-1,1)||r.Util._inRange(t.height,-(2*this.padding())-1,1)){this.update();return}let a=new r.Transform;if(a.rotate(l.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){let e=a.point({x:-(2*this.padding()),y:0});t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){let e=a.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){let e=a.point({x:0,y:-(2*this.padding())});t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){let e=a.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}if(this.boundBoxFunc()){let e=this.boundBoxFunc()(i,t);e?t=e:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}let n=new r.Transform;n.translate(i.x,i.y),n.rotate(i.rotation),n.scale(i.width/1e7,i.height/1e7);let s=new r.Transform,o=t.width/1e7,h=t.height/1e7;!1===this.flipEnabled()?(s.translate(t.x,t.y),s.rotate(t.rotation),s.translate(t.width<0?t.width:0,t.height<0?t.height:0),s.scale(Math.abs(o),Math.abs(h))):(s.translate(t.x,t.y),s.rotate(t.rotation),s.scale(o,h));let d=s.multiply(n.invert());this._nodes.forEach(t=>{var e;let i=t.getParent().getAbsoluteTransform(),a=t.getTransform().copy();a.translate(t.offsetX(),t.offsetY());let n=new r.Transform;n.multiply(i.copy().invert()).multiply(d).multiply(i).multiply(a);let s=n.decompose();t.setAttrs(s),null===(e=t.getLayer())||void 0===e||e.batchDraw()}),this.rotation(r.Util._getRotation(t.rotation)),this._nodes.forEach(t=>{this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t;let e=this._getNodeRect();this.rotation(r.Util._getRotation(e.rotation));let i=e.width,a=e.height,n=this.enabledAnchors(),s=this.resizeEnabled(),o=this.padding(),h=this.anchorSize(),l=this.find("._anchor");l.forEach(t=>{t.setAttrs({width:h,height:h,offsetX:h/2,offsetY:h/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:h/2+o,offsetY:h/2+o,visible:s&&n.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:i/2,y:0,offsetY:h/2+o,visible:s&&n.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:i,y:0,offsetX:h/2-o,offsetY:h/2+o,visible:s&&n.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:a/2,offsetX:h/2+o,visible:s&&n.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:i,y:a/2,offsetX:h/2-o,visible:s&&n.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:a,offsetX:h/2+o,offsetY:h/2-o,visible:s&&n.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:i/2,y:a,offsetY:h/2-o,visible:s&&n.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:i,y:a,offsetX:h/2-o,offsetY:h/2-o,visible:s&&n.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:i/2,y:-this.rotateAnchorOffset()*r.Util._sign(a)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:i,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});let d=this.anchorStyleFunc();d&&l.forEach(t=>{d(t)}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();let t=this.findOne("."+this._movingAnchorName);
1t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),h.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return n.Node.prototype.toObject.call(this)}clone(t){return n.Node.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}e.Transformer=S,S.isTransforming=()=>b>0,S.prototype.className="Transformer",(0,g._registerNode)(S),a.Factory.addGetterSetter(S,"enabledAnchors",x,function(t){return t instanceof Array||r.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===x.indexOf(t)&&r.Util.warn("Unknown anchor name: "+t+". Available names are: "+x.join(", "))}),t||[]}),a.Factory.addGetterSetter(S,"flipEnabled",!0,(0,d.getBooleanValidator)()),a.Factory.addGetterSetter(S,"resizeEnabled",!0),a.Factory.addGetterSetter(S,"anchorSize",10,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateEnabled",!0),a.Factory.addGetterSetter(S,"rotateLineVisible",!0),a.Factory.addGetterSetter(S,"rotationSnaps",[]),a.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),a.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderEnabled",!0),a.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"anchorFill","white"),a.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderDash"),a.Factory.addGetterSetter(S,"keepRatio",!0),a.Factory.addGetterSetter(S,"shiftBehavior","default"),a.Factory.addGetterSetter(S,"centeredScaling",!1),a.Factory.addGetterSetter(S,"ignoreStroke",!1),a.Factory.addGetterSetter(S,"padding",0,(0,d.getNumberValidator)()),a.Factory.addGetterSetter(S,"nodes"),a.Factory.addGetterSetter(S,"node"),a.Factory.addGetterSetter(S,"boundBoxFunc"),a.Factory.addGetterSetter(S,"anchorDragBoundFunc"),a.Factory.addGetterSetter(S,"anchorStyleFunc"),a.Factory.addGetterSetter(S,"shouldOverdrawWholeArea",!1),a.Factory.addGetterSetter(S,"useSingleNodeRotation",!0),a.Factory.backCompat(S,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledH
1andlers:"enabledAnchors"})},6132:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;let r=i(255167),a=i(542960),n=i(800194),s=i(221710),o=i(800194);class h extends a.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,n.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.Wedge=h,h.prototype.className="Wedge",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"radius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"clockwise",!1),r.Factory.backCompat(h,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.