From 932fbd4a542dc868be357fd7c368c0ebcb196b8f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Thu, 7 Nov 2024 10:59:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20RYOSKATE?= =?UTF-8?q?/PLIVET@73b6a0cbe986c06baac932735e7c58372f3f6f0b=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 31d7739d..6ffc0084 100644 --- a/js/main.js +++ b/js/main.js @@ -57,4 +57,4 @@ e.exports=function t(r){"use strict";var i=n(95),o=n(0),a=n(246);function s(e){f * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0;if(t.unstable_now=void 0,t.unstable_forceFrameRate=void 0,"undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}};t.unstable_now=function(){return Date.now()},r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(u,0))},i=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,h=window.Date,f=window.setTimeout,p=window.clearTimeout,g=window.requestAnimationFrame,m=window.cancelAnimationFrame;"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),t.unstable_now="object"==typeof d&&"function"==typeof d.now?function(){return d.now()}:function(){return h.now()};var b=!1,v=null,y=-1,w=-1,x=33.33,S=-1,k=-1,_=0,C=!1;a=function(){return t.unstable_now()>=_},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125(x=rs){if(a=l,null===$)$=e.next=e.previous=e;else{n=null;var c=$;do{if(a4;o&&(i=this.getTensionPoints());var a,s,l=r.length;o?(a=r[l-2]-(i[i.length-2]+i[i.length-4])/2,s=r[l-1]-(i[i.length-1]+i[i.length-3])/2):(a=r[l-2]-r[l-4],s=r[l-1]-r[l-3]);var c=(Math.atan2(s,a)+n)%n,u=this.pointerLength(),d=this.pointerWidth();t.save(),t.beginPath(),t.translate(r[l-2],r[l-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-u,d/2),t.lineTo(-u,-d/2),t.closePath(),t.restore(),this.pointerAtBeginning()&&(t.save(),t.translate(r[0],r[1]),o?(a=(i[0]+i[2])/2-r[0],s=(i[1]+i[3])/2-r[1]):(a=r[2]-r[0],s=r[3]-r[1]),t.rotate((Math.atan2(-s,-a)+n)%n),t.moveTo(0,0),t.lineTo(-u,d/2),t.lineTo(-u,-d/2),t.closePath(),t.restore());var h=this.dashEnabled();h&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),h&&(this.attrs.dashEnabled=!0)},t.prototype.getSelfRect=function(){var t=e.prototype.getSelfRect.call(this),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+2*n,height:t.height+2*n}},t}(s.Line);t.Arrow=u,u.prototype.className="Arrow",c._registerNode(u),a.Factory.addGetterSetter(u,"pointerLength",10,l.getNumberValidator()),a.Factory.addGetterSetter(u,"pointerWidth",10,l.getNumberValidator()),a.Factory.addGetterSetter(u,"pointerAtBeginning",!1),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){e.beginPath(),e.arc(0,0,this.radius(),0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radius()},t.prototype.getHeight=function(){return 2*this.radius()},t.prototype.setWidth=function(e){this.radius()!==e/2&&this.radius(e/2)},t.prototype.setHeight=function(e){this.radius()!==e/2&&this.radius(e/2)},t}(s.Shape);t.Circle=u,u.prototype._centroid=!0,u.prototype.className="Circle",u.prototype._attrsAffectingSize=["radius"],c._registerNode(u),a.Factory.addGetterSetter(u,"radius",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radiusX()},t.prototype.getHeight=function(){return 2*this.radiusY()},t.prototype.setWidth=function(e){this.radiusX(e/2)},t.prototype.setHeight=function(e){this.radiusY(e/2)},t}(s.Shape);t.Ellipse=u,u.prototype.className="Ellipse",u.prototype._centroid=!0,u.prototype._attrsAffectingSize=["radiusX","radiusY"],c._registerNode(u),a.Factory.addComponentsGetterSetter(u,"radius",["x","y"]),a.Factory.addGetterSetter(u,"radiusX",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"radiusY",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._useBufferCanvas=function(){return!(!this.hasShadow()&&1===this.getAbsoluteOpacity()||!this.hasStroke()||!this.getStage())},t.prototype._sceneFunc=function(e){var t,n,r,i=this.width(),o=this.height(),a=this.image();a&&(t=this.cropWidth(),n=this.cropHeight(),r=t&&n?[a,this.cropX(),this.cropY(),t,n,0,0,i,o]:[a,0,0,i,o]),(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,i,o),e.closePath(),e.fillStrokeShape(this)),a&&e.drawImage.apply(e,r)},t.prototype._hitFunc=function(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){var e,t=this.image();return null!=(e=this.attrs.width)?e:t?t.width:0},t.prototype.getHeight=function(){var e,t=this.image();return null!=(e=this.attrs.height)?e:t?t.height:0},t.fromURL=function(e,n){var r=o.Util.createImageElement();r.onload=function(){var e=new t({image:r});n(e)},r.crossOrigin="Anonymous",r.src=e},t}(s.Shape);t.Image=u,u.prototype.className="Image",c._registerNode(u),a.Factory.addGetterSetter(u,"image"),a.Factory.addComponentsGetterSetter(u,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(u,"cropX",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropY",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropWidth",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropHeight",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(153),c=n(10),u=n(8),d=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width"],h=d.length,f=function(e){function t(t){var n=e.call(this,t)||this;return n.on("add.konva",(function(e){this._addListeners(e.child),this._sync()})),n}return i(t,e),t.prototype.getText=function(){return this.find("Text")[0]},t.prototype.getTag=function(){return this.find("Tag")[0]},t.prototype._addListeners=function(e){var t,n=this,r=function(){n._sync()};for(t=0;t=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=e.dataArray[s].pathLength);var c=0;"center"===r&&(c=Math.max(0,a/2-o/2)),"right"===r&&(c=Math.max(0,a-o));for(var u,d,h,f=this.text().split(""),p=this.text().split(" ").length-1,g=-1,m=0,b=function(){m=0;for(var t=e.dataArray,n=g+1;n0)return g=n,t[n];"M"===t[n].command&&(u={x:t[n].points[0],y:t[n].points[1]})}return{}},v=function(t){var i=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(i+=(a-o)/p);var s=0,c=0;for(d=void 0;Math.abs(i-s)/i>.01&&c<25;){c++;for(var f=s;void 0===h;)(h=b())&&f+h.pathLengthi?d=l.Path.getPointOnLine(i,u.x,u.y,h.points[0],h.points[1],u.x,u.y):h=void 0;break;case"A":var v=h.points[4],y=h.points[5],w=h.points[4]+y;0===m?m=v+1e-8:i>s?m+=Math.PI/180*y/Math.abs(y):m-=Math.PI/360*y/Math.abs(y),(y<0&&m=0&&m>w)&&(m=w,g=!0),d=l.Path.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],m,h.points[6]);break;case"C":0===m?m=i>h.pathLength?1e-8:i/h.pathLength:i>s?m+=(i-s)/h.pathLength:m-=(s-i)/h.pathLength,m>1&&(m=1,g=!0),d=l.Path.getPointOnCubicBezier(m,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===m?m=i/h.pathLength:i>s?m+=(i-s)/h.pathLength:m-=(s-i)/h.pathLength,m>1&&(m=1,g=!0),d=l.Path.getPointOnQuadraticBezier(m,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3])}void 0!==d&&(s=l.Path.getLineLength(u.x,u.y,d.x,d.y)),g&&(g=!1,h=void 0)}},y=c/(e._getTextSize("C").width+n)-1,w=0;wthis.findOne(".bottom-right").x()?-1:1,u=this.findOne(".top-left").y()>this.findOne(".bottom-right").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".top-left").x(this.findOne(".bottom-right").x()-t-2*l),this.findOne(".top-left").y(this.findOne(".bottom-right").y()-n-2*l)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){if(s){r=Math.sqrt(Math.pow(i.x()-this.findOne(".bottom-left").x()-2*l,2)+Math.pow(this.findOne(".bottom-left").y()-i.y()-2*l,2));c=this.findOne(".top-right").x()this.findOne(".bottom-left").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".top-right").x(t+l),this.findOne(".top-right").y(this.findOne(".bottom-left").y()-n-2*l)}var h=i.position();this.findOne(".top-left").y(h.y),this.findOne(".bottom-right").x(h.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(i.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(i.x());else if("bottom-left"===this._movingAnchorName){if(s){r=Math.sqrt(Math.pow(this.findOne(".top-right").x()-i.x()-2*l,2)+Math.pow(i.y()-this.findOne(".top-right").y()-2*l,2));c=this.findOne(".top-right").x()this.findOne(".bottom-right").x()?-1:1,u=this.findOne(".top-left").y()>this.findOne(".bottom-right").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".bottom-right").x(t+l),this.findOne(".bottom-right").y(n+l)}}else if("rotater"===this._movingAnchorName){var f=this._getNodeRect();t=i.x()-f.width/2,n=-i.y()+f.height/2;var p=Math.atan2(-n,t)+Math.PI/2;f.height<0&&(p-=Math.PI);for(var g=d.Konva.getAngle(this.rotation()),m=o.Util._radToDeg(g)+o.Util._radToDeg(p),b=d.Konva.getAngle(this.getNode().rotation()),v=o.Util._degToRad(m),y=this.rotationSnaps(),w=d.Konva.getAngle(this.rotationSnapTolerance()),x=0;x=0}),this.findOne(".top-center").setAttrs({x:a/2,y:-u,scale:i,visible:c&&l.indexOf("top-center")>=0}),this.findOne(".top-right").setAttrs({x:a+u,y:-u,scale:i,visible:c&&l.indexOf("top-right")>=0}),this.findOne(".middle-left").setAttrs({x:-u,y:s/2,scale:i,visible:c&&l.indexOf("middle-left")>=0}),this.findOne(".middle-right").setAttrs({x:a+u,y:s/2,scale:i,visible:c&&l.indexOf("middle-right")>=0}),this.findOne(".bottom-left").setAttrs({x:-u,y:s+u,scale:i,visible:c&&l.indexOf("bottom-left")>=0}),this.findOne(".bottom-center").setAttrs({x:a/2,y:s+u,scale:i,visible:c&&l.indexOf("bottom-center")>=0}),this.findOne(".bottom-right").setAttrs({x:a+u,y:s+u,scale:i,visible:c&&l.indexOf("bottom-right")>=0});var h=-this.rotateAnchorOffset()*Math.abs(i.y);this.findOne(".rotater").setAttrs({x:a/2,y:h*o.Util._sign(s)-u,scale:i,visible:this.rotateEnabled()}),this.findOne(".back").setAttrs({width:a*r.x,height:s*r.y,scale:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash()})},t.prototype.isTransforming=function(){return this._transforming},t.prototype.stopTransform=function(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}},t.prototype.destroy=function(){return this.getStage()&&this._cursorChange&&(this.getStage().content.style.cursor=""),u.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this},t.prototype.toObject=function(){return s.Node.prototype.toObject.call(this)},t}(u.Group);t.Transformer=y,y.prototype.className="Transformer",f._registerNode(y),a.Factory.addGetterSetter(y,"enabledAnchors",v,(function(e){return e instanceof Array||o.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===v.indexOf(e)&&o.Util.warn("Unknown anchor name: "+e+". Available names are: "+v.join(", "))})),e||[]})),a.Factory.addGetterSetter(y,"resizeEnabled",!0),a.Factory.addGetterSetter(y,"anchorSize",10,h.getNumberValidator()),a.Factory.addGetterSetter(y,"rotateEnabled",!0),a.Factory.addGetterSetter(y,"rotationSnaps",[]),a.Factory.addGetterSetter(y,"rotateAnchorOffset",50,h.getNumberValidator()),a.Factory.addGetterSetter(y,"rotationSnapTolerance",5,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderEnabled",!0),a.Factory.addGetterSetter(y,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(y,"anchorStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(y,"anchorFill","white"),a.Factory.addGetterSetter(y,"anchorCornerRadius",0,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(y,"borderStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderDash"),a.Factory.addGetterSetter(y,"keepRatio",!0),a.Factory.addGetterSetter(y,"centeredScaling",!1),a.Factory.addGetterSetter(y,"ignoreStroke",!1),a.Factory.addGetterSetter(y,"padding",0,h.getNumberValidator()),a.Factory.addGetterSetter(y,"node"),a.Factory.addGetterSetter(y,"boundBoxFunc"),a.Factory.backCompat(y,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),o.Collection.mapMethods(y)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(8),c=n(10),u=n(8),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){e.beginPath(),e.arc(0,0,this.radius(),0,l.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radius()},t.prototype.getHeight=function(){return 2*this.radius()},t.prototype.setWidth=function(e){this.radius(e/2)},t.prototype.setHeight=function(e){this.radius(e/2)},t}(s.Shape);t.Wedge=d,d.prototype.className="Wedge",d.prototype._centroid=!0,d.prototype._attrsAffectingSize=["radius"],u._registerNode(d),a.Factory.addGetterSetter(d,"radius",0,c.getNumberValidator()),a.Factory.addGetterSetter(d,"angle",0,c.getNumberValidator()),a.Factory.addGetterSetter(d,"clockwise",!1),a.Factory.backCompat(d,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),o.Collection.mapMethods(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);function a(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var s=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];t.Blur=function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,i,o,c,u,d,h,f,p,g,m,b,v,y,w,x,S,k,_,C,E,T,O,A=e.data,M=e.width,$=e.height,P=t+t+1,R=M-1,L=$-1,N=t+1,F=N*(N+1)/2,I=new a,D=null,j=I,z=null,B=null,H=s[t],U=l[t];for(i=1;i>U,0!==T?(T=255/T,A[u]=(h*H>>U)*T,A[u+1]=(f*H>>U)*T,A[u+2]=(p*H>>U)*T):A[u]=A[u+1]=A[u+2]=0,h-=m,f-=b,p-=v,g-=y,m-=z.r,b-=z.g,v-=z.b,y-=z.a,o=d+((o=n+t+1)>U,T>0?(T=255/T,A[o]=(h*H>>U)*T,A[o+1]=(f*H>>U)*T,A[o+2]=(p*H>>U)*T):A[o]=A[o+1]=A[o+2]=0,h-=m,f-=b,p-=v,g-=y,m-=z.r,b-=z.g,v-=z.b,y-=z.a,o=n+((o=r+N)255?255:o,a=(a*=255)<0?0:a>255?255:a,s=(s*=255)<0?0:s>255?255:s,r[t]=o,r[t+1]=a,r[t+2]=s},r.Factory.addGetterSetter(i.Node,"contrast",0,o.getNumberValidator(),r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(12),a=n(10);t.Emboss=function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),a=0,s=0,l=e.data,c=e.width,u=e.height,d=4*c,h=u;switch(r){case"top-left":a=-1,s=-1;break;case"top":a=-1,s=0;break;case"top-right":a=-1,s=1;break;case"right":a=0,s=1;break;case"bottom-right":a=1,s=1;break;case"bottom":a=1,s=0;break;case"bottom-left":a=1,s=-1;break;case"left":a=0,s=-1;break;default:o.Util.error("Unknown emboss direction: "+r)}do{var f=(h-1)*d,p=a;h+p<1&&(p=0),h+p>u&&(p=0);var g=(h-1+p)*c*4,m=c;do{var b=f+4*(m-1),v=s;m+v<1&&(v=0),m+v>c&&(v=0);var y=g+4*(m-1+v),w=l[b]-l[y],x=l[b+1]-l[y+1],S=l[b+2]-l[y+2],k=w,_=k>0?k:-k;if((x>0?x:-x)>_&&(k=x),(S>0?S:-S)>_&&(k=S),k*=t,i){var C=l[b]+k,E=l[b+1]+k,T=l[b+2]+k;l[b]=C>255?255:C<0?0:C,l[b+1]=E>255?255:E<0?0:E,l[b+2]=T>255?255:T<0?0:T}else{var O=n-k;O<0?O=0:O>255&&(O=255),l[b]=l[b+1]=l[b+2]=O}}while(--m)}while(--h)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,a.getNumberValidator(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,a.getNumberValidator(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);function a(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}t.Enhance=function(e){var t,n,r,i,o=e.data,s=o.length,l=o[0],c=l,u=o[1],d=u,h=o[2],f=h,p=this.enhance();if(0!==p){for(i=0;ic&&(c=t),(n=o[i+1])d&&(d=n),(r=o[i+2])f&&(f=r);var g,m,b,v,y,w,x,S,k;for(c===l&&(c=255,l=0),d===u&&(d=255,u=0),f===h&&(f=255,h=0),p>0?(m=c+p*(255-c),b=l-p*(l-0),y=d+p*(255-d),w=u-p*(u-0),S=f+p*(255-f),k=h-p*(h-0)):(m=c+p*(c-(g=.5*(c+l))),b=l+p*(l-g),y=d+p*(d-(v=.5*(d+u))),w=u+p*(u-v),S=f+p*(f-(x=.5*(f+h))),k=h+p*(h-x)),i=0;ib?a:b;var v,y,w,x,S=u,k=c,_=360/k*Math.PI/180;for(y=0;yd&&(w=y,x=0,S=-1),n=0;ny?l:y;var w,x,S,k=h,_=d,C=n.polarRotation||0;for(i=0;i=0&&f=0&&p=0&&f=0&&p=1020?255:0}return a}(t=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=[],s=0;s=0&&f=0&&p=b))for(n=d;n=v||(o+=x[(r=4*(b*n+t))+0],a+=x[r+1],s+=x[r+2],l+=x[r+3],g+=1);for(o/=g,a/=g,s/=g,l/=g,t=c;t=b))for(n=d;n=v||(x[(r=4*(b*n+t))+0]=o,x[r+1]=a,x[r+2]=s,x[r+3]=l)}},r.Factory.addGetterSetter(o.Node,"pixelSize",8,a.getNumberValidator(),r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.Posterize=function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,i=r.length,o=255/n;for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"blue",0,o.RGBComponent,r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.RGBA=function(e){var t,n,r=e.data,i=r.length,o=this.red(),a=this.green(),s=this.blue(),l=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"blue",0,o.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=function(e){var t,n,r,i,o=e.data,a=o.length;for(t=0;t127&&(l=255-l),c>127&&(c=255-c),u>127&&(u=255-u),t[s]=l,t[s+1]=c,t[s+2]=u}while(--a)}while(--i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,i=r.length;for(t=0;ti)&&(m=Math.ceil(this.alphabet.length/i))>this.seps.length&&(y=m-this.seps.length,(w=this.seps).push.apply(w,t(this.alphabet.slice(0,y))),this.alphabet=this.alphabet.slice(y)),this.alphabet=d(this.alphabet,h);var S=Math.ceil(this.alphabet.length/o);this.alphabet.length<3?(this.guards=this.seps.slice(0,S),this.seps=this.seps.slice(S)):(this.guards=this.alphabet.slice(0,S),this.alphabet=this.alphabet.slice(S)),this.guardsRegExp=b(this.guards),this.sepsRegExp=b(this.seps),this.allowedCharsRegExp=v([].concat(t(this.alphabet),t(this.guards),t(this.seps)))}var n=e.prototype;return n.encode=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0){var b=m/2;o=o.slice(b,b+this.minLength)}}return o},n.isValidId=function(e){return this.allowedCharsRegExp.test(e)},n._decode=function(e){if(!this.isValidId(e))throw new Error("The provided ID ("+e+") is invalid, as it contains characters that do not exist in the alphabet ("+this.guards.join("")+this.seps.join("")+this.alphabet.join("")+")");var n=e.split(this.guardsRegExp),r=n[3===n.length||2===n.length?1:0];if(0===r.length)return[];var i=r[Symbol.iterator]().next().value,o=r.slice(i.length).split(this.sepsRegExp),a=this.alphabet,s=[],l=o,c=Array.isArray(l),u=0;for(l=c?l:l[Symbol.iterator]();;){var h;if(c){if(u>=l.length)break;h=l[u++]}else{if((u=l.next()).done)break;h=u.value}var p=h,g=d(a,[i].concat(t(this.salt),t(a)).slice(0,a.length));s.push(f(Array.from(p),g)),a=g}return this._encode(s).join("")!==e?[]:s},e}();e.default=n;var r=16,i=3.5,o=12,a=function(e){return Array.from(new Set(e))};e.keepUnique=a;var s=function(e,t){return e.filter((function(e){return!t.includes(e)}))};e.withoutChars=s;var l=function(e,t){return e.filter((function(e){return t.includes(e)}))};e.onlyChars=l;var c=function(e){return"bigint"==typeof e||!Number.isNaN(Number(e))&&Math.floor(Number(e))===e},u=function(e){return"bigint"==typeof e||e>=0&&Number.isSafeInteger(e)};function d(e,t){if(0===t.length)return e;for(var n,r=e.slice(),i=r.length-1,o=0,a=0;i>0;i--,o++){a+=n=t[o%=t.length].codePointAt(0);var s=(n+o+a)%i,l=r[i],c=r[s];r[s]=l,r[i]=c}return r}var h=function(e,t){var n=[];if("bigint"==typeof e){var r=BigInt(t.length);do{n.unshift(t[Number(e%r)]),e/=r}while(e>BigInt(0))}else do{n.unshift(t[e%t.length]),e=Math.floor(e/t.length)}while(e>0);return n},f=function(e,t){return e.reduce((function(n,r){var i=t.indexOf(r);if(-1===i)throw new Error("The provided ID ("+e.join("")+") is invalid, as it contains characters that do not exist in the alphabet ("+t.join("")+")");if("bigint"==typeof n)return n*BigInt(t.length)+BigInt(i);var o=n*t.length+i;if(Number.isSafeInteger(o))return o;if("function"==typeof BigInt)return BigInt(n)*BigInt(t.length)+BigInt(i);throw new Error("Unable to decode the provided string, due to lack of support for BigInt numbers in the current environment")}),0)},p=/^\+?[0-9]+$/,g=function(e){return p.test(e)?parseInt(e,10):NaN},m=function(e,t,n){return Array.from({length:Math.ceil(e.length/t)},(function(r,i){return n(e.slice(i*t,(i+1)*t))}))},b=function(e){return new RegExp(e.map((function(e){return y(e)})).sort((function(e,t){return t.length-e.length})).join("|"))},v=function(e){return new RegExp("^["+e.map((function(e){return y(e)})).sort((function(e,t){return t.length-e.length})).join("")+"]+$")},y=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){"use strict";var r=n(252).forEach,i=n(510),o=n(511),a=n(512),s=n(513),l=n(514),c=n(253),u=n(515),d=n(517),h=n(518),f=n(519);function p(e){return Array.isArray(e)||void 0!==e.length}function g(e){if(Array.isArray(e))return e;var t=[];return r(e,(function(e){t.push(e)})),t}function m(e){return e&&1===e.nodeType}function b(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}e.exports=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=a(),v=s({idGenerator:n,stateHandler:d});t=v}var y=e.reporter;y||(y=l(!1===y));var w=b(e,"batchProcessor",u({reporter:y})),x={};x.callOnAdd=!!b(e,"callOnAdd",!0),x.debug=!!b(e,"debug",!1);var S,k=o(t),_=i({stateHandler:d}),C=b(e,"strategy","object"),E=b(e,"important",!1),T={reporter:y,batchProcessor:w,stateHandler:d,idHandler:t,important:E};if("scroll"===C&&(c.isLegacyOpera()?(y.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),C="object"):c.isIE(9)&&(y.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),C="object")),"scroll"===C)S=f(T);else{if("object"!==C)throw new Error("Invalid strategy name: "+C);S=h(T)}var O={};return{listenTo:function(e,n,i){function o(e){var t=k.get(e);r(t,(function(t){t(e)}))}function a(e,t,n){k.add(t,n),e&&n(t)}if(i||(i=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(m(n))n=[n];else{if(!p(n))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=g(n)}var s=0,l=b(e,"callOnAdd",x.callOnAdd),c=b(e,"onReady",(function(){})),u=b(e,"debug",x.debug);r(n,(function(e){d.getState(e)||(d.initState(e),t.set(e));var h=t.get(e);if(u&&y.log("Attaching listener to element",h,e),!_.isDetectable(e))return u&&y.log(h,"Not detectable."),_.isBusy(e)?(u&&y.log(h,"System busy making it detectable"),a(l,e,i),O[h]=O[h]||[],void O[h].push((function(){++s===n.length&&c()}))):(u&&y.log(h,"Making detectable..."),_.markBusy(e,!0),S.makeDetectable({debug:u,important:E},e,(function(e){if(u&&y.log(h,"onElementDetectable"),d.getState(e)){_.markAsDetectable(e),_.markBusy(e,!1),S.addListener(e,o),a(l,e,i);var t=d.getState(e);if(t&&t.startSize){var f=e.offsetWidth,p=e.offsetHeight;t.startSize.width===f&&t.startSize.height===p||o(e)}O[h]&&r(O[h],(function(e){e()}))}else u&&y.log(h,"Element uninstalled before being detectable.");delete O[h],++s===n.length&&c()})));u&&y.log(h,"Already detecable, adding listener."),a(l,e,i),s++})),s===n.length&&c()},removeListener:k.removeListener,removeAllListeners:k.removeAllListeners,uninstall:function(e){if(!e)return y.error("At least one element is required.");if(m(e))e=[e];else{if(!p(e))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=g(e)}r(e,(function(e){k.removeAllListeners(e),S.uninstall(e),d.cleanState(e)}))},initDocument:function(e){S.initDocument&&S.initDocument(e)}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}},function(e,t,n){"use strict";e.exports=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;in?n=i:i div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",o+="."+i+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");i.innerHTML=n,i.id=t,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style","erd_scroll_detection_container")}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function c(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function u(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function d(e){return i(e).container.childNodes[0].childNodes[0].childNodes[0]}function h(e){return i(e).container.childNodes[0].childNodes[0].childNodes[1]}return s(window.document),{makeDetectable:function(e,s,u){function f(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(s),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;ru;)for(var f,p=l(arguments[u++]),g=d?i(p).concat(d(p)):i(p),m=g.length,b=0;m>b;)f=g[b++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:c},function(e,t,n){var r=n(64),i=n(258),o=n(526);e.exports=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(160),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){n(528);var r=n(28).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(55);r(r.S+r.F*!n(58),"Object",{defineProperty:n(57).f})},function(e,t,n){e.exports={default:n(530),__esModule:!0}},function(e,t,n){n(261),n(535),e.exports=n(167).f("iterator")},function(e,t,n){var r=n(160),i=n(159);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(165),i=n(88),o=n(166),a={};n(71)(a,n(43)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(57),i=n(72),o=n(113);e.exports=n(58)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var r=n(56).document;e.exports=r&&r.documentElement},function(e,t,n){n(536);for(var r=n(56),i=n(71),o=n(90),a=n(43)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(540),__esModule:!0}},function(e,t,n){n(541),n(546),n(547),n(548),e.exports=n(28).Symbol},function(e,t,n){"use strict";var r=n(56),i=n(63),o=n(58),a=n(55),s=n(263),l=n(542).KEY,c=n(74),u=n(162),d=n(166),h=n(115),f=n(43),p=n(167),g=n(168),m=n(543),b=n(544),v=n(72),y=n(73),w=n(89),x=n(64),S=n(157),k=n(88),_=n(165),C=n(545),E=n(169),T=n(164),O=n(57),A=n(113),M=E.f,$=O.f,P=C.f,R=r.Symbol,L=r.JSON,N=L&&L.stringify,F=f("_hidden"),I=f("toPrimitive"),D={}.propertyIsEnumerable,j=u("symbol-registry"),z=u("symbols"),B=u("op-symbols"),H=Object.prototype,U="function"==typeof R&&!!T.f,W=r.QObject,V=!W||!W.prototype||!W.prototype.findChild,G=o&&c((function(){return 7!=_($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=M(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,K=function(e){var t=z[e]=_(R.prototype);return t._k=e,t},q=U&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},Y=function(e,t,n){return e===H&&Y(B,t,n),v(e),t=S(t,!0),v(n),i(z,t)?(n.enumerable?(i(e,F)&&e[F][t]&&(e[F][t]=!1),n=_(n,{enumerable:k(0,!1)})):(i(e,F)||$(e,F,k(1,{})),e[F][t]=!0),G(e,t,n)):$(e,t,n)},X=function(e,t){v(e);for(var n,r=m(t=x(t)),i=0,o=r.length;o>i;)Y(e,n=r[i++],t[n]);return e},Q=function(e){var t=D.call(this,e=S(e,!0));return!(this===H&&i(z,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(z,e)||i(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=x(e),t=S(t,!0),e!==H||!i(z,t)||i(B,t)){var n=M(e,t);return!n||!i(z,t)||i(e,F)&&e[F][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=P(x(e)),r=[],o=0;n.length>o;)i(z,t=n[o++])||t==F||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=P(n?B:x(e)),o=[],a=0;r.length>a;)!i(z,t=r[a++])||n&&!i(H,t)||o.push(z[t]);return o};U||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(B,n),i(this,F)&&i(this[F],e)&&(this[F][e]=!1),G(this,e,k(1,n))};return o&&V&&G(H,e,{configurable:!0,set:t}),K(e)}).prototype,"toString",(function(){return this._k})),E.f=Z,O.f=Y,n(265).f=C.f=J,n(116).f=Q,T.f=ee,o&&!n(114)&&s(H,"propertyIsEnumerable",Q,!0),p.f=function(e){return K(f(e))}),a(a.G+a.W+a.F*!U,{Symbol:R});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=A(f.store),ie=0;re.length>ie;)g(re[ie++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=R(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!U,"Object",{create:function(e,t){return void 0===t?_(e):X(_(e),t)},defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var oe=c((function(){T.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return T.f(w(e))}}),L&&a(a.S+a.F*(!U||c((function(){var e=R();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(y(t)||void 0!==e)&&!q(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,N.apply(L,r)}}),R.prototype[I]||n(71)(R.prototype,I,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(115)("meta"),i=n(73),o=n(63),a=n(57).f,s=0,l=Object.isExtensible||function(){return!0},c=!n(74)((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,r)&&u(e),e}}},function(e,t,n){var r=n(113),i=n(164),o=n(116);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),l=o.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var r=n(158);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(64),i=n(265).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t){},function(e,t,n){n(168)("asyncIterator")},function(e,t,n){n(168)("observable")},function(e,t,n){e.exports={default:n(550),__esModule:!0}},function(e,t,n){n(551),e.exports=n(28).Object.setPrototypeOf},function(e,t,n){var r=n(55);r(r.S,"Object",{setPrototypeOf:n(552).set})},function(e,t,n){var r=n(73),i=n(72),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(156)(Function.call,n(169).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(554),__esModule:!0}},function(e,t,n){n(555);var r=n(28).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(55);r(r.S,"Object",{create:n(165)})},function(e,t,n){e.exports={default:n(557),__esModule:!0}},function(e,t,n){n(558),e.exports=n(28).Object.getPrototypeOf},function(e,t,n){var r=n(89),i=n(264);n(266)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){e.exports={default:n(560),__esModule:!0}},function(e,t,n){n(561);var r=n(28).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(64),i=n(169).f;n(266)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(563)),o=r(n(95)),a=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","shiftKey","target","timeStamp","view","type"];function s(e){return null==e}var l=[{reg:/^key/,props:["char","charCode","key","keyCode","which"],fix:function(e,t){s(e.which)&&(e.which=s(t.charCode)?t.keyCode:t.charCode),void 0===e.metaKey&&(e.metaKey=e.ctrlKey)}},{reg:/^touch/,props:["touches","changedTouches","targetTouches"]},{reg:/^hashchange$/,props:["newURL","oldURL"]},{reg:/^gesturechange$/i,props:["rotation","scale"]},{reg:/^(mousewheel|DOMMouseScroll)$/,props:[],fix:function(e,t){var n=void 0,r=void 0,i=void 0,o=t.wheelDelta,a=t.axis,s=t.wheelDeltaY,l=t.wheelDeltaX,c=t.detail;o&&(i=o/120),c&&(i=0-(c%3==0?c/3:c)),void 0!==a&&(a===e.HORIZONTAL_AXIS?(r=0,n=0-i):a===e.VERTICAL_AXIS&&(n=0,r=i)),void 0!==s&&(r=s/120),void 0!==l&&(n=-1*l/120),n||r||(r=i),void 0!==n&&(e.deltaX=n),void 0!==r&&(e.deltaY=r),void 0!==i&&(e.delta=i)}},{reg:/^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,props:["buttons","clientX","clientY","button","offsetX","relatedTarget","which","fromElement","toElement","offsetY","pageX","pageY","screenX","screenY"],fix:function(e,t){var n=void 0,r=void 0,i=void 0,o=e.target,a=t.button;return o&&s(e.pageX)&&!s(t.clientX)&&(r=(n=o.ownerDocument||document).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===o?e.toElement:e.fromElement),e}}];function c(){return!0}function u(){return!1}function d(e){var t=e.type,n="function"==typeof e.stopPropagation||"boolean"==typeof e.cancelBubble;i.default.call(this),this.nativeEvent=e;var r=u;"defaultPrevented"in e?r=e.defaultPrevented?c:u:"getPreventDefault"in e?r=e.getPreventDefault()?c:u:"returnValue"in e&&(r=!1===e.returnValue?c:u),this.isDefaultPrevented=r;var o=[],s=void 0,d=void 0,h=a.concat();for(l.forEach((function(e){t.match(e.reg)&&(h=h.concat(e.props),e.fix&&o.push(e.fix))})),s=h.length;s;)this[d=h[--s]]=e[d];for(!this.target&&n&&(this.target=e.srcElement||document),this.target&&3===this.target.nodeType&&(this.target=this.target.parentNode),s=o.length;s;)(0,o[--s])(this,e);this.timeStamp=e.timeStamp||Date.now()}var h=i.default.prototype;(0,o.default)(d.prototype,h,{constructor:d,preventDefault:function(){var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,h.preventDefault.call(this)},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,h.stopPropagation.call(this)}}),t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(){return!1}function i(){return!0}function o(){this.timeStamp=Date.now(),this.target=void 0,this.currentTarget=void 0}Object.defineProperty(t,"__esModule",{value:!0}),o.prototype={isEventObject:1,constructor:o,isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r,preventDefault:function(){this.isDefaultPrevented=i},stopPropagation:function(){this.isPropagationStopped=i},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},halt:function(e){e?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()}},t.default=o,e.exports=t.default},function(e,t,n){e.exports={default:n(565),__esModule:!0}},function(e,t,n){n(261),n(566),e.exports=n(28).Array.from},function(e,t,n){"use strict";var r=n(156),i=n(55),o=n(89),a=n(567),s=n(568),l=n(258),c=n(569),u=n(570);i(i.S+i.F*!n(572)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,h=o(e),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g,b=0,v=u(h);if(m&&(g=r(g,p>2?arguments[2]:void 0,2)),null==v||f==Array&&s(v))for(n=new f(t=l(h.length));t>b;b++)c(n,b,m?g(h[b],b):h[b]);else for(d=v.call(h),n=new f;!(i=d.next()).done;b++)c(n,b,m?a(d,g,[i.value,b],!0):i.value);return n.length=b,n}})},function(e,t,n){var r=n(72);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(90),i=n(43)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(57),i=n(88);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(571),i=n(43)("iterator"),o=n(90);e.exports=n(28).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(158),i=n(43)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(43)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(290))},function(e){e.exports=JSON.parse('{"name":"plivet","version":"1.0.0","description":"","main":"index.js","author":"","license":"MIT","engines":{"node":">= 10.20.1 <=16.13.2"},"scripts":{"ts-lint":"tslint --fix \'src/**/*.tsx\'","start":"opener http://localhost:8080 && cross-env NODE_ENV=dev webpack-dev-server --config webpack.config.dev.js","build":"yarn clean && cross-env NODE_ENV=prod webpack --config webpack.config.js && yarn license","license":"license-list-html -o ./dist/licenses.html -a RYOSKATE","test":"jest","deduplicate":"yarn-deduplicate yarn.lock && git add yarn.lock","clean":"shx rm -rf dist"},"husky":{"hooks":{"pre-commit":"yarn deduplicate && yarn install"}},"lint-staged":{"*.{ts,tsx}":["tslint --fix","git add"],"yarn.lock":["git add"]},"dependencies":{},"devDependencies":{"@babel/cli":"7.23.0","@babel/core":"7.23.2","@babel/plugin-proposal-class-properties":"7.18.6","@babel/plugin-proposal-object-rest-spread":"7.20.7","@babel/plugin-syntax-dynamic-import":"7.8.3","@babel/plugin-transform-runtime":"7.23.2","@babel/plugin-transform-typescript":"7.22.15","@babel/polyfill":"7.12.1","@babel/preset-env":"7.23.2","@babel/preset-react":"7.22.15","@babel/preset-typescript":"7.23.2","@types/ace":"0.0.52","@types/bootstrap":"^3.4.0","@types/enzyme":"3.10.18","@types/enzyme-adapter-react-16":"1.0.8","@types/events":"3.0.3","@types/jest":"25.2.3","@types/jquery":"3.5.32","@types/rc-slider":"8.6.5","@types/react":"16.14.21","@types/react-bootstrap":"0.32.37","@types/react-dom":"17.0.0","@types/react-event-listener":"0.4.15","@types/react-numeric-input":"2.2.7","@types/react-select":"3.0.26","@types/string-hash":"1.1.2","babel-loader":"8.2.3","bootstrap":"^3.4.1","core-js":"3.8.0","cross-env":"7.0.3","css-loader":"5.0.2","enzyme":"3.11.0","enzyme-adapter-react-16":"1.15.7","events":"3.2.0","file-loader":"6.2.0","fork-ts-checker-webpack-plugin":"4.1.6","happypack":"5.0.1","hard-source-webpack-plugin":"0.13.1","hashids":"2.2.2","hex-rgb":"4.2.0","html-webpack-plugin":"4.5.2","husky":"4.3.8","identity-obj-proxy":"3.0.0","jest":"26.6.3","jquery":"3.5.1","konva":"4.2.2","license-list-html":"1.0.6","lint-staged":"10.5.4","opener":"1.5.2","popper.js":"1.16.1","prettier":"2.2.1","rc-slider":"9.2.4","react":"16.14.0","react-ace":"8.1.0","react-bootstrap":"0.33.1","react-container-dimensions":"1.4.1","react-dom":"16.14.0","react-download-link":"2.3.0","react-konva":"16.9.0-1","react-numeric-input":"2.2.3","react-select":"3.1.1","react-test-renderer":"16.14.0","shx":"0.3.4","string-hash":"1.1.3","style-loader":"2.0.0","thread-loader":"3.0.4","ts-jest":"25.5.1","tslint":"6.1.3","tslint-config-prettier":"1.18.0","tslint-config-standard":"9.0.0","tslint-loader":"3.5.4","tslint-plugin-prettier":"2.3.0","typescript":"4.1.5","unicoen.ts":"0.5.0","url-loader":"4.1.1","vector2d":"3.0.0","webpack":"4.44.2","webpack-bundle-analyzer":"3.9.0","webpack-cli":"3.3.12","webpack-dev-server":"3.11.3","webpack-merge":"5.8.0","yarn-deduplicate":"2.1.1"}}')},function(e,t,n){"use strict";n.r(t);var r,i,o,a,s,l,c=n(0),u=n.n(c),d=n(17),h=n.n(d),f=n(21),p=n.n(f),g=n(171),m={insert:"head",singleton:!1},b=(p()(g.a,m),g.a.locals,n(289)),v=n.n(b),y=n(32),w=n.n(y),x=n(18),S=n.n(x),k=n(29),_=n.n(k),C=n(38),E=n.n(C),T=n(46),O=n.n(T),A={howToUse:"使い方",close:"閉じる",debugStart:"現在のプログラムで再ステップ実行",debugStop:"実行終了",debugBackAll:"実行中のプログラムを最初のステップに戻す",debugStepBack:"実行中のプログラムを1ステップ戻す",debugStep:"プログラムを1ステップ実行する",debugStepAll:"プログラムを最後まで実行する",changeThemedark:"ダークテーマに切り替える",changeThemelight:"ライトテーマに切り替える",zoomOut:"エディタのフォントサイズを小さくする",zoomIn:"エディタのフォントサイズを大きくする",zoomReset:"エディタのフォントサイズをリセットする",howToText:["下のエディタにプログラムを書き、上のボタンを押すことで可視化実行ができます。","(マウスカーソルを重ねるとで各ボタンの説明が表示されます。)"],uploadFile:"アップロードされたファイルはここに表示されます。",warning:"警告!",editInDebug:"実行中のソースコードが編集されました。\nプログラムの挙動には反映されませんが、\nコードのハイライトが等がずれる恐れがあります。",continueDebug:"続行",restart:"再実行",rememberCommand:"この選択を記憶する",sourceCodeCcpp:String.raw(r||(r=O()(['#include\nint recursiveToThree(int n){\n printf("%d th\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//変数定義\n\n n = recursiveToThree(0);//再帰関数呼出\n\n int arr[5] = {1, 2, 3};//配列変数\n\n int* ptr = &arr[2];//ポインタ変数\n *ptr = 5;\n\n //動的メモリ確保\n int* d_arry = malloc(sizeof(int) * 3);\n\n //二次元ポインタ配列の動的メモリ配列\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n free(pd_arr[0]);//メモリの解放\n\n printf("Hello,world!\n");//標準出力\n\n //ファイル出力\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //ファイル入力\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n\n return 0;\n}'],['#include\nint recursiveToThree(int n){\n printf("%d th\\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//変数定義\n\n n = recursiveToThree(0);//再帰関数呼出\n\n int arr[5] = {1, 2, 3};//配列変数\n\n int* ptr = &arr[2];//ポインタ変数\n *ptr = 5;\n\n //動的メモリ確保\n int* d_arry = malloc(sizeof(int) * 3);\n\n //二次元ポインタ配列の動的メモリ配列\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n free(pd_arr[0]);//メモリの解放\n\n printf("Hello,world!\\n");//標準出力\n\n //ファイル出力\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //ファイル入力\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n\n return 0;\n}']))),sourceCodeJava:String.raw(i||(i=O()(["import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int r = sc.nextInt();\n if (n == 0) {\n break;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = n - i;\n }\n for (int i = 0; i < r; i++) {\n int p = sc.nextInt();\n int c = sc.nextInt();\n p--;\n for (int j = 0; j < c; j++) {\n b[j] = a[p + j];\n }\n for (int j = 0; j < p; j++) {\n b[c + j] = a[j];\n }\n for (int j = 0; j < p + c; j++) {\n a[j] = b[j];\n }\n }\n System.out.println(a[0]);\n }\n }\n}"]))),sourceCodePython:String.raw(o||(o=O()(["while True:\n n, r = map(int, input().split())\n if n == 0:\n break\n a = [0] * n\n b = [0] * n\n for i in range(n):\n a[i] = b[i] = n - i\n for i in range(r):\n p, c = map(int, input().split())\n p = p - 1\n for j in range(c):\n b[j] = a[p + j]\n for j in range(p):\n b[c + j] = a[j]\n for j in range(p + c):\n a[j] = b[j]\n print(a[0])\n"])))},M={howToUse:"How to use",close:"Close",debugStart:"restart step execution",debugStop:"stop execution",debugBackAll:"go backward for all steps",debugStepBack:"step backward",debugStep:"step forward",debugStepAll:"execute all step",changeThemedark:"change to dark theme",changeThemelight:"change to light theme",zoomOut:"change the font size to smaller.",zoomIn:"change the font size to larger.",zoomReset:"reset the font size",howToText:["PVC.js has five GUI components:","(1) editor, (2) execution controller, buttons, (3) I/O window, (4) canvas for visualization, and (5) file upload form.","Users can write source code in the editor. Clicking on the execution control buttons initiates the step execution.","The I/O window shows the content of the standard output written by the program (e.g., printf) and accepts standard input (e.g., scanf).","Canvas shows the program's execution status using tables and figures.","PVC.js adaptively changes its layout to correspond with the size of the browser window."],uploadFile:"The uploaded file will be displayed here.",warning:"Warning!",editInDebug:"The source code being executed has been edited.\nProgram behavior is not affected by changing code. \nHowever, the highlight of the code may be out of place.",continueDebug:"Continue",restart:"Restart",rememberCommand:"Remember this choice",sourceCodeCcpp:String.raw(a||(a=O()(['#include\nint recursiveToThree(int n){\n printf("%d th\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//variable declaration\n\n n = recursiveToThree(0);//recursive function\n\n int arr[5] = {1, 2, 3};//array variable\n\n int* ptr = &arr[2];//pointer variable\n *ptr = 5;\n\n //dynamic memory allocation\n int* d_arry = malloc(sizeof(int) * 3);\n\n //two-dimensional dynamic array\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n printf("Hello,world!\n");//standard output\n\n free(pd_arr[0]);//memory leak\n\n //File Output\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //File Input\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n return 0;\n}'],['#include\nint recursiveToThree(int n){\n printf("%d th\\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//variable declaration\n\n n = recursiveToThree(0);//recursive function\n\n int arr[5] = {1, 2, 3};//array variable\n\n int* ptr = &arr[2];//pointer variable\n *ptr = 5;\n\n //dynamic memory allocation\n int* d_arry = malloc(sizeof(int) * 3);\n\n //two-dimensional dynamic array\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n printf("Hello,world!\\n");//standard output\n\n free(pd_arr[0]);//memory leak\n\n //File Output\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //File Input\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n return 0;\n}']))),sourceCodeJava:String.raw(s||(s=O()(["import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int r = sc.nextInt();\n if (n == 0) {\n break;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = n - i;\n }\n for (int i = 0; i < r; i++) {\n int p = sc.nextInt();\n int c = sc.nextInt();\n p--;\n for (int j = 0; j < c; j++) {\n b[j] = a[p + j];\n }\n for (int j = 0; j < p; j++) {\n b[c + j] = a[j];\n }\n for (int j = 0; j < p + c; j++) {\n a[j] = b[j];\n }\n }\n System.out.println(a[0]);\n }\n }\n}"]))),sourceCodePython:String.raw(l||(l=O()(["while True:\n n, r = map(int, input().split())\n if n == 0:\n break\n a = [0] * n\n b = [0] * n\n for i in range(n):\n a[i] = b[i] = n - i\n for i in range(r):\n p, c = map(int, input().split())\n p = p - 1\n for j in range(c):\n b[j] = a[p + j]\n for j in range(p):\n b[c + j] = a[j]\n for j in range(p + c):\n a[j] = b[j]\n print(a[0])\n"])))};var $=(e,t)=>"ja"===e?A[t]:M[t];class P extends c.Component{constructor(e){super(e),this.state={isShow:!1}}renderModalHeader(){return c.createElement(E.a.Header,{closeButton:!0},c.createElement(E.a.Title,null,$(this.props.lang,"howToUse")))}renderModalBody(){const e=$(this.props.lang,"howToText");return c.createElement(E.a.Body,null,e.map((e,t)=>c.createElement("p",{key:t},e.trim())))}renderModalFooter(){return c.createElement(E.a.Footer,null,c.createElement(_.a,{onClick:this.props.handleHideModal},$(this.props.lang,"close")))}render(){return c.createElement("div",null,c.createElement(E.a,{className:"modal-container",show:!0,"aria-labelledby":"ModalHeader",onHide:this.props.handleHideModal,animation:!0,tabIndex:-1,role:"dialog"},this.renderModalHeader(),this.renderModalBody(),this.renderModalFooter()))}}class R extends c.Component{constructor(e){super(e),this.handleHideModal=this.handleHideModal.bind(this),this.handleShowModal=this.handleShowModal.bind(this),this.state={showModal:!1}}handleHideModal(){this.setState({showModal:!1})}handleShowModal(){this.setState({showModal:!0})}render(){return c.createElement("a",{href:"#popup1",className:"popup_btn"},c.createElement(_.a,{className:"btn btn-default btn-block",onClick:this.handleShowModal},$(this.props.lang,"howToUse")),this.state.showModal?c.createElement(P,{handleHideModal:this.handleHideModal,lang:this.props.lang}):null)}}var L=n(2),N=n.n(L);n(410),n(412),n(413),n(417);function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0f)&&(j=(H=H.replace(" ",":")).length),0=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var oe=/[A-Z]|^ms/g,ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,se=function(e){return 45===e.charCodeAt(1)},le=function(e){return null!=e&&"boolean"!=typeof e},ce=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return se(e)?e:e.replace(oe,"-$&").toLowerCase()})),ue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ae,(function(e,t,n){return he={name:t,styles:n,next:he},t}))}return 1===ie[e]||se(e)||"number"!=typeof t||0===t?t:t+"px"};function de(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return he={name:n.name,styles:n.styles,next:he},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)he={name:i.name,styles:i.styles,next:he},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Me=n(3);function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1}function Ue(e){return He(e)?window.pageYOffset:e.scrollTop}function We(e,t){He(e)?window.scrollTo(0,t):e.scrollTop=t}function Ve(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:De,i=Ue(e),o=t-i,a=10,s=0;function l(){var t=Ve(s+=a,i,o,n);We(e,t),s=f)return{placement:"bottom",maxHeight:t};if(k>=f&&!a)return o&&Ge(l,_,160),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&x>=r)return o&&Ge(l,_,160),{placement:"bottom",maxHeight:a?x-v:k-v};if("auto"===i||a){var E=t,T=a?w:S;return T>=r&&(E=Math.min(T-v-s.controlHeight,t)),{placement:"top",maxHeight:E}}if("bottom"===i)return We(l,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=f)return{placement:"top",maxHeight:t};if(S>=f&&!a)return o&&Ge(l,C,160),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var O=t;return(!a&&S>=r||a&&w>=r)&&(O=a?w-y:S-y),o&&Ge(l,C,160),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var Ze=function(e){return"auto"===e?"bottom":e},Je=Object(c.createContext)({getPortalPlacement:null}),et=function(e){z(n,e);var t=Xe(n);function n(){var e;F(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0,p=u-d-c,g=!1;p>n&&e.isBottom&&(o&&o(t),e.isBottom=!1),f&&e.isTop&&(s&&s(t),e.isTop=!1),f&&n>p?(i&&!e.isBottom&&i(t),h.scrollTop=u,g=!0,e.isBottom=!0):!f&&-n>c&&(a&&!e.isTop&&a(t),h.scrollTop=0,g=!0,e.isTop=!0),g&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return D(n,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)}},{key:"render",value:function(){return u.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),n}(c.Component);function fn(e){var t=e.isEnabled,n=void 0===t||t,r=Ae(e,["isEnabled"]);return n?u.a.createElement(hn,r):r.children}var pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,i=t.label,o=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(i||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},gn=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},mn=function(e){return!!e.isDisabled};var bn={clearIndicator:vt,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:bt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:rt,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return Ne(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ne(t,"backgroundColor",a.neutral0),Ne(t,"borderRadius",i),Ne(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ne(t,"marginBottom",o.menuGutter),Ne(t,"marginTop",o.menuGutter),Ne(t,"position","absolute"),Ne(t,"width","100%"),Ne(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var vn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:mn,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},_n=1,Cn=function(e){z(n,e);var t=xn(n);function n(e){var r;F(this,n),(r=t.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},r.blockOptionHover=!1,r.isComposing=!1,r.clearFocusValueOnUpdate=!1,r.commonProps=void 0,r.components=void 0,r.hasGroups=!1,r.initialTouchX=0,r.initialTouchY=0,r.inputIsHiddenAfterUpdate=void 0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.cacheComponents=function(e){var t;r.components=(t={components:e},Lt(Lt({},Nt),t.components))},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;i(e,wn(wn({},t),{},{name:o}))},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,a=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.inputIsHiddenAfterUpdate=!a,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=r.state.selectValue;if(i)if(r.isOptionSelected(e,o)){var a=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==a})),"deselect-option",e),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(e)}})}else r.isOptionDisabled(e,o)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue([].concat(Le(o),[e]),"select-option",e),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));else r.isOptionDisabled(e,o)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue(e,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));n&&r.blurInput()},r.removeValue=function(e){var t=r.state.selectValue,n=r.getOptionValue(e),i=t.filter((function(e){return r.getOptionValue(e)!==n}));r.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),r.announceAriaLiveSelection({event:"remove-value",context:{value:e?r.getOptionLabel(e):""}}),r.focusInput()},r.clearValue=function(){var e=r.props.isMulti;r.onChange(e?[]:null,{action:"clear"})},r.popValue=function(){var e=r.state.selectValue,t=e[e.length-1],n=e.slice(0,e.length-1);r.announceAriaLiveSelection({event:"pop-value",context:{value:t?r.getOptionLabel(t):""}}),r.onChange(n.length?n:null,{action:"pop-value",removedValue:t})},r.getOptionLabel=function(e){return r.props.getOptionLabel(e)},r.getOptionValue=function(e){return r.props.getOptionValue(e)},r.getStyles=function(e,t){var n=bn[e](t);n.boxSizing="border-box";var i=r.props.styles[e];return i?i(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getActiveDescendentId=function(){var e=r.props.menuIsOpen,t=r.state,n=t.menuOptions,i=t.focusedOption;if(i&&e){var o=n.focusable.indexOf(i),a=n.render[o];return a&&a.key}},r.announceAriaLiveSelection=function(e){var t=e.event,n=e.context;r.setState({ariaLiveSelection:gn(t,n)})},r.announceAriaLiveContext=function(e){var t=e.event,n=e.context;r.setState({ariaLiveContext:pn(t,wn(wn({},n),{},{label:r.props["aria-label"]}))})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&He(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){var t=r.props,n=t.isSearchable,i=t.isMulti;r.props.onFocus&&r.props.onFocus(e),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:i}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){var e=r.props,t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,g=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)r.removeValue(g);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,m))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&o&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.buildMenuOptions=function(e,t){var n=e.inputValue,i=void 0===n?"":n,o=e.options,a=function(e,n){var o=r.isOptionDisabled(e,t),a=r.isOptionSelected(e,t),s=r.getOptionLabel(e),l=r.getOptionValue(e);if(!(r.shouldHideSelectedOptions()&&a||!r.filterOption({label:s,value:l,data:e},i))){var c=o?void 0:function(){return r.onOptionHover(e)},u=o?void 0:function(){return r.selectOption(e)},d="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:d,label:s,type:"option",value:l}}};return o.reduce((function(e,t,n){if(t.options){r.hasGroups||(r.hasGroups=!0);var i=t.options.map((function(t,r){var i=a(t,"".concat(n,"-").concat(r));return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o="".concat(r.getElementId("group"),"-").concat(n);e.render.push({type:"group",key:o,data:t,options:i})}}else{var s=a(t,"".concat(n));s&&(e.render.push(s),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var i=e.value;r.cacheComponents=G(r.cacheComponents,ut).bind(H(r)),r.cacheComponents(e.components),r.instancePrefix="react-select-"+(r.props.instanceId||++_n);var o=Be(i);r.buildMenuOptions=G(r.buildMenuOptions,(function(e,t){var n=Re(e,2),r=n[0],i=n[1],o=Re(t,2),a=o[0];return ut(i,o[1])&&ut(r.inputValue,a.inputValue)&&ut(r.options,a.options)})).bind(H(r));var a=e.menuIsOpen?r.buildMenuOptions(e,o):{render:[],focusable:[]};return r.state.menuOptions=a,r.state.selectValue=o,r}return D(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var a=Be(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},l=this.getNextFocusedValue(a),c=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:c,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,i,o,a=this.props,s=a.isDisabled,l=a.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?We(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o-1&&(s=l)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[s]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,c=-1;if(o.length){switch(e){case"previous":c=0===s?0:-1===s?l:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,i=n.menuOptions,o=i.focusable;if(o.length){var a=0,s=o.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=s>0?s-1:o.length-1:"down"===e?a=(s+1)%o.length:"pageup"===e?(a=s-t)<0&&(a=0):"pagedown"===e?(a=s+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:mn(o[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(vn):wn(wn({},vn),this.props.theme):vn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,a=i.isMulti,s=i.isRtl,l=i.options,c=this.state.selectValue,u=this.hasValue();return{cx:ze.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:a,isRtl:s,options:l,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,s=o.menuIsOpen,l=o.inputValue,c=o.screenReaderStatus,u=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=i&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"",h=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(d," ").concat(h," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,a=e.form,s=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return u.a.createElement(qt,Object(Me.a)({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:De,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:a,value:""},d));var h=this.commonProps,f=h.cx,p=h.theme,g=h.selectProps;return u.a.createElement(s,Object(Me.a)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:g,spellCheck:"false",tabIndex:o,form:a,theme:p,type:"text",value:i},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,d=c.controlShouldRenderValue,h=c.isDisabled,f=c.isMulti,p=c.inputValue,g=c.placeholder,m=this.state,b=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!d)return p?null:u.a.createElement(s,Object(Me.a)({},l,{key:"placeholder",isDisabled:h,isFocused:y}),g);if(f)return b.map((function(t,a){var s=t===v;return u.a.createElement(n,Object(Me.a)({},l,{components:{Container:r,Label:i,Remove:o},isFocused:s,isDisabled:h,key:e.getOptionValue(t),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var w=b[0];return u.a.createElement(a,Object(Me.a)({},l,{data:w,isDisabled:h}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return u.a.createElement(e,Object(Me.a)({},t,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!e||!i)return null;return u.a.createElement(e,Object(Me.a)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return u.a.createElement(n,Object(Me.a)({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return u.a.createElement(e,Object(Me.a)({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,d=this.commonProps,h=this.state,f=h.focusedOption,p=h.menuOptions,g=this.props,m=g.captureMenuScroll,b=g.inputValue,v=g.isLoading,y=g.loadingMessage,w=g.minMenuHeight,x=g.maxMenuHeight,S=g.menuIsOpen,k=g.menuPlacement,_=g.menuPosition,C=g.menuPortalTarget,E=g.menuShouldBlockScroll,T=g.menuShouldScrollIntoView,O=g.noOptionsMessage,A=g.onMenuScrollToTop,M=g.onMenuScrollToBottom;if(!S)return null;var $,P=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,u.a.createElement(c,Object(Me.a)({},d,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())$=p.render.map((function(t){if("group"===t.type){t.type;var i=Ae(t,["type"]),o="".concat(t.key,"-heading");return u.a.createElement(n,Object(Me.a)({},d,i,{Heading:r,headingProps:{id:o},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e)})))}if("option"===t.type)return P(t)}));else if(v){var R=y({inputValue:b});if(null===R)return null;$=u.a.createElement(s,d,R)}else{var L=O({inputValue:b});if(null===L)return null;$=u.a.createElement(l,d,L)}var N={minMenuHeight:w,maxMenuHeight:x,menuPlacement:k,menuPosition:_,menuShouldScrollIntoView:T},F=u.a.createElement(et,Object(Me.a)({},d,N),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return u.a.createElement(i,Object(Me.a)({},d,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),u.a.createElement(fn,{isEnabled:m,onTopArrive:A,onBottomArrive:M},u.a.createElement(un,{isEnabled:E},u.a.createElement(o,Object(Me.a)({},d,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:s}),$))))}));return C||"fixed"===_?u.a.createElement(a,Object(Me.a)({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:_}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return u.a.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return u.a.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):u.a.createElement("input",{name:o,type:"hidden"});return u.a.createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return u.a.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?u.a.createElement(Kt,{"aria-live":"polite"},u.a.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),u.a.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,s=o.id,l=o.isDisabled,c=o.menuIsOpen,d=this.state.isFocused,h=this.commonProps=this.getCommonProps();return u.a.createElement(r,Object(Me.a)({},h,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:d}),this.renderLiveRegion(),u.a.createElement(t,Object(Me.a)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:d,menuIsOpen:c}),u.a.createElement(i,Object(Me.a)({},h,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),u.a.createElement(n,Object(Me.a)({},h,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),n}(c.Component);function En(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return U(this,n)}}Cn.defaultProps=kn;var Tn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return U(this,n)}}c.Component;var An,Mn,$n,Pn=(An=Cn,$n=Mn=function(e){z(n,e);var t=En(n);function n(){var e;F(this,n);for(var r=arguments.length,i=new Array(r),o=0;o1?n-1:0),i=1;i{if(this.setState({selectedOption:e}),e&&"value"in e){const t=e.value;Object(Rn.a)(this.props.signal,t)}}),this.state={selectedOption:this.props.options[0]}}render(){return c.createElement(Pn,{value:this.state.selectedOption,onChange:this.handleChange,options:this.props.options,isDisabled:this.props.isDisabled})}}class Nn extends c.Component{constructor(e){super(e),this.state={isDebugging:!1},Object(Rn.b)("debug",e=>{"Stop"===e?this.setState({isDebugging:!1}):"Start"!==e&&"Exec"!==e||this.setState({isDebugging:!0})})}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(Ln,{signal:"changeLang",options:[{value:"ja",label:"日本語"},{value:"en",label:"English"}]})),c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(Ln,{signal:"changeProgLang",options:[{value:"c_cpp",label:"C"},{value:"java",label:"Java(WIP)"},{value:"python",label:"Python(WIP)"}],isDisabled:this.state.isDebugging})),c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(R,{lang:this.props.lang})))}}var Fn=n(274),In=n.n(Fn),Dn=n(174),jn=n.n(Dn),zn=n(76),Bn=n.n(zn);class Hn extends c.Component{constructor(e){super(e)}render(){return c.createElement(_.a,{title:$(this.props.lang,"".concat(this.props.signal).concat(this.props.command)),onClick:()=>{void 0!==this.props.onClick&&this.props.onClick(),Object(Rn.a)(this.props.signal,this.props.command)},className:"btn-outline-dark",disabled:!this.props.enable},c.createElement(Bn.a,{glyph:this.props.icon,className:this.props.iconClass}))}}var Un=n(173),Wn={insert:"head",singleton:!1};p()(Un.a,Wn),Un.a.locals;class Vn extends c.Component{constructor(e){super(e),this.state={Start:!1,Stop:!1,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0}}componentWillReceiveProps(e){switch(e.debugState){case"Stop":this.setState({Start:!1,Stop:!1,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"First":this.setState({Start:!0,Stop:!0,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"stdin":this.setState({BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"Debugging":this.setState({BackAll:!0,StepBack:!0,Step:!0,StepAll:!0});break;case"Executing":this.setState({BackAll:!1,StepBack:!1,Step:!1,StepAll:!1});break;case"EOF":this.setState({Start:!0,Stop:!0,BackAll:!0,StepBack:!0,Step:!1,StepAll:!1})}}render(){const e=this.props.lang;return c.createElement(In.a,{style:{marginTop:"1vh",marginBottom:"1vh"}},c.createElement(jn.a,null,c.createElement(Hn,{lang:e,signal:"debug",command:"Start",icon:"repeat",enable:this.state.Start,iconClass:this.state.Start?"icon-green":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"Stop",icon:"stop",enable:this.state.Stop,iconClass:this.state.Stop?"icon-red":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"BackAll",icon:"backward",enable:this.state.BackAll,iconClass:this.state.BackAll?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"StepBack",icon:"arrow-left",enable:this.state.StepBack,iconClass:this.state.StepBack?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:this.state.Stop?"Step":"Start",icon:"arrow-right",enable:this.state.Step,iconClass:this.state.Step?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:this.state.Stop?"StepAll":"Exec",icon:"forward",enable:this.state.StepAll,iconClass:this.state.StepAll?"icon-blue":void 0})),c.createElement(jn.a,null,c.createElement(Hn,{lang:e,signal:"zoom",command:"Out",icon:"zoom-out",enable:!0}),c.createElement(Hn,{lang:e,signal:"zoom",command:"Reset",icon:"search",enable:!0}),c.createElement(Hn,{lang:e,signal:"zoom",command:"In",icon:"zoom-in",enable:!0})))}}class Gn extends c.Component{constructor(e){super(e),this.state={debugStatus:"",debugState:"Stop"},Object(Rn.b)("changeState",(e,t)=>{let n="";n="Debugging"===e?"Step ".concat(t):e,this.setState({debugStatus:n,debugState:e})})}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:12,md:12,sm:12,xs:12,style:{zIndex:1e3}},c.createElement(Nn,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Vn,{lang:this.props.lang,debugState:this.state.debugState})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},"DebugStatus: ",this.state.debugStatus))}}n(230),n(61);var Kn=n(276),qn=n.n(Kn),Yn=n(277),Xn=n.n(Yn),Qn=n(117),Zn=n.n(Qn),Jn=(n(436),n(437),n(438),n(439),n(440),n(441),n(236),n(237),n(442),n(175)),er={insert:"head",singleton:!1},tr=(p()(Jn.a,er),Jn.a.locals,n(77));class nr extends c.Component{constructor(e){super(e),N()(this,"sentSourcecode",void 0),N()(this,"preventedCommand","Stop"),N()(this,"sourcecode",void 0),N()(this,"ace",null),N()(this,"editorRef",c.createRef()),N()(this,"lineNumOfBreakpoint",[]),N()(this,"isDebugging",!1),N()(this,"checkbox",null),N()(this,"noAlert",!1),N()(this,"highlightIds",[]),N()(this,"sourceCodeKey",e=>"sourceCode"+e.replace(/_/g,"").replace(/^[a-z]/g,e=>e.toUpperCase())),this.state={fontSize:14,showAlert:!1,theme:"light"};const{lang:t,progLang:n}=e;this.sourcecode=$(t,this.sourceCodeKey(n)),this.sentSourcecode="",this.hideAlert=this.hideAlert.bind(this),Object(Rn.b)("debug",(e,t)=>{this.send(e,t)}),Object(Rn.b)("EOF",e=>{this.recieve(e)}),Object(Rn.b)("stdin",e=>{this.recieve(e)}),Object(Rn.b)("Breakpoint",e=>{this.recieve(e)}),Object(Rn.b)("zoom",e=>{"In"===e?this.setState({fontSize:this.state.fontSize+1}):"Out"===e?this.setState({fontSize:Math.max(this.state.fontSize-1,10)}):"Reset"===e&&this.setState({fontSize:14})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})})}componentDidMount(){const e=this.editorRef.current.editor;e.on("keydown",e=>{console.log(e)}),e.on("guttermousedown",t=>{const n=t.domEvent.currentTarget;if(void 0!==n.className&&-1===n.className.indexOf("ace_gutter"))return;if(!e.isFocused())return;if(t.clientX>25+n.getBoundingClientRect().left)return;const r=t.getDocumentPosition().row,i=t.editor.getSession();this.lineNumOfBreakpoint.includes(r)?(i.clearBreakpoint(r),this.lineNumOfBreakpoint=this.lineNumOfBreakpoint.filter(e=>e!==r)):(i.setBreakpoint(r,"ace_breakpoint"),this.lineNumOfBreakpoint.push(r)),t.stop()})}componentWillReceiveProps(e){const{lang:t,progLang:n}=this.props,r=e.lang,i=e.progLang;r!==t?this.sourcecode===$(t,this.sourceCodeKey(n))&&(this.sourcecode=$(r,this.sourceCodeKey(i))):i!==n&&(this.sourcecode=$(r,this.sourceCodeKey(i)))}send(e,t){const n=this.sourcecode,r={sourcecode:n,controlEvent:e,stdinText:t,lineNumOfBreakpoint:this.lineNumOfBreakpoint,progLang:this.props.progLang};"SyntaxCheck"===e?tr.a.send(r).then(e=>{const{errors:t}=e;this.setSyntaxError(t)}).catch(e=>{console.log(e),alert(e)}):this.noAlert||!this.isDebugging||"BackAll"!==e&&"StepBack"!==e&&"Step"!==e&&"StepAll"!==e||n===this.sentSourcecode?(this.setState({showAlert:!1}),tr.a.send(r).then(e=>{this.recieve(e)}).catch(e=>{console.log(e),alert(e)})):(this.preventedCommand=e,this.setState({showAlert:!0}))}recieve(e){try{const{debugState:t,execState:n,output:r,step:i,sourcecode:o,files:a}=e;if(this.isDebugging="Stop"!==t,this.sentSourcecode=o,"Executing"===t)return;Object(Rn.a)("changeState",t,i),Object(Rn.a)("changeOutput",r),Object(Rn.a)("draw",n),Object(Rn.a)("files",a),this.setHighlightOnCode(t,n)}catch(e){console.log(e),alert(e)}}setHighlightOnCode(e,t){if("Stop"===e)return;if(void 0===t)return;let n=t.getNextExpr().codeRange;const r=this.ace.acequire("ace/range").Range,i=this.editorRef.current.editor;if(n){const t=new r(n.begin.y-1,n.begin.x,n.end.y-1,n.end.x+1);i.resize(!0),i.scrollToLine(n.begin.y,!0,!0,()=>{}),"EOF"===e?i.getSelection().setSelectionRange(new r(-1,0,-1,1)):i.getSelection().setSelectionRange(t)}}setSyntaxError(e){const t=this.editorRef.current.editor,n=e.map(e=>({row:e.line-1,column:e.charPositionInLine-1,text:e.getMsg(),type:"error"})),r=t.getSession();r.setAnnotations(n);for(const e of this.highlightIds)r.removeMarker(e);this.highlightIds=[];for(const e of n){const t=r.highlightLines(e.row,e.row,"error_line");this.highlightIds.push(t.id)}}render(){return c.createElement(c.Fragment,null,this.state.showAlert?this.renderAlert():null," ",this.renderEditor())}renderEditor(){const e=this.props.progLang,{fontSize:t,theme:n}=this.state;return c.createElement(Zn.a,{ref:this.editorRef,mode:e,theme:"light"===n?"textmate":"monokai",value:this.sourcecode,name:"sourcecode",fontSize:t,tabSize:2,editorProps:{$blockScrolling:1/0},setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,readOnly:!1},style:{height:"62vh",width:"auto"},className:"editorMain",onChange:e=>{this.sourcecode=e;const t=e=>{e===this.sourcecode&&Object(Rn.a)("debug","SyntaxCheck")};setTimeout(()=>t(e),1e3)},onBeforeLoad:e=>this.ace=e})}hideAlert(){this.setState({showAlert:!1})}renderAlert(){const{lang:e}=this.props,t=$(e,"warning"),n=$(e,"editInDebug"),r=$(e,"continueDebug"),i=$(e,"restart"),o=$(e,"rememberCommand");return c.createElement(E.a.Dialog,{className:"modal-container","aria-labelledby":"ModalHeader",tabIndex:-1,role:"dialog"},c.createElement(E.a.Header,{closeButton:!0},c.createElement(E.a.Title,null,t)),c.createElement(qn.a,{bsStyle:"danger"},c.createElement("p",null,n)),c.createElement(E.a.Footer,null,c.createElement(_.a,{bsStyle:"danger",onClick:()=>{this.isDebugging=!1,null!==this.checkbox&&(this.noAlert=this.checkbox.checked),Object(Rn.a)("debug",this.preventedCommand)}},r),c.createElement(_.a,{onClick:()=>{this.isDebugging=!1,null!==this.checkbox&&(this.noAlert=this.checkbox.checked),Object(Rn.a)("debug","Start")}},i),c.createElement(Xn.a,{validationState:"warning",inputRef:e=>this.checkbox=e},o)))}}n(443);var rr=n(176),ir={insert:"head",singleton:!1};p()(rr.a,ir),rr.a.locals;class or extends c.Component{constructor(e){super(e),this.state={output:"",theme:"light",isReadOnly:!0},this.onChange=this.onChange.bind(this),Object(Rn.b)("changeOutput",e=>{this.setState({output:e})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})}),Object(Rn.b)("changeState",async e=>{"stdin"===e&&this.setState({isReadOnly:!1})})}onChange(e){if(e.endsWith("\n")){const t=e.slice(0,-1).replace(this.state.output,"");this.setState({output:e,isReadOnly:!0}),Object(Rn.a)("debug","Step",t)}}render(){const{theme:e}=this.state;return c.createElement(Zn.a,{mode:"text",theme:"light"===e?"textmate":"monokai",value:this.state.output,onChange:this.onChange,name:"IO",fontSize:14,editorProps:{$blockScrolling:!0},setOptions:{enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,showLineNumbers:!1,readOnly:this.state.isReadOnly,showGutter:!1},style:{height:"18vh",width:"auto"},className:"console"})}}var ar=n(279),sr=n.n(ar),lr=n(281),cr=n.n(lr),ur=n(280),dr=n.n(ur),hr=n(93),fr=n.n(hr),pr=n(94),gr=n.n(pr),mr=n(177),br={insert:"head",singleton:!1},vr=(p()(mr.a,br),mr.a.locals,n(278)),yr=n.n(vr);class wr extends c.Component{constructor(e){super(e),this.deleteFile=this.deleteFile.bind(this)}deleteFile(){this.props.onFileDelete(this.props.filename)}render(){const{filename:e,arrayBuffer:t}=this.props;return c.createElement(fr.a,null,c.createElement(yr.a,{filename:e,label:c.createElement(_.a,{title:"download"},c.createElement(Bn.a,{glyph:"save"})),style:{marginLeft:10,marginRight:10},exportFile:()=>new Blob([t],{type:"application/octet-binary"})}),c.createElement(_.a,{title:"remove",onClick:this.deleteFile,style:{marginRight:"10px"}},c.createElement(Bn.a,{glyph:"trash"})),e)}}class xr extends c.Component{constructor(e){super(e),this.state={filelist:null},this.onFileSelected=this.onFileSelected.bind(this),this.onFileDelete=this.onFileDelete.bind(this),Object(Rn.b)("files",e=>{this.setState({filelist:e})})}async onFileSelected(e){const t=e.currentTarget,n=t.files;if(null!==n)try{const e=await tr.a.upload(n);this.setState({filelist:e}),t.value=""}catch(e){console.warn(e.message),alert("Failed to upload files")}}onFileDelete(e){const t=tr.a.delete(e);this.setState({filelist:t})}makeFileList(){const e=$(this.props.lang,"uploadFile"),t=[];if(t.push(c.createElement(fr.a,{key:"text"},e)),null!==this.state.filelist)for(const[e,n]of this.state.filelist)t.push(c.createElement(wr,{key:e,filename:e,arrayBuffer:n,onFileDelete:this.onFileDelete}));return t.push(c.createElement(fr.a,{key:"submit"},c.createElement(sr.a,null,c.createElement(dr.a,{type:"file",id:"files",name:"files[]",multiple:!0,onChange:this.onFileSelected})))),t}render(){const e=this.makeFileList();return c.createElement(cr.a,{id:"file-form",accordion:!1,className:"file-form"},c.createElement(gr.a,{eventKey:"1"},c.createElement(gr.a.Heading,null,c.createElement(gr.a.Title,{toggle:!0},"File Upload")),c.createElement(gr.a.Collapse,null,e)))}}class Sr extends c.Component{constructor(e){super(e)}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Gn,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(nr,{lang:this.props.lang,progLang:this.props.progLang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(or,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(xr,{lang:this.props.lang})))}}var kr=n(30),_r=n(67),Cr=n(282),Er=n.n(Cr),Tr=n(178),Or=n.n(Tr);const Ar=new Er.a("",6,"1234567890abcdef");class Mr{constructor(e,t){this.fromKey=e,this.toKey=t,N()(this,"color",void 0),N()(this,"isDrawn",!1);const n=Or()(e),r=Or()(t),i=Ar.encode(n,r);this.color="#".concat(i.substr(0,6))}}class $r{constructor(e,t,n){this.color=n,N()(this,"key",void 0),N()(this,"from",void 0),N()(this,"to",void 0),N()(this,"mid",void 0),N()(this,"clone",e=>new _r.Vector(e.x,e.y));const r=Ir.HEIGHT/2;this.from=this.clone(e).add(new _r.Vector(-5,r)),this.to=this.clone(t).add(new _r.Vector(5,r)),this.mid=this.calcMidPos(this.clone(e),this.clone(t)),this.key=[this.from,this.to,this.mid].toString()}calcMidPos(e,t){const n=e.ye}updateStack(){if(null===this.execState)return;const e=this.execState.getStacks();for(const t of e){const e=new Lr(t,this.getTypedef);e.isEmpty()||this.canvasStacks.push(e)}}updateConnection(){Pr.makeConnection(),this.calcPos(),this.canvasArrows=Pr.makeCanvasArrows()}updatePos(){Pr.resetPosList(),this.updateConnection()}getCanvasStacks(){return this.canvasStacks}getCanvasArrows(){return this.canvasArrows}calcPos(){let e=0,t=0;for(const n of this.canvasStacks){const r=n.height(),i=50+10*e,o=50+t;this.calcStackPos(i,o,n),t+=r+10,++e}}calcStackPos(e,t,n){n.setPos(e,t);const r=Ir.HEIGHT;t+=r;let i=0;const o=n.getCanvasTable();for(const n of o){if(!n[0].isVisible)continue;const o=r*i;this.calcVariablePos(e,t+o,n),++i}}calcVariablePos(e,t,n){let r=0;for(const i of n){const{width:n,key:o}=i;i.setPos(e+r,t),i.clearColor(),i.isVisible&&(r+=n,Pr.addPos(o,i))}}}class Lr{constructor(e,t){this.stack=e,this.getTypedef=t,N()(this,"key",void 0),N()(this,"numOfCol",0),N()(this,"pos",new _r.Vector(-1,-1)),N()(this,"canvasTable",void 0),this.canvasTable=this.makeCanvasTable(),2<=this.canvasTable.length&&(this.pushbackEmptyCell(this.canvasTable),this.alignToMaximumWidth(this.canvasTable)),1<=this.canvasTable.length&&this.rescaleWidthForLongFuncName(),this.key=e.name}setPos(e,t){this.pos.setAxes(e,t)}x(){return this.pos.getX()}y(){return this.pos.getY()}isEmpty(){return this.canvasTable.length<=0}getCanvasTable(){return this.canvasTable}name(){return this.stack.name}height(){if(this.canvasTable.length<=0)return 0;return(this.canvasTable.reduce((e,t)=>e+(t[0].isVisible?1:0),0)+1)*Ir.HEIGHT}width(){if(this.canvasTable.length<=0)return 0;return this.canvasTable[0].reduce((e,t)=>e+t.width,0)}makeCanvasTable(){const e=[],t=this.stack.getVariables(),n=this.stack.name;for(const r of t){const t=r.getValue(),i=(Array.isArray(t)?new Fr(r,n,this.getTypedef):new Nr(r,n,this.getTypedef)).getCanvasTable();e.push(...i)}return e}pushbackEmptyCell(e){this.numOfCol=Math.max(...e.map(e=>e.length));for(const t of e){const e=new Array(this.numOfCol-t.length);for(let t=0;t[new Ir("","".concat(this.key,"-empty-").concat(t))].concat(e));e.push(...t)}return this.addToFoldCell(e),[this.canvasCells].concat(e)}addToFoldCell(e){const t=new Ir("▼","");this.canvasCells.push(t),t.setChildren(e)}}class Ir{constructor(e,t){this.text=e,N()(this,"width",void 0),N()(this,"key",void 0),N()(this,"isVisible",!0),N()(this,"pos",new _r.Vector(-1,-1)),N()(this,"colors",[]),N()(this,"children",null);const n=e.length%2==0?1.5:1;this.width=(e.length+2*n)*(Ir.FONT_SIZE/2),this.key="".concat(t,"-").concat(e)}setPos(e,t){this.pos.setAxes(e,t)}getPos(){return this.pos}x(){return this.pos.getX()}y(){return this.pos.getY()}clearColor(){this.colors=[]}setColor(e){this.colors.push(e)}hasColor(){return 0{const t=jr()(e);return"rgba(".concat(t.red,", ").concat(t.green,", ").concat(t.blue,", ").concat(t.alpha,")")};class Br extends u.a.Component{constructor(e){super(e)}render(){if(!this.props.isVisible)return null;const{x:e,y:t,text:n,width:r,align:i,fontStyle:o,onClick:a,colors:s}=this.props,l=Ir.HEIGHT,c=i&&"center"===i,d=[];if(Array.isArray(s)&&0e+"44"))d.push(e,zr(n)),e+=1/(t.length-1)}else d.push(0,"rgba(0,0,0,0)",1,"rgba(0,0,0,0)");return u.a.createElement(u.a.Fragment,null,u.a.createElement(kr.Rect,{x:e,y:t,width:r,height:l,stroke:"black",fillLinearGradientStartPoint:{x:0,y:0},fillLinearGradientEndPoint:{x:r,y:0},fillLinearGradientColorStops:d}),u.a.createElement(kr.Text,{x:e,y:t,fontFamily:"Consolas, 'Courier New', monospace",fontStyle:o||"normal",align:i||"left",verticalAlign:"middle",offsetX:c?0:-Ir.FONT_SIZE/2,width:r,height:l,text:n,fontSize:Ir.FONT_SIZE,onClick:a||void 0}))}}class Hr extends u.a.Component{constructor(e){super(e)}render(){const e=this.props.canvasRow.map(e=>{const{width:t,isVisible:n,key:r}=e,i=e.x(),o=e.y(),a=e.getText(),s=e.canToggleFold();return u.a.createElement(Br,{key:r,x:i,y:o,text:a,width:t,align:s?"center":void 0,onClick:s?()=>e.toggleFold():void 0,isVisible:n,colors:e.getColors()})});return u.a.createElement(kr.Group,null,e)}}class Ur extends c.Component{constructor(e){super(e)}renderHeader(){const{canvasStack:e}=this.props,t=e.x(),n=e.y();return c.createElement(Br,{x:t,y:n,text:e.name(),width:e.width(),fontStyle:"bold",align:"center",isVisible:!0})}renderBody(){const e=[],t=this.props.canvasStack.getCanvasTable();for(const n of t){if(!n[0].isVisible)continue;const t=n.reduce((e,t)=>e.concat(t.key),"");e.push(c.createElement(Hr,{key:t,canvasRow:n}))}return e}render(){const e=this.renderHeader(),t=this.renderBody();return c.createElement(kr.Group,null,e,t)}}class Wr extends c.Component{constructor(e){super(e),this.state={canvasStacks:[],canvasArrows:[]},Object(Rn.b)("redraw",()=>{this.updatePos()})}makeStacks(e){return e.map(e=>c.createElement(Ur,{key:e.key,canvasStack:e}))}makeArrows(e){return e.map(e=>{const{from:t,mid:n,to:r,key:i,color:o}=e,a=zr(o);return c.createElement(kr.Arrow,{key:i,points:[t.x,t.y,n.x,n.y,r.x,r.y],tension:.25,stroke:a,fill:a,pointerLength:10,pointerWidth:10,opacity:1})})}updatePos(){this.props.canvasDrawer.updatePos(),this.forceUpdate()}render(){const e=this.props.canvasDrawer.getCanvasStacks(),t=this.props.canvasDrawer.getCanvasArrows(),n=this.makeStacks(e),r=this.makeArrows(t);return c.createElement(c.Fragment,null,c.createElement(kr.Layer,null,n),c.createElement(kr.Layer,null,r))}}var Vr=n(179),Gr={insert:"head",singleton:!1};p()(Vr.a,Gr),Vr.a.locals;class Kr extends c.Component{constructor(e){super(e),this.state={execState:void 0},Object(Rn.b)("draw",e=>this.setState({execState:e}))}render(){return c.createElement("div",{id:"display"},c.createElement(kr.Stage,{width:.95*this.props.width,height:.95*this.props.height,scale:{x:this.props.scale,y:this.props.scale}},c.createElement(Wr,{canvasDrawer:new Rr(this.state.execState)})))}}var qr=n(284),Yr=n.n(qr),Xr=n(285);class Qr extends c.Component{constructor(e){super(e),this.state={value:1}}render(){return c.createElement(c.Fragment,null,"Scale:",c.createElement(Xr,{precision:1,value:this.props.value,min:this.props.min,max:this.props.max,step:.1,onChange:e=>null!==e?this.props.onScaleChange(e):null,style:{wrap:{width:"60px",margin:"0px 5px 5px 10px",padding:"2px 2px 2px 2px",borderRadius:"6px 3px 3px 6px",fontSize:16},input:{width:"40px",borderRadius:"4px 2px 2px 4px",padding:"0.1ex 1ex",border:"1px solid #ccc",marginRight:4,display:"block"}}}))}}var Zr=n(11),Jr=n.n(Zr),ei=n(33),ti=n.n(ei),ni=n(34),ri=n.n(ni),ii=n(25),oi=n.n(ii),ai=n(35),si=n.n(ai),li=n(65),ci=n.n(li),ui=n(6),di=n.n(ui),hi=function(e){var t,n,r=e.className,i=e.included,o=e.vertical,a=e.style,s=e.length,l=e.offset,c=e.reverse;s<0&&(c=!c,s=Math.abs(s),l=100-l);var d=o?(t={},di()(t,c?"top":"bottom",l+"%"),di()(t,c?"bottom":"top","auto"),di()(t,"height",s+"%"),t):(n={},di()(n,c?"right":"left",l+"%"),di()(n,c?"left":"right","auto"),di()(n,"width",s+"%"),n),h=Jr()({},a,d);return i?u.a.createElement("div",{className:r,style:h}):null},fi=n(66),pi=n.n(fi),gi=n(118),mi=n.n(gi),bi=n(286),vi=n.n(bi);function yi(e,t,n,r){var i=h.a.unstable_batchedUpdates?function(e){h.a.unstable_batchedUpdates(n,e)}:n;return vi()(e,t,i,r)}var wi=n(4),xi=n.n(wi),Si=function(e){var t=e.prefixCls,n=e.vertical,r=e.reverse,i=e.marks,o=e.dots,a=e.step,s=e.included,l=e.lowerBound,c=e.upperBound,d=e.max,h=e.min,f=e.dotStyle,p=e.activeDotStyle,g=d-h,m=function(e,t,n,r,i,o){ci()(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(n&&r)for(var s=i;s<=o;s+=r)-1===a.indexOf(s)&&a.push(s);return a}(0,i,o,a,h,d).map((function(e){var i,o=Math.abs(e-h)/g*100+"%",a=!s&&e===c||s&&e<=c&&e>=l,d=n?Jr()({},f,di()({},r?"top":"bottom",o)):Jr()({},f,di()({},r?"right":"left",o));a&&(d=Jr()({},d,p));var m=xi()((i={},di()(i,t+"-dot",!0),di()(i,t+"-dot-active",a),di()(i,t+"-dot-reverse",r),i));return u.a.createElement("span",{className:m,style:d,key:e})}));return u.a.createElement("div",{className:t+"-step"},m)},ki=function(e){var t=e.className,n=e.vertical,r=e.reverse,i=e.marks,o=e.included,a=e.upperBound,s=e.lowerBound,l=e.max,c=e.min,d=e.onClickLabel,h=Object.keys(i),f=l-c,p=h.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var l,h=i[e],p="object"==typeof h&&!u.a.isValidElement(h),g=p?h.label:h;if(!g&&0!==g)return null;var m=!o&&e===a||o&&e<=a&&e>=s,b=xi()((l={},di()(l,t+"-text",!0),di()(l,t+"-text-active",m),l)),v=di()({marginBottom:"-50%"},r?"top":"bottom",(e-c)/f*100+"%"),y=di()({transform:"translateX("+(r?"50%":"-50%")+")",msTransform:"translateX("+(r?"50%":"-50%")+")"},r?"right":"left",(e-c)/f*100+"%"),w=n?v:y,x=p?Jr()({},w,h.style):w;return u.a.createElement("span",{className:b,style:x,key:e,onMouseDown:function(t){return d(t,e)},onTouchStart:function(t){return d(t,e)}},g)}));return u.a.createElement("div",{className:t},p)},_i=function(e){function t(){var e,n,r,i;ti()(this,t);for(var o=arguments.length,a=Array(o),s=0;s=Ti.F1&&t<=Ti.F12)return!1;switch(t){case Ti.ALT:case Ti.CAPS_LOCK:case Ti.CONTEXT_MENU:case Ti.CTRL:case Ti.DOWN:case Ti.END:case Ti.ESC:case Ti.HOME:case Ti.INSERT:case Ti.LEFT:case Ti.MAC_FF_META:case Ti.META:case Ti.NUMLOCK:case Ti.NUM_CENTER:case Ti.PAGE_DOWN:case Ti.PAGE_UP:case Ti.PAUSE:case Ti.PRINT_SCREEN:case Ti.RIGHT:case Ti.SHIFT:case Ti.UP:case Ti.WIN_KEY:case Ti.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ti.ZERO&&e<=Ti.NINE)return!0;if(e>=Ti.NUM_ZERO&&e<=Ti.NUM_MULTIPLY)return!0;if(e>=Ti.A&&e<=Ti.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Ti.SPACE:case Ti.QUESTION_MARK:case Ti.NUM_PLUS:case Ti.NUM_MINUS:case Ti.NUM_PERIOD:case Ti.NUM_DIVISION:case Ti.SEMICOLON:case Ti.DASH:case Ti.EQUALS:case Ti.COMMA:case Ti.PERIOD:case Ti.SLASH:case Ti.APOSTROPHE:case Ti.SINGLE_QUOTE:case Ti.OPEN_SQUARE_BRACKET:case Ti.BACKSLASH:case Ti.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Oi=Ti;function Ai(e,t){try{return Object.keys(t).some((function(n){return e.target===Object(d.findDOMNode)(t[n])}))}catch(e){return!1}}function Mi(e,t){var n=t.min,r=t.max;return er}function $i(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function Pi(e,t){var n=t.marks,r=t.step,i=t.min,o=t.max,a=Object.keys(n).map(parseFloat);if(null!==r){var s=Math.floor((o-i)/r),l=Math.min((e-i)/r,s),c=Math.round(l)*r+i;a.push(c)}var u=a.map((function(t){return Math.abs(e-t)}));return a[u.indexOf(Math.min.apply(Math,Ei()(u)))]}function Ri(e,t){return e?t.clientY:t.pageX}function Li(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function Ni(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:window.pageXOffset+n.left+.5*n.width}function Fi(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function Ii(e,t){var n=t.step,r=isFinite(Pi(e,t))?Pi(e,t):0;return null===n?r:parseFloat(r.toFixed(function(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}(n)))}function Di(e){e.stopPropagation(),e.preventDefault()}function ji(e,t,n){var r="increase";switch(e.keyCode){case Oi.UP:r=t&&n?"decrease":"increase";break;case Oi.RIGHT:r=!t&&n?"decrease":"increase";break;case Oi.DOWN:r=t&&n?"increase":"decrease";break;case Oi.LEFT:r=!t&&n?"increase":"decrease";break;case Oi.END:return function(e,t){return t.max};case Oi.HOME:return function(e,t){return t.min};case Oi.PAGE_UP:return function(e,t){return e+2*t.step};case Oi.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,n){var r={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},i=r[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),o=Object.keys(n.marks)[i];return n.step?r[e](t,n.step):Object.keys(n.marks).length&&n.marks[o]?n.marks[o]:t}(r,e,t)}}function zi(){}function Bi(e){var t,n;return n=t=function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onMouseDown=function(e){if(0===e.button){var t=n.props.vertical,r=Ri(t,e);if(Ai(e,n.handlesRefs)){var i=Ni(t,e.target);n.dragOffset=r-i,r=i}else n.dragOffset=0;n.removeDocumentEvents(),n.onStart(r),n.addDocumentMouseEvents()}},n.onTouchStart=function(e){if(!$i(e)){var t=n.props.vertical,r=Li(t,e);if(Ai(e,n.handlesRefs)){var i=Ni(t,e.target);n.dragOffset=r-i,r=i}else n.dragOffset=0;n.onStart(r),n.addDocumentTouchEvents(),Di(e)}},n.onFocus=function(e){var t=n.props,r=t.onFocus,i=t.vertical;if(Ai(e,n.handlesRefs)){var o=Ni(i,e.target);n.dragOffset=0,n.onStart(o),Di(e),r&&r(e)}},n.onBlur=function(e){var t=n.props.onBlur;n.onEnd(),t&&t(e)},n.onMouseUp=function(){n.handlesRefs[n.prevMovedHandleIndex]&&n.handlesRefs[n.prevMovedHandleIndex].clickFocus()},n.onMouseMove=function(e){if(n.sliderRef){var t=Ri(n.props.vertical,e);n.onMove(e,t-n.dragOffset)}else n.onEnd()},n.onTouchMove=function(e){if(!$i(e)&&n.sliderRef){var t=Li(n.props.vertical,e);n.onMove(e,t-n.dragOffset)}else n.onEnd()},n.onKeyDown=function(e){n.sliderRef&&Ai(e,n.handlesRefs)&&n.onKeyboard(e)},n.onClickMarkLabel=function(e,t){e.stopPropagation(),n.onChange({value:t}),n.setState({value:t},(function(){return n.onEnd(!0)}))},n.saveSlider=function(e){n.sliderRef=e};var r=e.step,i=e.max,o=e.min,a=!isFinite(i-o)||(i-o)%r==0;return ci()(!r||Math.floor(r)!==r||a,"Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)",i-o,r),n.handlesRefs={},n}return si()(t,e),ri()(t,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,n=e.disabled;t&&!n&&this.focus()}},{key:"componentWillUnmount",value:function(){mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this)&&mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,n=t.vertical,r=t.reverse,i=e.getBoundingClientRect();return n?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=yi(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=yi(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=yi(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=yi(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){this.props.disabled||this.handlesRefs[0].focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){e.handlesRefs[t]&&e.handlesRefs[t].blur&&e.handlesRefs[t].blur()}))}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,i=t.max,o=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-o)*(i-r)+r:o*(i-r)+r}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min,r=(e-n)/(t.max-n);return Math.max(0,100*r)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,n=this.props,r=n.prefixCls,i=n.className,o=n.marks,a=n.dots,s=n.step,l=n.included,c=n.disabled,d=n.vertical,h=n.reverse,f=n.min,p=n.max,g=n.children,m=n.maximumTrackStyle,b=n.style,v=n.railStyle,y=n.dotStyle,w=n.activeDotStyle,x=mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this),S=x.tracks,k=x.handles,_=xi()(r,(e={},di()(e,r+"-with-marks",Object.keys(o).length),di()(e,r+"-disabled",c),di()(e,r+"-vertical",d),di()(e,i,i),e));return u.a.createElement("div",{ref:this.saveSlider,className:_,onTouchStart:c?zi:this.onTouchStart,onMouseDown:c?zi:this.onMouseDown,onMouseUp:c?zi:this.onMouseUp,onKeyDown:c?zi:this.onKeyDown,onFocus:c?zi:this.onFocus,onBlur:c?zi:this.onBlur,style:b},u.a.createElement("div",{className:r+"-rail",style:Jr()({},m,v)}),S,u.a.createElement(Si,{prefixCls:r,vertical:d,reverse:h,marks:o,dots:a,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,dotStyle:y,activeDotStyle:w}),k,u.a.createElement(ki,{className:r+"-mark",onClickLabel:c?zi:this.onClickMarkLabel,vertical:d,marks:o,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,reverse:h}),g)}}]),t}(e),t.displayName="ComponentEnhancer("+e.displayName+")",t.defaultProps=Jr()({},e.defaultProps,{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=pi()(e,["index"]);return delete n.dragging,null===n.value?null:u.a.createElement(_i,Jr()({},n,{key:t}))},onBeforeChange:zi,onChange:zi,onAfterChange:zi,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),n}var Hi=Bi(function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onEnd=function(e){var t=n.state.dragging;n.removeDocumentEvents(),(t||e)&&n.props.onAfterChange(n.getValue()),n.setState({dragging:!1})};var r=void 0!==e.defaultValue?e.defaultValue:e.min,i=void 0!==e.value?e.value:r;return n.state={value:n.trimAlignValue(i),dragging:!1},ci()(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),ci()(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),n}return si()(t,e),ri()(t,[{key:"componentDidUpdate",value:function(e,t){if("value"in this.props||"min"in this.props||"max"in this.props){var n=this.props,r=n.value,i=n.onChange,o=void 0!==r?r:t.value,a=this.trimAlignValue(o,this.props);a!==t.value&&(this.setState({value:a}),Mi(o,this.props)&&i(a))}}},{key:"onChange",value:function(e){var t=this.props,n=!("value"in t),r=e.value>this.props.max?Jr()({},e,{value:this.props.max}):e;n&&this.setState(r);var i=r.value;t.onChange(i)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,n=this.getValue();t.onBeforeChange(n);var r=this.calcValueByPos(e);this.startValue=r,this.startPosition=e,r!==n&&(this.prevMovedHandleIndex=0,this.onChange({value:r}))}},{key:"onMove",value:function(e,t){Di(e);var n=this.state.value,r=this.calcValueByPos(t);r!==n&&this.onChange({value:r})}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=ji(e,t.vertical,n);if(r){Di(e);var i=this.state.value,o=r(i,this.props),a=this.trimAlignValue(o);if(a===i)return;this.onChange({value:a}),this.props.onAfterChange(a),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){return this.props.min}},{key:"getUpperBound",value:function(){return this.state.value}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var n=Jr()({},this.props,t),r=Fi(e,n);return Ii(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,i=t.included,o=t.disabled,a=t.minimumTrackStyle,s=t.trackStyle,l=t.handleStyle,c=t.tabIndex,d=t.ariaLabelForHandle,h=t.ariaLabelledByForHandle,f=t.ariaValueTextFormatterForHandle,p=t.min,g=t.max,m=t.startPoint,b=t.reverse,v=t.handle,y=this.state,w=y.value,x=y.dragging,S=this.calcOffset(w),k=v({className:n+"-handle",prefixCls:n,vertical:r,offset:S,value:w,dragging:x,disabled:o,min:p,max:g,reverse:b,index:0,tabIndex:c,ariaLabel:d,ariaLabelledBy:h,ariaValueTextFormatter:f,style:l[0]||l,ref:function(t){return e.saveHandle(0,t)}}),_=void 0!==m?this.calcOffset(m):0,C=s[0]||s;return{tracks:u.a.createElement(hi,{className:n+"-track",vertical:r,included:i,offset:_,reverse:b,length:S-_,style:Jr()({},a,C)}),handles:k}}}]),t}(u.a.Component)),Ui=n(287),Wi=n.n(Ui),Vi=function(e){var t=e.value,n=e.handle,r=e.bounds,i=e.props,o=i.allowCross,a=i.pushable,s=Number(a),l=Fi(t,i),c=l;return o||null==n||void 0===r||(n>0&&l<=r[n-1]+s&&(c=r[n-1]+s),n=r[n+1]-s&&(c=r[n+1]-s)),Ii(c,i)},Gi=function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onEnd=function(e){var t=n.state.handle;n.removeDocumentEvents(),(null!==t||e)&&n.props.onAfterChange(n.getValue()),n.setState({handle:null})};var r=e.count,i=e.min,o=e.max,a=Array.apply(void 0,Ei()(Array(r+1))).map((function(){return i})),s="defaultValue"in e?e.defaultValue:a,l=(void 0!==e.value?e.value:s).map((function(t,n){return Vi({value:t,handle:n,props:e})})),c=l[0]===o?0:l.length-1;return n.state={handle:null,recent:c,bounds:l},n}return si()(t,e),ri()(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;if(("value"in this.props||"min"in this.props||"max"in this.props)&&(this.props.min!==e.min||this.props.max!==e.max||!Wi()(this.props.value,e.value))){var r=this.props,i=r.onChange,o=r.value||t.bounds;if(o.some((function(e){return Mi(e,n.props)})))i(o.map((function(e){return Fi(e,n.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var n={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),Object.keys(n).length&&this.setState(n)}var r=Jr()({},this.state,e).bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var i=this.calcValueByPos(e);this.startValue=i,this.startPosition=e;var o=this.getClosestBound(i);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(i,o),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),i!==r[this.prevMovedHandleIndex]){var a=[].concat(Ei()(n.bounds));a[this.prevMovedHandleIndex]=i,this.onChange({bounds:a})}}},{key:"onMove",value:function(e,t){Di(e);var n=this.state,r=this.calcValueByPos(t);r!==n.bounds[n.handle]&&this.moveTo(r)}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=ji(e,t.vertical,n);if(r){Di(e);var i=this.state,o=this.props,a=i.bounds,s=i.handle,l=a[null===s?i.recent:s],c=r(l,o),u=Vi({value:c,handle:s,bounds:i.bounds,props:o});if(u===l)return;this.moveTo(u,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;r=t[r]&&(n=r);return Math.abs(t[n+1]-e)=r.length||i<0)return!1;var o=t+n,a=r[i],s=this.props.pushable,l=n*(e[o]-a);return!!this.pushHandle(e,o,n,s-l)&&(e[t]=a,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,n=t.handle,r=t.bounds;return Vi({value:e,handle:n,bounds:r,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,i=this.props,o=i.prefixCls,a=i.vertical,s=i.included,l=i.disabled,c=i.min,d=i.max,h=i.reverse,f=i.handle,p=i.trackStyle,g=i.handleStyle,m=i.tabIndex,b=i.ariaLabelGroupForHandles,v=i.ariaLabelledByGroupForHandles,y=i.ariaValueTextFormatterGroupForHandles,w=r.map((function(t){return e.calcOffset(t)})),x=o+"-handle",S=r.map((function(t,r){var i,s=m[r]||0;(l||null===m[r])&&(s=null);var u=n===r;return f({className:xi()((i={},di()(i,x,!0),di()(i,x+"-"+(r+1),!0),di()(i,x+"-dragging",u),i)),prefixCls:o,vertical:a,dragging:u,offset:w[r],value:t,index:r,tabIndex:s,min:c,max:d,reverse:h,disabled:l,style:g[r],ref:function(t){return e.saveHandle(r,t)},ariaLabel:b[r],ariaLabelledBy:v[r],ariaValueTextFormatter:y[r]})}));return{tracks:r.slice(0,-1).map((function(e,t){var n,r=t+1,i=xi()((n={},di()(n,o+"-track",!0),di()(n,o+"-track-"+r,!0),n));return u.a.createElement(hi,{className:i,vertical:a,reverse:h,included:s,offset:w[r-1],length:w[r]-w[r-1],style:p[t],key:r})})),handles:S}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if("value"in e||"min"in e||"max"in e){var n=(e.value||t.bounds).map((function(n,r){return Vi({value:n,handle:r,bounds:t.bounds,props:e})}));return n.length===t.bounds.length&&n.every((function(e,n){return e===t.bounds[n]}))?null:Jr()({},t,{bounds:n})}return null}}]),t}(u.a.Component);Gi.displayName="Range",Gi.defaultProps={count:1,allowCross:!0,pushable:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var Ki=Bi(Gi);function qi(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function Yi(e){return e instanceof HTMLElement?e:h.a.findDOMNode(e)}function Xi(e){return(Xi="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 Qi(e,t){"function"==typeof e?e(t):"object"===Xi(e)&&e&&"current"in e&&(e.current=t)}function Zi(){for(var e=arguments.length,t=new Array(e),n=0;n=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function oa(e){var t,n,r;if(ea.isWindow(e)||9===e.nodeType){var i=ea.getWindow(e);t={left:ea.getWindowScrollLeft(i),top:ea.getWindowScrollTop(i)},n=ea.viewportWidth(i),r=ea.viewportHeight(i)}else t=ea.offset(e),n=ea.outerWidth(e),r=ea.outerHeight(e);return t.width=n,t.height=r,t}function aa(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return"c"===n?s+=o/2:"b"===n&&(s+=o),"c"===r?a+=i/2:"r"===r&&(a+=i),{left:a,top:s}}function sa(e,t,n,r,i){var o=aa(t,n[1]),a=aa(e,n[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function la(e,t,n){return e.leftn.right}function ca(e,t,n){return e.topn.bottom}function ua(e,t,n){var r=[];return ea.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function da(e,t){return e[t]=-e[t],e}function ha(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function fa(e,t){e[0]=ha(e[0],t.width),e[1]=ha(e[1],t.height)}function pa(e,t,n,r){var i=n.points,o=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,l=n.source||e;o=[].concat(o),a=[].concat(a);var c={},u=0,d=ia(l,!(!(s=s||{})||!s.alwaysByViewport)),h=oa(l);fa(o,h),fa(a,t);var f=sa(h,t,i,o,a),p=ea.merge(h,f);if(d&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&la(f,h,d)){var g=ua(i,/[lr]/gi,{l:"r",r:"l"}),m=da(o,0),b=da(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),ea.mix(i,o)}(f,h,d,c))}return p.width!==h.width&&ea.css(l,"width",ea.width(l)+p.width-h.width),p.height!==h.height&&ea.css(l,"height",ea.height(l)+p.height-h.height),ea.offset(l,{left:p.left,top:p.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:c}}function ga(e,t,n){var r=n.target||t;return pa(e,oa(r),n,!function(e,t){var n=ia(e,t),r=oa(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function ma(e,t,n){var r,i,o=ea.getDocument(e),a=o.defaultView||o.parentWindow,s=ea.getWindowScrollLeft(a),l=ea.getWindowScrollTop(a),c=ea.viewportWidth(a),u=ea.viewportHeight(a);r="pageX"in t?t.pageX:s+t.clientX,i="pageY"in t?t.pageY:l+t.clientY;var d=r>=0&&r<=s+c&&i>=0&&i<=l+u;return pa(e,{left:r,top:i,width:0,height:0},function(e){for(var t=1;t1&&(h=u.a.createElement("div",{className:"".concat(n,"-content")},a)),u.a.createElement("div",{ref:t,className:xi()(r,!i&&"".concat(e.hiddenClassName)),onMouseEnter:s,onMouseLeave:l,onMouseDown:c,onTouchStart:d,style:o},h)}));Ha.displayName="PopupInner";var Ua=Ha;function Wa(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Va(e){return(Va="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 Ga(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Es=Object(c.forwardRef)((function(e,t){var n=e.overlayClassName,r=e.trigger,i=void 0===r?["hover"]:r,o=e.mouseEnterDelay,a=void 0===o?0:o,s=e.mouseLeaveDelay,l=void 0===s?.1:s,d=e.overlayStyle,h=e.prefixCls,f=void 0===h?"rc-tooltip":h,p=e.children,g=e.onVisibleChange,m=e.afterVisibleChange,b=e.transitionName,v=e.animation,y=e.placement,w=void 0===y?"right":y,x=e.align,S=void 0===x?{}:x,k=e.destroyTooltipOnHide,_=void 0!==k&&k,C=e.defaultVisible,E=e.getTooltipContainer,T=Cs(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer"]),O=Object(c.useRef)(null);Object(c.useImperativeHandle)(t,(function(){return O.current}));var A=function(e){for(var t=1;t{this.setState({scale:e})}),this.state={scale:1},this.onScaleChange=this.onScaleChange.bind(this)}render(){return c.createElement(w.a,{ref:"canvasContainer"},c.createElement(S.a,{lg:11,md:11,sm:11,xs:11},c.createElement(Rs,{min:.1,max:2,scale:this.state.scale,onScaleChange:this.onScaleChange})),c.createElement(S.a,{lg:1,md:1,sm:1,xs:1}),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Yr.a,null,e=>{let{width:t,height:n}=e;return c.createElement(Kr,{width:t,height:n,scale:this.state.scale})})))}}var Ns=n(181),Fs={insert:"head",singleton:!1},Is=(p()(Ns.a,Fs),Ns.a.locals,n(182)),Ds={insert:"head",singleton:!1};p()(Is.a,Ds),Is.a.locals;class js extends c.Component{constructor(e){super(e)}getGithub(){return c.createElement("a",{href:"https://github.com/RYOSKATE/PLIVET"}," GitHub ")}getYear(){const{fromYear:e}=this.props,t=(new Date).getFullYear();return void 0!==e?e===t?"".concat(e):"".concat(e," - ").concat((new Date).getFullYear()):(new Date).getFullYear()}renderCopyRight(){return c.createElement("span",null,"PLIVET v",n(574).version," © ",this.getYear(),"  @RYOSKATE")}renderLicense(){return c.createElement("a",{href:"./licenses.html"}," LICENSES")}render(){return c.createElement("div",{className:"footer"},this.renderCopyRight(),c.createElement("br",null),this.getGithub(),this.renderLicense())}}class zs extends c.Component{constructor(e){super(e)}render(){const{lang:e,progLang:t,theme:n}=this.props;return c.createElement(v.a,{fluid:!0},c.createElement(w.a,{style:{margin:"5px"}},c.createElement(S.a,{lg:4,md:5,sm:6,xs:12,className:"light"===n?"theme-light":"theme-gray"},c.createElement(Sr,{lang:e,progLang:t})),c.createElement(S.a,{lg:8,md:7,sm:6,xs:12,className:"light"===n?"theme-light":"theme-gray"},c.createElement(Ls,{lang:e}))),c.createElement(js,{fromYear:2018}))}}class Bs extends c.Component{constructor(e){super(e),this.state={lang:"ja",progLang:"c_cpp",theme:"light"},Object(Rn.b)("changeLang",e=>{this.setState({lang:e})}),Object(Rn.b)("changeProgLang",e=>{this.setState({progLang:e})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})})}render(){const{lang:e,progLang:t,theme:n}=this.state;return c.createElement(zs,{lang:e,progLang:t,theme:n})}}d.render(c.createElement(Bs,null),document.getElementById("root"))}]); \ No newline at end of file + */Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0;if(t.unstable_now=void 0,t.unstable_forceFrameRate=void 0,"undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,c=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}};t.unstable_now=function(){return Date.now()},r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(u,0))},i=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},a=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,h=window.Date,f=window.setTimeout,p=window.clearTimeout,g=window.requestAnimationFrame,m=window.cancelAnimationFrame;"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),t.unstable_now="object"==typeof d&&"function"==typeof d.now?function(){return d.now()}:function(){return h.now()};var b=!1,v=null,y=-1,w=-1,x=33.33,S=-1,k=-1,_=0,C=!1;a=function(){return t.unstable_now()>=_},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125(x=rs){if(a=l,null===$)$=e.next=e.previous=e;else{n=null;var c=$;do{if(a4;o&&(i=this.getTensionPoints());var a,s,l=r.length;o?(a=r[l-2]-(i[i.length-2]+i[i.length-4])/2,s=r[l-1]-(i[i.length-1]+i[i.length-3])/2):(a=r[l-2]-r[l-4],s=r[l-1]-r[l-3]);var c=(Math.atan2(s,a)+n)%n,u=this.pointerLength(),d=this.pointerWidth();t.save(),t.beginPath(),t.translate(r[l-2],r[l-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-u,d/2),t.lineTo(-u,-d/2),t.closePath(),t.restore(),this.pointerAtBeginning()&&(t.save(),t.translate(r[0],r[1]),o?(a=(i[0]+i[2])/2-r[0],s=(i[1]+i[3])/2-r[1]):(a=r[2]-r[0],s=r[3]-r[1]),t.rotate((Math.atan2(-s,-a)+n)%n),t.moveTo(0,0),t.lineTo(-u,d/2),t.lineTo(-u,-d/2),t.closePath(),t.restore());var h=this.dashEnabled();h&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),h&&(this.attrs.dashEnabled=!0)},t.prototype.getSelfRect=function(){var t=e.prototype.getSelfRect.call(this),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+2*n,height:t.height+2*n}},t}(s.Line);t.Arrow=u,u.prototype.className="Arrow",c._registerNode(u),a.Factory.addGetterSetter(u,"pointerLength",10,l.getNumberValidator()),a.Factory.addGetterSetter(u,"pointerWidth",10,l.getNumberValidator()),a.Factory.addGetterSetter(u,"pointerAtBeginning",!1),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){e.beginPath(),e.arc(0,0,this.radius(),0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radius()},t.prototype.getHeight=function(){return 2*this.radius()},t.prototype.setWidth=function(e){this.radius()!==e/2&&this.radius(e/2)},t.prototype.setHeight=function(e){this.radius()!==e/2&&this.radius(e/2)},t}(s.Shape);t.Circle=u,u.prototype._centroid=!0,u.prototype.className="Circle",u.prototype._attrsAffectingSize=["radius"],c._registerNode(u),a.Factory.addGetterSetter(u,"radius",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radiusX()},t.prototype.getHeight=function(){return 2*this.radiusY()},t.prototype.setWidth=function(e){this.radiusX(e/2)},t.prototype.setHeight=function(e){this.radiusY(e/2)},t}(s.Shape);t.Ellipse=u,u.prototype.className="Ellipse",u.prototype._centroid=!0,u.prototype._attrsAffectingSize=["radiusX","radiusY"],c._registerNode(u),a.Factory.addComponentsGetterSetter(u,"radius",["x","y"]),a.Factory.addGetterSetter(u,"radiusX",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"radiusY",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(10),c=n(8),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._useBufferCanvas=function(){return!(!this.hasShadow()&&1===this.getAbsoluteOpacity()||!this.hasStroke()||!this.getStage())},t.prototype._sceneFunc=function(e){var t,n,r,i=this.width(),o=this.height(),a=this.image();a&&(t=this.cropWidth(),n=this.cropHeight(),r=t&&n?[a,this.cropX(),this.cropY(),t,n,0,0,i,o]:[a,0,0,i,o]),(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,i,o),e.closePath(),e.fillStrokeShape(this)),a&&e.drawImage.apply(e,r)},t.prototype._hitFunc=function(e){var t=this.width(),n=this.height();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){var e,t=this.image();return null!=(e=this.attrs.width)?e:t?t.width:0},t.prototype.getHeight=function(){var e,t=this.image();return null!=(e=this.attrs.height)?e:t?t.height:0},t.fromURL=function(e,n){var r=o.Util.createImageElement();r.onload=function(){var e=new t({image:r});n(e)},r.crossOrigin="Anonymous",r.src=e},t}(s.Shape);t.Image=u,u.prototype.className="Image",c._registerNode(u),a.Factory.addGetterSetter(u,"image"),a.Factory.addComponentsGetterSetter(u,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(u,"cropX",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropY",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropWidth",0,l.getNumberValidator()),a.Factory.addGetterSetter(u,"cropHeight",0,l.getNumberValidator()),o.Collection.mapMethods(u)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(153),c=n(10),u=n(8),d=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width"],h=d.length,f=function(e){function t(t){var n=e.call(this,t)||this;return n.on("add.konva",(function(e){this._addListeners(e.child),this._sync()})),n}return i(t,e),t.prototype.getText=function(){return this.find("Text")[0]},t.prototype.getTag=function(){return this.find("Tag")[0]},t.prototype._addListeners=function(e){var t,n=this,r=function(){n._sync()};for(t=0;t=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=e.dataArray[s].pathLength);var c=0;"center"===r&&(c=Math.max(0,a/2-o/2)),"right"===r&&(c=Math.max(0,a-o));for(var u,d,h,f=this.text().split(""),p=this.text().split(" ").length-1,g=-1,m=0,b=function(){m=0;for(var t=e.dataArray,n=g+1;n0)return g=n,t[n];"M"===t[n].command&&(u={x:t[n].points[0],y:t[n].points[1]})}return{}},v=function(t){var i=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(i+=(a-o)/p);var s=0,c=0;for(d=void 0;Math.abs(i-s)/i>.01&&c<25;){c++;for(var f=s;void 0===h;)(h=b())&&f+h.pathLengthi?d=l.Path.getPointOnLine(i,u.x,u.y,h.points[0],h.points[1],u.x,u.y):h=void 0;break;case"A":var v=h.points[4],y=h.points[5],w=h.points[4]+y;0===m?m=v+1e-8:i>s?m+=Math.PI/180*y/Math.abs(y):m-=Math.PI/360*y/Math.abs(y),(y<0&&m=0&&m>w)&&(m=w,g=!0),d=l.Path.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],m,h.points[6]);break;case"C":0===m?m=i>h.pathLength?1e-8:i/h.pathLength:i>s?m+=(i-s)/h.pathLength:m-=(s-i)/h.pathLength,m>1&&(m=1,g=!0),d=l.Path.getPointOnCubicBezier(m,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===m?m=i/h.pathLength:i>s?m+=(i-s)/h.pathLength:m-=(s-i)/h.pathLength,m>1&&(m=1,g=!0),d=l.Path.getPointOnQuadraticBezier(m,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3])}void 0!==d&&(s=l.Path.getLineLength(u.x,u.y,d.x,d.y)),g&&(g=!1,h=void 0)}},y=c/(e._getTextSize("C").width+n)-1,w=0;wthis.findOne(".bottom-right").x()?-1:1,u=this.findOne(".top-left").y()>this.findOne(".bottom-right").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".top-left").x(this.findOne(".bottom-right").x()-t-2*l),this.findOne(".top-left").y(this.findOne(".bottom-right").y()-n-2*l)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){if(s){r=Math.sqrt(Math.pow(i.x()-this.findOne(".bottom-left").x()-2*l,2)+Math.pow(this.findOne(".bottom-left").y()-i.y()-2*l,2));c=this.findOne(".top-right").x()this.findOne(".bottom-left").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".top-right").x(t+l),this.findOne(".top-right").y(this.findOne(".bottom-left").y()-n-2*l)}var h=i.position();this.findOne(".top-left").y(h.y),this.findOne(".bottom-right").x(h.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(i.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(i.x());else if("bottom-left"===this._movingAnchorName){if(s){r=Math.sqrt(Math.pow(this.findOne(".top-right").x()-i.x()-2*l,2)+Math.pow(i.y()-this.findOne(".top-right").y()-2*l,2));c=this.findOne(".top-right").x()this.findOne(".bottom-right").x()?-1:1,u=this.findOne(".top-left").y()>this.findOne(".bottom-right").y()?-1:1;t=r*this.cos*c,n=r*this.sin*u,this.findOne(".bottom-right").x(t+l),this.findOne(".bottom-right").y(n+l)}}else if("rotater"===this._movingAnchorName){var f=this._getNodeRect();t=i.x()-f.width/2,n=-i.y()+f.height/2;var p=Math.atan2(-n,t)+Math.PI/2;f.height<0&&(p-=Math.PI);for(var g=d.Konva.getAngle(this.rotation()),m=o.Util._radToDeg(g)+o.Util._radToDeg(p),b=d.Konva.getAngle(this.getNode().rotation()),v=o.Util._degToRad(m),y=this.rotationSnaps(),w=d.Konva.getAngle(this.rotationSnapTolerance()),x=0;x=0}),this.findOne(".top-center").setAttrs({x:a/2,y:-u,scale:i,visible:c&&l.indexOf("top-center")>=0}),this.findOne(".top-right").setAttrs({x:a+u,y:-u,scale:i,visible:c&&l.indexOf("top-right")>=0}),this.findOne(".middle-left").setAttrs({x:-u,y:s/2,scale:i,visible:c&&l.indexOf("middle-left")>=0}),this.findOne(".middle-right").setAttrs({x:a+u,y:s/2,scale:i,visible:c&&l.indexOf("middle-right")>=0}),this.findOne(".bottom-left").setAttrs({x:-u,y:s+u,scale:i,visible:c&&l.indexOf("bottom-left")>=0}),this.findOne(".bottom-center").setAttrs({x:a/2,y:s+u,scale:i,visible:c&&l.indexOf("bottom-center")>=0}),this.findOne(".bottom-right").setAttrs({x:a+u,y:s+u,scale:i,visible:c&&l.indexOf("bottom-right")>=0});var h=-this.rotateAnchorOffset()*Math.abs(i.y);this.findOne(".rotater").setAttrs({x:a/2,y:h*o.Util._sign(s)-u,scale:i,visible:this.rotateEnabled()}),this.findOne(".back").setAttrs({width:a*r.x,height:s*r.y,scale:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash()})},t.prototype.isTransforming=function(){return this._transforming},t.prototype.stopTransform=function(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}},t.prototype.destroy=function(){return this.getStage()&&this._cursorChange&&(this.getStage().content.style.cursor=""),u.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this},t.prototype.toObject=function(){return s.Node.prototype.toObject.call(this)},t}(u.Group);t.Transformer=y,y.prototype.className="Transformer",f._registerNode(y),a.Factory.addGetterSetter(y,"enabledAnchors",v,(function(e){return e instanceof Array||o.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===v.indexOf(e)&&o.Util.warn("Unknown anchor name: "+e+". Available names are: "+v.join(", "))})),e||[]})),a.Factory.addGetterSetter(y,"resizeEnabled",!0),a.Factory.addGetterSetter(y,"anchorSize",10,h.getNumberValidator()),a.Factory.addGetterSetter(y,"rotateEnabled",!0),a.Factory.addGetterSetter(y,"rotationSnaps",[]),a.Factory.addGetterSetter(y,"rotateAnchorOffset",50,h.getNumberValidator()),a.Factory.addGetterSetter(y,"rotationSnapTolerance",5,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderEnabled",!0),a.Factory.addGetterSetter(y,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(y,"anchorStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(y,"anchorFill","white"),a.Factory.addGetterSetter(y,"anchorCornerRadius",0,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(y,"borderStrokeWidth",1,h.getNumberValidator()),a.Factory.addGetterSetter(y,"borderDash"),a.Factory.addGetterSetter(y,"keepRatio",!0),a.Factory.addGetterSetter(y,"centeredScaling",!1),a.Factory.addGetterSetter(y,"ignoreStroke",!1),a.Factory.addGetterSetter(y,"padding",0,h.getNumberValidator()),a.Factory.addGetterSetter(y,"node"),a.Factory.addGetterSetter(y,"boundBoxFunc"),a.Factory.backCompat(y,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),o.Collection.mapMethods(y)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(7),s=n(20),l=n(8),c=n(10),u=n(8),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._sceneFunc=function(e){e.beginPath(),e.arc(0,0,this.radius(),0,l.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)},t.prototype.getWidth=function(){return 2*this.radius()},t.prototype.getHeight=function(){return 2*this.radius()},t.prototype.setWidth=function(e){this.radius(e/2)},t.prototype.setHeight=function(e){this.radius(e/2)},t}(s.Shape);t.Wedge=d,d.prototype.className="Wedge",d.prototype._centroid=!0,d.prototype._attrsAffectingSize=["radius"],u._registerNode(d),a.Factory.addGetterSetter(d,"radius",0,c.getNumberValidator()),a.Factory.addGetterSetter(d,"angle",0,c.getNumberValidator()),a.Factory.addGetterSetter(d,"clockwise",!1),a.Factory.backCompat(d,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),o.Collection.mapMethods(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);function a(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var s=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];t.Blur=function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,i,o,c,u,d,h,f,p,g,m,b,v,y,w,x,S,k,_,C,E,T,O,A=e.data,M=e.width,$=e.height,P=t+t+1,R=M-1,L=$-1,N=t+1,F=N*(N+1)/2,I=new a,D=null,j=I,z=null,B=null,H=s[t],U=l[t];for(i=1;i>U,0!==T?(T=255/T,A[u]=(h*H>>U)*T,A[u+1]=(f*H>>U)*T,A[u+2]=(p*H>>U)*T):A[u]=A[u+1]=A[u+2]=0,h-=m,f-=b,p-=v,g-=y,m-=z.r,b-=z.g,v-=z.b,y-=z.a,o=d+((o=n+t+1)>U,T>0?(T=255/T,A[o]=(h*H>>U)*T,A[o+1]=(f*H>>U)*T,A[o+2]=(p*H>>U)*T):A[o]=A[o+1]=A[o+2]=0,h-=m,f-=b,p-=v,g-=y,m-=z.r,b-=z.g,v-=z.b,y-=z.a,o=n+((o=r+N)255?255:o,a=(a*=255)<0?0:a>255?255:a,s=(s*=255)<0?0:s>255?255:s,r[t]=o,r[t+1]=a,r[t+2]=s},r.Factory.addGetterSetter(i.Node,"contrast",0,o.getNumberValidator(),r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(12),a=n(10);t.Emboss=function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),a=0,s=0,l=e.data,c=e.width,u=e.height,d=4*c,h=u;switch(r){case"top-left":a=-1,s=-1;break;case"top":a=-1,s=0;break;case"top-right":a=-1,s=1;break;case"right":a=0,s=1;break;case"bottom-right":a=1,s=1;break;case"bottom":a=1,s=0;break;case"bottom-left":a=1,s=-1;break;case"left":a=0,s=-1;break;default:o.Util.error("Unknown emboss direction: "+r)}do{var f=(h-1)*d,p=a;h+p<1&&(p=0),h+p>u&&(p=0);var g=(h-1+p)*c*4,m=c;do{var b=f+4*(m-1),v=s;m+v<1&&(v=0),m+v>c&&(v=0);var y=g+4*(m-1+v),w=l[b]-l[y],x=l[b+1]-l[y+1],S=l[b+2]-l[y+2],k=w,_=k>0?k:-k;if((x>0?x:-x)>_&&(k=x),(S>0?S:-S)>_&&(k=S),k*=t,i){var C=l[b]+k,E=l[b+1]+k,T=l[b+2]+k;l[b]=C>255?255:C<0?0:C,l[b+1]=E>255?255:E<0?0:E,l[b+2]=T>255?255:T<0?0:T}else{var O=n-k;O<0?O=0:O>255&&(O=255),l[b]=l[b+1]=l[b+2]=O}}while(--m)}while(--h)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,a.getNumberValidator(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,a.getNumberValidator(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);function a(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}t.Enhance=function(e){var t,n,r,i,o=e.data,s=o.length,l=o[0],c=l,u=o[1],d=u,h=o[2],f=h,p=this.enhance();if(0!==p){for(i=0;ic&&(c=t),(n=o[i+1])d&&(d=n),(r=o[i+2])f&&(f=r);var g,m,b,v,y,w,x,S,k;for(c===l&&(c=255,l=0),d===u&&(d=255,u=0),f===h&&(f=255,h=0),p>0?(m=c+p*(255-c),b=l-p*(l-0),y=d+p*(255-d),w=u-p*(u-0),S=f+p*(255-f),k=h-p*(h-0)):(m=c+p*(c-(g=.5*(c+l))),b=l+p*(l-g),y=d+p*(d-(v=.5*(d+u))),w=u+p*(u-v),S=f+p*(f-(x=.5*(f+h))),k=h+p*(h-x)),i=0;ib?a:b;var v,y,w,x,S=u,k=c,_=360/k*Math.PI/180;for(y=0;yd&&(w=y,x=0,S=-1),n=0;ny?l:y;var w,x,S,k=h,_=d,C=n.polarRotation||0;for(i=0;i=0&&f=0&&p=0&&f=0&&p=1020?255:0}return a}(t=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=[],s=0;s=0&&f=0&&p=b))for(n=d;n=v||(o+=x[(r=4*(b*n+t))+0],a+=x[r+1],s+=x[r+2],l+=x[r+3],g+=1);for(o/=g,a/=g,s/=g,l/=g,t=c;t=b))for(n=d;n=v||(x[(r=4*(b*n+t))+0]=o,x[r+1]=a,x[r+2]=s,x[r+3]=l)}},r.Factory.addGetterSetter(o.Node,"pixelSize",8,a.getNumberValidator(),r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.Posterize=function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,i=r.length,o=255/n;for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"blue",0,o.RGBComponent,r.Factory.afterSetFilter)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.RGBA=function(e){var t,n,r=e.data,i=r.length,o=this.red(),a=this.green(),s=this.blue(),l=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(i.Node,"blue",0,o.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=function(e){var t,n,r,i,o=e.data,a=o.length;for(t=0;t127&&(l=255-l),c>127&&(c=255-c),u>127&&(u=255-u),t[s]=l,t[s+1]=c,t[s+2]=u}while(--a)}while(--i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=n(19),o=n(10);t.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,i=r.length;for(t=0;ti)&&(m=Math.ceil(this.alphabet.length/i))>this.seps.length&&(y=m-this.seps.length,(w=this.seps).push.apply(w,t(this.alphabet.slice(0,y))),this.alphabet=this.alphabet.slice(y)),this.alphabet=d(this.alphabet,h);var S=Math.ceil(this.alphabet.length/o);this.alphabet.length<3?(this.guards=this.seps.slice(0,S),this.seps=this.seps.slice(S)):(this.guards=this.alphabet.slice(0,S),this.alphabet=this.alphabet.slice(S)),this.guardsRegExp=b(this.guards),this.sepsRegExp=b(this.seps),this.allowedCharsRegExp=v([].concat(t(this.alphabet),t(this.guards),t(this.seps)))}var n=e.prototype;return n.encode=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0){var b=m/2;o=o.slice(b,b+this.minLength)}}return o},n.isValidId=function(e){return this.allowedCharsRegExp.test(e)},n._decode=function(e){if(!this.isValidId(e))throw new Error("The provided ID ("+e+") is invalid, as it contains characters that do not exist in the alphabet ("+this.guards.join("")+this.seps.join("")+this.alphabet.join("")+")");var n=e.split(this.guardsRegExp),r=n[3===n.length||2===n.length?1:0];if(0===r.length)return[];var i=r[Symbol.iterator]().next().value,o=r.slice(i.length).split(this.sepsRegExp),a=this.alphabet,s=[],l=o,c=Array.isArray(l),u=0;for(l=c?l:l[Symbol.iterator]();;){var h;if(c){if(u>=l.length)break;h=l[u++]}else{if((u=l.next()).done)break;h=u.value}var p=h,g=d(a,[i].concat(t(this.salt),t(a)).slice(0,a.length));s.push(f(Array.from(p),g)),a=g}return this._encode(s).join("")!==e?[]:s},e}();e.default=n;var r=16,i=3.5,o=12,a=function(e){return Array.from(new Set(e))};e.keepUnique=a;var s=function(e,t){return e.filter((function(e){return!t.includes(e)}))};e.withoutChars=s;var l=function(e,t){return e.filter((function(e){return t.includes(e)}))};e.onlyChars=l;var c=function(e){return"bigint"==typeof e||!Number.isNaN(Number(e))&&Math.floor(Number(e))===e},u=function(e){return"bigint"==typeof e||e>=0&&Number.isSafeInteger(e)};function d(e,t){if(0===t.length)return e;for(var n,r=e.slice(),i=r.length-1,o=0,a=0;i>0;i--,o++){a+=n=t[o%=t.length].codePointAt(0);var s=(n+o+a)%i,l=r[i],c=r[s];r[s]=l,r[i]=c}return r}var h=function(e,t){var n=[];if("bigint"==typeof e){var r=BigInt(t.length);do{n.unshift(t[Number(e%r)]),e/=r}while(e>BigInt(0))}else do{n.unshift(t[e%t.length]),e=Math.floor(e/t.length)}while(e>0);return n},f=function(e,t){return e.reduce((function(n,r){var i=t.indexOf(r);if(-1===i)throw new Error("The provided ID ("+e.join("")+") is invalid, as it contains characters that do not exist in the alphabet ("+t.join("")+")");if("bigint"==typeof n)return n*BigInt(t.length)+BigInt(i);var o=n*t.length+i;if(Number.isSafeInteger(o))return o;if("function"==typeof BigInt)return BigInt(n)*BigInt(t.length)+BigInt(i);throw new Error("Unable to decode the provided string, due to lack of support for BigInt numbers in the current environment")}),0)},p=/^\+?[0-9]+$/,g=function(e){return p.test(e)?parseInt(e,10):NaN},m=function(e,t,n){return Array.from({length:Math.ceil(e.length/t)},(function(r,i){return n(e.slice(i*t,(i+1)*t))}))},b=function(e){return new RegExp(e.map((function(e){return y(e)})).sort((function(e,t){return t.length-e.length})).join("|"))},v=function(e){return new RegExp("^["+e.map((function(e){return y(e)})).sort((function(e,t){return t.length-e.length})).join("")+"]+$")},y=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){"use strict";var r=n(252).forEach,i=n(510),o=n(511),a=n(512),s=n(513),l=n(514),c=n(253),u=n(515),d=n(517),h=n(518),f=n(519);function p(e){return Array.isArray(e)||void 0!==e.length}function g(e){if(Array.isArray(e))return e;var t=[];return r(e,(function(e){t.push(e)})),t}function m(e){return e&&1===e.nodeType}function b(e,t,n){var r=e[t];return null==r&&void 0!==n?n:r}e.exports=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=a(),v=s({idGenerator:n,stateHandler:d});t=v}var y=e.reporter;y||(y=l(!1===y));var w=b(e,"batchProcessor",u({reporter:y})),x={};x.callOnAdd=!!b(e,"callOnAdd",!0),x.debug=!!b(e,"debug",!1);var S,k=o(t),_=i({stateHandler:d}),C=b(e,"strategy","object"),E=b(e,"important",!1),T={reporter:y,batchProcessor:w,stateHandler:d,idHandler:t,important:E};if("scroll"===C&&(c.isLegacyOpera()?(y.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),C="object"):c.isIE(9)&&(y.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),C="object")),"scroll"===C)S=f(T);else{if("object"!==C)throw new Error("Invalid strategy name: "+C);S=h(T)}var O={};return{listenTo:function(e,n,i){function o(e){var t=k.get(e);r(t,(function(t){t(e)}))}function a(e,t,n){k.add(t,n),e&&n(t)}if(i||(i=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(m(n))n=[n];else{if(!p(n))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=g(n)}var s=0,l=b(e,"callOnAdd",x.callOnAdd),c=b(e,"onReady",(function(){})),u=b(e,"debug",x.debug);r(n,(function(e){d.getState(e)||(d.initState(e),t.set(e));var h=t.get(e);if(u&&y.log("Attaching listener to element",h,e),!_.isDetectable(e))return u&&y.log(h,"Not detectable."),_.isBusy(e)?(u&&y.log(h,"System busy making it detectable"),a(l,e,i),O[h]=O[h]||[],void O[h].push((function(){++s===n.length&&c()}))):(u&&y.log(h,"Making detectable..."),_.markBusy(e,!0),S.makeDetectable({debug:u,important:E},e,(function(e){if(u&&y.log(h,"onElementDetectable"),d.getState(e)){_.markAsDetectable(e),_.markBusy(e,!1),S.addListener(e,o),a(l,e,i);var t=d.getState(e);if(t&&t.startSize){var f=e.offsetWidth,p=e.offsetHeight;t.startSize.width===f&&t.startSize.height===p||o(e)}O[h]&&r(O[h],(function(e){e()}))}else u&&y.log(h,"Element uninstalled before being detectable.");delete O[h],++s===n.length&&c()})));u&&y.log(h,"Already detecable, adding listener."),a(l,e,i),s++})),s===n.length&&c()},removeListener:k.removeListener,removeAllListeners:k.removeAllListeners,uninstall:function(e){if(!e)return y.error("At least one element is required.");if(m(e))e=[e];else{if(!p(e))return y.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=g(e)}r(e,(function(e){k.removeAllListeners(e),S.uninstall(e),d.cleanState(e)}))},initDocument:function(e){S.initDocument&&S.initDocument(e)}}}},function(e,t,n){"use strict";e.exports=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}},function(e,t,n){"use strict";e.exports=function(e){var t={};function n(n){var r=e.get(n);return void 0===r?[]:t[r]||[]}return{get:n,add:function(n,r){var i=e.get(n);t[i]||(t[i]=[]),t[i].push(r)},removeListener:function(e,t){for(var r=n(e),i=0,o=r.length;in?n=i:i div::-webkit-scrollbar { "+l(["display: none"])+" }\n\n",o+="."+i+" { "+l(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+r,"animation-name: "+r])+" }\n",o+="@-webkit-keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,r){r=r||function(t){e.head.appendChild(t)};var i=e.createElement("style");i.innerHTML=n,i.id=t,r(i)}(o+="@keyframes "+r+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style","erd_scroll_detection_container")}function l(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function c(e,n,r){if(e.addEventListener)e.addEventListener(n,r);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,r)}}function u(e,n,r){if(e.removeEventListener)e.removeEventListener(n,r);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,r)}}function d(e){return i(e).container.childNodes[0].childNodes[0].childNodes[0]}function h(e){return i(e).container.childNodes[0].childNodes[0].childNodes[1]}return s(window.document),{makeDetectable:function(e,s,u){function f(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(o.get(s),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var r=0;ru;)for(var f,p=l(arguments[u++]),g=d?i(p).concat(d(p)):i(p),m=g.length,b=0;m>b;)f=g[b++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:c},function(e,t,n){var r=n(64),i=n(258),o=n(526);e.exports=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(160),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){n(528);var r=n(28).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(55);r(r.S+r.F*!n(58),"Object",{defineProperty:n(57).f})},function(e,t,n){e.exports={default:n(530),__esModule:!0}},function(e,t,n){n(261),n(535),e.exports=n(167).f("iterator")},function(e,t,n){var r=n(160),i=n(159);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(165),i=n(88),o=n(166),a={};n(71)(a,n(43)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(57),i=n(72),o=n(113);e.exports=n(58)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var r=n(56).document;e.exports=r&&r.documentElement},function(e,t,n){n(536);for(var r=n(56),i=n(71),o=n(90),a=n(43)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(540),__esModule:!0}},function(e,t,n){n(541),n(546),n(547),n(548),e.exports=n(28).Symbol},function(e,t,n){"use strict";var r=n(56),i=n(63),o=n(58),a=n(55),s=n(263),l=n(542).KEY,c=n(74),u=n(162),d=n(166),h=n(115),f=n(43),p=n(167),g=n(168),m=n(543),b=n(544),v=n(72),y=n(73),w=n(89),x=n(64),S=n(157),k=n(88),_=n(165),C=n(545),E=n(169),T=n(164),O=n(57),A=n(113),M=E.f,$=O.f,P=C.f,R=r.Symbol,L=r.JSON,N=L&&L.stringify,F=f("_hidden"),I=f("toPrimitive"),D={}.propertyIsEnumerable,j=u("symbol-registry"),z=u("symbols"),B=u("op-symbols"),H=Object.prototype,U="function"==typeof R&&!!T.f,W=r.QObject,V=!W||!W.prototype||!W.prototype.findChild,G=o&&c((function(){return 7!=_($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=M(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,K=function(e){var t=z[e]=_(R.prototype);return t._k=e,t},q=U&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},Y=function(e,t,n){return e===H&&Y(B,t,n),v(e),t=S(t,!0),v(n),i(z,t)?(n.enumerable?(i(e,F)&&e[F][t]&&(e[F][t]=!1),n=_(n,{enumerable:k(0,!1)})):(i(e,F)||$(e,F,k(1,{})),e[F][t]=!0),G(e,t,n)):$(e,t,n)},X=function(e,t){v(e);for(var n,r=m(t=x(t)),i=0,o=r.length;o>i;)Y(e,n=r[i++],t[n]);return e},Q=function(e){var t=D.call(this,e=S(e,!0));return!(this===H&&i(z,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(z,e)||i(this,F)&&this[F][e])||t)},Z=function(e,t){if(e=x(e),t=S(t,!0),e!==H||!i(z,t)||i(B,t)){var n=M(e,t);return!n||!i(z,t)||i(e,F)&&e[F][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=P(x(e)),r=[],o=0;n.length>o;)i(z,t=n[o++])||t==F||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=P(n?B:x(e)),o=[],a=0;r.length>a;)!i(z,t=r[a++])||n&&!i(H,t)||o.push(z[t]);return o};U||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(B,n),i(this,F)&&i(this[F],e)&&(this[F][e]=!1),G(this,e,k(1,n))};return o&&V&&G(H,e,{configurable:!0,set:t}),K(e)}).prototype,"toString",(function(){return this._k})),E.f=Z,O.f=Y,n(265).f=C.f=J,n(116).f=Q,T.f=ee,o&&!n(114)&&s(H,"propertyIsEnumerable",Q,!0),p.f=function(e){return K(f(e))}),a(a.G+a.W+a.F*!U,{Symbol:R});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=A(f.store),ie=0;re.length>ie;)g(re[ie++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=R(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!U,"Object",{create:function(e,t){return void 0===t?_(e):X(_(e),t)},defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var oe=c((function(){T.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return T.f(w(e))}}),L&&a(a.S+a.F*(!U||c((function(){var e=R();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(y(t)||void 0!==e)&&!q(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,N.apply(L,r)}}),R.prototype[I]||n(71)(R.prototype,I,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(115)("meta"),i=n(73),o=n(63),a=n(57).f,s=0,l=Object.isExtensible||function(){return!0},c=!n(74)((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,r)&&u(e),e}}},function(e,t,n){var r=n(113),i=n(164),o=n(116);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),l=o.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var r=n(158);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(64),i=n(265).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t){},function(e,t,n){n(168)("asyncIterator")},function(e,t,n){n(168)("observable")},function(e,t,n){e.exports={default:n(550),__esModule:!0}},function(e,t,n){n(551),e.exports=n(28).Object.setPrototypeOf},function(e,t,n){var r=n(55);r(r.S,"Object",{setPrototypeOf:n(552).set})},function(e,t,n){var r=n(73),i=n(72),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(156)(Function.call,n(169).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){e.exports={default:n(554),__esModule:!0}},function(e,t,n){n(555);var r=n(28).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(55);r(r.S,"Object",{create:n(165)})},function(e,t,n){e.exports={default:n(557),__esModule:!0}},function(e,t,n){n(558),e.exports=n(28).Object.getPrototypeOf},function(e,t,n){var r=n(89),i=n(264);n(266)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){e.exports={default:n(560),__esModule:!0}},function(e,t,n){n(561);var r=n(28).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(64),i=n(169).f;n(266)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(563)),o=r(n(95)),a=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","shiftKey","target","timeStamp","view","type"];function s(e){return null==e}var l=[{reg:/^key/,props:["char","charCode","key","keyCode","which"],fix:function(e,t){s(e.which)&&(e.which=s(t.charCode)?t.keyCode:t.charCode),void 0===e.metaKey&&(e.metaKey=e.ctrlKey)}},{reg:/^touch/,props:["touches","changedTouches","targetTouches"]},{reg:/^hashchange$/,props:["newURL","oldURL"]},{reg:/^gesturechange$/i,props:["rotation","scale"]},{reg:/^(mousewheel|DOMMouseScroll)$/,props:[],fix:function(e,t){var n=void 0,r=void 0,i=void 0,o=t.wheelDelta,a=t.axis,s=t.wheelDeltaY,l=t.wheelDeltaX,c=t.detail;o&&(i=o/120),c&&(i=0-(c%3==0?c/3:c)),void 0!==a&&(a===e.HORIZONTAL_AXIS?(r=0,n=0-i):a===e.VERTICAL_AXIS&&(n=0,r=i)),void 0!==s&&(r=s/120),void 0!==l&&(n=-1*l/120),n||r||(r=i),void 0!==n&&(e.deltaX=n),void 0!==r&&(e.deltaY=r),void 0!==i&&(e.delta=i)}},{reg:/^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,props:["buttons","clientX","clientY","button","offsetX","relatedTarget","which","fromElement","toElement","offsetY","pageX","pageY","screenX","screenY"],fix:function(e,t){var n=void 0,r=void 0,i=void 0,o=e.target,a=t.button;return o&&s(e.pageX)&&!s(t.clientX)&&(r=(n=o.ownerDocument||document).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===o?e.toElement:e.fromElement),e}}];function c(){return!0}function u(){return!1}function d(e){var t=e.type,n="function"==typeof e.stopPropagation||"boolean"==typeof e.cancelBubble;i.default.call(this),this.nativeEvent=e;var r=u;"defaultPrevented"in e?r=e.defaultPrevented?c:u:"getPreventDefault"in e?r=e.getPreventDefault()?c:u:"returnValue"in e&&(r=!1===e.returnValue?c:u),this.isDefaultPrevented=r;var o=[],s=void 0,d=void 0,h=a.concat();for(l.forEach((function(e){t.match(e.reg)&&(h=h.concat(e.props),e.fix&&o.push(e.fix))})),s=h.length;s;)this[d=h[--s]]=e[d];for(!this.target&&n&&(this.target=e.srcElement||document),this.target&&3===this.target.nodeType&&(this.target=this.target.parentNode),s=o.length;s;)(0,o[--s])(this,e);this.timeStamp=e.timeStamp||Date.now()}var h=i.default.prototype;(0,o.default)(d.prototype,h,{constructor:d,preventDefault:function(){var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,h.preventDefault.call(this)},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,h.stopPropagation.call(this)}}),t.default=d,e.exports=t.default},function(e,t,n){"use strict";function r(){return!1}function i(){return!0}function o(){this.timeStamp=Date.now(),this.target=void 0,this.currentTarget=void 0}Object.defineProperty(t,"__esModule",{value:!0}),o.prototype={isEventObject:1,constructor:o,isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r,preventDefault:function(){this.isDefaultPrevented=i},stopPropagation:function(){this.isPropagationStopped=i},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},halt:function(e){e?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()}},t.default=o,e.exports=t.default},function(e,t,n){e.exports={default:n(565),__esModule:!0}},function(e,t,n){n(261),n(566),e.exports=n(28).Array.from},function(e,t,n){"use strict";var r=n(156),i=n(55),o=n(89),a=n(567),s=n(568),l=n(258),c=n(569),u=n(570);i(i.S+i.F*!n(572)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,h=o(e),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,m=void 0!==g,b=0,v=u(h);if(m&&(g=r(g,p>2?arguments[2]:void 0,2)),null==v||f==Array&&s(v))for(n=new f(t=l(h.length));t>b;b++)c(n,b,m?g(h[b],b):h[b]);else for(d=v.call(h),n=new f;!(i=d.next()).done;b++)c(n,b,m?a(d,g,[i.value,b],!0):i.value);return n.length=b,n}})},function(e,t,n){var r=n(72);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(90),i=n(43)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){"use strict";var r=n(57),i=n(88);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(571),i=n(43)("iterator"),o=n(90);e.exports=n(28).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(158),i=n(43)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(43)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(290))},function(e){e.exports=JSON.parse('{"name":"plivet","version":"1.0.0","description":"","main":"index.js","author":"","license":"MIT","engines":{"node":">= 10.20.1 <=16.13.2"},"scripts":{"ts-lint":"tslint --fix \'src/**/*.tsx\'","start":"opener http://localhost:8080 && cross-env NODE_ENV=dev webpack-dev-server --config webpack.config.dev.js","build":"yarn clean && cross-env NODE_ENV=prod webpack --config webpack.config.js && yarn license","license":"license-list-html -o ./dist/licenses.html -a RYOSKATE","test":"jest","deduplicate":"yarn-deduplicate yarn.lock && git add yarn.lock","clean":"shx rm -rf dist"},"husky":{"hooks":{"pre-commit":"yarn deduplicate && yarn install"}},"lint-staged":{"*.{ts,tsx}":["tslint --fix","git add"],"yarn.lock":["git add"]},"dependencies":{},"devDependencies":{"@babel/cli":"7.23.0","@babel/core":"7.23.2","@babel/plugin-proposal-class-properties":"7.18.6","@babel/plugin-proposal-object-rest-spread":"7.20.7","@babel/plugin-syntax-dynamic-import":"7.8.3","@babel/plugin-transform-runtime":"7.23.2","@babel/plugin-transform-typescript":"7.22.15","@babel/polyfill":"7.12.1","@babel/preset-env":"7.23.2","@babel/preset-react":"7.22.15","@babel/preset-typescript":"7.23.2","@types/ace":"0.0.52","@types/bootstrap":"^3.4.0","@types/enzyme":"3.10.18","@types/enzyme-adapter-react-16":"1.0.8","@types/events":"3.0.3","@types/jest":"25.2.3","@types/jquery":"3.5.32","@types/rc-slider":"8.6.5","@types/react":"16.14.21","@types/react-bootstrap":"0.32.37","@types/react-dom":"17.0.0","@types/react-event-listener":"0.4.15","@types/react-numeric-input":"2.2.7","@types/react-select":"3.0.26","@types/string-hash":"1.1.3","babel-loader":"8.2.3","bootstrap":"^3.4.1","core-js":"3.8.0","cross-env":"7.0.3","css-loader":"5.0.2","enzyme":"3.11.0","enzyme-adapter-react-16":"1.15.7","events":"3.2.0","file-loader":"6.2.0","fork-ts-checker-webpack-plugin":"4.1.6","happypack":"5.0.1","hard-source-webpack-plugin":"0.13.1","hashids":"2.2.2","hex-rgb":"4.2.0","html-webpack-plugin":"4.5.2","husky":"4.3.8","identity-obj-proxy":"3.0.0","jest":"26.6.3","jquery":"3.5.1","konva":"4.2.2","license-list-html":"1.0.6","lint-staged":"10.5.4","opener":"1.5.2","popper.js":"1.16.1","prettier":"2.2.1","rc-slider":"9.2.4","react":"16.14.0","react-ace":"8.1.0","react-bootstrap":"0.33.1","react-container-dimensions":"1.4.1","react-dom":"16.14.0","react-download-link":"2.3.0","react-konva":"16.9.0-1","react-numeric-input":"2.2.3","react-select":"3.1.1","react-test-renderer":"16.14.0","shx":"0.3.4","string-hash":"1.1.3","style-loader":"2.0.0","thread-loader":"3.0.4","ts-jest":"25.5.1","tslint":"6.1.3","tslint-config-prettier":"1.18.0","tslint-config-standard":"9.0.0","tslint-loader":"3.5.4","tslint-plugin-prettier":"2.3.0","typescript":"4.1.5","unicoen.ts":"0.5.0","url-loader":"4.1.1","vector2d":"3.0.0","webpack":"4.44.2","webpack-bundle-analyzer":"3.9.0","webpack-cli":"3.3.12","webpack-dev-server":"3.11.3","webpack-merge":"5.8.0","yarn-deduplicate":"2.1.1"}}')},function(e,t,n){"use strict";n.r(t);var r,i,o,a,s,l,c=n(0),u=n.n(c),d=n(17),h=n.n(d),f=n(21),p=n.n(f),g=n(171),m={insert:"head",singleton:!1},b=(p()(g.a,m),g.a.locals,n(289)),v=n.n(b),y=n(32),w=n.n(y),x=n(18),S=n.n(x),k=n(29),_=n.n(k),C=n(38),E=n.n(C),T=n(46),O=n.n(T),A={howToUse:"使い方",close:"閉じる",debugStart:"現在のプログラムで再ステップ実行",debugStop:"実行終了",debugBackAll:"実行中のプログラムを最初のステップに戻す",debugStepBack:"実行中のプログラムを1ステップ戻す",debugStep:"プログラムを1ステップ実行する",debugStepAll:"プログラムを最後まで実行する",changeThemedark:"ダークテーマに切り替える",changeThemelight:"ライトテーマに切り替える",zoomOut:"エディタのフォントサイズを小さくする",zoomIn:"エディタのフォントサイズを大きくする",zoomReset:"エディタのフォントサイズをリセットする",howToText:["下のエディタにプログラムを書き、上のボタンを押すことで可視化実行ができます。","(マウスカーソルを重ねるとで各ボタンの説明が表示されます。)"],uploadFile:"アップロードされたファイルはここに表示されます。",warning:"警告!",editInDebug:"実行中のソースコードが編集されました。\nプログラムの挙動には反映されませんが、\nコードのハイライトが等がずれる恐れがあります。",continueDebug:"続行",restart:"再実行",rememberCommand:"この選択を記憶する",sourceCodeCcpp:String.raw(r||(r=O()(['#include\nint recursiveToThree(int n){\n printf("%d th\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//変数定義\n\n n = recursiveToThree(0);//再帰関数呼出\n\n int arr[5] = {1, 2, 3};//配列変数\n\n int* ptr = &arr[2];//ポインタ変数\n *ptr = 5;\n\n //動的メモリ確保\n int* d_arry = malloc(sizeof(int) * 3);\n\n //二次元ポインタ配列の動的メモリ配列\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n free(pd_arr[0]);//メモリの解放\n\n printf("Hello,world!\n");//標準出力\n\n //ファイル出力\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //ファイル入力\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n\n return 0;\n}'],['#include\nint recursiveToThree(int n){\n printf("%d th\\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//変数定義\n\n n = recursiveToThree(0);//再帰関数呼出\n\n int arr[5] = {1, 2, 3};//配列変数\n\n int* ptr = &arr[2];//ポインタ変数\n *ptr = 5;\n\n //動的メモリ確保\n int* d_arry = malloc(sizeof(int) * 3);\n\n //二次元ポインタ配列の動的メモリ配列\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n free(pd_arr[0]);//メモリの解放\n\n printf("Hello,world!\\n");//標準出力\n\n //ファイル出力\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //ファイル入力\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n\n return 0;\n}']))),sourceCodeJava:String.raw(i||(i=O()(["import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int r = sc.nextInt();\n if (n == 0) {\n break;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = n - i;\n }\n for (int i = 0; i < r; i++) {\n int p = sc.nextInt();\n int c = sc.nextInt();\n p--;\n for (int j = 0; j < c; j++) {\n b[j] = a[p + j];\n }\n for (int j = 0; j < p; j++) {\n b[c + j] = a[j];\n }\n for (int j = 0; j < p + c; j++) {\n a[j] = b[j];\n }\n }\n System.out.println(a[0]);\n }\n }\n}"]))),sourceCodePython:String.raw(o||(o=O()(["while True:\n n, r = map(int, input().split())\n if n == 0:\n break\n a = [0] * n\n b = [0] * n\n for i in range(n):\n a[i] = b[i] = n - i\n for i in range(r):\n p, c = map(int, input().split())\n p = p - 1\n for j in range(c):\n b[j] = a[p + j]\n for j in range(p):\n b[c + j] = a[j]\n for j in range(p + c):\n a[j] = b[j]\n print(a[0])\n"])))},M={howToUse:"How to use",close:"Close",debugStart:"restart step execution",debugStop:"stop execution",debugBackAll:"go backward for all steps",debugStepBack:"step backward",debugStep:"step forward",debugStepAll:"execute all step",changeThemedark:"change to dark theme",changeThemelight:"change to light theme",zoomOut:"change the font size to smaller.",zoomIn:"change the font size to larger.",zoomReset:"reset the font size",howToText:["PVC.js has five GUI components:","(1) editor, (2) execution controller, buttons, (3) I/O window, (4) canvas for visualization, and (5) file upload form.","Users can write source code in the editor. Clicking on the execution control buttons initiates the step execution.","The I/O window shows the content of the standard output written by the program (e.g., printf) and accepts standard input (e.g., scanf).","Canvas shows the program's execution status using tables and figures.","PVC.js adaptively changes its layout to correspond with the size of the browser window."],uploadFile:"The uploaded file will be displayed here.",warning:"Warning!",editInDebug:"The source code being executed has been edited.\nProgram behavior is not affected by changing code. \nHowever, the highlight of the code may be out of place.",continueDebug:"Continue",restart:"Restart",rememberCommand:"Remember this choice",sourceCodeCcpp:String.raw(a||(a=O()(['#include\nint recursiveToThree(int n){\n printf("%d th\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//variable declaration\n\n n = recursiveToThree(0);//recursive function\n\n int arr[5] = {1, 2, 3};//array variable\n\n int* ptr = &arr[2];//pointer variable\n *ptr = 5;\n\n //dynamic memory allocation\n int* d_arry = malloc(sizeof(int) * 3);\n\n //two-dimensional dynamic array\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n printf("Hello,world!\n");//standard output\n\n free(pd_arr[0]);//memory leak\n\n //File Output\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //File Input\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n return 0;\n}'],['#include\nint recursiveToThree(int n){\n printf("%d th\\n", n + 1);\n if(n < 3){\n int r = recursiveToThree(n + 1);\n n = r;\n }\n return n;\n}\nint main(){\n int n = 0;//variable declaration\n\n n = recursiveToThree(0);//recursive function\n\n int arr[5] = {1, 2, 3};//array variable\n\n int* ptr = &arr[2];//pointer variable\n *ptr = 5;\n\n //dynamic memory allocation\n int* d_arry = malloc(sizeof(int) * 3);\n\n //two-dimensional dynamic array\n int* pd_arr[2];\n pd_arr[0] = malloc(sizeof(int) * 2);\n pd_arr[1] = malloc(sizeof(int) * 2);\n\n printf("Hello,world!\\n");//standard output\n\n free(pd_arr[0]);//memory leak\n\n //File Output\n {\n FILE* fp=NULL;\n fp = fopen("PLIVET.txt", "w");\n fputs("PLIVET", fp);\n fclose(fp);\n }\n\n //File Input\n {\n FILE* fp=NULL;\n char buf[7];\n fp = fopen("PLIVET.txt", "r");\n while(fgets(buf,10,fp) != NULL) {\n printf("%s",buf);\n }\n fclose(fp);\n }\n return 0;\n}']))),sourceCodeJava:String.raw(s||(s=O()(["import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int r = sc.nextInt();\n if (n == 0) {\n break;\n }\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = n - i;\n }\n for (int i = 0; i < r; i++) {\n int p = sc.nextInt();\n int c = sc.nextInt();\n p--;\n for (int j = 0; j < c; j++) {\n b[j] = a[p + j];\n }\n for (int j = 0; j < p; j++) {\n b[c + j] = a[j];\n }\n for (int j = 0; j < p + c; j++) {\n a[j] = b[j];\n }\n }\n System.out.println(a[0]);\n }\n }\n}"]))),sourceCodePython:String.raw(l||(l=O()(["while True:\n n, r = map(int, input().split())\n if n == 0:\n break\n a = [0] * n\n b = [0] * n\n for i in range(n):\n a[i] = b[i] = n - i\n for i in range(r):\n p, c = map(int, input().split())\n p = p - 1\n for j in range(c):\n b[j] = a[p + j]\n for j in range(p):\n b[c + j] = a[j]\n for j in range(p + c):\n a[j] = b[j]\n print(a[0])\n"])))};var $=(e,t)=>"ja"===e?A[t]:M[t];class P extends c.Component{constructor(e){super(e),this.state={isShow:!1}}renderModalHeader(){return c.createElement(E.a.Header,{closeButton:!0},c.createElement(E.a.Title,null,$(this.props.lang,"howToUse")))}renderModalBody(){const e=$(this.props.lang,"howToText");return c.createElement(E.a.Body,null,e.map((e,t)=>c.createElement("p",{key:t},e.trim())))}renderModalFooter(){return c.createElement(E.a.Footer,null,c.createElement(_.a,{onClick:this.props.handleHideModal},$(this.props.lang,"close")))}render(){return c.createElement("div",null,c.createElement(E.a,{className:"modal-container",show:!0,"aria-labelledby":"ModalHeader",onHide:this.props.handleHideModal,animation:!0,tabIndex:-1,role:"dialog"},this.renderModalHeader(),this.renderModalBody(),this.renderModalFooter()))}}class R extends c.Component{constructor(e){super(e),this.handleHideModal=this.handleHideModal.bind(this),this.handleShowModal=this.handleShowModal.bind(this),this.state={showModal:!1}}handleHideModal(){this.setState({showModal:!1})}handleShowModal(){this.setState({showModal:!0})}render(){return c.createElement("a",{href:"#popup1",className:"popup_btn"},c.createElement(_.a,{className:"btn btn-default btn-block",onClick:this.handleShowModal},$(this.props.lang,"howToUse")),this.state.showModal?c.createElement(P,{handleHideModal:this.handleHideModal,lang:this.props.lang}):null)}}var L=n(2),N=n.n(L);n(410),n(412),n(413),n(417);function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){for(var n=0;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0f)&&(j=(H=H.replace(" ",":")).length),0=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},ie={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var oe=/[A-Z]|^ms/g,ae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,se=function(e){return 45===e.charCodeAt(1)},le=function(e){return null!=e&&"boolean"!=typeof e},ce=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return se(e)?e:e.replace(oe,"-$&").toLowerCase()})),ue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ae,(function(e,t,n){return he={name:t,styles:n,next:he},t}))}return 1===ie[e]||se(e)||"number"!=typeof t||0===t?t:t+"px"};function de(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return he={name:n.name,styles:n.styles,next:he},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)he={name:i.name,styles:i.styles,next:he},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Me=n(3);function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1}function Ue(e){return He(e)?window.pageYOffset:e.scrollTop}function We(e,t){He(e)?window.scrollTo(0,t):e.scrollTop=t}function Ve(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:De,i=Ue(e),o=t-i,a=10,s=0;function l(){var t=Ve(s+=a,i,o,n);We(e,t),s=f)return{placement:"bottom",maxHeight:t};if(k>=f&&!a)return o&&Ge(l,_,160),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&x>=r)return o&&Ge(l,_,160),{placement:"bottom",maxHeight:a?x-v:k-v};if("auto"===i||a){var E=t,T=a?w:S;return T>=r&&(E=Math.min(T-v-s.controlHeight,t)),{placement:"top",maxHeight:E}}if("bottom"===i)return We(l,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=f)return{placement:"top",maxHeight:t};if(S>=f&&!a)return o&&Ge(l,C,160),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var O=t;return(!a&&S>=r||a&&w>=r)&&(O=a?w-y:S-y),o&&Ge(l,C,160),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var Ze=function(e){return"auto"===e?"bottom":e},Je=Object(c.createContext)({getPortalPlacement:null}),et=function(e){z(n,e);var t=Xe(n);function n(){var e;F(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0,p=u-d-c,g=!1;p>n&&e.isBottom&&(o&&o(t),e.isBottom=!1),f&&e.isTop&&(s&&s(t),e.isTop=!1),f&&n>p?(i&&!e.isBottom&&i(t),h.scrollTop=u,g=!0,e.isBottom=!0):!f&&-n>c&&(a&&!e.isTop&&a(t),h.scrollTop=0,g=!0,e.isTop=!0),g&&e.cancelScroll(t)},e.onWheel=function(t){e.handleEventDelta(t,t.deltaY)},e.onTouchStart=function(t){e.touchStart=t.changedTouches[0].clientY},e.onTouchMove=function(t){var n=e.touchStart-t.changedTouches[0].clientY;e.handleEventDelta(t,n)},e.getScrollTarget=function(t){e.scrollTarget=t},e}return D(n,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){"function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1)}},{key:"render",value:function(){return u.a.createElement(Xt,{innerRef:this.getScrollTarget},this.props.children)}}]),n}(c.Component);function fn(e){var t=e.isEnabled,n=void 0===t||t,r=Ae(e,["isEnabled"]);return n?u.a.createElement(hn,r):r.children}var pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,i=t.label,o=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(i||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},gn=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},mn=function(e){return!!e.isDisabled};var bn={clearIndicator:vt,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:bt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:rt,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return Ne(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ne(t,"backgroundColor",a.neutral0),Ne(t,"borderRadius",i),Ne(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ne(t,"marginBottom",o.menuGutter),Ne(t,"marginTop",o.menuGutter),Ne(t,"position","absolute"),Ne(t,"width","100%"),Ne(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:nt,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var vn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}};function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:mn,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},_n=1,Cn=function(e){z(n,e);var t=xn(n);function n(e){var r;F(this,n),(r=t.call(this,e)).state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},r.blockOptionHover=!1,r.isComposing=!1,r.clearFocusValueOnUpdate=!1,r.commonProps=void 0,r.components=void 0,r.hasGroups=!1,r.initialTouchX=0,r.initialTouchY=0,r.inputIsHiddenAfterUpdate=void 0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.cacheComponents=function(e){var t;r.components=(t={components:e},Lt(Lt({},Nt),t.components))},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;i(e,wn(wn({},t),{},{name:o}))},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,a=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.inputIsHiddenAfterUpdate=!a,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=r.state.selectValue;if(i)if(r.isOptionSelected(e,o)){var a=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==a})),"deselect-option",e),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(e)}})}else r.isOptionDisabled(e,o)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue([].concat(Le(o),[e]),"select-option",e),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));else r.isOptionDisabled(e,o)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue(e,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));n&&r.blurInput()},r.removeValue=function(e){var t=r.state.selectValue,n=r.getOptionValue(e),i=t.filter((function(e){return r.getOptionValue(e)!==n}));r.onChange(i.length?i:null,{action:"remove-value",removedValue:e}),r.announceAriaLiveSelection({event:"remove-value",context:{value:e?r.getOptionLabel(e):""}}),r.focusInput()},r.clearValue=function(){var e=r.props.isMulti;r.onChange(e?[]:null,{action:"clear"})},r.popValue=function(){var e=r.state.selectValue,t=e[e.length-1],n=e.slice(0,e.length-1);r.announceAriaLiveSelection({event:"pop-value",context:{value:t?r.getOptionLabel(t):""}}),r.onChange(n.length?n:null,{action:"pop-value",removedValue:t})},r.getOptionLabel=function(e){return r.props.getOptionLabel(e)},r.getOptionValue=function(e){return r.props.getOptionValue(e)},r.getStyles=function(e,t){var n=bn[e](t);n.boxSizing="border-box";var i=r.props.styles[e];return i?i(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getActiveDescendentId=function(){var e=r.props.menuIsOpen,t=r.state,n=t.menuOptions,i=t.focusedOption;if(i&&e){var o=n.focusable.indexOf(i),a=n.render[o];return a&&a.key}},r.announceAriaLiveSelection=function(e){var t=e.event,n=e.context;r.setState({ariaLiveSelection:gn(t,n)})},r.announceAriaLiveContext=function(e){var t=e.event,n=e.context;r.setState({ariaLiveContext:pn(t,wn(wn({},n),{},{label:r.props["aria-label"]}))})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&He(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){var t=r.props,n=t.isSearchable,i=t.isMulti;r.props.onFocus&&r.props.onFocus(e),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:i}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){var e=r.props,t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,f=r.state,p=f.focusedOption,g=f.focusedValue,m=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)r.removeValue(g);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!p||h&&r.isOptionSelected(p,m))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":c?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&o&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.buildMenuOptions=function(e,t){var n=e.inputValue,i=void 0===n?"":n,o=e.options,a=function(e,n){var o=r.isOptionDisabled(e,t),a=r.isOptionSelected(e,t),s=r.getOptionLabel(e),l=r.getOptionValue(e);if(!(r.shouldHideSelectedOptions()&&a||!r.filterOption({label:s,value:l,data:e},i))){var c=o?void 0:function(){return r.onOptionHover(e)},u=o?void 0:function(){return r.selectOption(e)},d="".concat(r.getElementId("option"),"-").concat(n);return{innerProps:{id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:d,label:s,type:"option",value:l}}};return o.reduce((function(e,t,n){if(t.options){r.hasGroups||(r.hasGroups=!0);var i=t.options.map((function(t,r){var i=a(t,"".concat(n,"-").concat(r));return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o="".concat(r.getElementId("group"),"-").concat(n);e.render.push({type:"group",key:o,data:t,options:i})}}else{var s=a(t,"".concat(n));s&&(e.render.push(s),e.focusable.push(t))}return e}),{render:[],focusable:[]})};var i=e.value;r.cacheComponents=G(r.cacheComponents,ut).bind(H(r)),r.cacheComponents(e.components),r.instancePrefix="react-select-"+(r.props.instanceId||++_n);var o=Be(i);r.buildMenuOptions=G(r.buildMenuOptions,(function(e,t){var n=Re(e,2),r=n[0],i=n[1],o=Re(t,2),a=o[0];return ut(i,o[1])&&ut(r.inputValue,a.inputValue)&&ut(r.options,a.options)})).bind(H(r));var a=e.menuIsOpen?r.buildMenuOptions(e,o):{render:[],focusable:[]};return r.state.menuOptions=a,r.state.selectValue=o,r}return D(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,i=t.menuIsOpen,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.menuIsOpen!==i||e.inputValue!==o){var a=Be(e.value),s=e.menuIsOpen?this.buildMenuOptions(e,a):{render:[],focusable:[]},l=this.getNextFocusedValue(a),c=this.getNextFocusedOption(s.focusable);this.setState({menuOptions:s,selectValue:a,focusedOption:c,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,i,o,a=this.props,s=a.isDisabled,l=a.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?We(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o-1&&(s=l)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:o,focusedValue:null,focusedOption:o.focusable[s]},(function(){t.onMenuOpen(),t.announceAriaLiveContext({event:"menu"})}))}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,c=-1;if(o.length){switch(e){case"previous":c=0===s?0:-1===s?l:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,i=n.menuOptions,o=i.focusable;if(o.length){var a=0,s=o.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=s>0?s-1:o.length-1:"down"===e?a=(s+1)%o.length:"pageup"===e?(a=s-t)<0&&(a=0):"pagedown"===e?(a=s+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:mn(o[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(vn):wn(wn({},vn),this.props.theme):vn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,a=i.isMulti,s=i.isRtl,l=i.options,c=this.state.selectValue,u=this.hasValue();return{cx:ze.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:a,isRtl:s,options:l,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,s=o.menuIsOpen,l=o.inputValue,c=o.screenReaderStatus,u=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=i&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"",h=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(d," ").concat(h," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,a=e.form,s=this.components.Input,l=this.state.inputIsHidden,c=r||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!n)return u.a.createElement(qt,Object(Me.a)({id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:De,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:a,value:""},d));var h=this.commonProps,f=h.cx,p=h.theme,g=h.selectProps;return u.a.createElement(s,Object(Me.a)({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:g,spellCheck:"false",tabIndex:o,form:a,theme:p,type:"text",value:i},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,d=c.controlShouldRenderValue,h=c.isDisabled,f=c.isMulti,p=c.inputValue,g=c.placeholder,m=this.state,b=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!d)return p?null:u.a.createElement(s,Object(Me.a)({},l,{key:"placeholder",isDisabled:h,isFocused:y}),g);if(f)return b.map((function(t,a){var s=t===v;return u.a.createElement(n,Object(Me.a)({},l,{components:{Container:r,Label:i,Remove:o},isFocused:s,isDisabled:h,key:e.getOptionValue(t),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var w=b[0];return u.a.createElement(a,Object(Me.a)({},l,{data:w,isDisabled:h}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return u.a.createElement(e,Object(Me.a)({},t,{innerProps:a,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!e||!i)return null;return u.a.createElement(e,Object(Me.a)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return u.a.createElement(n,Object(Me.a)({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return u.a.createElement(e,Object(Me.a)({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,d=this.commonProps,h=this.state,f=h.focusedOption,p=h.menuOptions,g=this.props,m=g.captureMenuScroll,b=g.inputValue,v=g.isLoading,y=g.loadingMessage,w=g.minMenuHeight,x=g.maxMenuHeight,S=g.menuIsOpen,k=g.menuPlacement,_=g.menuPosition,C=g.menuPortalTarget,E=g.menuShouldBlockScroll,T=g.menuShouldScrollIntoView,O=g.noOptionsMessage,A=g.onMenuScrollToTop,M=g.onMenuScrollToBottom;if(!S)return null;var $,P=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,u.a.createElement(c,Object(Me.a)({},d,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())$=p.render.map((function(t){if("group"===t.type){t.type;var i=Ae(t,["type"]),o="".concat(t.key,"-heading");return u.a.createElement(n,Object(Me.a)({},d,i,{Heading:r,headingProps:{id:o},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e)})))}if("option"===t.type)return P(t)}));else if(v){var R=y({inputValue:b});if(null===R)return null;$=u.a.createElement(s,d,R)}else{var L=O({inputValue:b});if(null===L)return null;$=u.a.createElement(l,d,L)}var N={minMenuHeight:w,maxMenuHeight:x,menuPlacement:k,menuPosition:_,menuShouldScrollIntoView:T},F=u.a.createElement(et,Object(Me.a)({},d,N),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return u.a.createElement(i,Object(Me.a)({},d,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),u.a.createElement(fn,{isEnabled:m,onTopArrive:A,onBottomArrive:M},u.a.createElement(un,{isEnabled:E},u.a.createElement(o,Object(Me.a)({},d,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:s}),$))))}));return C||"fixed"===_?u.a.createElement(a,Object(Me.a)({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:_}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,a=this.state.selectValue;if(o&&!r){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return u.a.createElement("input",{name:o,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return u.a.createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):u.a.createElement("input",{name:o,type:"hidden"});return u.a.createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return u.a.createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?u.a.createElement(Kt,{"aria-live":"polite"},u.a.createElement("span",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),u.a.createElement("span",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,a=o.className,s=o.id,l=o.isDisabled,c=o.menuIsOpen,d=this.state.isFocused,h=this.commonProps=this.getCommonProps();return u.a.createElement(r,Object(Me.a)({},h,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:d}),this.renderLiveRegion(),u.a.createElement(t,Object(Me.a)({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:d,menuIsOpen:c}),u.a.createElement(i,Object(Me.a)({},h,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),u.a.createElement(n,Object(Me.a)({},h,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),n}(c.Component);function En(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return U(this,n)}}Cn.defaultProps=kn;var Tn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null};function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return U(this,n)}}c.Component;var An,Mn,$n,Pn=(An=Cn,$n=Mn=function(e){z(n,e);var t=En(n);function n(){var e;F(this,n);for(var r=arguments.length,i=new Array(r),o=0;o1?n-1:0),i=1;i{if(this.setState({selectedOption:e}),e&&"value"in e){const t=e.value;Object(Rn.a)(this.props.signal,t)}}),this.state={selectedOption:this.props.options[0]}}render(){return c.createElement(Pn,{value:this.state.selectedOption,onChange:this.handleChange,options:this.props.options,isDisabled:this.props.isDisabled})}}class Nn extends c.Component{constructor(e){super(e),this.state={isDebugging:!1},Object(Rn.b)("debug",e=>{"Stop"===e?this.setState({isDebugging:!1}):"Start"!==e&&"Exec"!==e||this.setState({isDebugging:!0})})}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(Ln,{signal:"changeLang",options:[{value:"ja",label:"日本語"},{value:"en",label:"English"}]})),c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(Ln,{signal:"changeProgLang",options:[{value:"c_cpp",label:"C"},{value:"java",label:"Java(WIP)"},{value:"python",label:"Python(WIP)"}],isDisabled:this.state.isDebugging})),c.createElement(S.a,{lg:4,md:4,sm:4,xs:4},c.createElement(R,{lang:this.props.lang})))}}var Fn=n(274),In=n.n(Fn),Dn=n(174),jn=n.n(Dn),zn=n(76),Bn=n.n(zn);class Hn extends c.Component{constructor(e){super(e)}render(){return c.createElement(_.a,{title:$(this.props.lang,"".concat(this.props.signal).concat(this.props.command)),onClick:()=>{void 0!==this.props.onClick&&this.props.onClick(),Object(Rn.a)(this.props.signal,this.props.command)},className:"btn-outline-dark",disabled:!this.props.enable},c.createElement(Bn.a,{glyph:this.props.icon,className:this.props.iconClass}))}}var Un=n(173),Wn={insert:"head",singleton:!1};p()(Un.a,Wn),Un.a.locals;class Vn extends c.Component{constructor(e){super(e),this.state={Start:!1,Stop:!1,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0}}componentWillReceiveProps(e){switch(e.debugState){case"Stop":this.setState({Start:!1,Stop:!1,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"First":this.setState({Start:!0,Stop:!0,BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"stdin":this.setState({BackAll:!1,StepBack:!1,Step:!0,StepAll:!0});break;case"Debugging":this.setState({BackAll:!0,StepBack:!0,Step:!0,StepAll:!0});break;case"Executing":this.setState({BackAll:!1,StepBack:!1,Step:!1,StepAll:!1});break;case"EOF":this.setState({Start:!0,Stop:!0,BackAll:!0,StepBack:!0,Step:!1,StepAll:!1})}}render(){const e=this.props.lang;return c.createElement(In.a,{style:{marginTop:"1vh",marginBottom:"1vh"}},c.createElement(jn.a,null,c.createElement(Hn,{lang:e,signal:"debug",command:"Start",icon:"repeat",enable:this.state.Start,iconClass:this.state.Start?"icon-green":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"Stop",icon:"stop",enable:this.state.Stop,iconClass:this.state.Stop?"icon-red":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"BackAll",icon:"backward",enable:this.state.BackAll,iconClass:this.state.BackAll?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:"StepBack",icon:"arrow-left",enable:this.state.StepBack,iconClass:this.state.StepBack?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:this.state.Stop?"Step":"Start",icon:"arrow-right",enable:this.state.Step,iconClass:this.state.Step?"icon-blue":void 0}),c.createElement(Hn,{lang:e,signal:"debug",command:this.state.Stop?"StepAll":"Exec",icon:"forward",enable:this.state.StepAll,iconClass:this.state.StepAll?"icon-blue":void 0})),c.createElement(jn.a,null,c.createElement(Hn,{lang:e,signal:"zoom",command:"Out",icon:"zoom-out",enable:!0}),c.createElement(Hn,{lang:e,signal:"zoom",command:"Reset",icon:"search",enable:!0}),c.createElement(Hn,{lang:e,signal:"zoom",command:"In",icon:"zoom-in",enable:!0})))}}class Gn extends c.Component{constructor(e){super(e),this.state={debugStatus:"",debugState:"Stop"},Object(Rn.b)("changeState",(e,t)=>{let n="";n="Debugging"===e?"Step ".concat(t):e,this.setState({debugStatus:n,debugState:e})})}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:12,md:12,sm:12,xs:12,style:{zIndex:1e3}},c.createElement(Nn,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Vn,{lang:this.props.lang,debugState:this.state.debugState})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},"DebugStatus: ",this.state.debugStatus))}}n(230),n(61);var Kn=n(276),qn=n.n(Kn),Yn=n(277),Xn=n.n(Yn),Qn=n(117),Zn=n.n(Qn),Jn=(n(436),n(437),n(438),n(439),n(440),n(441),n(236),n(237),n(442),n(175)),er={insert:"head",singleton:!1},tr=(p()(Jn.a,er),Jn.a.locals,n(77));class nr extends c.Component{constructor(e){super(e),N()(this,"sentSourcecode",void 0),N()(this,"preventedCommand","Stop"),N()(this,"sourcecode",void 0),N()(this,"ace",null),N()(this,"editorRef",c.createRef()),N()(this,"lineNumOfBreakpoint",[]),N()(this,"isDebugging",!1),N()(this,"checkbox",null),N()(this,"noAlert",!1),N()(this,"highlightIds",[]),N()(this,"sourceCodeKey",e=>"sourceCode"+e.replace(/_/g,"").replace(/^[a-z]/g,e=>e.toUpperCase())),this.state={fontSize:14,showAlert:!1,theme:"light"};const{lang:t,progLang:n}=e;this.sourcecode=$(t,this.sourceCodeKey(n)),this.sentSourcecode="",this.hideAlert=this.hideAlert.bind(this),Object(Rn.b)("debug",(e,t)=>{this.send(e,t)}),Object(Rn.b)("EOF",e=>{this.recieve(e)}),Object(Rn.b)("stdin",e=>{this.recieve(e)}),Object(Rn.b)("Breakpoint",e=>{this.recieve(e)}),Object(Rn.b)("zoom",e=>{"In"===e?this.setState({fontSize:this.state.fontSize+1}):"Out"===e?this.setState({fontSize:Math.max(this.state.fontSize-1,10)}):"Reset"===e&&this.setState({fontSize:14})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})})}componentDidMount(){const e=this.editorRef.current.editor;e.on("keydown",e=>{console.log(e)}),e.on("guttermousedown",t=>{const n=t.domEvent.currentTarget;if(void 0!==n.className&&-1===n.className.indexOf("ace_gutter"))return;if(!e.isFocused())return;if(t.clientX>25+n.getBoundingClientRect().left)return;const r=t.getDocumentPosition().row,i=t.editor.getSession();this.lineNumOfBreakpoint.includes(r)?(i.clearBreakpoint(r),this.lineNumOfBreakpoint=this.lineNumOfBreakpoint.filter(e=>e!==r)):(i.setBreakpoint(r,"ace_breakpoint"),this.lineNumOfBreakpoint.push(r)),t.stop()})}componentWillReceiveProps(e){const{lang:t,progLang:n}=this.props,r=e.lang,i=e.progLang;r!==t?this.sourcecode===$(t,this.sourceCodeKey(n))&&(this.sourcecode=$(r,this.sourceCodeKey(i))):i!==n&&(this.sourcecode=$(r,this.sourceCodeKey(i)))}send(e,t){const n=this.sourcecode,r={sourcecode:n,controlEvent:e,stdinText:t,lineNumOfBreakpoint:this.lineNumOfBreakpoint,progLang:this.props.progLang};"SyntaxCheck"===e?tr.a.send(r).then(e=>{const{errors:t}=e;this.setSyntaxError(t)}).catch(e=>{console.log(e),alert(e)}):this.noAlert||!this.isDebugging||"BackAll"!==e&&"StepBack"!==e&&"Step"!==e&&"StepAll"!==e||n===this.sentSourcecode?(this.setState({showAlert:!1}),tr.a.send(r).then(e=>{this.recieve(e)}).catch(e=>{console.log(e),alert(e)})):(this.preventedCommand=e,this.setState({showAlert:!0}))}recieve(e){try{const{debugState:t,execState:n,output:r,step:i,sourcecode:o,files:a}=e;if(this.isDebugging="Stop"!==t,this.sentSourcecode=o,"Executing"===t)return;Object(Rn.a)("changeState",t,i),Object(Rn.a)("changeOutput",r),Object(Rn.a)("draw",n),Object(Rn.a)("files",a),this.setHighlightOnCode(t,n)}catch(e){console.log(e),alert(e)}}setHighlightOnCode(e,t){if("Stop"===e)return;if(void 0===t)return;let n=t.getNextExpr().codeRange;const r=this.ace.acequire("ace/range").Range,i=this.editorRef.current.editor;if(n){const t=new r(n.begin.y-1,n.begin.x,n.end.y-1,n.end.x+1);i.resize(!0),i.scrollToLine(n.begin.y,!0,!0,()=>{}),"EOF"===e?i.getSelection().setSelectionRange(new r(-1,0,-1,1)):i.getSelection().setSelectionRange(t)}}setSyntaxError(e){const t=this.editorRef.current.editor,n=e.map(e=>({row:e.line-1,column:e.charPositionInLine-1,text:e.getMsg(),type:"error"})),r=t.getSession();r.setAnnotations(n);for(const e of this.highlightIds)r.removeMarker(e);this.highlightIds=[];for(const e of n){const t=r.highlightLines(e.row,e.row,"error_line");this.highlightIds.push(t.id)}}render(){return c.createElement(c.Fragment,null,this.state.showAlert?this.renderAlert():null," ",this.renderEditor())}renderEditor(){const e=this.props.progLang,{fontSize:t,theme:n}=this.state;return c.createElement(Zn.a,{ref:this.editorRef,mode:e,theme:"light"===n?"textmate":"monokai",value:this.sourcecode,name:"sourcecode",fontSize:t,tabSize:2,editorProps:{$blockScrolling:1/0},setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,readOnly:!1},style:{height:"62vh",width:"auto"},className:"editorMain",onChange:e=>{this.sourcecode=e;const t=e=>{e===this.sourcecode&&Object(Rn.a)("debug","SyntaxCheck")};setTimeout(()=>t(e),1e3)},onBeforeLoad:e=>this.ace=e})}hideAlert(){this.setState({showAlert:!1})}renderAlert(){const{lang:e}=this.props,t=$(e,"warning"),n=$(e,"editInDebug"),r=$(e,"continueDebug"),i=$(e,"restart"),o=$(e,"rememberCommand");return c.createElement(E.a.Dialog,{className:"modal-container","aria-labelledby":"ModalHeader",tabIndex:-1,role:"dialog"},c.createElement(E.a.Header,{closeButton:!0},c.createElement(E.a.Title,null,t)),c.createElement(qn.a,{bsStyle:"danger"},c.createElement("p",null,n)),c.createElement(E.a.Footer,null,c.createElement(_.a,{bsStyle:"danger",onClick:()=>{this.isDebugging=!1,null!==this.checkbox&&(this.noAlert=this.checkbox.checked),Object(Rn.a)("debug",this.preventedCommand)}},r),c.createElement(_.a,{onClick:()=>{this.isDebugging=!1,null!==this.checkbox&&(this.noAlert=this.checkbox.checked),Object(Rn.a)("debug","Start")}},i),c.createElement(Xn.a,{validationState:"warning",inputRef:e=>this.checkbox=e},o)))}}n(443);var rr=n(176),ir={insert:"head",singleton:!1};p()(rr.a,ir),rr.a.locals;class or extends c.Component{constructor(e){super(e),this.state={output:"",theme:"light",isReadOnly:!0},this.onChange=this.onChange.bind(this),Object(Rn.b)("changeOutput",e=>{this.setState({output:e})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})}),Object(Rn.b)("changeState",async e=>{"stdin"===e&&this.setState({isReadOnly:!1})})}onChange(e){if(e.endsWith("\n")){const t=e.slice(0,-1).replace(this.state.output,"");this.setState({output:e,isReadOnly:!0}),Object(Rn.a)("debug","Step",t)}}render(){const{theme:e}=this.state;return c.createElement(Zn.a,{mode:"text",theme:"light"===e?"textmate":"monokai",value:this.state.output,onChange:this.onChange,name:"IO",fontSize:14,editorProps:{$blockScrolling:!0},setOptions:{enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,showLineNumbers:!1,readOnly:this.state.isReadOnly,showGutter:!1},style:{height:"18vh",width:"auto"},className:"console"})}}var ar=n(279),sr=n.n(ar),lr=n(281),cr=n.n(lr),ur=n(280),dr=n.n(ur),hr=n(93),fr=n.n(hr),pr=n(94),gr=n.n(pr),mr=n(177),br={insert:"head",singleton:!1},vr=(p()(mr.a,br),mr.a.locals,n(278)),yr=n.n(vr);class wr extends c.Component{constructor(e){super(e),this.deleteFile=this.deleteFile.bind(this)}deleteFile(){this.props.onFileDelete(this.props.filename)}render(){const{filename:e,arrayBuffer:t}=this.props;return c.createElement(fr.a,null,c.createElement(yr.a,{filename:e,label:c.createElement(_.a,{title:"download"},c.createElement(Bn.a,{glyph:"save"})),style:{marginLeft:10,marginRight:10},exportFile:()=>new Blob([t],{type:"application/octet-binary"})}),c.createElement(_.a,{title:"remove",onClick:this.deleteFile,style:{marginRight:"10px"}},c.createElement(Bn.a,{glyph:"trash"})),e)}}class xr extends c.Component{constructor(e){super(e),this.state={filelist:null},this.onFileSelected=this.onFileSelected.bind(this),this.onFileDelete=this.onFileDelete.bind(this),Object(Rn.b)("files",e=>{this.setState({filelist:e})})}async onFileSelected(e){const t=e.currentTarget,n=t.files;if(null!==n)try{const e=await tr.a.upload(n);this.setState({filelist:e}),t.value=""}catch(e){console.warn(e.message),alert("Failed to upload files")}}onFileDelete(e){const t=tr.a.delete(e);this.setState({filelist:t})}makeFileList(){const e=$(this.props.lang,"uploadFile"),t=[];if(t.push(c.createElement(fr.a,{key:"text"},e)),null!==this.state.filelist)for(const[e,n]of this.state.filelist)t.push(c.createElement(wr,{key:e,filename:e,arrayBuffer:n,onFileDelete:this.onFileDelete}));return t.push(c.createElement(fr.a,{key:"submit"},c.createElement(sr.a,null,c.createElement(dr.a,{type:"file",id:"files",name:"files[]",multiple:!0,onChange:this.onFileSelected})))),t}render(){const e=this.makeFileList();return c.createElement(cr.a,{id:"file-form",accordion:!1,className:"file-form"},c.createElement(gr.a,{eventKey:"1"},c.createElement(gr.a.Heading,null,c.createElement(gr.a.Title,{toggle:!0},"File Upload")),c.createElement(gr.a.Collapse,null,e)))}}class Sr extends c.Component{constructor(e){super(e)}render(){return c.createElement(w.a,null,c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Gn,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(nr,{lang:this.props.lang,progLang:this.props.progLang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(or,{lang:this.props.lang})),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(xr,{lang:this.props.lang})))}}var kr=n(30),_r=n(67),Cr=n(282),Er=n.n(Cr),Tr=n(178),Or=n.n(Tr);const Ar=new Er.a("",6,"1234567890abcdef");class Mr{constructor(e,t){this.fromKey=e,this.toKey=t,N()(this,"color",void 0),N()(this,"isDrawn",!1);const n=Or()(e),r=Or()(t),i=Ar.encode(n,r);this.color="#".concat(i.substr(0,6))}}class $r{constructor(e,t,n){this.color=n,N()(this,"key",void 0),N()(this,"from",void 0),N()(this,"to",void 0),N()(this,"mid",void 0),N()(this,"clone",e=>new _r.Vector(e.x,e.y));const r=Ir.HEIGHT/2;this.from=this.clone(e).add(new _r.Vector(-5,r)),this.to=this.clone(t).add(new _r.Vector(5,r)),this.mid=this.calcMidPos(this.clone(e),this.clone(t)),this.key=[this.from,this.to,this.mid].toString()}calcMidPos(e,t){const n=e.ye}updateStack(){if(null===this.execState)return;const e=this.execState.getStacks();for(const t of e){const e=new Lr(t,this.getTypedef);e.isEmpty()||this.canvasStacks.push(e)}}updateConnection(){Pr.makeConnection(),this.calcPos(),this.canvasArrows=Pr.makeCanvasArrows()}updatePos(){Pr.resetPosList(),this.updateConnection()}getCanvasStacks(){return this.canvasStacks}getCanvasArrows(){return this.canvasArrows}calcPos(){let e=0,t=0;for(const n of this.canvasStacks){const r=n.height(),i=50+10*e,o=50+t;this.calcStackPos(i,o,n),t+=r+10,++e}}calcStackPos(e,t,n){n.setPos(e,t);const r=Ir.HEIGHT;t+=r;let i=0;const o=n.getCanvasTable();for(const n of o){if(!n[0].isVisible)continue;const o=r*i;this.calcVariablePos(e,t+o,n),++i}}calcVariablePos(e,t,n){let r=0;for(const i of n){const{width:n,key:o}=i;i.setPos(e+r,t),i.clearColor(),i.isVisible&&(r+=n,Pr.addPos(o,i))}}}class Lr{constructor(e,t){this.stack=e,this.getTypedef=t,N()(this,"key",void 0),N()(this,"numOfCol",0),N()(this,"pos",new _r.Vector(-1,-1)),N()(this,"canvasTable",void 0),this.canvasTable=this.makeCanvasTable(),2<=this.canvasTable.length&&(this.pushbackEmptyCell(this.canvasTable),this.alignToMaximumWidth(this.canvasTable)),1<=this.canvasTable.length&&this.rescaleWidthForLongFuncName(),this.key=e.name}setPos(e,t){this.pos.setAxes(e,t)}x(){return this.pos.getX()}y(){return this.pos.getY()}isEmpty(){return this.canvasTable.length<=0}getCanvasTable(){return this.canvasTable}name(){return this.stack.name}height(){if(this.canvasTable.length<=0)return 0;return(this.canvasTable.reduce((e,t)=>e+(t[0].isVisible?1:0),0)+1)*Ir.HEIGHT}width(){if(this.canvasTable.length<=0)return 0;return this.canvasTable[0].reduce((e,t)=>e+t.width,0)}makeCanvasTable(){const e=[],t=this.stack.getVariables(),n=this.stack.name;for(const r of t){const t=r.getValue(),i=(Array.isArray(t)?new Fr(r,n,this.getTypedef):new Nr(r,n,this.getTypedef)).getCanvasTable();e.push(...i)}return e}pushbackEmptyCell(e){this.numOfCol=Math.max(...e.map(e=>e.length));for(const t of e){const e=new Array(this.numOfCol-t.length);for(let t=0;t[new Ir("","".concat(this.key,"-empty-").concat(t))].concat(e));e.push(...t)}return this.addToFoldCell(e),[this.canvasCells].concat(e)}addToFoldCell(e){const t=new Ir("▼","");this.canvasCells.push(t),t.setChildren(e)}}class Ir{constructor(e,t){this.text=e,N()(this,"width",void 0),N()(this,"key",void 0),N()(this,"isVisible",!0),N()(this,"pos",new _r.Vector(-1,-1)),N()(this,"colors",[]),N()(this,"children",null);const n=e.length%2==0?1.5:1;this.width=(e.length+2*n)*(Ir.FONT_SIZE/2),this.key="".concat(t,"-").concat(e)}setPos(e,t){this.pos.setAxes(e,t)}getPos(){return this.pos}x(){return this.pos.getX()}y(){return this.pos.getY()}clearColor(){this.colors=[]}setColor(e){this.colors.push(e)}hasColor(){return 0{const t=jr()(e);return"rgba(".concat(t.red,", ").concat(t.green,", ").concat(t.blue,", ").concat(t.alpha,")")};class Br extends u.a.Component{constructor(e){super(e)}render(){if(!this.props.isVisible)return null;const{x:e,y:t,text:n,width:r,align:i,fontStyle:o,onClick:a,colors:s}=this.props,l=Ir.HEIGHT,c=i&&"center"===i,d=[];if(Array.isArray(s)&&0e+"44"))d.push(e,zr(n)),e+=1/(t.length-1)}else d.push(0,"rgba(0,0,0,0)",1,"rgba(0,0,0,0)");return u.a.createElement(u.a.Fragment,null,u.a.createElement(kr.Rect,{x:e,y:t,width:r,height:l,stroke:"black",fillLinearGradientStartPoint:{x:0,y:0},fillLinearGradientEndPoint:{x:r,y:0},fillLinearGradientColorStops:d}),u.a.createElement(kr.Text,{x:e,y:t,fontFamily:"Consolas, 'Courier New', monospace",fontStyle:o||"normal",align:i||"left",verticalAlign:"middle",offsetX:c?0:-Ir.FONT_SIZE/2,width:r,height:l,text:n,fontSize:Ir.FONT_SIZE,onClick:a||void 0}))}}class Hr extends u.a.Component{constructor(e){super(e)}render(){const e=this.props.canvasRow.map(e=>{const{width:t,isVisible:n,key:r}=e,i=e.x(),o=e.y(),a=e.getText(),s=e.canToggleFold();return u.a.createElement(Br,{key:r,x:i,y:o,text:a,width:t,align:s?"center":void 0,onClick:s?()=>e.toggleFold():void 0,isVisible:n,colors:e.getColors()})});return u.a.createElement(kr.Group,null,e)}}class Ur extends c.Component{constructor(e){super(e)}renderHeader(){const{canvasStack:e}=this.props,t=e.x(),n=e.y();return c.createElement(Br,{x:t,y:n,text:e.name(),width:e.width(),fontStyle:"bold",align:"center",isVisible:!0})}renderBody(){const e=[],t=this.props.canvasStack.getCanvasTable();for(const n of t){if(!n[0].isVisible)continue;const t=n.reduce((e,t)=>e.concat(t.key),"");e.push(c.createElement(Hr,{key:t,canvasRow:n}))}return e}render(){const e=this.renderHeader(),t=this.renderBody();return c.createElement(kr.Group,null,e,t)}}class Wr extends c.Component{constructor(e){super(e),this.state={canvasStacks:[],canvasArrows:[]},Object(Rn.b)("redraw",()=>{this.updatePos()})}makeStacks(e){return e.map(e=>c.createElement(Ur,{key:e.key,canvasStack:e}))}makeArrows(e){return e.map(e=>{const{from:t,mid:n,to:r,key:i,color:o}=e,a=zr(o);return c.createElement(kr.Arrow,{key:i,points:[t.x,t.y,n.x,n.y,r.x,r.y],tension:.25,stroke:a,fill:a,pointerLength:10,pointerWidth:10,opacity:1})})}updatePos(){this.props.canvasDrawer.updatePos(),this.forceUpdate()}render(){const e=this.props.canvasDrawer.getCanvasStacks(),t=this.props.canvasDrawer.getCanvasArrows(),n=this.makeStacks(e),r=this.makeArrows(t);return c.createElement(c.Fragment,null,c.createElement(kr.Layer,null,n),c.createElement(kr.Layer,null,r))}}var Vr=n(179),Gr={insert:"head",singleton:!1};p()(Vr.a,Gr),Vr.a.locals;class Kr extends c.Component{constructor(e){super(e),this.state={execState:void 0},Object(Rn.b)("draw",e=>this.setState({execState:e}))}render(){return c.createElement("div",{id:"display"},c.createElement(kr.Stage,{width:.95*this.props.width,height:.95*this.props.height,scale:{x:this.props.scale,y:this.props.scale}},c.createElement(Wr,{canvasDrawer:new Rr(this.state.execState)})))}}var qr=n(284),Yr=n.n(qr),Xr=n(285);class Qr extends c.Component{constructor(e){super(e),this.state={value:1}}render(){return c.createElement(c.Fragment,null,"Scale:",c.createElement(Xr,{precision:1,value:this.props.value,min:this.props.min,max:this.props.max,step:.1,onChange:e=>null!==e?this.props.onScaleChange(e):null,style:{wrap:{width:"60px",margin:"0px 5px 5px 10px",padding:"2px 2px 2px 2px",borderRadius:"6px 3px 3px 6px",fontSize:16},input:{width:"40px",borderRadius:"4px 2px 2px 4px",padding:"0.1ex 1ex",border:"1px solid #ccc",marginRight:4,display:"block"}}}))}}var Zr=n(11),Jr=n.n(Zr),ei=n(33),ti=n.n(ei),ni=n(34),ri=n.n(ni),ii=n(25),oi=n.n(ii),ai=n(35),si=n.n(ai),li=n(65),ci=n.n(li),ui=n(6),di=n.n(ui),hi=function(e){var t,n,r=e.className,i=e.included,o=e.vertical,a=e.style,s=e.length,l=e.offset,c=e.reverse;s<0&&(c=!c,s=Math.abs(s),l=100-l);var d=o?(t={},di()(t,c?"top":"bottom",l+"%"),di()(t,c?"bottom":"top","auto"),di()(t,"height",s+"%"),t):(n={},di()(n,c?"right":"left",l+"%"),di()(n,c?"left":"right","auto"),di()(n,"width",s+"%"),n),h=Jr()({},a,d);return i?u.a.createElement("div",{className:r,style:h}):null},fi=n(66),pi=n.n(fi),gi=n(118),mi=n.n(gi),bi=n(286),vi=n.n(bi);function yi(e,t,n,r){var i=h.a.unstable_batchedUpdates?function(e){h.a.unstable_batchedUpdates(n,e)}:n;return vi()(e,t,i,r)}var wi=n(4),xi=n.n(wi),Si=function(e){var t=e.prefixCls,n=e.vertical,r=e.reverse,i=e.marks,o=e.dots,a=e.step,s=e.included,l=e.lowerBound,c=e.upperBound,d=e.max,h=e.min,f=e.dotStyle,p=e.activeDotStyle,g=d-h,m=function(e,t,n,r,i,o){ci()(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(n&&r)for(var s=i;s<=o;s+=r)-1===a.indexOf(s)&&a.push(s);return a}(0,i,o,a,h,d).map((function(e){var i,o=Math.abs(e-h)/g*100+"%",a=!s&&e===c||s&&e<=c&&e>=l,d=n?Jr()({},f,di()({},r?"top":"bottom",o)):Jr()({},f,di()({},r?"right":"left",o));a&&(d=Jr()({},d,p));var m=xi()((i={},di()(i,t+"-dot",!0),di()(i,t+"-dot-active",a),di()(i,t+"-dot-reverse",r),i));return u.a.createElement("span",{className:m,style:d,key:e})}));return u.a.createElement("div",{className:t+"-step"},m)},ki=function(e){var t=e.className,n=e.vertical,r=e.reverse,i=e.marks,o=e.included,a=e.upperBound,s=e.lowerBound,l=e.max,c=e.min,d=e.onClickLabel,h=Object.keys(i),f=l-c,p=h.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var l,h=i[e],p="object"==typeof h&&!u.a.isValidElement(h),g=p?h.label:h;if(!g&&0!==g)return null;var m=!o&&e===a||o&&e<=a&&e>=s,b=xi()((l={},di()(l,t+"-text",!0),di()(l,t+"-text-active",m),l)),v=di()({marginBottom:"-50%"},r?"top":"bottom",(e-c)/f*100+"%"),y=di()({transform:"translateX("+(r?"50%":"-50%")+")",msTransform:"translateX("+(r?"50%":"-50%")+")"},r?"right":"left",(e-c)/f*100+"%"),w=n?v:y,x=p?Jr()({},w,h.style):w;return u.a.createElement("span",{className:b,style:x,key:e,onMouseDown:function(t){return d(t,e)},onTouchStart:function(t){return d(t,e)}},g)}));return u.a.createElement("div",{className:t},p)},_i=function(e){function t(){var e,n,r,i;ti()(this,t);for(var o=arguments.length,a=Array(o),s=0;s=Ti.F1&&t<=Ti.F12)return!1;switch(t){case Ti.ALT:case Ti.CAPS_LOCK:case Ti.CONTEXT_MENU:case Ti.CTRL:case Ti.DOWN:case Ti.END:case Ti.ESC:case Ti.HOME:case Ti.INSERT:case Ti.LEFT:case Ti.MAC_FF_META:case Ti.META:case Ti.NUMLOCK:case Ti.NUM_CENTER:case Ti.PAGE_DOWN:case Ti.PAGE_UP:case Ti.PAUSE:case Ti.PRINT_SCREEN:case Ti.RIGHT:case Ti.SHIFT:case Ti.UP:case Ti.WIN_KEY:case Ti.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ti.ZERO&&e<=Ti.NINE)return!0;if(e>=Ti.NUM_ZERO&&e<=Ti.NUM_MULTIPLY)return!0;if(e>=Ti.A&&e<=Ti.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Ti.SPACE:case Ti.QUESTION_MARK:case Ti.NUM_PLUS:case Ti.NUM_MINUS:case Ti.NUM_PERIOD:case Ti.NUM_DIVISION:case Ti.SEMICOLON:case Ti.DASH:case Ti.EQUALS:case Ti.COMMA:case Ti.PERIOD:case Ti.SLASH:case Ti.APOSTROPHE:case Ti.SINGLE_QUOTE:case Ti.OPEN_SQUARE_BRACKET:case Ti.BACKSLASH:case Ti.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Oi=Ti;function Ai(e,t){try{return Object.keys(t).some((function(n){return e.target===Object(d.findDOMNode)(t[n])}))}catch(e){return!1}}function Mi(e,t){var n=t.min,r=t.max;return er}function $i(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function Pi(e,t){var n=t.marks,r=t.step,i=t.min,o=t.max,a=Object.keys(n).map(parseFloat);if(null!==r){var s=Math.floor((o-i)/r),l=Math.min((e-i)/r,s),c=Math.round(l)*r+i;a.push(c)}var u=a.map((function(t){return Math.abs(e-t)}));return a[u.indexOf(Math.min.apply(Math,Ei()(u)))]}function Ri(e,t){return e?t.clientY:t.pageX}function Li(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function Ni(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:window.pageXOffset+n.left+.5*n.width}function Fi(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function Ii(e,t){var n=t.step,r=isFinite(Pi(e,t))?Pi(e,t):0;return null===n?r:parseFloat(r.toFixed(function(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}(n)))}function Di(e){e.stopPropagation(),e.preventDefault()}function ji(e,t,n){var r="increase";switch(e.keyCode){case Oi.UP:r=t&&n?"decrease":"increase";break;case Oi.RIGHT:r=!t&&n?"decrease":"increase";break;case Oi.DOWN:r=t&&n?"increase":"decrease";break;case Oi.LEFT:r=!t&&n?"increase":"decrease";break;case Oi.END:return function(e,t){return t.max};case Oi.HOME:return function(e,t){return t.min};case Oi.PAGE_UP:return function(e,t){return e+2*t.step};case Oi.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,n){var r={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},i=r[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),o=Object.keys(n.marks)[i];return n.step?r[e](t,n.step):Object.keys(n.marks).length&&n.marks[o]?n.marks[o]:t}(r,e,t)}}function zi(){}function Bi(e){var t,n;return n=t=function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onMouseDown=function(e){if(0===e.button){var t=n.props.vertical,r=Ri(t,e);if(Ai(e,n.handlesRefs)){var i=Ni(t,e.target);n.dragOffset=r-i,r=i}else n.dragOffset=0;n.removeDocumentEvents(),n.onStart(r),n.addDocumentMouseEvents()}},n.onTouchStart=function(e){if(!$i(e)){var t=n.props.vertical,r=Li(t,e);if(Ai(e,n.handlesRefs)){var i=Ni(t,e.target);n.dragOffset=r-i,r=i}else n.dragOffset=0;n.onStart(r),n.addDocumentTouchEvents(),Di(e)}},n.onFocus=function(e){var t=n.props,r=t.onFocus,i=t.vertical;if(Ai(e,n.handlesRefs)){var o=Ni(i,e.target);n.dragOffset=0,n.onStart(o),Di(e),r&&r(e)}},n.onBlur=function(e){var t=n.props.onBlur;n.onEnd(),t&&t(e)},n.onMouseUp=function(){n.handlesRefs[n.prevMovedHandleIndex]&&n.handlesRefs[n.prevMovedHandleIndex].clickFocus()},n.onMouseMove=function(e){if(n.sliderRef){var t=Ri(n.props.vertical,e);n.onMove(e,t-n.dragOffset)}else n.onEnd()},n.onTouchMove=function(e){if(!$i(e)&&n.sliderRef){var t=Li(n.props.vertical,e);n.onMove(e,t-n.dragOffset)}else n.onEnd()},n.onKeyDown=function(e){n.sliderRef&&Ai(e,n.handlesRefs)&&n.onKeyboard(e)},n.onClickMarkLabel=function(e,t){e.stopPropagation(),n.onChange({value:t}),n.setState({value:t},(function(){return n.onEnd(!0)}))},n.saveSlider=function(e){n.sliderRef=e};var r=e.step,i=e.max,o=e.min,a=!isFinite(i-o)||(i-o)%r==0;return ci()(!r||Math.floor(r)!==r||a,"Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)",i-o,r),n.handlesRefs={},n}return si()(t,e),ri()(t,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,n=e.disabled;t&&!n&&this.focus()}},{key:"componentWillUnmount",value:function(){mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this)&&mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,n=t.vertical,r=t.reverse,i=e.getBoundingClientRect();return n?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=yi(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=yi(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=yi(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=yi(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){this.props.disabled||this.handlesRefs[0].focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){e.handlesRefs[t]&&e.handlesRefs[t].blur&&e.handlesRefs[t].blur()}))}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,i=t.max,o=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-o)*(i-r)+r:o*(i-r)+r}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min,r=(e-n)/(t.max-n);return Math.max(0,100*r)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,n=this.props,r=n.prefixCls,i=n.className,o=n.marks,a=n.dots,s=n.step,l=n.included,c=n.disabled,d=n.vertical,h=n.reverse,f=n.min,p=n.max,g=n.children,m=n.maximumTrackStyle,b=n.style,v=n.railStyle,y=n.dotStyle,w=n.activeDotStyle,x=mi()(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this),S=x.tracks,k=x.handles,_=xi()(r,(e={},di()(e,r+"-with-marks",Object.keys(o).length),di()(e,r+"-disabled",c),di()(e,r+"-vertical",d),di()(e,i,i),e));return u.a.createElement("div",{ref:this.saveSlider,className:_,onTouchStart:c?zi:this.onTouchStart,onMouseDown:c?zi:this.onMouseDown,onMouseUp:c?zi:this.onMouseUp,onKeyDown:c?zi:this.onKeyDown,onFocus:c?zi:this.onFocus,onBlur:c?zi:this.onBlur,style:b},u.a.createElement("div",{className:r+"-rail",style:Jr()({},m,v)}),S,u.a.createElement(Si,{prefixCls:r,vertical:d,reverse:h,marks:o,dots:a,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,dotStyle:y,activeDotStyle:w}),k,u.a.createElement(ki,{className:r+"-mark",onClickLabel:c?zi:this.onClickMarkLabel,vertical:d,marks:o,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,reverse:h}),g)}}]),t}(e),t.displayName="ComponentEnhancer("+e.displayName+")",t.defaultProps=Jr()({},e.defaultProps,{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=pi()(e,["index"]);return delete n.dragging,null===n.value?null:u.a.createElement(_i,Jr()({},n,{key:t}))},onBeforeChange:zi,onChange:zi,onAfterChange:zi,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),n}var Hi=Bi(function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onEnd=function(e){var t=n.state.dragging;n.removeDocumentEvents(),(t||e)&&n.props.onAfterChange(n.getValue()),n.setState({dragging:!1})};var r=void 0!==e.defaultValue?e.defaultValue:e.min,i=void 0!==e.value?e.value:r;return n.state={value:n.trimAlignValue(i),dragging:!1},ci()(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),ci()(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),n}return si()(t,e),ri()(t,[{key:"componentDidUpdate",value:function(e,t){if("value"in this.props||"min"in this.props||"max"in this.props){var n=this.props,r=n.value,i=n.onChange,o=void 0!==r?r:t.value,a=this.trimAlignValue(o,this.props);a!==t.value&&(this.setState({value:a}),Mi(o,this.props)&&i(a))}}},{key:"onChange",value:function(e){var t=this.props,n=!("value"in t),r=e.value>this.props.max?Jr()({},e,{value:this.props.max}):e;n&&this.setState(r);var i=r.value;t.onChange(i)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,n=this.getValue();t.onBeforeChange(n);var r=this.calcValueByPos(e);this.startValue=r,this.startPosition=e,r!==n&&(this.prevMovedHandleIndex=0,this.onChange({value:r}))}},{key:"onMove",value:function(e,t){Di(e);var n=this.state.value,r=this.calcValueByPos(t);r!==n&&this.onChange({value:r})}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=ji(e,t.vertical,n);if(r){Di(e);var i=this.state.value,o=r(i,this.props),a=this.trimAlignValue(o);if(a===i)return;this.onChange({value:a}),this.props.onAfterChange(a),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){return this.props.min}},{key:"getUpperBound",value:function(){return this.state.value}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var n=Jr()({},this.props,t),r=Fi(e,n);return Ii(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,i=t.included,o=t.disabled,a=t.minimumTrackStyle,s=t.trackStyle,l=t.handleStyle,c=t.tabIndex,d=t.ariaLabelForHandle,h=t.ariaLabelledByForHandle,f=t.ariaValueTextFormatterForHandle,p=t.min,g=t.max,m=t.startPoint,b=t.reverse,v=t.handle,y=this.state,w=y.value,x=y.dragging,S=this.calcOffset(w),k=v({className:n+"-handle",prefixCls:n,vertical:r,offset:S,value:w,dragging:x,disabled:o,min:p,max:g,reverse:b,index:0,tabIndex:c,ariaLabel:d,ariaLabelledBy:h,ariaValueTextFormatter:f,style:l[0]||l,ref:function(t){return e.saveHandle(0,t)}}),_=void 0!==m?this.calcOffset(m):0,C=s[0]||s;return{tracks:u.a.createElement(hi,{className:n+"-track",vertical:r,included:i,offset:_,reverse:b,length:S-_,style:Jr()({},a,C)}),handles:k}}}]),t}(u.a.Component)),Ui=n(287),Wi=n.n(Ui),Vi=function(e){var t=e.value,n=e.handle,r=e.bounds,i=e.props,o=i.allowCross,a=i.pushable,s=Number(a),l=Fi(t,i),c=l;return o||null==n||void 0===r||(n>0&&l<=r[n-1]+s&&(c=r[n-1]+s),n=r[n+1]-s&&(c=r[n+1]-s)),Ii(c,i)},Gi=function(e){function t(e){ti()(this,t);var n=oi()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onEnd=function(e){var t=n.state.handle;n.removeDocumentEvents(),(null!==t||e)&&n.props.onAfterChange(n.getValue()),n.setState({handle:null})};var r=e.count,i=e.min,o=e.max,a=Array.apply(void 0,Ei()(Array(r+1))).map((function(){return i})),s="defaultValue"in e?e.defaultValue:a,l=(void 0!==e.value?e.value:s).map((function(t,n){return Vi({value:t,handle:n,props:e})})),c=l[0]===o?0:l.length-1;return n.state={handle:null,recent:c,bounds:l},n}return si()(t,e),ri()(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;if(("value"in this.props||"min"in this.props||"max"in this.props)&&(this.props.min!==e.min||this.props.max!==e.max||!Wi()(this.props.value,e.value))){var r=this.props,i=r.onChange,o=r.value||t.bounds;if(o.some((function(e){return Mi(e,n.props)})))i(o.map((function(e){return Fi(e,n.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var n={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),Object.keys(n).length&&this.setState(n)}var r=Jr()({},this.state,e).bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var i=this.calcValueByPos(e);this.startValue=i,this.startPosition=e;var o=this.getClosestBound(i);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(i,o),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),i!==r[this.prevMovedHandleIndex]){var a=[].concat(Ei()(n.bounds));a[this.prevMovedHandleIndex]=i,this.onChange({bounds:a})}}},{key:"onMove",value:function(e,t){Di(e);var n=this.state,r=this.calcValueByPos(t);r!==n.bounds[n.handle]&&this.moveTo(r)}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=ji(e,t.vertical,n);if(r){Di(e);var i=this.state,o=this.props,a=i.bounds,s=i.handle,l=a[null===s?i.recent:s],c=r(l,o),u=Vi({value:c,handle:s,bounds:i.bounds,props:o});if(u===l)return;this.moveTo(u,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;r=t[r]&&(n=r);return Math.abs(t[n+1]-e)=r.length||i<0)return!1;var o=t+n,a=r[i],s=this.props.pushable,l=n*(e[o]-a);return!!this.pushHandle(e,o,n,s-l)&&(e[t]=a,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,n=t.handle,r=t.bounds;return Vi({value:e,handle:n,bounds:r,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,i=this.props,o=i.prefixCls,a=i.vertical,s=i.included,l=i.disabled,c=i.min,d=i.max,h=i.reverse,f=i.handle,p=i.trackStyle,g=i.handleStyle,m=i.tabIndex,b=i.ariaLabelGroupForHandles,v=i.ariaLabelledByGroupForHandles,y=i.ariaValueTextFormatterGroupForHandles,w=r.map((function(t){return e.calcOffset(t)})),x=o+"-handle",S=r.map((function(t,r){var i,s=m[r]||0;(l||null===m[r])&&(s=null);var u=n===r;return f({className:xi()((i={},di()(i,x,!0),di()(i,x+"-"+(r+1),!0),di()(i,x+"-dragging",u),i)),prefixCls:o,vertical:a,dragging:u,offset:w[r],value:t,index:r,tabIndex:s,min:c,max:d,reverse:h,disabled:l,style:g[r],ref:function(t){return e.saveHandle(r,t)},ariaLabel:b[r],ariaLabelledBy:v[r],ariaValueTextFormatter:y[r]})}));return{tracks:r.slice(0,-1).map((function(e,t){var n,r=t+1,i=xi()((n={},di()(n,o+"-track",!0),di()(n,o+"-track-"+r,!0),n));return u.a.createElement(hi,{className:i,vertical:a,reverse:h,included:s,offset:w[r-1],length:w[r]-w[r-1],style:p[t],key:r})})),handles:S}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if("value"in e||"min"in e||"max"in e){var n=(e.value||t.bounds).map((function(n,r){return Vi({value:n,handle:r,bounds:t.bounds,props:e})}));return n.length===t.bounds.length&&n.every((function(e,n){return e===t.bounds[n]}))?null:Jr()({},t,{bounds:n})}return null}}]),t}(u.a.Component);Gi.displayName="Range",Gi.defaultProps={count:1,allowCross:!0,pushable:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var Ki=Bi(Gi);function qi(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function Yi(e){return e instanceof HTMLElement?e:h.a.findDOMNode(e)}function Xi(e){return(Xi="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 Qi(e,t){"function"==typeof e?e(t):"object"===Xi(e)&&e&&"current"in e&&(e.current=t)}function Zi(){for(var e=arguments.length,t=new Array(e),n=0;n=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function oa(e){var t,n,r;if(ea.isWindow(e)||9===e.nodeType){var i=ea.getWindow(e);t={left:ea.getWindowScrollLeft(i),top:ea.getWindowScrollTop(i)},n=ea.viewportWidth(i),r=ea.viewportHeight(i)}else t=ea.offset(e),n=ea.outerWidth(e),r=ea.outerHeight(e);return t.width=n,t.height=r,t}function aa(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return"c"===n?s+=o/2:"b"===n&&(s+=o),"c"===r?a+=i/2:"r"===r&&(a+=i),{left:a,top:s}}function sa(e,t,n,r,i){var o=aa(t,n[1]),a=aa(e,n[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function la(e,t,n){return e.leftn.right}function ca(e,t,n){return e.topn.bottom}function ua(e,t,n){var r=[];return ea.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function da(e,t){return e[t]=-e[t],e}function ha(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function fa(e,t){e[0]=ha(e[0],t.width),e[1]=ha(e[1],t.height)}function pa(e,t,n,r){var i=n.points,o=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,l=n.source||e;o=[].concat(o),a=[].concat(a);var c={},u=0,d=ia(l,!(!(s=s||{})||!s.alwaysByViewport)),h=oa(l);fa(o,h),fa(a,t);var f=sa(h,t,i,o,a),p=ea.merge(h,f);if(d&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&la(f,h,d)){var g=ua(i,/[lr]/gi,{l:"r",r:"l"}),m=da(o,0),b=da(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),ea.mix(i,o)}(f,h,d,c))}return p.width!==h.width&&ea.css(l,"width",ea.width(l)+p.width-h.width),p.height!==h.height&&ea.css(l,"height",ea.height(l)+p.height-h.height),ea.offset(l,{left:p.left,top:p.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:c}}function ga(e,t,n){var r=n.target||t;return pa(e,oa(r),n,!function(e,t){var n=ia(e,t),r=oa(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function ma(e,t,n){var r,i,o=ea.getDocument(e),a=o.defaultView||o.parentWindow,s=ea.getWindowScrollLeft(a),l=ea.getWindowScrollTop(a),c=ea.viewportWidth(a),u=ea.viewportHeight(a);r="pageX"in t?t.pageX:s+t.clientX,i="pageY"in t?t.pageY:l+t.clientY;var d=r>=0&&r<=s+c&&i>=0&&i<=l+u;return pa(e,{left:r,top:i,width:0,height:0},function(e){for(var t=1;t1&&(h=u.a.createElement("div",{className:"".concat(n,"-content")},a)),u.a.createElement("div",{ref:t,className:xi()(r,!i&&"".concat(e.hiddenClassName)),onMouseEnter:s,onMouseLeave:l,onMouseDown:c,onTouchStart:d,style:o},h)}));Ha.displayName="PopupInner";var Ua=Ha;function Wa(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Va(e){return(Va="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 Ga(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Es=Object(c.forwardRef)((function(e,t){var n=e.overlayClassName,r=e.trigger,i=void 0===r?["hover"]:r,o=e.mouseEnterDelay,a=void 0===o?0:o,s=e.mouseLeaveDelay,l=void 0===s?.1:s,d=e.overlayStyle,h=e.prefixCls,f=void 0===h?"rc-tooltip":h,p=e.children,g=e.onVisibleChange,m=e.afterVisibleChange,b=e.transitionName,v=e.animation,y=e.placement,w=void 0===y?"right":y,x=e.align,S=void 0===x?{}:x,k=e.destroyTooltipOnHide,_=void 0!==k&&k,C=e.defaultVisible,E=e.getTooltipContainer,T=Cs(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer"]),O=Object(c.useRef)(null);Object(c.useImperativeHandle)(t,(function(){return O.current}));var A=function(e){for(var t=1;t{this.setState({scale:e})}),this.state={scale:1},this.onScaleChange=this.onScaleChange.bind(this)}render(){return c.createElement(w.a,{ref:"canvasContainer"},c.createElement(S.a,{lg:11,md:11,sm:11,xs:11},c.createElement(Rs,{min:.1,max:2,scale:this.state.scale,onScaleChange:this.onScaleChange})),c.createElement(S.a,{lg:1,md:1,sm:1,xs:1}),c.createElement(S.a,{lg:12,md:12,sm:12,xs:12},c.createElement(Yr.a,null,e=>{let{width:t,height:n}=e;return c.createElement(Kr,{width:t,height:n,scale:this.state.scale})})))}}var Ns=n(181),Fs={insert:"head",singleton:!1},Is=(p()(Ns.a,Fs),Ns.a.locals,n(182)),Ds={insert:"head",singleton:!1};p()(Is.a,Ds),Is.a.locals;class js extends c.Component{constructor(e){super(e)}getGithub(){return c.createElement("a",{href:"https://github.com/RYOSKATE/PLIVET"}," GitHub ")}getYear(){const{fromYear:e}=this.props,t=(new Date).getFullYear();return void 0!==e?e===t?"".concat(e):"".concat(e," - ").concat((new Date).getFullYear()):(new Date).getFullYear()}renderCopyRight(){return c.createElement("span",null,"PLIVET v",n(574).version," © ",this.getYear(),"  @RYOSKATE")}renderLicense(){return c.createElement("a",{href:"./licenses.html"}," LICENSES")}render(){return c.createElement("div",{className:"footer"},this.renderCopyRight(),c.createElement("br",null),this.getGithub(),this.renderLicense())}}class zs extends c.Component{constructor(e){super(e)}render(){const{lang:e,progLang:t,theme:n}=this.props;return c.createElement(v.a,{fluid:!0},c.createElement(w.a,{style:{margin:"5px"}},c.createElement(S.a,{lg:4,md:5,sm:6,xs:12,className:"light"===n?"theme-light":"theme-gray"},c.createElement(Sr,{lang:e,progLang:t})),c.createElement(S.a,{lg:8,md:7,sm:6,xs:12,className:"light"===n?"theme-light":"theme-gray"},c.createElement(Ls,{lang:e}))),c.createElement(js,{fromYear:2018}))}}class Bs extends c.Component{constructor(e){super(e),this.state={lang:"ja",progLang:"c_cpp",theme:"light"},Object(Rn.b)("changeLang",e=>{this.setState({lang:e})}),Object(Rn.b)("changeProgLang",e=>{this.setState({progLang:e})}),Object(Rn.b)("changeTheme",async e=>{this.setState({theme:e})})}render(){const{lang:e,progLang:t,theme:n}=this.state;return c.createElement(zs,{lang:e,progLang:t,theme:n})}}d.render(c.createElement(Bs,null),document.getElementById("root"))}]); \ No newline at end of file