diff --git a/package.json b/package.json index 6d4c46b..a1ff0fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "physics-simulation-engine", - "version": "2.2.0", + "version": "2.2.1", "description": "A Simulation Engine for Physics Simulation", "main": "./src/app.js", "scripts": { diff --git a/versions/2.2.1/pSEngine.min.js b/versions/2.2.1/pSEngine.min.js new file mode 100644 index 0000000..e19d425 --- /dev/null +++ b/versions/2.2.1/pSEngine.min.js @@ -0,0 +1,2 @@ +var pSEngine=function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=8)}([function(t,e,i){"use strict";i(1);class s{constructor(t,e,i,s="rgb(255, 255, 255)",n){this.x=t||0,this.y=e||0,this.z=i||0,this.color=s,this.setName(n)}set(t,e,i){return t instanceof s?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this):(this.x=t||0,this.y=t||0,this.z=t||0,this)}setName(t){return null==t||(t instanceof pSText?this.name=t:this.name=new pSText(t,new s(this.x,this.y,this.z))),this}equals(t,e,i){return t instanceof s?this.equals(t.x,t.y,t.z):this.x==t&&this.y==e&&this.z==i}copy(){return new s(this.x,this.y,this.z)}clear(){return this.set(0,0,0)}toString(){return`Vector Object : [${this.x}, ${this.y}, ${this.z}]`}add(t,e,i){return t instanceof s?this.add(t.x,t.y,t.z):(this.x+=t||0,this.y+=e||0,this.y+=i||0,this)}sub(t,e,i){return t instanceof s?this.sub(t.x,t.y,t.z):this.add(-t,-e,-i)}mult(t){return"number"==typeof t&&isFinite(t)?(this.x*=t,this.y*=t,this.z*=t,this):(console.warn("Vector::mult()","c is undefined or isn't a finite number"),this)}div(t){return"number"==typeof t&&isFinite(t)?0==t?(console.error("Cannot divide by 0"),this):this.mult(1/t):(console.warn("Vector::div()","c is undefined or isn't a finite number"),this)}static add(t,e){return t.copy().add(e)}static sub(t,e){return t.copy().sub(e)}static mult(t,e){return t.copy().mult(e)}static div(t,e){return t.copy().div(e)}dot(t,e,i){return t instanceof s?this.dot(t.x,t.y,t.z):this.x*(t||0)+this.y*(e||0)+this.z*(i||0)}cross(t){return new s(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}normalize(){const t=this.mag();return 0!==t&&this.div(t),this}limit(t,e){let i=this.mag();return ie&&this.div(i).mult(e),this}mag(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}setMag(t){return this.normalize().mult(t)}rotate(t){const e=this.getAngle()+t,i=this.mag();return this.x=Math.cos(e)*i,this.y=Math.sin(e)*i,this}getAngle(){return Math.atan2(this.y,this.x)}static dist(t,e){return s.sub(t,e).mag()}static dot(t,e,i,s){return t.copy().dot(e,i,s)}static cross(t,e){return t.copy().cross(e)}static normalize(t){return t.copy().normalize()}static rotate(t,e){return t.copy().rotate(e)}draw(t,e,i){null!=t?s.draw(t,this,this.color,e,i):s.draw(void 0,this,this.color)}static draw(t,e,i="rgb(255, 255, 255)",s=5,n=1){(null!=t&&0!=t.z||0!=e.z)&&console.warn("Vector drawing is only implemented in 2D yet.");let r=_pSimulationInstance.plotter;if(push(),null!=t){let e=r.computeForXY(t.x,t.y);translate(e.x-width/2,e.y-height/2)}let o=r.computeForXY(0,0),a=r.computeForXY(e.x,e.y);if(push(),r.drawer.stroke(i).strokeWeight(n).fill(i),line(o.x,o.y,a.x,a.y),translate(a.x,a.y),rotate(a.sub(o).getAngle()),translate(-s-2,0),triangle(0,s/2,0,-s/2,s,0),pop(),null!=e.name){let t=e.getAngle();t<0&&(t+=2*PI);let o=.8*e.name.cWidth;(PI/4=3.0.0 in order to use Text and Tex strings."),this.textSize=i,this.color=s,this.pos=e,this.showHitbox=n,this.setText(t)}draw(){let t=_pSimulationInstance.plotter.drawer,e=t.plotter.computeForXY(this.pos.x,this.pos.y);if(push(),translate(-this.svgImg.width/2,-this.svgImg.height/2),image(this.svgImg,e.x,e.y,this.svgImg.width,this.svgImg.height),this.showHitbox){let i=this.svgImg.height,s=this.svgImg.width;t.stroke(this.color).strokeWeight(1).noFill(),line(e.x,e.y,e.x+s,e.y),line(e.x,e.y+i,e.x+s,e.y+i),line(e.x,e.y+i,e.x,e.y),line(e.x+s,e.y+i,e.x+s,e.y)}pop()}setText(t){this.text=t;let e="")[0]+"";return e=e.replace(/this.timeLength?this.finalDraw(this):(this.lastKey=t(e,this)/this.scaleTime,this.lastKey)}updateKey(){return this.getKey(this.update)}drawKey(){return this.getKey(this.draw)}update(){}draw(){}};var n=class extends s{constructor(t,e){super(t,e),this.i=-1,this.currentShape=this.nextShape(e),this.localDt=0}nextShape(t){this.i++;let e=this.i+1;return e>t.length-1&&(e=0),[t[this.i],t[e]]}update(t,e){}draw(t,e){let i=e.timeLength/e.datas.length;null!=e.currentShape[0]&&null!=e.currentShape[1]&&t-e.localDt>=i&&(e.currentShape=e.nextShape(e.datas),e.localDt+=i),e.drawCurrentShape(e.datas,(t,e,i,s)=>{let n=1;return t==i&&(n=e/s),n},e,e.i+1,t-e.localDt,i)}finalDraw(t){this.drawCurrentShape(this.datas,()=>1,this,this.datas.length,0)}drawCurrentShape(t,e,i,s,n,r){for(let o=0;o=t.length&&(a=0),_pSimulationInstance.plotter.drawer.noFill().strokeWeight(3).stroke(255).line(t[o].pos.x,t[o].pos.y,t[o].pos.x+(t[a].pos.x-t[o].pos.x)*s,t[o].pos.y+(t[a].pos.y-t[o].pos.y)*s)}}};var r=class extends s{constructor(t,e){super(t,e),null==this.datas.min&&(this.datas.min=0),null==this.datas.max&&(this.datas.max=1)}update(t,e){let i=t/e.timeLength;return i<.5?2*i*i*(e.datas.max-e.datas.min)+e.datas.min:((4-2*i)*i-1)*(e.datas.max-e.datas.min)+e.datas.min}draw(t,e){}finalDraw(t){return t.datas.max}};e.a=class{static new(t,e=1,i={}){switch(t||(t="easeInOutCubic"),t){case"easeInOutCubic":return new r(e,i);case"interpolation":return new n(e,i)}}}},function(t,e,i){"use strict";var s=i(4),n=i(5);e.a=class{constructor(){this.config={},this.beginTime=Date.now(),this.lastUpdateTime=Date.now(),this.lastDrawTime=Date.now(),this.config.engine=this.getDefaultEngineConfig(),this.config.custom={},window.getCustomConfig=this.getCustomConfig,window.getEngineConfig=this.getEngineConfig,this.dtMoy=this.config.engine.runner.rollbackControl.minimalUpdateFPS,this.dtTotal=0,this.dtCount=0}instanciate(){this.createP5Instance(),this.plotter=new s.a(this,new n.a),window.runSimulator(this)}createP5Instance(){let t=this.getCanvasProportions(this.config.engine.window.proportions);this.canvas=createCanvas(t.w,t.h),this.canvas.parent(this.config.engine.runner.divId);let e=this.config.engine.runner;e.UPDATE_FPS>=e.DRAW_FPS?frameRate(e.UPDATE_FPS):console.error("The Updates FPS must be superior as the Draws FPS."),window.draw=function(){let t=_pSimulationInstance,e=Date.now(),i=(e-t.lastUpdateTime)/1e3,s=t.dtMoy+t.dtMoy*t.config.engine.runner.rollbackControl.maxStandardDeviation;i>s&&(i=t.dtMoy),t.lastUpdateTime=e,t.plotter.update(i*t.config.engine.runner.simulationSpeed),e-t.lastDrawTime>=1/t.config.engine.runner.DRAW_FPS&&(i<=s&&(t.dtTotal+=i,t.dtCount+=1,t.dtCount%t.config.engine.runner.rollbackControl.averageTimeSample==0&&(t.dtMoy=t.dtTotal/t.dtCount,t.dtTotal=0,t.dtCount=0)),t.plotter.draw(),t.lastDrawTime=e)},window.windowResized=function(){let t=_pSimulationInstance.getCanvasProportions(_pSimulationInstance.config.engine.window.proportions);resizeCanvas(t.w,t.h)}}getCanvasProportions(t){let e,i;return t.isRelative?(e=windowWidth*t.width,i=windowHeight*t.height):(e=t.width+"px",i=t.height+"px"),{w:e,h:i}}addObjects(t,e=1,...i){if(t instanceof Function)for(let s=0;s{"loading"===document.readyState?t():window.addEventListener("load",t,!1)}).then(()=>{new n})}]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9wU0VuZ2luZS93ZWJwYWNrL2Jvb3RzdHJhcCIsIndlYnBhY2s6Ly9wU0VuZ2luZS8uL3NyYy91dGlsaXRpZXMvVmVjdG9yLmpzIiwid2VicGFjazovL3BTRW5naW5lLy4vc3JjL2RyYXdlci9vYmplY3RzL1RleHQuanMiLCJ3ZWJwYWNrOi8vcFNFbmdpbmUvLi9zcmMvZHJhd2VyL2FuaW1hdGlvbnMvcFNBbmltYXRpb25IYW5kbGVyLmpzIiwid2VicGFjazovL3BTRW5naW5lLy4vc3JjL2RyYXdlci9hbmltYXRpb25zL3BTSW50ZXJwb2xhdGlvbi5qcyIsIndlYnBhY2s6Ly9wU0VuZ2luZS8uL3NyYy9kcmF3ZXIvYW5pbWF0aW9ucy9wU0Vhc2VJbk91dEN1YmljLmpzIiwid2VicGFjazovL3BTRW5naW5lLy4vc3JjL2RyYXdlci9BbmltYXRpb24uanMiLCJ3ZWJwYWNrOi8vcFNFbmdpbmUvLi9zcmMvY29yZS9TaW11bGF0b3IuanMiLCJ3ZWJwYWNrOi8vcFNFbmdpbmUvLi9zcmMvZHJhd2VyL1Bsb3R0ZXIuanMiLCJ3ZWJwYWNrOi8vcFNFbmdpbmUvLi9zcmMvZHJhd2VyL0RyYXdlci5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xuICAgIC8qKlxyXG4gICAgKiBTZXQgeCwgeSwgeiBjb29yZGluYXRlcyAoZWFjaCBjb29yZGluYXRlIGdldHMgYSAwIGlmIHZhbHVlIG5vdCBwcm92aWRlZClcclxuICAgICogQHBhcmFtIHggTmV3IFggY29vcmRpbmF0ZSBPUiBhIFZlY3RvciB4IHRvIGJlIGVxdWFsIHRvXHJcbiAgICAqIEBwYXJhbSB5IE5ldyBZIGNvb3JkaW5hdGVcclxuICAgICogQHBhcmFtIHogTmV3IFogY29vcmRpbmF0ZVxyXG4gICAgKiBAcmV0dXJuIHRoaXNcclxuICAgICovXHJcbiAgICBzZXQoeCwgeSwgeikge1xyXG4gICAgICAgIGlmKHggaW5zdGFuY2VvZiBWZWN0b3IpIHtcclxuICAgICAgICAgICAgdGhpcy54ID0geC54IHx8IDA7XHJcbiAgICAgICAgICAgIHRoaXMueSA9IHgueSB8fCAwO1xyXG4gICAgICAgICAgICB0aGlzLnogPSB4LnogfHwgMDtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB0aGlzLnggPSB4IHx8IDA7XHJcbiAgICAgICAgdGhpcy55ID0geCB8fCAwO1xyXG4gICAgICAgIHRoaXMueiA9IHggfHwgMDtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICogU2V0IHZlY3RvciBuYW1lXHJcbiAgICAqIEBwYXJhbSBuYW1lIE5ldyBuYW1lIG9mIHRoZSBWZWN0b3JcclxuICAgICogQHJldHVybiB0aGlzXHJcbiAgICAqL1xyXG4gICAgc2V0TmFtZShuYW1lKSB7XHJcbiAgICAgICAgaWYobmFtZSA9PSB1bmRlZmluZWQpXHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xyXG5cclxuICAgICAgICBpZihuYW1lIGluc3RhbmNlb2YgcFNUZXh0KVxyXG4gICAgICAgICAgICB0aGlzLm5hbWUgPSBuYW1lO1xy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IHJlcHJlc2VudGF0aW9uIG9mIHRoZSBvYmplY3QgKi9cclxuICAgIHRvU3RyaW5nKCkgeyByZXR1cm4gYFZlY3RvciBPYmplY3QgOiBbJHt0aGlzLnh9LCAke3RoaXMueX0sICR7dGhpcy56fV1gOyB9XHJcbiAgICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXHJcblxyXG5cclxuXHJcblxyXG5cclxuICAgIC8qID09PT09PT09PSBCQVNJQyBWRUNUT1IgT1BFUkFUSU9OUyA9PT09PT09PT0gKi9cclxuICAgIC8qKlxyXG4gICAgKiBBZGQgdHdvIHZlY3RvcnMgb3IgcGFpciBvZiBjb29yZGluYXRlcyB0b2dldGhlclxyXG4gICAgKiBAcGFyYW0geCBYIGNvb3JkaW5hdGUgT1IgYSBWZWN0b3IgeFxyXG4gICAgKiBAcGFyYW0geSBZIGNvb3JkaW5hdGVcclxuICAgICogQHBhcmFtIHogWiBjb29yZGluYXRlXHJcbiAgICAqIEByZXR1cm4gdGhpc1xyXG4gICAgKi9cclxuICAgIGFkZCh4LCB5LCB6KSB7XHJcbiAgICAgICAgaWYoeCBpbnN0YW5jZW9mIFZlY3RvcilcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkKHgueCwgeC55LCB4LnopO1xyXG5cclxuICAgICAgICB0aGlzLnggKz0geCB8fCAwO1xyXG4gICAgICAgIHRoaXMueSArPSB5IHx8IDA7XHJcbiAgICAgICAgdGhpcy55ICs9IHogfHwgMDtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICogU3VzdHJhY3QgdHdvIHZlY3RvcnMgb3IgcGFpciBvZiBjb29yZGluYXRlcyB0b2dldGhlclxyXG4gICAgKiBAcGFyYW0geCBYIGNvb3JkaW5hdGUgT1IgYSBWZWN0b3IgeFxyXG4gICAgKiBAcGFyYW0geSBZIGNvb3JkaW5hdGVcclxuICAgICogQHBhcmFtIHogWiBjb29yZGluYXRlXHJcbiAgICAqIEByZXR1cm4gdGhpc1xyXG4gICAgKi9cclxuICAgIHN1Yih4LCB5LCB6KSB7XHJcbiAgICAgICAgaWYoeCBpbnN0YW5jZW9mIFZlY3RvcilcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuc3ViKHgueCwgeC55LCB4LnopO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5hZGQoLXgsIC15LCAteik7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAqIE11bHRpcGx5IHRoaXMgVmVjdG9yIGJ5IGEgc2NhbGFyXHJcbiAgICAqIEBwYXJhbSBjIFRoZSBtdWx0aXBsaWNhdGlvbiBzY2FsYXJcclxuICAgICogQHJldHVybiB0aGlzXHJcbiAgICAqL1xyXG4gICAgbXVsdChjKSB7XHJcbiAgICAgICAgaWYoISh0eXBlb2YgYyA9PT0gJ251bWJlcicpIHx8ICFpc0Zpbml0ZShjKSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLndhcm4oXHJcbiAgICAgICAgICAgICAgICAnVmVjdG9yOjptdWx0KCknLFxyXG4gICAgICAgICAgICAgICAgJ2MgaXMgdW5kZWZpbmVkIG9yIGlzblxcJ3QgYSBmaW5pdGUgbnVtYmVyJ1xyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMueCAqPSBjO1xyXG4gICAgICAgIHRoaXMueSAqPSBjO1xyXG4gICAgICAgIHRoaXMueiAqPSBjO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgKiBEaXZpZGVzIHRoaXMgVmVjdG9yIGJ5IGEgc2NhbGFyXHJcbiAgICAqIEBwYXJhbSBjIFRoZSBkaXZpc2lvbiBzY2FsYXJcclxuICAgICogQHJldHVybiB0aGlzXHJcbiAgICAqL1xyXG4gICAgZGl2KGMpIHtcclxuICAgICAgICBpZighKHR5cGVvZiBjID09PSAnbnVtYmVyJykgfHwgIWlzRmluaXRlKGMpKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUud2FybihcclxuICAgICAgICAgICAgICAgICdWZWN0b3I6OmRpdigpJyxcclxuICAgICAgICAgICAgICAgICdjIGlzIHVuZGVmaW5lZCBvciBpc25cXCd0IGEgZmluaXRlIG51bWJlcidcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmKGMgPT0gMCkge1xyXG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKCdDYW5ub3QgZGl2aWRlIGJ5IDAnKTtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5tdWx0KDEgLyBjKTtcclxuICAgIH1cclxuXHJcblxyXG5cclxuICAgIC8vIFN0YXRpYyBtZXRob2RzXHJcbiAgICAvKipcclxuICAgICogQWRkIHR3byB2ZWN0b3JzIHRvZ2V0aGVyXHJcbiAgICAqIEBwYXJhbSB2MSBUaGUgZmlyc3QgdmVjdG9yXHJcbiAgICAqIEBwYXJhbSB2MiBUaGUgc2Vjb25kIHZlY3RvclxyXG4gICAgKiBAcmV0dXJuIEEgbmV3IFZlY3RvclxyXG4gICAgKi9cclxuICAgIHN0YXRpYyBhZGQodjEsIHYyKSB7IHJldHVybiAodjEuY29weSgpKS5hZGQodjIpOyB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAqIFN1YnRyYWN0IHR3byB2ZWN0b3JzIHRvZ2V0aGVyXHJcbiAgICAqIEBwYXJhbSB2MSBUaGUgZmlyc3QgdmVjdG9yXHJcbiAgICAqIEBwYXJhbSB2MiBUaGUgc2Vjb25kIHZlY3RvclxyXG4gICAgKiBAcmV0dXJuIEEgbmV3IFZlY3RvclxyXG4gICAgKi9cclxuICAgIHN0YXRpYyB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luYXRlXHJcbiAgICAqIEByZXR1cm4gdGhpc1xyXG4gICAgKi9cclxuICAgIGRvdCh4LCB5LCB6KSB7XHJcbiAgICAgICAgaWYoeCBpbnN0YW5jZW9mIFZlY3RvcilcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZG90KHgueCwgeC55LCB4LnopO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy54ICogKHggfHwgMCkgKyB0aGlzLnkgKiAoeSB8fCAwKSArIHRoaXMueiAqICh6IHx8IDApO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgKiBDcm9zcyBwcm9kdWN0IHdpdGggYSBWZWN0b3JcclxuICAgICogQHBhcmFtIHYgVGhlIHZlY3RvclxyXG4gICAgKiBAcmV0dXJuIHRoaXNcclxuICAgICovXHJcbiAgICBjcm9zcyh2KSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBWZWN0b3IoXHJcbiAgICAgICAgICAgIHRoaXMueSAqIHYueiAtIHRoaXMueiAqIHYueSxcclxuICAgICAgICAgICAgdGhpcy56ICogdi54IC0gdGhpcy54ICogdi56LFxyXG4gICAgICAgICAgICB0aGlzLnggKiB2LnkgLSB0aGlzLnkgKiB2LnhcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuXHJcblxyXG4gICAgLy8gTWFnbml0dWRlXHJcbiAgICAvKiogQHJldHVybiB0aGUgbm9ybWFsaXplZCBWZWN0b3IgKi9cclxuICAgIG5vcm1hbGl6ZSgpIHtcclxuICAgICAgICBjb25zdCB2TGVuID0gdGhpcy5tYWcoKTtcclxuICAgICAgICBpZiAodkxlbiAhPT0gMClcclxuICAgICAgICAgICAgdGhpcy5kaXYodkxlbik7XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgKiBMaW1pdCB0aGUgbWFnbml0dWRlIG9mIHRoZSB2ZWN0b3IgYmV0d2VlbiBhIG1pbiBhbmQgYSBtY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geyByZXR1cm4gKHYxLmNvcHkoKSkucm90YXRlKGFuZ2xlKTsgfVxyXG4gICAgLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXHJcblxyXG5cclxuXHJcblxyXG5cclxuICAgIC8qID09PT09PT09PSBEUkFXSU5HIFZFQ1RPUlMgPT09PT09PT09ICovXHJcbiAgICAvKipcclxuICAgICogRHJhdyBhIHZlY3RvciB0byB0aGUgY2FudmFzIHVzaW5nIHRoZSBgRHJhd2VyYCBjbGFzc1xyXG4gICAgKiBAcGFyYW0gaW5pdGlhbFBvcyBUaGUgYmVnaW5uaW5nIHBvc2l0aW9uIG9mIHRoZSBWZWN0b3IgQXJyb3dcclxuICAgICogQHBhcmFtIGhlYWRTaXplIFNpemUgb2YgdGhlIGhlYWQgaW4gcGl4ZWxzIChkZWZhdWx0ID0gNSBweClcclxuICAgICogQHBhcmFtIHN0cm9rZVdlaWdodCBTdHJva2Ugd2VpZ2h0IG9mIHRoZSBWZWN0b3IgaW4gcGl4ZWxzIChkZWZhdWx0ID0gMSBweClcclxuICAgICovXHJcbiAgICBkcmF3KGluaXRpYWxQb3MsIGhlYWRTaXplLCBzdHJva2VXZWlnaHQpIHtcclxuICAgICAgICBpZihpbml0aWFsUG9zICE9IHVuZGVmaW5lZClcclxuICAgICAgICAgICAgVmVjdG9yLmRyYXcoaW5pdGlhbFBvcywgdGhpcywgdGhpcy5jb2xvciwgaGVhZFNpemUsIHN0cm9rZVdlaWdodCk7XHJcbiAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICBWZWN0b3IuZHJhdyh1bmRlZmluZWQgLCB0aGlzLCB0aGlzLmNvbG9yKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICogKFBsZWFzZSBhdm9pZCBkaXJlY3RseSB1c2luZyB0aGlzIG1ldGhvZClcclxuICAgICogRHJhdyBhIHZlY3RvciB0byB0aGUgY2FudmFzIHVzaW5nIHRoZSBgRHJhd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gIGxldCBwID0gcGxvdHRlci5jb21wdXRlRm9yWFkoaW5pdGlhbFBvcy54LCBpbml0aWFsUG9zLnkpO1xyXG4gICAgICAgICAgICAgICAgdHJhbnNsYXRlKHAueCAtIHdpZHRoIC8gMiwgcC55IC0gaGVpZ2h0IC8gMik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCB6elBvc2l0aW9uID0gcGxvdHRlci5jb21wdXRlRm9yWFkoMCwgMCk7XHJcbiAgICAgICAgICAgIGxldCBlbmRQb3MgICAgID0gcGxvdHRlci5jb21wdXRlRm9yWFkocG9pbnRpbmdQb3MueCwgcG9pbnRpbmdQb3MueSk7XHJcblxyXG4gICAgICAgICAgICBwdXNoKCk7XHJcbiAgICAgICAgICAgICAgICBwbG90dGVyLmRyYXdlclxyXG4gICAgICAgICAgICAgICAgICAgIC5zdHJva2UoY29sb3IpXHJcbiAgICAgICAgICAgICAgICAgICAgLnN0cm9rZVdlaWdodChzdHJva2VXKVxyXG4gICAgICAgICAgICAgICAgICAgIC5maWxsKGNvbG9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICBsaW5lKHp6UG9zaXRpb24ueCwgenpQb3NpdGlvbi55LCBlbmRQb3MueCwgZW5kUG9zLnkpO1xyXG4gICAgICAgICAgICAgICAgdHJhbnNsYXRlKGVuZFBvcy54LCBlbmRQb3MueSk7XHJcblxyXG4gICAgICAgICAgICAgICAgcm90YXRlKGVuZFBvcy5zdWIoenpQb3NpdGlvbikuZ2V0QW5nbGUoKSk7XHJcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGUoLWhlYWRTaXplIC0gMiwgMCk7XHJcbiAgICAgICAgICAgICAgICB0cmlhbmdsZSgwLCBoZWFkU2l6ZSAvIDIsIDAsIC1oZWFkU2l6ZSAvIDIsIGhlYWRTaXplLCAwKTtcclxuICAgICAgICBcdHBvcCgpO1xyXG5cclxuXHJcbiAgICAgICAgICAgIC8vIERSQVcgVkVDVE9SIE5BTUVcclxuICAgICAgICAgICAgaWYocG9pbnRpbmdQb3MubmFtZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIC8vIE9mZnNldCBvZiB0aGUgdGV4dCBiYXNlZCBvbiB0aGUgYW5nbGUgb24gdGhlIHVuaXQgY2lyY2xlXHJcbiAgICAgICAgICAgICAgICBsZXQgYW5nbGUgPSBwb2ludGluZ1Bvcy5nZXRBbmdsZSgpO1xyXG4gICAgICAgICAgICAgICAgaWYoYW5nbGUgPCAwKVxyXG4gICAgICAgICAgICAgICAgICAgIGFuZ2xlICs9IDIqUEk7XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHhPZmZzZXQgPSAwLjggKiBwb2ludGluZ1Bvcy5uYW1lLmNXaWR0aDtcclxuICAgICAgICAgICAgICAgIGlmKCAgICAoUEkvNCAgIDwgYW5nbGUgJiYgYW5nbGUgPD0gUEkvMiAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHx8ICgzKlBJLzQgPCBhbmdsZSAmJiBhbmdsZSA8PSA1KlBJLzQpXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgKDMqUEkvMiA8IGFuZ2xlICYmIGFuZ2xlIDw9IDcqUEkvNClcclxuICAgICAgICAgICAgICAgICkgeE9mZnNldCAqPSAtMTtcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgeU9mZnNldCA9IC0xLjEgKiBwb2ludGluZ1Bvcy5uYW1lLmRlc2MgKyAxLjEgKiBwb2ludGluZ1Bvcy5uYW1lLmFzYztcclxuICAgICAgICAgICAgICAgIGlmKCAgICAoUEkvNCAgIDwgYW5nbGUgJiYgYW5nbGUgPD0gICBQSS8yKVxyXG4gICAgICAgICAgICAgICAgICAgIHx8IChQSS8yICAgPCBhbmdsZSAmJiBhbmdsZSA8PSAzKlBJLzQpXHJcbiAgICAgICAgICAgICAgICAgICAgfHwgKFBJICAgICA8IGFuZ2xlICYmIGFuZ2xlIDw9IDUqUEkvNClcclxuICAgICAgICAgICAgICAgICAgICB8fCAoNypQSS80IDwgYW5nbGUgJiYgYW5nbGUgPD0gICAyKlBJKVxyXG4gICAgICAgICAgICAgICAgKSB5T2Zmc2V0ICo9IC0xO1xyXG5cclxuICAgICAgICAgICAgICAgIHBvaW50aW5nUG9zLm5hbWVcclxuICAgICAgICAgICAgICAgICAgICAuc2V0Q29sb3IoY29sb3IpXHJcbiAgICAgICAgICAgICAgICAgICAgLnNldFBvc2l0aW9uKHBvaW50aW5nUG9zLnggLyAyLCBwb2ludGluZ1Bvcy55IC8gMilcclxuICAgICAgICAgICAgICAgICAgICAuc2V0T2Zmc2V0KHhPZmZzZXQsIHlPZmZzZXQpXHJcbiAgICAgICAgICAgICAgICAgICAgLmRyYXcocGxvdHRlci5kcmF3ZXIpO1xyXG5cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBBUlJPVyBPTiBUT1BcclxuICAgICAgICAgICAgICAgIGxldCBhcnJvd09yUG9zID0gcGxvdHRlci5jb21wdXRlRm9yWFkocG9pbnRpbmdQb3MueCAvIDIsIHBvaW50aW5nUG9zLnkgLyAyKTtcclxuICAgICAgICAgICAgICAgIHBsb3R0ZXIuZHJhd2VyXHJcbiAgICAgICAgICAgICAgICAgICAgLnN0cm9rZShjb2xvcilcclxuICAgICAgICAgICAgICAgICAgICAuc3Ryb2tlV2VpZ2h0KHN0cm9rZVcpXHJcbiAgICAgICAgICAgICAgICAgICAgLmZpbGwoY29sb3IpO1xyXG5cclxuICAgICAgICAgICAgICAgIHRyYW5zbGF0ZShcclxuICAgICAgICAgICAgICAgICAgICBhcnJvd09yUG9zLnggKyB4T2Zmc2V0IC0gcG9pbnRpbmdQb3MubmFtZS5jV2lkdGggLyAyLFxyXG4gICAgICAgICAgICAgICAgICAgIGFycm93T3JQb3MueSArIHlPZmZzZXQgLSBwb2ludGluZ1Bvcy5uYW1lLmFzY1xyXG4gICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgICAgIGxpbmUoMCwgMCwgcG9pbnRpbmdQb3Mubm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gICAgbGV0IGggPSB0aGlzLnN2Z0ltZy5oZWlnaHQ7XHJcbiAgICAgICAgICAgICAgICBsZXQgdyA9IHRoaXMuc3ZnSW1nLndpZHRoO1xyXG5cclxuICAgICAgICAgICAgICAgIGRyYXdlclxyXG4gICAgICAgICAgICAgICAgICAgIC5zdHJva2UodGhpcy5jb2xvcilcclxuICAgICAgICAgICAgICAgICAgICAuc3Ryb2tlV2VpZ2h0KDEpXHJcbiAgICAgICAgICAgICAgICAgICAgLm5vRmlsbCgpO1xyXG4gICAgICAgICAgICAgICAgbGluZShwb3MueCAgICAsIHBvcy55ICAgICwgcG9zLnggKyB3LCBwb3MueSAgICApO1xyXG4gICAgICAgICAgICAgICAgbGluZShwb3MueCAgICAsIHBvcy55ICsgaCwgcG9zLnggKyB3LCBwb3MueSArIGgpO1xyXG4gICAgICAgICAgICAgICAgbGluZShwb3MueCAgICAsIHBvcy55ICsgaCwgcG9zLnggICAgLCBwb3MueSAgICApO1xyXG4gICAgICAgICAgICAgICAgbGluZShwb3MueCArIHcsIHBvcy55ICsgaCwgcG9zLnggKyB3LCBwb3MueSAgICApO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgcG9wKCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAqIENoYW5nZSB0ZXh0IHZhbHVlXHJcbiAgICAqL1xyXG4gICAgc2V0VGV4dCh0ZXh0KSB7XHJcbiAgICAgICAgdGhpcy50ZXh0ID0gdGV4dDtcclxuXHJcbiAgICAgICAgbGV0IHN2ZyA9ICc8c3ZnJyArIE1hdGhKYXgudGV4MnN2Zyh0aGlzLnRleHQsXHJcbiAgICAgICAgICAgIHsgZGlzcGxheSA6IHRydWUsIGVtIDogMTIsIGV4IDogNiwgY29udGFpbmVyV2lkdGggOiA4MCAqIDYsIGxpbmVXaWR0aCA6IDEwMDAwMCwgc2NhbGUgOiAxIH1cclxuICAgICAgICApLmlubmVySFRNTC5zcGxpdCgnPHN2ZycpWzFdLnNwbG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gZm9yIChsZXQgaSA9IDA7IGkgPCBtYXhJOyBpKyspIHtcclxuICAgICAgICAgICAgbGV0IHBlcmNlbnQgPSBwZXJjZW50RnVuY3Rpb24oaSwgbHQsIHRoLmksIGMpO1xyXG5cclxuICAgICAgICAgICAgbGV0IG4gPSBpICsgMTtcclxuICAgICAgICAgICAgaWYobiA+PSBkLmxlbmd0aCkgbiA9IDA7XHJcblxyXG4gICAgICAgICAgICBfcFNpbXVsYXRpb25JbnN0YW5jZS5wbG90dGVyLmRyYXdlclxyXG4gICAgICAgICAgICAgICAgLm5vRmlsbCgpXHJcbiAgICAgICAgICAgICAgICAuc3Ryb2tlV2VpZ2h0KDMpXHJcbiAgICAgICAgICAgICAgICAuc3Ryb2tlKDI1NSlcclxuICAgICAgICAgICAgICAgIC5saW5lKFxyXG4gICAgICAgICAgICAgICAgICAgIGRbaV0ucG9zLngsXHJcbiAgICAgICAgICAgICAgICAgICAgZFtpXS5wb3MueSxcclxuICAgICAgICAgICAgICAgICAgICBkW2ldLnBvcy54ICsgKGRbbl0ucG9zLnggLSBkW2ldLnBvcy54KSAqIHBlcmNlbnQsXHJcbiAgICAgICAgICAgICAgICAgICAgZFtpXS5wb3MueSArIChkW25dLnBvcy55IC0gZFtpXS5wb3MueSkgKiBwZXJjZW50XHJcbiAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IGRlZmF1bHQgcFNJbnRlcnBvbGF0aW9uO1xyXG4iLCJpbXBvcnQgcFNBbmltYXRpb25IYW5kbGVyIGZyb20gJy4vcFNBbmltYXRpb25IYW5kbGVyJztcclxuXHJcbmNsYXNzIHBTRWFzZUluT3V0Q3ViaWMgZXh0ZW5kcyBwU0FuaW1hdGlvbkhhbmRsZXIge1xyXG4gICAgLyoqXHJcbiAgICAqIEVhc2UgaW4gYW5kIG91dCBjdWJpYyBhbmltYXRpb25cclxuICAgICogQHBhcmFtIHRpbWVMZW5ndGggRHVyYXR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sb3R0ZXIudXBkYXRlKGR0ICogcy5jb25maWcuZW5naW5lLnJ1bm5lci5zaW11bGF0aW9uU3BlZWQpO1xyXG5cclxuICAgICAgICAgICAgaWYoY3VycmVudFRpbWUgLSBzLmxhc3REcmF3VGltZSA+PSAxIC8gcy5jb25maWcuZW5naW5lLnJ1bm5lci5EUkFXX0ZQUykge1xyXG4gICAgICAgICAgICAgICAgaWYoZHQgPD0gY3JpdGlxRHQpIHtcclxuICAgICAgICAgICAgICAgICAgICBzLmR0VG90YWwgKz0gZHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgcy5kdENvdW50ICs9IDE7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYocy5kdENvdW50ICUgcy5jb25maWcuZW5naW5lLnJ1bm5lci5yb2xsYmFja0NvbnRyb2wuYXZlcmFnZVRpbWVTYW1wbGUgPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzLmR0TW95ICAgPSBzLmR0VG90YWwgLyBzLmR0Q291bnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHMuZHRUb3RhbCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHMuZHRDb3VudCA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHMucGxvdHRlci5kcmF3KCk7XHJcbiAgICAgICAgICAgICAgICBzLmxhc3REcmF3VGltZSA9IGN1cnJlbnRUaW1lO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgLy8gcnVucyBldmVyeSB0aW1lIHRoZSB3aW5kb3cgaXMgcmVzaXplZFxyXG4gICAgICAgIHdpbmRvdy53aW5kb3dSZXNpemVkID0gZnVuY3Rpb24oKSB7XHJcbiAgICAgICAgICAgIGxldCBwID0gX3BTaW11bGF0aW9uSW5zdGFuY2UuZ2V0Q2FudmFzUHJvcG9ydGlvbnMoX3BTaW11bG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EsIC4uLnBhcmFtcykge1xyXG4gICAgICAgIGlmKGN1c3RvbU9iamVjdCBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbnVtYmVyOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBjb3B5UGFyYW1zVGVtcCA9IFtdO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBwYXJhbXMubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpZihcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zW2pdIGluc3RhbmNlb2YgQXJyYXlcclxuICAgICAgICAgICAgICAgICAgICAgICAgJiYgcGFyYW1zW2pdWzBdICE9IHVuZGVmaW5lZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAmJiBwYXJhbXNbal1bMV0gIT0gdW5kZWZpbmVkXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBhcmFtc1tqXVsxXSBpbnN0YW5jZW9mIEZ1bmN0aW9uXHJcbiAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgICAgIChwYXJhbXNbal1bMF0gPT0gdGhpcy5jb25maWcuZW5naW5lLnJ1bm5lci5hZGRpbmdPYmplY3RzQ29uZmlnS2V5V29yZHMucnVuRnVuY3Rpb25zKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weVBhcmFtc1RlbXAucHVzaChwYXJhbXNbal1bMV0oLi4ucGFyYW1zW2pdLnNsaWNlKDIpKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYocGFyYW1zW2pdWzBdID09IHRoaXMuY29uZmlnLmVuZ2luZS5ydW5uZXIuYWRkaW5nT2JqZWN0c0NvbmZpZ0tleVdvcmRzLnJ1bkNsYXNzKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weVBhcmFtc1RlbXAucHVzaChuZXcgcGFyYW1zW2pdWzFdKC4uLnBhcmFtc1tqXS5zbGljZSgyKSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvcHlQYXJhbXNUZW1wLnB1c2gocGFyYW1zW2pdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRoaXMucGxvdHRlci5vYmplY3RzTC5wdXNoKG5ldyBjdXN0b21PYmplY3QoLi4uY29weVBhcmFtc1RlbXApKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgIHRoaXMucGxvdHRlci5vYmplY3RzTC5wdXNoKGN1c3RvbU9iamVjdCk7XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKiBAcmV0dXJuIHRoZSBkZWZhdWx0IGNvbmZpZ3VyYXRpb24gb2YgdGhlIGVuZ2luZSAqL1xyXG4gICAgZ2V0RGVmYXVsdEVuZ2luZUNvbmZpZygpIHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBydW5uZXIgOiB7XHJcbiAgICAgICAgICAgICAgICBkaXZJZCA6ICdzaW11bGF0aW9uQ29udGVudCcsXHJcbiAgICAgICAgICAgICAgICBVUERBVEVfRlBTIDogMTIwLFxyXG4gICAgICAgICAgICAgICAgRFJBV19GUFMgICA6IDYwLFxyXG4gICAgICAgICAgICAgICAgc2ltdWxhdGlvblNwZWVkIDogMSxcclxuICAgICAgICAgICAgICAgIGFkZGluZ09iamVjdHNDb25maWdLZXlXb3JkcyA6IHsgIC8vIGtleXdvcmRzIGZvciB3aGVuIHdlIGFkZCBvYmplY3RzIGF0IHRoZSBzdGFydCBvZiB0aGUgZW5naW5lXHJcbiAgICAgIC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dGggIDogMC45OSxcclxuICAgICAgICAgICAgICAgICAgICBoZWlnaHQgOiAwLjk5XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgXHRwbG90dGVyIDoge1xyXG4gICAgICAgIFx0XHRzY2FsZSA6IHsgIC8vIGRpc3BsYXlzIHggcmVsYXRpdmUgdW5pdHMgb24gZWFjaCBzaWRlXHJcbiAgICAgICAgXHRcdFx0eCA6IDEwLFxyXG4gICAgICAgIFx0XHRcdHkgOiAxMCxcclxuICAgICAgICBcdFx0XHRzcXVhcmVCeVggOiB0cnVlXHJcbiAgICAgICAgXHRcdH0sXHJcbiAgICAgICAgXHRcdG9mZnNldCA6IHsgIC8vIHggYW5kIHkgcmVsYXRpdmUgb2Zmc2V0XHJcbiAgICAgICAgXHRcdFx0eCA6IDAsXHJcbiAgICAgICAgXHRcdFx0eSA6IDBcclxuICAgICAgICBcdFx0fSxcclxuICAgICAgICAgICAgICAgIGJhY2tncm91bmRDb2xvciA6IHtcclxuICAgICAgICAgICAgICAgICAgICBkcmF3IDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBjb2xvciA6IHsgciA6IDAgICwgZyA6IDAgICwgYiA6IDAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGdyaWRDb2xvciAgICAgICA6IHsgciA6IDI1NSwgZyA6IDI1NSwgYiA6IDI1NSwgYSA6IDAuNiB9LFxyXG4gICAgICAgIFx0XHRkaXNwbGF5R3JpZCAgICAgOiB0cnVlICAvLyB0cnVlIDogZGlzcGxheSBncmFwaCBvbiB0aGUgc2NyZWVuXHJcbiAgICAgICAgXHR9XHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICogQHBhcmFtIGNvbmZpZ0Z1bmMgVGhlIGZ1bmN0aW9uIHRoYXQgbW9kaWZpZXMgZW5naW5lIGNvbmZpZ3VyYXRpb25cclxuICAgICogQHJldHV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gICAgICAgICAgICBfcFNpbXVsYXRpb25JbnN0YW5jZS5jb25maWcuZW5naW5lLnBsb3R0ZXIuc2NhbGUueSArIGhcclxuICAgICAgICAgKTtcclxuICAgICAgICAgcmVjdCh2MC54LCB2MC55LCB2MS54LCB2MS55KTtcclxuICAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICB9O1xyXG5cclxuXHJcblxyXG4gICAgLyoqXHJcbiAgICAqIFNldCBzdHJva2UgY29sb3JcclxuICAgICogQHBhcmFtIHIgUmVkIHZhbHVlICgwIHRvIDI1NSksIG9yICdyZ2IociwgZywgYiknIG9yICdyZ2JhKHIsIGcsIGIsIGEpJ1xyXG4gICAgKiBAcGFyYW0gZyBHcmVlbiB2YWx1ZSAoMCB0byAyNTUpXHJcbiAgICAqIEBwYXJhbSBiIEJsdWUgdmFsdWUgKDAgdG8gMjU1KVxyXG4gICAgKiBAcGFyYW0gYSBBbHBoYSB2YWx1ZSAoMCB0byAyNTUpXHJcbiAgICAqIEByZXR1cm4gdGhpc1xyXG4gICAgKi9cclxuICAgIHN0cm9rZShyLCBnLCBiLCBhKSB7XHJcbiAgICAgICAgaWYoYSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYoYiA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmKGcgPT0gdW5kZWZpbmVkKVxyXG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZShyKTtcclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBzdHJva2UociwgZyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAgc3Ryb2tlKHIsIGcsIGIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgIHN0cm9rZShgcmdiYSgke3J9LCAke2d9LCAke2J9LCAke2F9KWApO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgKiBTZXQgc3Ryb2tlIHdlaWdodFxyXG4gICAgKiBAcGFyYW0gbiBTdHJva2Ugd2VpZ2h0IChpbnRlZ2VyKVxyXG4gICAgKi9cclxuICAgIHN0cm9rZVdlaWdodChuKSB7XHJcbiAgICAgICAgc3Ryb2tlV2VpZ2h0KG4pO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgKiBTZXQgZmlsbCBjb2xvclxyXG4gICAgKiBAcGFyYW0gciBSZWQgdmFsdWUgKDAgdG8gMjU1KSwgb3IgJ3JnYihyLCBnLCBiKScgb3IgJ3JnYmEociwgZywgYiwgYSknXHJcbiAgICAqIEBwYXJhbSBnIEdyZWVuIHZhbHVlICgwIHRvIDI1NSlcclxuICAgICogQHBhcmFtIGIgQmx1ZSB2YWx1ZSAoMCB0byAyNTUpXHJcbiAgICAqIEBwYXJhbSBhIEFscGhhIHZhbHVlICgwIHRvIDI1NSlcclxuICAgICogQHJldHVybiB0aGlzXHJcbiAgICAqL1xyXG4gICAgZmlsbChyLCBnLCBiLCBhKSB7XHJcbiAgICAgICAgaWYoYSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYoYiA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmKGcgPT0gdW5kZWZpbmVkKVxyXG4gICAgICAgICAgICAgICAgICAgIGZpbGwocik7XHJcbiAgICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsbChyLCBnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICBmaWxsKHIsIGcsIGIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgIGZpbGwoYHJnYmEoJHtyfSwgJHtnfSwgJHtifSwgJHthfSlgKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcblxyXG5cclxuICAgIGJlZ2luU2hhcGUoVFlQRSkge1xyXG4gICAgICAgIGJlZ2luU2hhcGUoVFlQRSk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICB9XHJcblxyXG4gICAgZW5kU2hhcGUoKSB7XHJcbiAgICAgICAgZW5kU2hhcGUoKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICB2ZXJ0ZXgoeCwgeSkge1xyXG4gICAgICAgIGxldCB2ID0gdGhpcy5wbG90dGVyLmNvbXB1dGVGb3JYWSh4LCB5KTtcclxuICAgICAgICB2ZXJ0ZXgodi54LCB2LnkpO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIHBvcCgpIHtcclxuICAgICAgICBwb3AoKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBwdXNoKCkge1xyXG4gICAgICAgIHB1c2goKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcblxyXG5cclxuXHJcblxyXG4gICAgLyoqIFJlbW92ZSBzdHJva2Ugb2YgdGhlIHNoYXBlICovXHJcbiAgICBub1N0cm9rZSgpIHtcclxuICAgICAgICBub1N0cm9rZSgpO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKiBObyBmaWxsIHRoZSBzaGFwZSAqL1xyXG4gICAgbm9GaWxsKCkge1xyXG4gICAgICAgIG5vRmlsbCgpO1xyXG4gICAgICAgIHJldHVybiB0aGlzO1xyXG4gICAgfVxyXG59XHJcblxyXG5leHBvcnQgZGVmYXVsdCBwU0RyYXdlcjtcclxuIiwiaW1wb3J0ICcuLy4uLy4uL3V0aWxpdGllcy9WZWN0b3InO1xyXG5pbXBvcnQgJy4vLi4vQW5pbWF0aW9uJztcclxuaW1wb3J0ICcuL1RleHQ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gICAgICAgICAgIGQubm9GaWxsKCk7XHJcbiAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICBkLmZpbGwodGhpcy5maWxsQ29sb3IpO1xyXG5cclxuICAgICAgICBpZih0aGlzLnN0cm9rZUNvbG9yID09ICdub25lJylcclxuICAgICAgICAgICAgZC5ub1N0cm9rZSgpO1xyXG4gICAgICAgIGVsc2VcclxuICAgICAgICAgICAgZC5zdHJva2UodGhpcy5zdHJva2VDb2xvcikuc3Ryb2tlV2VpZ2h0KHRoaXMuc3Ryb2tlV2VpZ2h0KTtcclxuXHJcbiAgICAgICAgZC5wdXNoKClcclxuICAgICAgICAgICAgLmJlZ2luU2hhcGUoKVxyXG4gICAgICAgICAgICAgICAgLnZlcnRleCh0aGlzLnAwLngsIHRoaXMucDAueSlcclxuICAgICAgICAgICAgICAgIC52ZXJ0ZXgodGhpcy5wMS54LCB0aGlzLnAxLnkpXHJcbiAgICAgICAgICAgICAgICAudmVydGV4KHRoaXMucDIueCwgdGhpcy5wMi55KVxyXG4gICAgICAgICAgICAgICAgLnZlcnRleCh0aGlzLnAwLngsIHRoaXMucDAueSlcclxuICAgICAgICAgICAgLmVuZFNoYXBlKClcclxuICAgICAgICAucG9wKCk7XHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHBTVHJpYW5nbGU7XHJcbiIsIi8vID09PT09PT09PT0gUFNFTkdJTkUgVkFSSUFCTEVTID09PT09PT09PT1cclxuLy8gPT09PSBDb3JlID09PT1cclxuaW1wb3J0IHBTaW11bGF0b3IgZnJvbSAnLi9jb3JlL1NpbXVsYXRvcic7XHJcblxyXG4vLyA9PT09IERyYXdlciA9PT09XHJcbi8vIE9iamVjdHNcclxuaW1wb3J0IHBTUG9pbnQgICAgZnJvbSAnLi9kcmF3ZXIvb2JqZWN0cy9Qb2ludCc7XHJcbmltcG9ydCBwU1RleHQgICAgIGZyb20gJy4vZHJhd2VyL29iamVjdHMvVGV4dCc7XHJcbmltcG9ydC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