>B,0!==M?(M=255/M,x[u]=(f*U>>B)*M,x[u+1]=(d*U>>B)*M,x[u+2]=(p*U>>B)*M):x[u]=x[u+1]=x[u+2]=0,f-=m,d-=y,p-=g,v-=b,m-=F.r,y-=F.g,g-=F.b,b-=F.a,s=h+((s=o+i+1)>B,M>0?(M=255/M,x[s]=(f*U>>B)*M,x[s+1]=(d*U>>B)*M,x[s+2]=(p*U>>B)*M):x[s]=x[s+1]=x[s+2]=0,f-=m,d-=y,p-=g,v-=b,m-=F.r,y-=F.g,g-=F.b,b-=F.a,s=o+((s=a+L)=0&&d=0&&p=0&&d=0&&p=1020?255:0}return a}(r=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],c=0;c=0&&d=0&&p255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.RGBA=function(e){var t,n,r=e.data,i=r.length,o=this.red(),a=this.green(),c=this.blue(),s=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)}),Konva.Factory.addGetterSetter(Konva.Node,"blue",0,Konva.Validators.RGBComponent,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e})}(),function(){"use strict";Konva.Filters.HSV=function(e){var t,n,r,i,o,a=e.data,c=a.length,s=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=s*l*Math.cos(u*Math.PI/180),f=s*l*Math.sin(u*Math.PI/180),d=.299*s+.701*h+.167*f,p=.587*s-.587*h+.33*f,v=.114*s-.114*h-.497*f,m=.299*s-.299*h-.328*f,y=.587*s+.413*h+.035*f,g=.114*s-.114*h+.293*f,b=.299*s-.3*h+1.25*f,T=.587*s-.586*h-1.05*f,E=.114*s+.886*h-.2*f;for(t=0;tl&&(d=0);var p=(h-1+d)*s*4,v=s;do{var m=f+4*(v-1),y=a;v+y<1&&(y=0),v+y>s&&(y=0);var g=p+4*(v-1+y),b=c[m]-c[g],T=c[m+1]-c[g+1],E=c[m+2]-c[g+2],_=b,C=_>0?_:-_;if((T>0?T:-T)>C&&(_=T),(E>0?E:-E)>C&&(_=E),_*=t,i){var S=c[m]+_,w=c[m+1]+_,O=c[m+2]+_;c[m]=S>255?255:S<0?0:S,c[m+1]=w>255?255:w<0?0:w,c[m+2]=O>255?255:O<0?0:O}else{var M=n-_;M<0?M=0:M>255&&(M=255),c[m]=c[m+1]=c[m+2]=M}}while(--v)}while(--h)},Konva.Factory.addGetterSetter(Konva.Node,"embossStrength",.5,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossWhiteLevel",.5,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossDirection","top-left",null,Konva.Factory.afterSetFilter),Konva.Factory.addGetterSetter(Konva.Node,"embossBlend",!1,null,Konva.Factory.afterSetFilter)}(),function(){"use strict";function e(e,t,n,r,i){var o=n-t,a=i-r;return 0===o?r+a/2:0===a?r:a*((e-t)/o)+r}Konva.Filters.Enhance=function(t){var n,r,i,o,a=t.data,c=a.length,s=a[0],l=s,u=a[1],h=u,f=a[2],d=f,p=this.enhance();if(0!==p){for(o=0;ol&&(l=n),(r=a[o+1])h&&(h=r),(i=a[o+2])d&&(d=i);var v,m,y,g,b,T,E,_,C;for(l===s&&(l=255,s=0),h===u&&(h=255,u=0),d===f&&(d=255,f=0),p>0?(m=l+p*(255-l),y=s-p*(s-0),b=h+p*(255-h),T=u-p*(u-0),_=d+p*(255-d),C=f-p*(f-0)):(m=l+p*(l-(v=.5*(l+s))),y=s+p*(s-v),b=h+p*(h-(g=.5*(h+u))),T=u+p*(u-g),_=d+p*(d-(E=.5*(d+f))),C=f+p*(f-E)),o=0;o=m))for(n=u;n=y||(i+=e[(r=4*(m*n+t))+0],o+=e[r+1],a+=e[r+2],c+=e[r+3],p+=1);for(i/=p,o/=p,a/=p,c/=p,t=s;t=m))for(n=u;n=y||(e[(r=4*(m*n+t))+0]=i,e[r+1]=o,e[r+2]=a,e[r+3]=c)}},Konva.Factory.addGetterSetter(Konva.Node,"pixelSize",8,Konva.Validators.getNumberValidator(),Konva.Factory.afterSetFilter)}(),function(){"use strict";Konva.Filters.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,i=r.length;for(t=0;t255?255:c,u[r+1]=s>255?255:s,u[r+2]=l>255?255:l,u[r+3]=u[r+3]}while(--n)}while(--f)}}(),function(){"use strict";Konva.Filters.Solarize=function(e){var t=e.data,n=e.width,r=4*n,i=e.height;do{var o=(i-1)*r,a=n;do{var c=o+4*(a-1),s=t[c],l=t[c+1],u=t[c+2];s>127&&(s=255-s),l>127&&(l=255-l),u>127&&(u=255-u),t[c]=s,t[c+1]=l,t[c+2]=u}while(--a)}while(--i)}}(),function(){"use strict";Konva.Filters.Kaleidoscope=function(e){var t,n,r,i,o,a,c,s,l,u=e.width,h=e.height,f=Math.round(this.kaleidoscopePower()),d=Math.round(this.kaleidoscopeAngle()),p=Math.floor(u*(d%360)/360);if(!(f<1)){var v=Konva.Util.createCanvasElement();v.width=u,v.height=h;var m=v.getContext("2d").getImageData(0,0,u,h);!function(e,t,n){var r,i,o,a,c=e.data,s=t.data,l=e.width,u=e.height,h=n.polarCenterX||l/2,f=n.polarCenterY||u/2,d=0,p=0,v=0,m=0,y=Math.sqrt(h*h+f*f);i=l-h,o=u-f,y=(a=Math.sqrt(i*i+o*o))>y?a:y;var g,b,T,E,_=u,C=l,S=360/C*Math.PI/180;for(b=0;bu&&(b=g,T=0,E=-1),n=0;nb?s:b;var T,E,_,C=f,S=h,w=n.polarRotation||0;for(i=0;i255?255:o,a=(a*=255)<0?0:a>255?255:a,c=(c*=255)<0?0:c>255?255:c,r[t]=o,r[t+1]=a,r[t+2]=c},e.Factory.addGetterSetter(e.Node,"contrast",0,e.Validators.getNumberValidator(),e.Factory.afterSetFilter)}(Konva),function(){"use strict";Konva.Container=function(e){this.__init(e)},Konva.Util.addMethods(Konva.Container,{__init:function(e){this.children=new Konva.Collection,Konva.Node.call(this,e)},getChildren:function(e){if(!e)return this.children;var t=new Konva.Collection;return this.children.each(function(n){e(n)&&t.push(n)}),t},hasChildren:function(){return this.getChildren().length>0},removeChildren:function(){for(var e,t=Konva.Collection.toCollection(this.children),n=0;n1){for(var t=0;t0?t[0]:void 0},_generalFind:function(e,t){var n=[];return"string"===typeof e?n=this._findByString(e,t):"function"===typeof e&&(n=this._findByFunction(e,t)),Konva.Collection.toCollection(n)},_findByString:function(e){var t,n,r,i,o,a,c,s=[],l=e.replace(/ /g,"").split(","),u=l.length;for(t=0;t0)){var o=i.getChildren(),a=o.length;e(i)&&(n=n.concat(i));for(var c=0;c0},destroy:function(){return e.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],this},_useBufferCanvas:function(e){return!e&&this.perfectDrawEnabled()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()||this.perfectDrawEnabled()&&this.hasShadow()&&1!==this.getAbsoluteOpacity()&&this.hasFill()&&this.hasStroke()&&this.getStage()},getSelfRect:function(){var e=this.getSize();return{x:this._centroid?Math.round(-e.width/2):0,y:this._centroid?Math.round(-e.height/2):0,width:e.width,height:e.height}},getClientRect:function(e){var t=(e=e||{}).skipTransform,n=e.relativeTo,r=this.getSelfRect(),i=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=r.width+i,a=r.height+i,c=!e.skipShadow&&this.hasShadow(),s=c?this.shadowOffsetX():0,l=c?this.shadowOffsetY():0,u=o+Math.abs(s),h=a+Math.abs(l),f=c&&this.shadowBlur()||0,d=u+2*f,p=h+2*f,v=0;Math.round(i/2)!==i/2&&(v=1);var m={width:d+v,height:p+v,x:-Math.round(i/2+f)+Math.min(s,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return t?m:this._transformedRect(m,n)},drawScene:function(e,t,n,r){var i,o,a=this.getLayer(),c=e||a.getCanvas(),s=c.getContext(),l=this._cache.canvas,u=this.sceneFunc(),h=this.hasShadow(),f=this.hasStroke();if(!this.isVisible()&&!n)return this;if(l)return s.save(),a._applyTransform(this,s,t),this._drawCachedSceneCanvas(s),s.restore(),this;if(!u)return this;if(s.save(),this._useBufferCanvas(n)&&!r){if((o=(i=this.getStage().bufferCanvas).getContext()).clear(),o.save(),o._applyLineJoin(this),!n)if(a)a._applyTransform(this,o,t);else{var d=this.getAbsoluteTransform(t).getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5])}u.call(this,o,this),o.restore();var p=i.pixelRatio;h&&!c.hitCanvas?(s.save(),s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/p,i.height/p),s.restore()):(s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/p,i.height/p))}else{if(s._applyLineJoin(this),!n)if(a)a._applyTransform(this,s,t);else{var v=this.getAbsoluteTransform(t).getMatrix();s.transform(v[0],v[1],v[2],v[3],v[4],v[5])}h&&f&&!c.hitCanvas?(s.save(),n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),s._applyShadow(this),u.call(this,s,this),s.restore(),this.hasFill()&&this.getShadowForStrokeEnabled()&&u.call(this,s,this)):h&&!c.hitCanvas?(s.save(),n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),s._applyShadow(this),u.call(this,s,this),s.restore()):(n||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),u.call(this,s,this))}return s.restore(),this},drawHit:function(e,t,n){var r=this.getLayer(),i=e||r.hitCanvas,o=i.getContext(),a=this.hitFunc()||this.sceneFunc(),c=this._cache.canvas,s=c&&c.hit;if(!this.shouldDrawHit(i)&&!n)return this;if(r&&r.clearHitCache(),s)return o.save(),r._applyTransform(this,o,t),this._drawCachedHitCanvas(o),o.restore(),this;if(!a)return this;if(o.save(),o._applyLineJoin(this),!n)if(r)r._applyTransform(this,o,t);else{var l=this.getAbsoluteTransform(t).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5])}return a.call(this,o,this),o.restore(),this},drawHitFromCache:function(t){var n,r,i,o,a,c=t||0,s=this._cache.canvas,l=this._getCachedSceneCanvas(),u=s.hit,h=u.getContext(),f=u.getWidth(),d=u.getHeight();h.clear(),h.drawImage(l._canvas,0,0,f,d);try{for(i=(r=(n=h.getImageData(0,0,f,d)).data).length,o=e.Util._hexToRgb(this.colorKey),a=0;ac?(r[a]=o.r,r[a+1]=o.g,r[a+2]=o.b,r[a+3]=255):r[a+3]=0;h.putImageData(n,0,0)}catch(p){e.Util.error("Unable to draw hit graph from cached scene canvas. "+p.message)}return this}}),e.Util.extend(e.Shape,e.Node),e.Factory.addGetterSetter(e.Shape,"stroke",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"strokeWidth",2,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"strokeHitEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"perfectDrawEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"shadowForStrokeEnabled",!0,e.Validators.getBooleanValidator()),e.Factory.addGetterSetter(e.Shape,"lineJoin"),e.Factory.addGetterSetter(e.Shape,"lineCap"),e.Factory.addGetterSetter(e.Shape,"sceneFunc"),e.Factory.addGetterSetter(e.Shape,"hitFunc"),e.Factory.addGetterSetter(e.Shape,"dash"),e.Factory.addGetterSetter(e.Shape,"dashOffset",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowColor",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"shadowBlur",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowOpacity",1,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"shadowOffset",["x","y"]),e.Factory.addGetterSetter(e.Shape,"shadowOffsetX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"shadowOffsetY",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternImage"),e.Factory.addGetterSetter(e.Shape,"fill",void 0,e.Validators.getStringValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternY",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartRadius",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndRadius",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientColorStops"),e.Factory.addGetterSetter(e.Shape,"fillPatternRepeat","repeat"),e.Factory.addGetterSetter(e.Shape,"fillEnabled",!0),e.Factory.addGetterSetter(e.Shape,"strokeEnabled",!0),e.Factory.addGetterSetter(e.Shape,"shadowEnabled",!0),e.Factory.addGetterSetter(e.Shape,"dashEnabled",!0),e.Factory.addGetterSetter(e.Shape,"strokeScaleEnabled",!0),e.Factory.addGetterSetter(e.Shape,"fillPriority","color"),e.Factory.addComponentsGetterSetter(e.Shape,"fillPatternOffset",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillPatternOffsetX",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternOffsetY",0,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"fillPatternScale",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillPatternScaleX",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Shape,"fillPatternScaleY",1,e.Validators.getNumberValidator()),e.Factory.addComponentsGetterSetter(e.Shape,"fillLinearGradientStartPoint",["x","y"]),e.Factory.addComponentsGetterSetter(e.Shape,"strokeLinearGradientStartPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientStartPointY",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientStartPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillLinearGradientEndPoint",["x","y"]),e.Factory.addComponentsGetterSetter(e.Shape,"strokeLinearGradientEndPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"fillLinearGradientEndPointY",0),e.Factory.addGetterSetter(e.Shape,"strokeLinearGradientEndPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillRadialGradientStartPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartPointX",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientStartPointY",0),e.Factory.addComponentsGetterSetter(e.Shape,"fillRadialGradientEndPoint",["x","y"]),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndPointX",0),e.Factory.addGetterSetter(e.Shape,"fillRadialGradientEndPointY",0),e.Factory.addGetterSetter(e.Shape,"fillPatternRotation",0),e.Factory.backCompat(e.Shape,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"}),e.Collection.mapMethods(e.Shape)}(Konva),function(){"use strict";var e="_",t=["mousedown","mousemove","mouseup","mouseout","touchstart","touchmove","touchend","mouseover","wheel","contextmenu"],n=t.length;function r(t,n){t.content.addEventListener(n,function(r){t[e+n](r)},!1)}Konva.Stage=function(e){this.___init(e)},Konva.Util.addMethods(Konva.Stage,{___init:function(e){this.nodeType="Stage",Konva.Container.call(this,e),this._id=Konva.idCounter++,this._buildDOM(),this._bindContentEvents(),this._enableNestedTransforms=!1,Konva.stages.push(this)},_validateAdd:function(e){"Layer"!==e.getType()&&Konva.Util.throw("You may only add layers to the stage.")},setContainer:function(e){if("string"===typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=Konva.document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=Konva.document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this},shouldDrawHit:function(){return!0},draw:function(){return Konva.Node.prototype.draw.call(this),this},setHeight:function(e){return Konva.Node.prototype.setHeight.call(this,e),this._resizeDOM(),this},setWidth:function(e){return Konva.Node.prototype.setWidth.call(this,e),this._resizeDOM(),this},clear:function(){var e,t=this.children,n=t.length;for(e=0;e-1&&Konva.stages.splice(t,1),this},getPointerPosition:function(){return this.pointerPos},getStage:function(){return this},getContent:function(){return this.content},_toKonvaCanvas:function(e){var t=(e=e||{}).x||0,n=e.y||0,r=new Konva.SceneCanvas({width:e.width||this.getWidth(),height:e.height||this.getHeight(),pixelRatio:e.pixelRatio||1}),i=r.getContext()._context,o=this.children;return(t||n)&&i.translate(-1*t,-1*n),o.each(function(r){if(r.isVisible()){var o=r._toKonvaCanvas(e);i.drawImage(o._canvas,t,n,o.getWidth()/o.getPixelRatio(),o.getHeight()/o.getPixelRatio())}}),r},toImage:function(e){var t=e.callback;e.callback=function(e){Konva.Util._getImage(e,function(e){t(e)})},this.toDataURL(e)},getIntersection:function(e,t){var n,r,i=this.getChildren();for(n=i.length-1;n>=0;n--)if(r=i[n].getIntersection(e,t))return r;return null},_resizeDOM:function(){if(this.content){var e,t,n=this.getWidth(),r=this.getHeight(),i=this.getChildren(),o=i.length;for(this.content.style.width=n+"px",this.content.style.height=r+"px",this.bufferCanvas.setSize(n,r),this.bufferHitCanvas.setSize(n,r),e=0;e1){for(var t=0;t0){var i=e.touches[0];n=i.clientX-t.left,r=i.clientY-t.top}}else n=e.clientX-t.left,r=e.clientY-t.top;null!==n&&null!==r&&(this.pointerPos={x:n,y:r})},_getContentPosition:function(){var e=this.content.getBoundingClientRect?this.content.getBoundingClientRect():{top:0,left:0};return{top:e.top,left:e.left}},_buildDOM:function(){if(this.bufferCanvas=new Konva.SceneCanvas,this.bufferHitCanvas=new Konva.HitCanvas({pixelRatio:1}),Konva.isBrowser){var e=this.getContainer();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=Konva.document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}},_onContent:function(e,t){var n,r,i=e.split(" "),o=i.length;for(n=0;n0?{antialiased:!0}:{}},drawScene:function(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.getClearBeforeDraw()&&r.getContext().clear(),Konva.Container.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this},drawHit:function(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.getClearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Konva.Container.prototype.drawHit.call(this,r,t),this.imageData=null,this},clear:function(e){return Konva.BaseLayer.prototype.clear.call(this,e),this.getHitCanvas().getContext().clear(e),this.imageData=null,this},setVisible:function(e){return Konva.Node.prototype.setVisible.call(this,e),e?(this.getCanvas()._canvas.style.display="block",this.hitCanvas._canvas.style.display="block"):(this.getCanvas()._canvas.style.display="none",this.hitCanvas._canvas.style.display="none"),this},enableHitGraph:function(){return this.setHitGraphEnabled(!0),this},disableHitGraph:function(){return this.setHitGraphEnabled(!1),this},setSize:function(e,t){return Konva.BaseLayer.prototype.setSize.call(this,e,t),this.hitCanvas.setSize(e,t),this}}),Konva.Util.extend(Konva.Layer,Konva.BaseLayer),Konva.Factory.addGetterSetter(Konva.Layer,"hitGraphEnabled",!0),Konva.Collection.mapMethods(Konva.Layer)}(),function(){"use strict";Konva.FastLayer=function(e){this.____init(e)},Konva.Util.addMethods(Konva.FastLayer,{____init:function(e){this.nodeType="Layer",this.canvas=new Konva.SceneCanvas,Konva.BaseLayer.call(this,e)},_validateAdd:function(e){"Shape"!==e.getType()&&Konva.Util.throw("You may only add shapes to a fast layer.")},_setCanvasSize:function(e,t){this.canvas.setSize(e,t)},hitGraphEnabled:function(){return!1},getIntersection:function(){return null},drawScene:function(e){var t=this.getLayer(),n=e||t&&t.getCanvas();return this.getClearBeforeDraw()&&n.getContext().clear(),Konva.Container.prototype.drawScene.call(this,n),this},draw:function(){return this.drawScene(),this},setVisible:function(e){return Konva.Node.prototype.setVisible.call(this,e),this.getCanvas()._canvas.style.display=e?"block":"none",this}}),Konva.Util.extend(Konva.FastLayer,Konva.BaseLayer),Konva.Collection.mapMethods(Konva.FastLayer)}(),function(){"use strict";Konva.Group=function(e){this.___init(e)},Konva.Util.addMethods(Konva.Group,{___init:function(e){this.nodeType="Group",Konva.Container.call(this,e)},_validateAdd:function(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&Konva.Util.throw("You may only add groups and shapes to groups.")}}),Konva.Util.extend(Konva.Group,Konva.Container),Konva.Collection.mapMethods(Konva.Group)}(),function(e){"use strict";var t=e.global.performance&&e.global.performance.now?function(){return e.global.performance.now()}:function(){return(new Date).getTime()};function n(e){setTimeout(e,1e3/60)}var r=e.global.requestAnimationFrame||e.global.webkitRequestAnimationFrame||e.global.mozRequestAnimationFrame||e.global.oRequestAnimationFrame||e.global.msRequestAnimationFrame||n;function i(){return r.apply(e.global,arguments)}e.Animation=function(n,r){var i=e.Animation;this.func=n,this.setLayers(r),this.id=i.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t()}},e.Animation.prototype={setLayers:function(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this},getLayers:function(){return this.layers},addLayer:function(e){var t,n=this.layers,r=n.length;for(t=0;tthis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())},getTime:function(){return this._time},setPosition:function(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e},getPosition:function(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)},play:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")},reverse:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")},seek:function(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")},reset:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")},finish:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")},update:function(){this.setPosition(this.getPosition(this._time))},onEnterFrame:function(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)},pause:function(){this.state=1,this.fire("onPause")},getTimer:function(){return(new Date).getTime()}},Konva.Tween=function(n){var i,o,a=this,c=n.node,s=c._id,l=n.easing||Konva.Easings.Linear,u=!!n.yoyo;i="undefined"===typeof n.duration?.3:0===n.duration?.001:n.duration,this.node=c,this._id=t++;var h=c.getLayer()||(c instanceof Konva.Stage?c.getLayers():null);for(o in h||Konva.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Konva.Animation(function(){a.tween.onEnterFrame()},h),this.tween=new r(o,function(e){a._tweenFunc(e)},l,0,1,1e3*i,u),this._addListeners(),Konva.Tween.attrs[s]||(Konva.Tween.attrs[s]={}),Konva.Tween.attrs[s][this._id]||(Konva.Tween.attrs[s][this._id]={}),Konva.Tween.tweens[s]||(Konva.Tween.tweens[s]={}),n)void 0===e[o]&&this._addAttr(o,n[o]);this.reset(),this.onFinish=n.onFinish,this.onReset=n.onReset},Konva.Tween.attrs={},Konva.Tween.tweens={},Konva.Tween.prototype={_addAttr:function(e,t){var r,i,o,a,c,s,l,u,h=this.node,f=h._id;if((o=Konva.Tween.tweens[f][e])&&delete Konva.Tween.attrs[f][o][e],r=h.getAttr(e),Konva.Util._isArray(t))if(i=[],c=Math.max(t.length,r.length),"points"===e&&t.length!==r.length&&(t.length>r.length?(l=r,r=Konva.Util._prepareArrayForTween(r,t,h.closed())):(s=t,t=Konva.Util._prepareArrayForTween(t,r,h.closed()))),0===e.indexOf("fill"))for(a=0;a1&&e.translate(0,i)}},_hitFunc:function(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)},setText:function(e){var t=Konva.Util._isString(e)?e:(e||"").toString();return this._setAttr("text",t),this},getWidth:function(){return"auto"===this.attrs.width||void 0===this.attrs.width?this.getTextWidth()+2*this.getPadding():this.attrs.width},getHeight:function(){return"auto"===this.attrs.height||void 0===this.attrs.height?this.getTextHeight()*this.textArr.length*this.getLineHeight()+2*this.getPadding():this.attrs.height},getTextWidth:function(){return this.textWidth},getTextHeight:function(){return this.textHeight},_getTextSize:function(e){var t,n=i(),r=this.getFontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{width:t.width,height:parseInt(r,10)}},_getContextFont:function(){return Konva.UA.isIE?this.getFontStyle()+" "+this.getFontSize()+"px "+this.getFontFamily():this.getFontStyle()+" "+this.getFontVariant()+" "+this.getFontSize()+"px "+this.getFontFamily()},_addTextLine:function(e){"justify"===this.align()&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t})},_getTextWidth:function(e){var t=this.getLetterSpacing(),n=e.length;return i().measureText(e).width+(n?t*(n-1):0)},_setTextData:function(){var e=this.getText().split("\n"),t=+this.getFontSize(),n=0,r=this.getLineHeight()*t,o=this.attrs.width,a=this.attrs.height,c="auto"!==o,s="auto"!==a,l=this.getPadding(),u=o-2*l,h=a-2*l,f=0,d=this.getWrap(),p="none"!==d,v="char"!==d&&p,m=this.getEllipsis()&&!p;this.textArr=[],i().font=this._getContextFont();for(var y=0,g=e.length;yu)for(;b.length>0;){for(var _=0,C=b.length,S="",w=0;_>>1,M=b.slice(0,O+1),k=this._getTextWidth(M)+T;k<=u?(_=O+1,S=M+(m?"\u2026":""),w=k):C=O}if(!S)break;if(v){var x,A=b[S.length];(x=(" "===A||"-"===A)&&w<=u?S.length:Math.max(S.lastIndexOf(" "),S.lastIndexOf("-"))+1)>0&&(_=x,S=S.slice(0,_),w=this._getTextWidth(S))}if(S=Konva.Util.trimRight(S),this._addTextLine(S),n=Math.max(n,w),f+=r,!p||s&&f+r>h)break;if(b=b.slice(_),(b=Konva.Util.trimLeft(b)).length>0&&(E=this._getTextWidth(b))<=u){this._addTextLine(b),f+=r,n=Math.max(n,E);break}}else this._addTextLine(b),f+=r,n=Math.max(n,E);if(s&&f+r>h)break}this.textHeight=t,this.textWidth=n}},Konva.Util.extend(Konva.Text,Konva.Shape),Konva.Factory.addSetter(Konva.Node,"width",Konva.Validators.getNumberOrAutoValidator()),Konva.Factory.addSetter(Konva.Node,"height",Konva.Validators.getNumberOrAutoValidator()),Konva.Factory.addGetterSetter(Konva.Text,"fontFamily","Arial"),Konva.Factory.addGetterSetter(Konva.Text,"fontSize",12,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"fontStyle","normal"),Konva.Factory.addGetterSetter(Konva.Text,"fontVariant","normal"),Konva.Factory.addGetterSetter(Konva.Text,"padding",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"align","left"),Konva.Factory.addGetterSetter(Konva.Text,"verticalAlign","top"),Konva.Factory.addGetterSetter(Konva.Text,"lineHeight",1,Konva.Validators.getNumberValidator()),Konva.Factory.addGetterSetter(Konva.Text,"wrap","word"),Konva.Factory.addGetterSetter(Konva.Text,"ellipsis",!1),Konva.Factory.addGetterSetter(Konva.Text,"letterSpacing",0,Konva.Validators.getNumberValidator()),Konva.Factory.addGetter(Konva.Text,"text",""),Konva.Factory.addOverloadedGetterSetter(Konva.Text,"text"),Konva.Factory.addGetterSetter(Konva.Text,"textDecoration",""),Konva.Collection.mapMethods(Konva.Text)}(),function(){"use strict";Konva.Line=function(e){this.___init(e)},Konva.Line.prototype={___init:function(e){Konva.Shape.call(this,e),this.className="Line",this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")}),this.sceneFunc(this._sceneFunc)},_sceneFunc:function(e){var t,n,r,i=this.getPoints(),o=i.length,a=this.getTension(),c=this.getClosed(),s=this.getBezier();if(o){if(e.beginPath(),e.moveTo(i[0],i[1]),0!==a&&o>4){for(n=(t=this.getTensionPoints()).length,r=c?0:4,c||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);rs?c:s,p=c>s?1:c/s,v=c>s?s/c:1;e.translate(o,a),e.rotate(h),e.scale(p,v),e.arc(0,0,d,l,l+u,1-f),e.scale(1/p,1/v),e.rotate(-h),e.translate(-o,-a);break;case"z":e.closePath()}}e.fillStrokeShape(this)},getSelfRect:function(){var e=[];this.dataArray.forEach(function(t){e=e.concat(t.points)});for(var t,n,r=e[0],i=e[0],o=e[1],a=e[1],c=0;cthis.dataArray[n].pathLength;)e-=this.dataArray[n].pathLength,++n;if(n===r)return{x:(t=this.dataArray[n-1].points.slice(-2))[0],y:t[1]};if(e<.01)return{x:(t=this.dataArray[n].points.slice(0,2))[0],y:t[1]};var i=this.dataArray[n],o=i.points;switch(i.command){case"L":return Konva.Path.getPointOnLine(e,i.start.x,i.start.y,o[0],o[1]);case"C":return Konva.Path.getPointOnCubicBezier(e/i.pathLength,i.start.x,i.start.y,o[0],o[1],o[2],o[3],o[4],o[5]);case"Q":return Konva.Path.getPointOnQuadraticBezier(e/i.pathLength,i.start.x,i.start.y,o[0],o[1],o[2],o[3]);case"A":var a=o[0],c=o[1],s=o[2],l=o[3],u=o[4],h=o[5],f=o[6];return u+=h*e/i.pathLength,Konva.Path.getPointOnEllipticalArc(a,c,s,l,u,f)}return null}},Konva.Util.extend(Konva.Path,Konva.Shape),Konva.Path.getLineLength=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Konva.Path.getPointOnLine=function(e,t,n,r,i,o,a){void 0===o&&(o=t),void 0===a&&(a=n);var c=(i-n)/(r-t+1e-8),s=Math.sqrt(e*e/(1+c*c));r0&&!isNaN(d[0]);){var y,g,b,T,E,_,C,S,w,O,M=null,k=[],x=s,A=l;switch(f){case"l":s+=d.shift(),l+=d.shift(),M="L",k.push(s,l);break;case"L":s=d.shift(),l=d.shift(),k.push(s,l);break;case"m":var z=d.shift(),D=d.shift();if(s+=z,l+=D,M="M",a.length>2&&"z"===a[a.length-1].command)for(var P=a.length-2;P>=0;P--)if("M"===a[P].command){s=a[P].points[0]+z,l=a[P].points[1]+D;break}k.push(s,l),f="l";break;case"M":s=d.shift(),l=d.shift(),M="M",k.push(s,l),f="L";break;case"h":s+=d.shift(),M="L",k.push(s,l);break;case"H":s=d.shift(),M="L",k.push(s,l);break;case"v":l+=d.shift(),M="L",k.push(s,l);break;case"V":l=d.shift(),M="L",k.push(s,l);break;case"C":k.push(d.shift(),d.shift(),d.shift(),d.shift()),s=d.shift(),l=d.shift(),k.push(s,l);break;case"c":k.push(s+d.shift(),l+d.shift(),s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="C",k.push(s,l);break;case"S":g=s,b=l,"C"===(y=a[a.length-1]).command&&(g=s+(s-y.points[2]),b=l+(l-y.points[3])),k.push(g,b,d.shift(),d.shift()),s=d.shift(),l=d.shift(),M="C",k.push(s,l);break;case"s":g=s,b=l,"C"===(y=a[a.length-1]).command&&(g=s+(s-y.points[2]),b=l+(l-y.points[3])),k.push(g,b,s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="C",k.push(s,l);break;case"Q":k.push(d.shift(),d.shift()),s=d.shift(),l=d.shift(),k.push(s,l);break;case"q":k.push(s+d.shift(),l+d.shift()),s+=d.shift(),l+=d.shift(),M="Q",k.push(s,l);break;case"T":g=s,b=l,"Q"===(y=a[a.length-1]).command&&(g=s+(s-y.points[0]),b=l+(l-y.points[1])),s=d.shift(),l=d.shift(),M="Q",k.push(g,b,s,l);break;case"t":g=s,b=l,"Q"===(y=a[a.length-1]).command&&(g=s+(s-y.points[0]),b=l+(l-y.points[1])),s+=d.shift(),l+=d.shift(),M="Q",k.push(g,b,s,l);break;case"A":T=d.shift(),E=d.shift(),_=d.shift(),C=d.shift(),S=d.shift(),w=s,O=l,s=d.shift(),l=d.shift(),M="A",k=this.convertEndpointToCenterParameterization(w,O,s,l,C,S,T,E,_);break;case"a":T=d.shift(),E=d.shift(),_=d.shift(),C=d.shift(),S=d.shift(),w=s,O=l,s+=d.shift(),l+=d.shift(),M="A",k=this.convertEndpointToCenterParameterization(w,O,s,l,C,S,T,E,_)}a.push({command:M||f,points:k,start:{x:x,y:A},pathLength:this.calcLength(x,A,M||f,k)})}"z"!==f&&"Z"!==f||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a},Konva.Path.calcLength=function(e,t,n,r){var i,o,a,c,s=Konva.Path;switch(n){case"L":return s.getLineLength(e,t,r[0],r[1]);case"C":for(i=0,o=s.getPointOnCubicBezier(0,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),c=.01;c<=1;c+=.01)a=s.getPointOnCubicBezier(c,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case"Q":for(i=0,o=s.getPointOnQuadraticBezier(0,e,t,r[0],r[1],r[2],r[3]),c=.01;c<=1;c+=.01)a=s.getPointOnQuadraticBezier(c,e,t,r[0],r[1],r[2],r[3]),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case"A":i=0;var l=r[4],u=r[5],h=r[4]+u,f=Math.PI/180;if(Math.abs(l-h)h;c-=f)a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(c=l+f;c1&&(a*=Math.sqrt(f),c*=Math.sqrt(f));var d=Math.sqrt((a*a*(c*c)-a*a*(h*h)-c*c*(u*u))/(a*a*(h*h)+c*c*(u*u)));i===o&&(d*=-1),isNaN(d)&&(d=0);var p=d*a*h/c,v=d*-c*u/a,m=(e+n)/2+Math.cos(l)*p-Math.sin(l)*v,y=(t+r)/2+Math.sin(l)*p+Math.cos(l)*v,g=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(g(e)*g(t))},T=function(e,t){return(e[0]*t[1]=1&&(S=0),0===o&&S>0&&(S-=2*Math.PI),1===o&&S<0&&(S+=2*Math.PI),[m,y,a,c,E,S,l,o]},Konva.Factory.addGetterSetter(Konva.Path,"data"),Konva.Collection.mapMethods(Konva.Path)}(),function(){"use strict";function e(e){e.fillText(this.partialText,0,0)}function t(e){e.strokeText(this.partialText,0,0)}Konva.TextPath=function(e){this.___init(e)},Konva.TextPath.prototype={___init:function(n){var r=this;this.dummyCanvas=Konva.Util.createCanvasElement(),this.dataArray=[],Konva.Shape.call(this,n),this._fillFunc=e,this._strokeFunc=t,this._fillFuncHit=e,this._strokeFuncHit=t,this.className="TextPath",this.dataArray=Konva.Path.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){r.dataArray=Konva.Path.parsePathData(this.attrs.data),r._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva",r._setTextData),n&&n.getKerning&&(Konva.Util.warn('getKerning TextPath API is deprecated. Please use "kerningFunc" instead.'),this.setKerningFunc(n.getKerning)),r._setTextData(),this.sceneFunc(this._sceneFunc),this.hitFunc(this._hitFunc)},_sceneFunc:function(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.getTextBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===t&&e.beginPath();for(var o=0;o=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=e.dataArray[c].pathLength);var s=0;"center"===r&&(s=Math.max(0,a/2-o/2)),"right"===r&&(s=Math.max(0,a-o));for(var l,u,h,f=this.getText().split(""),d=this.getText().split(" ").length-1,p=-1,v=0,m=function(){v=0;for(var t=e.dataArray,n=p+1;n0)return p=n,t[n];"M"===t[n].command&&(l={x:t[n].points[0],y:t[n].points[1]})}return{}},y=function(t){var i=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(i+=(a-o)/d);var c=0,s=0;for(u=void 0;Math.abs(i-c)/i>.01&&s<25;){s++;for(var f=c;void 0===h;)(h=m())&&f+h.pathLengthi?u=Konva.Path.getPointOnLine(i,l.x,l.y,h.points[0],h.points[1],l.x,l.y):h=void 0;break;case"A":var y=h.points[4],g=h.points[5],b=h.points[4]+g;0===v?v=y+1e-8:i>c?v+=Math.PI/180*g/Math.abs(g):v-=Math.PI/360*g/Math.abs(g),(g<0&&v=0&&v>b)&&(v=b,p=!0),u=Konva.Path.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],v,h.points[6]);break;case"C":0===v?v=i>h.pathLength?1e-8:i/h.pathLength:i>c?v+=(i-c)/h.pathLength:v-=(c-i)/h.pathLength,v>1&&(v=1,p=!0),u=Konva.Path.getPointOnCubicBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3],h.points[4],h.points[5]);break;case"Q":0===v?v=i/h.pathLength:i>c?v+=(i-c)/h.pathLength:v-=(c-i)/h.pathLength,v>1&&(v=1,p=!0),u=Konva.Path.getPointOnQuadraticBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3])}void 0!==u&&(c=Konva.Path.getLineLength(l.x,l.y,u.x,u.y)),p&&(p=!1,h=void 0)}},g=e._getTextSize("C").width+n,b=0;b4;o&&(i=this.getTensionPoints());var a,c,s=r.length;o?(a=r[s-2]-i[s-2],c=r[s-1]-i[s-1]):(a=r[s-2]-r[s-4],c=r[s-1]-r[s-3]);var l=(Math.atan2(c,a)+n)%n,u=this.pointerLength(),h=this.pointerWidth();t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(l),t.moveTo(0,0),t.lineTo(-u,h/2),t.lineTo(-u,-h/2),t.closePath(),t.restore(),this.pointerAtBeginning()&&(t.save(),t.translate(r[0],r[1]),o?(a=i[0]-r[0],c=i[1]-r[1]):(a=r[2]-r[0],c=r[3]-r[1]),t.rotate((Math.atan2(-c,-a)+n)%n),t.moveTo(0,0),t.lineTo(-u,h/2),t.lineTo(-u,-h/2),t.closePath(),t.restore());var f=this.dashEnabled();f&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),f&&(this.attrs.dashEnabled=!0)}},e.Util.extend(e.Arrow,e.Line),e.Factory.addGetterSetter(e.Arrow,"pointerLength",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Arrow,"pointerWidth",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Arrow,"pointerAtBeginning",!1),e.Collection.mapMethods(e.Arrow)}(Konva),function(e){"use strict";var t=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].join(" "),n=["xChange.resizer","yChange.resizer","widthChange.resizer","heightChange.resizer","scaleXChange.resizer","scaleYChange.resizer","skewXChange.resizer","skewYChange.resizer","rotationChange.resizer","offsetXChange.resizer","offsetYChange.resizer","transformsEnabledChange.resizer"].join(" "),r=["widthChange.resizer","heightChange.resizer","scaleXChange.resizer","scaleYChange.resizer","skewXChange.resizer","skewYChange.resizer","rotationChange.resizer","offsetXChange.resizer","offsetYChange.resizer"].join(" "),i={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};e.Transformer=function(e){this.____init(e)};var o=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];e.Transformer.prototype={_centroid:!1,____init:function(n){e.Group.call(this,n),this.className="Transformer",this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(t,this.update),this.getNode()&&this.update()},attachTo:function(e){this.setNode(e)},setNode:function(e){return this._node&&this.detach(),this._node=e,this._resetTransformCache(),e.on(n,this._resetTransformCache.bind(this)),e.on(r,function(){this._transforming||this.update()}.bind(this)),!!this.findOne(".top-left")&&this.update(),this},getNode:function(){return this._node},detach:function(){this.getNode()&&(this.getNode().off(".resizer"),this._node=void 0),this._resetTransformCache()},_resetTransformCache:function(){this._clearCache("nodeRect"),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")},_getNodeRect:function(){return this._getCache("nodeRect",this.__getNodeRect)},__getNodeRect:function(){var t=this.getNode();if(!t)return{x:-Number.MAX_SAFE_INTEGER,y:-Number.MAX_SAFE_INTEGER,width:0,height:0,rotation:0};var n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=e.getAngle(t.rotation()),i=n.x*t.scaleX()-t.offsetX()*t.scaleX(),o=n.y*t.scaleY()-t.offsetY()*t.scaleY();return{x:t.x()+i*Math.cos(r)+o*Math.sin(-r),y:t.y()+o*Math.cos(r)+i*Math.sin(r),width:n.width*t.scaleX(),height:n.height*t.scaleY(),rotation:t.rotation()}},getX:function(){return this._getNodeRect().x},getY:function(){return this._getNodeRect().y},getRotation:function(){return this._getNodeRect().rotation},getWidth:function(){return this._getNodeRect().width},getHeight:function(){return this._getNodeRect().height},_createElements:function(){this._createBack(),o.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")},_createAnchor:function(t){var n=new e.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0}),r=this;n.on("mousedown touchstart",function(e){r._handleMouseDown(e)}),n.on("dragstart",function(e){e.cancelBubble=!0}),n.on("dragmove",function(e){e.cancelBubble=!0}),n.on("dragend",function(e){e.cancelBubble=!0}),n.on("mouseenter",function(){var r=this.getParent(),o=e.getAngle(r.rotation()),a=r.getNode().getAbsoluteScale(),c=a.y*a.x<0,s=function(t,n,r){if("rotater"===t)return"crosshair";n+=e.Util._degToRad(i[t]||0),r&&(n*=-1);var o=(e.Util._radToDeg(n)%360+360)%360;return e.Util._inRange(o,337.5,360)||e.Util._inRange(o,0,22.5)?"ns-resize":e.Util._inRange(o,22.5,67.5)?"nesw-resize":e.Util._inRange(o,67.5,112.5)?"ew-resize":e.Util._inRange(o,112.5,157.5)?"nwse-resize":e.Util._inRange(o,157.5,202.5)?"ns-resize":e.Util._inRange(o,202.5,247.5)?"nesw-resize":e.Util._inRange(o,247.5,292.5)?"ew-resize":e.Util._inRange(o,292.5,337.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+o),"pointer")}(t,o,c);n.getStage().content.style.cursor=s,r._cursorChange=!0}),n.on("mouseout",function(){n.getStage()&&this.getParent()&&(n.getStage().content.style.cursor="",this.getParent()._cursorChange=!1)}),this.add(n)},_createBack:function(){var t=new e.Shape({name:"back",width:0,height:0,listening:!1,sceneFunc:function(t){var n=this.getParent(),r=n.getPadding();t.beginPath(),t.rect(-r,-r,this.width()+2*r,this.height()+2*r),t.moveTo(this.width()/2,-r),n.rotateEnabled()&&t.lineTo(this.width()/2,-n.rotateAnchorOffset()*e.Util._sign(this.height())),t.fillStrokeShape(this)}});this.add(t)},_handleMouseDown:function(e){this.movingResizer=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=r/i,this.cos=n/i,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,this._fire("transformstart",{evt:e}),this.getNode()._fire("transformstart",{evt:e})},_handleMouseMove:function(t){var n,r,i,o=this.findOne("."+this.movingResizer),a=o.getStage().getContent().getBoundingClientRect(),c=a.left,s=a.top,l={x:(void 0!==t.clientX?t.clientX:t.touches[0].clientX)-c,y:(void 0!==t.clientX?t.clientY:t.touches[0].clientY)-s};o.setAbsolutePosition(l);var u=this.keepRatio()||t.shiftKey;if("top-left"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-right").x()-o.x(),2)+Math.pow(this.findOne(".bottom-right").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".top-left").x(this.findOne(".bottom-right").x()-n),this.findOne(".top-left").y(this.findOne(".bottom-right").y()-r));else if("top-center"===this.movingResizer)this.findOne(".top-left").y(o.y());else if("top-right"===this.movingResizer){u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-left").x()-o.x(),2)+Math.pow(this.findOne(".bottom-left").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".top-right").x(n),this.findOne(".top-right").y(this.findOne(".bottom-left").y()-r));var h=o.position();this.findOne(".top-left").y(h.y),this.findOne(".bottom-right").x(h.x)}else if("middle-left"===this.movingResizer)this.findOne(".top-left").x(o.x());else if("middle-right"===this.movingResizer)this.findOne(".bottom-right").x(o.x());else if("bottom-left"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".top-right").x()-o.x(),2)+Math.pow(this.findOne(".top-right").y()-o.y(),2)))*this.cos,r=i*this.sin,this.findOne(".bottom-left").x(this.findOne(".top-right").x()-n),this.findOne(".bottom-left").y(r)),h=o.position(),this.findOne(".top-left").x(h.x),this.findOne(".bottom-right").y(h.y);else if("bottom-center"===this.movingResizer)this.findOne(".bottom-right").y(o.y());else if("bottom-right"===this.movingResizer)u&&(n=(i=Math.sqrt(Math.pow(this.findOne(".bottom-right").x(),2)+Math.pow(this.findOne(".bottom-right").y(),2)))*this.cos,r=i*this.sin,this.findOne(".bottom-right").x(n),this.findOne(".bottom-right").y(r));else if("rotater"===this.movingResizer){var f=this.getPadding(),d=this._getNodeRect();n=o.x()-d.width/2,r=-o.y()+d.height/2;var p=Math.atan2(-r,n)+Math.PI/2;d.height<0&&(p-=Math.PI);for(var v=e.getAngle(this.rotation()),m=e.Util._radToDeg(v)+e.Util._radToDeg(p),y=e.getAngle(this.getNode().rotation()),g=e.Util._degToRad(m),b=this.rotationSnaps(),T=0;T=0}),this.findOne(".top-center").setAttrs({x:o/2,y:-l,scale:i,visible:s&&c.indexOf("top-center")>=0}),this.findOne(".top-right").setAttrs({x:o+l,y:-l,scale:i,visible:s&&c.indexOf("top-right")>=0}),this.findOne(".middle-left").setAttrs({x:-l,y:a/2,scale:i,visible:s&&c.indexOf("middle-left")>=0}),this.findOne(".middle-right").setAttrs({x:o+l,y:a/2,scale:i,visible:s&&c.indexOf("middle-right")>=0}),this.findOne(".bottom-left").setAttrs({x:-l,y:a+l,scale:i,visible:s&&c.indexOf("bottom-left")>=0}),this.findOne(".bottom-center").setAttrs({x:o/2,y:a+l,scale:i,visible:s&&c.indexOf("bottom-center")>=0}),this.findOne(".bottom-right").setAttrs({x:o+l,y:a+l,scale:i,visible:s&&c.indexOf("bottom-right")>=0});var h=-this.rotateAnchorOffset()*Math.abs(i.y);this.findOne(".rotater").setAttrs({x:o/2,y:h*e.Util._sign(a),scale:i,visible:this.rotateEnabled()}),this.findOne(".back").setAttrs({width:o*r.x,height:a*r.y,scale:i,visible:this.borderEnabled(),stroke:this.getBorderStroke(),strokeWidth:this.getBorderStrokeWidth(),dash:this.getBorderDash()})},isTransforming:function(){return this._transforming},stopTransform:function(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this.movingResizer);e&&e.stopDrag()}},destroy:function(){this.getStage()&&this._cursorChange&&(this.getStage().content.style.cursor=""),e.Group.prototype.destroy.call(this),this.detach(),this._removeEvents()},toObject:function(){return e.Node.prototype.toObject.call(this)}},e.Util.extend(e.Transformer,e.Group),e.Factory.addGetterSetter(e.Transformer,"enabledAnchors",o,function(t){return t instanceof Array||e.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===o.indexOf(t)&&e.Util.warn("Unknown anchor name: "+t+". Available names are: "+o.join(", "))}),t||[]}),e.Factory.addGetterSetter(e.Transformer,"resizeEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"anchorSize",10,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"rotateEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"rotationSnaps",[]),e.Factory.addGetterSetter(e.Transformer,"rotateAnchorOffset",50,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderEnabled",!0),e.Factory.addGetterSetter(e.Transformer,"anchorStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(e.Transformer,"anchorStrokeWidth",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"anchorFill","white"),e.Factory.addGetterSetter(e.Transformer,"anchorCornerRadius",0,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(e.Transformer,"borderStrokeWidth",1,e.Validators.getNumberValidator()),e.Factory.addGetterSetter(e.Transformer,"borderDash"),e.Factory.addGetterSetter(e.Transformer,"keepRatio",!0),e.Factory.addGetterSetter(e.Transformer,"centeredScaling",!1),e.Factory.addGetterSetter(e.Transformer,"ignoreStroke",!1),e.Factory.addGetterSetter(e.Transformer,"padding",0,e.Validators.getNumberValidator()),e.Factory.addOverloadedGetterSetter(e.Transformer,"node"),e.Factory.addGetterSetter(e.Transformer,"boundBoxFunc"),e.Factory.backCompat(e.Transformer,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),e.Collection.mapMethods(e.Transformer)}(Konva)}).call(this,n(59))},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(57),i=n.n(r),o={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function a(e){var t=i()(e);return"string"===t||"number"===t?o[e]||e:""}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(0)),i=o(n(435));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,n){var r=n(190),i=n(191),o=n(140),a=n(43),c=n(68),s=n(186),l=n(249),u=n(187),h="[object Map]",f="[object Set]",d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(c(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||u(e)||o(e)))return!e.length;var t=i(e);if(t==h||t==f)return!e.size;if(l(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(581),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1)for(var n=1;n=l.DIGIT_0&&e<=l.DIGIT_9}function v(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_Z}function m(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_Z}function y(e){return m(e)||v(e)}function g(e){return y(e)||p(e)}function b(e){return e>=l.LATIN_CAPITAL_A&&e<=l.LATIN_CAPITAL_F}function T(e){return e>=l.LATIN_SMALL_A&&e<=l.LATIN_SMALL_F}function E(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function C(e){return String.fromCharCode(E(e))}function S(e,t){for(var n=c[++e],r=++e,i=r+n-1;r<=i;){var o=r+i>>>1,a=c[o];if(at))return c[o+n];i=o-1}}return-1}var w=function(){function e(){r(this,e),this.preprocessor=new o,this.tokenQueue=[],this.allowCDATA=!1,this.state=f,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}return i(e,[{key:"_err",value:function(){}},{key:"_errOnNextCodePoint",value:function(e){this._consume(),this._err(e),this._unconsume()}},{key:"getNextToken",value:function(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;var e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}},{key:"write",value:function(e,t){this.active=!0,this.preprocessor.write(e,t)}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}},{key:"_ensureHibernation",value:function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:e.HIBERNATION_TOKEN}),!0}return!1}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}},{key:"_reconsumeInState",value:function(e){this.state=e,this._unconsume()}},{key:"_consumeSequenceIfMatch",value:function(e,t,n){for(var r=0,i=!0,o=e.length,a=0,c=t,s=void 0;a0&&(c=this._consume(),r++),c===l.EOF){i=!1;break}if(c!==(s=e[a])&&(n||c!==E(s))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}},{key:"_isTempBufferEqualToScriptString",value:function(){if(this.tempBuff.length!==u.SCRIPT_STRING.length)return!1;for(var e=0;e0&&this._err(s.endTagWithAttributes),t.selfClosing&&this._err(s.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}},{key:"_emitCurrentCharacterToken",value:function(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}},{key:"_emitEOFToken",value:function(){this._createEOFToken(),this._emitCurrentToken()}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(t){var n=e.CHARACTER_TOKEN;d(t)?n=e.WHITESPACE_CHARACTER_TOKEN:t===l.NULL&&(n=e.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(n,_(t))}},{key:"_emitSeveralCodePoints",value:function(e){for(var t=0;t-1;){var i=c[r],o=i<7;o&&1&i&&(t=2&i?[c[++r],c[++r]]:[c[++r]],n=0);var a=this._consume();if(this.tempBuff.push(a),n++,a===l.EOF)break;r=o?4&i?S(r,a):-1:a===i?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}},{key:"_isCharacterReferenceInAttribute",value:function(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}},{key:"_isCharacterReferenceAttributeQuirk",value:function(e){if(!e&&this._isCharacterReferenceInAttribute()){var t=this._consume();return this._unconsume(),t===l.EQUALS_SIGN||g(t)}return!1}},{key:"_flushCodePointsConsumedAsCharacterReference",value:function(){if(this._isCharacterReferenceInAttribute())for(var e=0;e")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):y(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}},{key:"SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",value:function(e){y(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars(""),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}},{key:"SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",value:function(e){if(v(e))this.currentToken.tagName+=C(e),this.tempBuff.push(e);else if(m(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(d(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===l.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===l.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=f)}this._emitChars(""),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}}},{key:"SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",value:function(e){d(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):v(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE")}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",value:function(e){e===l.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChars("-")):e===l.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(e)}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===l.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this._emitChars("-"):e===l.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===l.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(a.REPLACEMENT_CHARACTER)):e===l.EOF?(this._err(s.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}},{key:"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",value:function(e){e===l.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",value:function(e){d(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):v(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):m(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}},{key:"BEFORE_ATTRIBUTE_NAME_STATE",value:function(e){d(e)||(e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===l.EQUALS_SIGN?(this._err(s.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"ATTRIBUTE_NAME_STATE",value:function(e){d(e)||e===l.SOLIDUS||e===l.GREATER_THAN_SIGN||e===l.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===l.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):v(e)?this.currentAttr.name+=C(e):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN?(this._err(s.unexpectedCharacterInAttributeName),this.currentAttr.name+=_(e)):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.name+=a.REPLACEMENT_CHARACTER):this.currentAttr.name+=_(e)}},{key:"AFTER_ATTRIBUTE_NAME_STATE",value:function(e){d(e)||(e===l.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===l.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}},{key:"BEFORE_ATTRIBUTE_VALUE_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===l.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.missingAttributeValue),this.state=f,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}},{key:"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"ATTRIBUTE_VALUE_UNQUOTED_STATE",value:function(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentAttr.value+=a.REPLACEMENT_CHARACTER):e===l.QUOTATION_MARK||e===l.APOSTROPHE||e===l.LESS_THAN_SIGN||e===l.EQUALS_SIGN||e===l.GRAVE_ACCENT?(this._err(s.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=_(e)):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}},{key:"AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",value:function(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===l.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===l.GREATER_THAN_SIGN?(this._leaveAttrValue(f),this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"SELF_CLOSING_START_TAG_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInTag),this._emitEOFToken()):(this._err(s.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}},{key:"BOGUS_COMMENT_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):this.currentToken.data+=_(e)}},{key:"MARKUP_DECLARATION_OPEN_STATE",value:function(e){this._consumeSequenceIfMatch(u.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(u.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(u.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(s.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(s.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}},{key:"COMMENT_START_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_START_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.GREATER_THAN_SIGN?(this._err(s.abruptClosingOfEmptyComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===l.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.data+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=_(e)}},{key:"COMMENT_LESS_THAN_SIGN_STATE",value:function(e){e===l.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===l.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}},{key:"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",value:function(e){e!==l.GREATER_THAN_SIGN&&e!==l.EOF&&this._err(s.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}},{key:"COMMENT_END_DASH_STATE",value:function(e){e===l.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===l.HYPHEN_MINUS?this.currentToken.data+="-":e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}},{key:"COMMENT_END_BANG_STATE",value:function(e){e===l.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.incorrectlyClosedComment),this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}},{key:"DOCTYPE_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}},{key:"BEFORE_DOCTYPE_NAME_STATE",value:function(e){d(e)||(v(e)?(this._createDoctypeToken(C(e)),this.state="DOCTYPE_NAME_STATE"):e===l.NULL?(this._err(s.unexpectedNullCharacter),this._createDoctypeToken(a.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"))}},{key:"DOCTYPE_NAME_STATE",value:function(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):v(e)?this.currentToken.name+=C(e):e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.name+=a.REPLACEMENT_CHARACTER):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=_(e)}},{key:"AFTER_DOCTYPE_NAME_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(u.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(u.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(s.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.publicId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}},{key:"AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",value:function(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===l.GREATER_THAN_SIGN?(this.state=f,this._emitCurrentToken()):e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",value:function(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.QUOTATION_MARK?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this._err(s.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}},{key:"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===l.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===l.GREATER_THAN_SIGN?(this._err(s.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=f,this._emitCurrentToken()):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",value:function(e){e===l.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",value:function(e){e===l.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===l.NULL?(this._err(s.unexpectedNullCharacter),this.currentToken.systemId+=a.REPLACEMENT_CHARACTER):e===l.GREATER_THAN_SIGN?(this._err(s.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}},{key:"AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",value:function(e){d(e)||(e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.EOF?(this._err(s.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(s.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}},{key:"BOGUS_DOCTYPE_STATE",value:function(e){e===l.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=f):e===l.NULL?this._err(s.unexpectedNullCharacter):e===l.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}},{key:"CDATA_SECTION_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===l.EOF?(this._err(s.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}},{key:"CDATA_SECTION_BRACKET_STATE",value:function(e){e===l.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CDATA_SECTION_END_STATE",value:function(e){e===l.GREATER_THAN_SIGN?this.state=f:e===l.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}},{key:"CHARACTER_REFERENCE_STATE",value:function(e){this.tempBuff=[l.AMPERSAND],e===l.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):g(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"NAMED_CHARACTER_REFERENCE_STATE",value:function(e){var t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[l.AMPERSAND];else if(t){var n=this.tempBuff[this.tempBuff.length-1]===l.SEMICOLON;this._isCharacterReferenceAttributeQuirk(n)||(n||this._errOnNextCodePoint(s.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}},{key:"AMBIGUOS_AMPERSAND_STATE",value:function(e){g(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=_(e):this._emitCodePoint(e):(e===l.SEMICOLON&&this._err(s.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}},{key:"NUMERIC_CHARACTER_REFERENCE_STATE",value:function(e){this.charRefCode=0,e===l.LATIN_SMALL_X||e===l.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",value:function(e){!function(e){return p(e)||b(e)||T(e)}(e)?(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}},{key:"DECIMAL_CHARACTER_REFERENCE_START_STATE",value:function(e){p(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(s.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}},{key:"HEXADEMICAL_CHARACTER_REFERENCE_STATE",value:function(e){b(e)?this.charRefCode=16*this.charRefCode+e-55:T(e)?this.charRefCode=16*this.charRefCode+e-87:p(e)?this.charRefCode=16*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"DECIMAL_CHARACTER_REFERENCE_STATE",value:function(e){p(e)?this.charRefCode=10*this.charRefCode+e-48:e===l.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(s.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}},{key:"NUMERIC_CHARACTER_REFERENCE_END_STATE",value:function(){if(this.charRefCode===l.NULL)this._err(s.nullCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(s.characterReferenceOutsideUnicodeRange),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isSurrogate(this.charRefCode))this._err(s.surrogateCharacterReference),this.charRefCode=l.REPLACEMENT_CHARACTER;else if(a.isUndefinedCodePoint(this.charRefCode))this._err(s.noncharacterCharacterReference);else if(a.isControlCodePoint(this.charRefCode)||this.charRefCode===l.CARRIAGE_RETURN){this._err(s.controlCharacterReference);var e=h[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}]),e}();w.CHARACTER_TOKEN="CHARACTER_TOKEN",w.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",w.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",w.START_TAG_TOKEN="START_TAG_TOKEN",w.END_TAG_TOKEN="END_TAG_TOKEN",w.COMMENT_TOKEN="COMMENT_TOKEN",w.DOCTYPE_TOKEN="DOCTYPE_TOKEN",w.EOF_TOKEN="EOF_TOKEN",w.HIBERNATION_TOKEN="HIBERNATION_TOKEN",w.MODE={DATA:f,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},w.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=w},function(e,t,n){var r=n(231),i=n(174);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(440),i=n(441),o=n(442),a=n(443),c=n(444);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0)){var i=e.props.insertExtraNode;e.extraNode=document.createElement("div");var o=f(e).extraNode;o.className="ant-click-animating-node";var c=e.getAttributeName();t.setAttribute(c,"true"),r=r||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&function(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return!(t&&t[1]&&t[2]&&t[3])||!(t[1]===t[2]&&t[2]===t[3])}(n)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(n)&&"transparent"!==n&&(e.csp&&e.csp.nonce&&(r.nonce=e.csp.nonce),o.style.borderColor=n,r.innerHTML="\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ".concat(n,";\n }"),document.body.contains(r)||document.body.appendChild(r)),i&&t.appendChild(o),a.a.addStartEventListener(t,e.onTransitionStart),a.a.addEndEventListener(t,e.onTransitionEnd)}},e.onTransitionStart=function(t){if(!e.destroy){var n=Object(o.findDOMNode)(f(e));t&&t.target===n&&(e.animationStart||e.resetEffect(n))}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!p(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout(function(){return e.onClick(t,r)},0),c.a.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=Object(c.a)(function(){e.animationStart=!1},10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.renderWave=function(t){var n=t.csp,r=e.props.children;return e.csp=n,r},e}var n,v,m;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,i["Component"]),n=t,(v=[{key:"componentDidMount",value:function(){var e=Object(o.findDOMNode)(this);e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroy=!0}},{key:"getAttributeName",value:function(){return this.props.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode&&e instanceof Element){var t=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),r&&(r.innerHTML=""),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),a.a.removeStartEventListener(e,this.onTransitionStart),a.a.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"render",value:function(){return i.createElement(s.a,null,this.renderWave)}}])&&u(n.prototype,v),m&&u(n,m),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(51),i=Object(r.a)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")},function(e,t,n){var r=n(507)(n(203));e.exports=r},function(e,t,n){var r=n(67),i=n(509),o=n(63),a="[object Object]",c=Function.prototype,s=Object.prototype,l=c.toString,u=s.hasOwnProperty,h=l.call(Object);e.exports=function(e){if(!o(e)||r(e)!=a)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==h}},function(e,t,n){var r=n(247),i=n(528),o=n(88),a=n(43);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(0),i=n.n(r),o=n(15),a=n.n(o),c=n(2),s=n.n(c);function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n=t||n<0||y&&e-v>=h}function E(){var e=i();if(T(e))return _(e);d=setTimeout(E,function(e){var n=t-(e-p);return y?s(n,h-(e-v)):n}(e))}function _(e){return d=void 0,g&&l?b(e):(l=u=void 0,f)}function C(){var e=i(),n=T(e);if(l=arguments,u=this,p=e,n){if(void 0===d)return function(e){return v=e,d=setTimeout(E,t),m?b(e):f}(p);if(y)return clearTimeout(d),d=setTimeout(E,t),b(p)}return void 0===d&&(d=setTimeout(E,t)),f}return t=o(t)||0,r(n)&&(m=!!n.leading,h=(y="maxWait"in n)?c(o(n.maxWait)||0,t):h,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),v=0,l=p=u=d=void 0},C.flush=function(){return void 0===d?f:_(i())},C}},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;s.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),C="undefined"!==typeof WeakMap?new WeakMap:new n,S=function(){return function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);C.set(this,r)}}();["observe","unobserve","disconnect"].forEach(function(e){S.prototype[e]=function(){var t;return(t=C.get(this))[e].apply(t,arguments)}});var w="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:S;t.a=w}).call(this,n(59))},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(0),i=n.n(r);function o(e){var t=[];return i.a.Children.forEach(e,function(e){t.push(e)}),t}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(575)),i=o(n(578));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t,n,o){null===t&&(t=Function.prototype);var a=(0,i.default)(t,n);if(void 0===a){var c=(0,r.default)(t);return null===c?void 0:e(c,n,o)}if("value"in a)return a.value;var s=a.get;return void 0!==s?s.call(o):void 0}},,function(e,t,n){!function(t){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o="all",a={"\u21e7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,command:91},c={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},s=function(e){return c[e]||e.toUpperCase().charCodeAt(0)},l=[];for(n=1;n<20;n++)c["f"+n]=111+n;function u(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function h(e,t){if(e.length!=t.length)return!1;for(var n=0;n1&&(o=y(e),e=[e[e.length-1]]),e=e[0],(e=s(e))in r||(r[e]=[]),r[e].push({shortcut:i[a],scope:t,method:n,key:i[a],mods:o})}for(n in a)p[n]=!1;function v(){return o||"all"}function m(e){var t;return""==(t=(e=e.replace(/\s/g,"")).split(","))[t.length-1]&&(t[t.length-2]+=","),t}function y(e){for(var t=e.slice(0,e.length-1),n=0;n0,i)(!i[o]&&u(n.mods,+o)>-1||i[o]&&-1==u(n.mods,+o))&&(s=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!s||!1===n.method(e,n)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}(e)}),g(document,"keyup",function(e){var t,n=e.keyCode,r=u(l,n);if(r>=0&&l.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(t in i[n]=!1,a)a[t]==n&&(p[t]=!1)}),g(window,"focus",function(){for(n in i)i[n]=!1;for(n in a)p[n]=!1});var b=t.key;t.key=p,t.key.setScope=function(e){o=e||"all"},t.key.getScope=v,t.key.deleteScope=function(e){var t,n,i;for(t in r)for(n=r[t],i=0;i1&&(l=y(i),e=i[i.length-1]),e=s(e),void 0===t&&(t=v()),!r[e])return;for(o=0;o=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";var r=n(48),i=n(50),o=n(72),a=n(60),c=n(73),s=n(66),l=function(e){function t(e,n){var i;return r(this,t),(i=o(this,a(t).call(this,e))).posTracker=null,i.onParseError=n.onParseError,i}return c(t,s),i(t,[{key:"_setErrorLocation",value:function(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}},{key:"_reportError",value:function(e){var t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}},{key:"_getOverriddenMethods",value:function(e){return{_err:function(t){e._reportError(t)}}}}]),t}();e.exports=l},function(e,t,n){var r=n(399);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(99);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(173)("keys"),i=n(131);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(53),i=n(75),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(130)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(98),i=n(409),o=n(174),a=n(172)("IE_PROTO"),c=function(){},s=function(){var e,t=n(230)("iframe"),r=o.length;for(t.style.display="none",n(410).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("