function e(e){return e&&e.__esModule?e.default:e}var t;t=JSON.parse('[{"command":"help","responseType":"list","value":["a-propos : Affiche les informations me concernant","clear : Nettoie le terminal","experiences : Affiche la liste de mes expériences","get cv : Télécharge le CV","help : Affiche l\'aide","hobby : Affiche la liste de mes passes temps","projets-perso : Affiche la liste de mes projets personnels","dark/light : Change le thème de la page","Vous pouvez utiliser la touche TAB afin de compléter une commande","Vous pouvez retrouver les anciennes commandes avec les flèches haut et bas."]},{"command":"a-propos","responseType":"code","value":["{"," \\"nom\\" : \\"Gregory Lebreton\\","," \\"poste\\" : \\"Formateur Devops\\","," \\"experience\\" : \\"6\\","," \\"ville\\" : \\"Paris, France\\"","}"]},{"command":"experiences","responseType":"table","headers":["Date","Client","Description","Tech"],"rows":[["maintenant
03/2021","
Le garage numérique","Formateur Devops pour le CNAM,
administrateur système et intégrateur pour le Garage","Docker
Python
Bash"],["09/2019
06/2019","
Safran, S.A.E","Mise en place d\'une plateforme mettant en relation les
différents acteurs de la DSI sur une plateforme logicielle.","Docker
Kubernetes
Jenkins"],["03/2019
12/2017","PHP dev
Leading Frog","Module PHP permettant l\'envoie de cartes postales
numériques avec implémentation API Stripe.","PHP
JavaScript
SQL"]]},{"command":"hobby","responseType":"list","value":["Musique: Skateboard, Unity, VR","Programmation: Python, bash, PHP, C#","Autre: Famille, Cinéma, Environnement"]},{"command":"projets-perso","responseType":"table","headers":["Nom","Description","Tech","Liens"],"rows":[["Personal website
(2021)","Site web personnel me permettant de montrer mes projets et tester des applicatifs
","PHP/JS","Lien"],["GoldeneyeVR
(2020)","Implémentation VR au célèbre jeux de 1997.","C# WPF","Lien"]]}]');var i={};!function e(t,i,n,s){var o=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL);function a(){}function r(e){var n=i.exports.Promise,s=void 0!==n?n:t.Promise;return"function"==typeof s?new s(e):(e(a,a),null)}var c,h,d,l,u,m,f,p,_,g=(d=Math.floor(1e3/60),l={},u=0,"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(c=function(e){var t=Math.random();return l[t]=requestAnimationFrame((function i(n){u===n||u+d-1{var e={511:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Explosion=void 0;var n=i(909);t.Explosion=class{constructor(e){var{x:t,y:i,ctx:s,hue:o,exp:a,gravity:r,friction:c,brightness:h,explosionLength:d}=e;for(this._coordinates=[],this._alpha=1,this._x=t,this._y=i,this._exp=a,this._ctx=s,this._gravity=r,this._friction=c,this._explosionLength=d;this._explosionLength--;)this._coordinates.push([t,i]);this._angle=n.randomFloat(0,2*Math.PI),this._speed=n.randomInt(1,10),this._hue=n.randomInt(o-20,o+20),this._brightness=n.randomInt(h.min,h.max),this._decay=n.randomFloat(h.decay.min,h.decay.max)}update(e){this._coordinates.pop(),this._coordinates.unshift([this._x,this._y]),this._speed*=this._friction,this._x+=Math.cos(this._angle)*this._speed,this._y+=Math.sin(this._angle)*this._speed+this._gravity,this._alpha-=this._decay,this._alpha<=this._decay&&e()}draw(){var e=this._coordinates.length-1;this._ctx.beginPath(),this._exp&&(this._ctx.arc(this._x,this._y,n.randomFloat(.5,1.5),0,2*Math.PI),this._ctx.fill()),this._ctx.fillStyle=n.hsla(this._hue,this._brightness,this._alpha),this._ctx.moveTo(this._coordinates[e][0],this._coordinates[e][1]),this._ctx.lineTo(this._x,this._y),this._ctx.strokeStyle=n.hsla(this._hue,this._brightness,this._alpha),this._ctx.stroke()}}},909:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hsla=t.getDistance=t.randomInt=t.randomFloat=void 0,t.randomFloat=function(e,t){return Math.random()*(t-e)+e},t.randomInt=function(e,t){return Math.floor(e+Math.random()*(t+1-e))},t.getDistance=function(e,t,i,n){var s=Math.pow;return Math.sqrt(s(e-i,2)+s(t-n,2))},t.hsla=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return"hsla(".concat(e,", 100%, ").concat(t,"%, ").concat(i,")")}},449:function(e,t,i){var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(s,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,r)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Sound=void 0;var s=i(909);t.Sound=class{constructor(e){this._buffer=[],this.onInit=!0,this._audioContext=new(window.AudioContext||window.webkitAudioContext),this.options=Object.assign({enabled:!1,files:["explosion0.mp3","explosion1.mp3","explosion2.mp3"],volume:{min:4,max:8}},e),this.init()}init(){this.onInit&&this.options.enabled&&(this.onInit=!1,this.load())}load(){return n(this,void 0,void 0,(function*(){for(var e of this.options.files){var t=yield(yield fetch(e)).arrayBuffer();this._audioContext.decodeAudioData(t).then((e=>{this._buffer.push(e)})).catch((e=>{throw e}))}}))}play(){if(this.options.enabled&&this._buffer.length){var e=this._audioContext.createBufferSource(),t=this._buffer[s.randomInt(0,this._buffer.length-1)],i=this._audioContext.createGain();e.buffer=t,i.gain.value=s.randomFloat(this.options.volume.min/100,this.options.volume.max/100),i.connect(this._audioContext.destination),e.connect(i),e.start(0)}else this.init()}}},668:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Trace=void 0;var n=i(909);t.Trace=class{constructor(e){var{x:t,y:i,dx:s,dy:o,ctx:a,hue:r,speed:c,traceLength:h,acceleration:d}=e;for(this._coordinates=[],this._currentDistance=0,this._x=t,this._y=i,this._sx=t,this._sy=i,this._dx=s,this._dy=o,this._ctx=a,this._hue=r,this._speed=c,this._traceLength=h,this._acceleration=d,this._totalDistance=n.getDistance(t,i,s,o);this._traceLength--;)this._coordinates.push([t,i]);this._angle=Math.atan2(o-i,s-t),this._brightness=n.randomInt(50,70)}update(e){this._coordinates.pop(),this._coordinates.unshift([this._x,this._y]),this._speed*=this._acceleration;var t=Math.cos(this._angle)*this._speed,i=Math.sin(this._angle)*this._speed;this._currentDistance=n.getDistance(this._sx,this._sy,this._x+t,this._y+i),this._currentDistance>=this._totalDistance?e(this._dx,this._dy,this._hue):(this._x+=t,this._y+=i)}draw(){var e=this._coordinates.length-1;this._ctx.beginPath(),this._ctx.moveTo(this._coordinates[e][0],this._coordinates[e][1]),this._ctx.lineTo(this._x,this._y),this._ctx.strokeStyle=n.hsla(this._hue,this._brightness),this._ctx.stroke()}}}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.Fireworks=void 0;var t=i(668),s=i(449),o=i(511),a=i(909);e.Fireworks=class{constructor(e){var{autoresize:t=!0,boundaries:i,brightness:n,delay:o,hue:a,mouse:r,sound:c,trace:h=3,speed:d=2,explosion:l=5,gravity:u=1.5,opacity:m=.5,particles:f=50,friction:p=.95,rocketsPoint:_=50,acceleration:g=1.05}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._tick=0,this._version="1.3.5",this._running=!1,this._randomRocketsPoint=!1,this._experimentals=!1,this._m=!1,this._container=e,this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._container.appendChild(this._canvas),this._sound=new s.Sound(c),this.setSize(),this.setBoundaries(Object.assign({visible:!1,x:50,y:50},i)),this.autoresize=t,this.trace=h,this.speed=d,this.explosion=l,this.gravity=u,this.opacity=m,this.particles=f,this.friction=p,this.rocketsPoint=_,this.acceleration=g,this.hue=Object.assign({min:0,max:360},a),this.mouse=Object.assign({click:!1,move:!1,max:1},r),this.delay=Object.assign({min:15,max:30},o),this.brightness=Object.assign({min:50,max:80,decay:{min:.015,max:.03}},n),this.autoresize&&window.addEventListener("resize",(()=>this.windowResize())),this._canvas.addEventListener("mousedown",(e=>this.mouseDown(e))),this._canvas.addEventListener("mouseup",(e=>this.mouseUp(e))),this._canvas.addEventListener("mousemove",(e=>this.mouseMove(e)))}get isRunning(){return this._running}get version(){return this._version}start(){this._running||(this._running=!0,this.clear(),this.render())}stop(){this._running&&(this._running=!1,this.clear())}unmount(){window.removeEventListener("resize",this.windowResize),this._canvas.addEventListener("mousedown",this.mouseDown),this._canvas.addEventListener("mouseup",this.mouseUp),this._canvas.addEventListener("mousemove",this.mouseMove)}pause(){this._running=!this._running}clear(){this._ctx&&(this._traces=[],this._explosions=[],this._ctx.clearRect(0,0,this._width,this._height))}setOptions(e){for(var[t,i]of Object.entries(e)){var n=Object.prototype.hasOwnProperty.call(this,t);if("function"==typeof this[t])throw new Error("You cannot change the methods of the class!");n&&("object"==typeof this[t]?Object.assign(this[t],i):this[t]=i),"sound"===t&&Object.assign(this._sound.options,i)}}setSize(){var{width:e=this._container.clientWidth,height:t=this._container.clientHeight}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._width=e,this._height=t,this._canvas.width=e,this._canvas.height=t,this.setBoundaries({width:e,height:t})}setBoundaries(e){this.boundaries=Object.assign(Object.assign({},this.boundaries),e)}useMouse(e,t){(this.mouse.click||this.mouse.move)&&(this._mx=e.pageX-this._canvas.offsetLeft,this._my=e.pageY-this._canvas.offsetTop,this._m=t)}windowResize(){this.setSize()}mouseDown(e){this.useMouse(e,this.mouse.click)}mouseUp(e){this.useMouse(e,!1)}mouseMove(e){this.useMouse(e,this._m)}render(){this._ctx&&this._running&&(requestAnimationFrame((()=>this.render())),this._ctx.globalCompositeOperation="destination-out",this._ctx.fillStyle="rgba(0, 0, 0, ".concat(this.opacity,")"),this._ctx.fillRect(0,0,this._width,this._height),this._ctx.globalCompositeOperation="lighter",this.drawBoundaries(),this.initTrace(),this.drawTrace(),this.drawExplosion(),this._tick++)}drawBoundaries(){this.boundaries.visible&&(this._ctx.beginPath(),this._ctx.strokeStyle="red",this._ctx.rect(this.boundaries.x,this.boundaries.y,this.boundaries.width-2*this.boundaries.x,.5*this.boundaries.height),this._ctx.stroke())}initTrace(){this._ds=a.randomInt(this.delay.min,this.delay.max),(2*this._dsthis._traces.length)&&(this._traces.push(new t.Trace({x:this._width*(this._randomRocketsPoint?a.randomInt(0,100):this.rocketsPoint)/100,y:this._height,dx:this._mx&&this.mouse.move||this._m?this._mx:a.randomInt(this.boundaries.x,this.boundaries.width-2*this.boundaries.x),dy:this._my&&this.mouse.move||this._m?this._my:a.randomInt(this.boundaries.y,.5*this.boundaries.height),ctx:this._ctx,hue:a.randomInt(this.hue.min,this.hue.max),speed:this.speed,acceleration:this.acceleration,traceLength:this.trace})),this._tick=0)}drawTrace(){for(var e=this._traces.length;e--;)this._traces[e].draw(),this._traces[e].update(((t,i,n)=>{this.initExplosion(t,i,n),this._sound.play(),this._traces.splice(e,1)}))}initExplosion(e,t,i){for(var n=this.particles;n--;)this._explosions.push(new o.Explosion({x:e,y:t,ctx:this._ctx,hue:i,friction:this.friction,gravity:this.gravity,explosionLength:this.explosion,brightness:this.brightness,exp:this._experimentals}))}drawExplosion(){for(var e=this._explosions.length;e--;)this._explosions[e].draw(),this._explosions[e].update((()=>{this._explosions.splice(e,1)}))}}})(),n})()}));let a=[];e(t).forEach((e=>{a.push(e.command)}));const r=["clear","dark","light","get cv"];a=a.concat(r);const c=["pif","rm -rf /"];window.innerWidth>1024&&function(e){var t=0,i=0,n=0,s=0;const o=document.querySelector(".terminal__header");function a(e){(e=e||window.event).preventDefault(),n=e.clientX,s=e.clientY,document.onmouseup=c,document.onmousemove=r}function r(o){(o=o||window.event).preventDefault(),t=n-o.clientX,i=s-o.clientY,n=o.clientX,s=o.clientY,e.style.top=e.offsetTop-i+"px",e.style.left=e.offsetLeft-t+"px"}function c(){document.onmouseup=null,document.onmousemove=null}o?o.onmousedown=a:e.onmousedown=a}(document.querySelector(".terminal"));const h=[];let d=!1,l=-1;const u=document.querySelector(".terminal__body");m();if(11===(new Date).getMonth()){let e="";for(let t=0;t<6;t++)e+='
';const t=``;document.body.append(function(e){return document.createRange().createContextualFragment(e)}(t))}function m(e=null){const t=Math.random().toString(36).replace("0.",""),i=document.createElement("div");i.classList.add("terminal__line");const n=document.createElement("div");n.classList.add("terminal__response"),n.id=`response-${t}`;const s=document.createElement("input");if(s.type="text",s.id=`input-${t}`,s.autocapitalize="off",s.dataset.uid=t,s.dataset.active="1",s.addEventListener("keydown",f),i.appendChild(s),e){const t=document.getElementById(e);t&&(t.setAttribute("disabled","true"),t.removeEventListener("keydown",f),delete t.dataset.active)}document.getElementById("terminal").appendChild(i),document.getElementById("terminal").appendChild(n),s.focus()}function f(i){const f=i.target.value.trim().toLowerCase();if(13===i.keyCode){if(""!==f){d=!1;const a=`response-${i.target.dataset.uid}`,l=document.getElementById(a);let p;p=c.includes(f)||r.includes(f)?function(e){switch(e){case"pif":return function(){const e={origin:{y:.7}};function t(t,i){n(Object.assign({},e,i,{particleCount:Math.floor(200*t)}))}t(.25,{spread:26,startVelocity:55}),t(.2,{spread:60}),t(.35,{spread:100,decay:.91,scalar:.8}),t(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),t(.1,{spread:120,startVelocity:45})}(),"Let's go !";case"light":return document.body.classList.contains("dark-mode")?(o(!1),"Your are now in light mode."):"You are already in light mode.";case"dark":return document.body.classList.contains("dark-mode")?"You are already in dark mode.":(o(!0),"You are now in dark mode.");case"get cv":return function(){const e=document.createElement("a");e.href="resources/resume.pdf",e.setAttribute("download","CV - Antoine DAUTRY.pdf"),e.click()}(),"The CV will be downloaded.";case"rm -rf /":return o(!0),document.body.classList.add("firework"),new s.Fireworks(document.body,{mouse:{click:!0,move:!1,max:7}}).start(),"🎆";case"clear":return void(u.innerHTML='
')}}(f):function(i){const n=e(t).find((e=>e.command===i));let s="";if(void 0===n)s=`'${i.split(" ")[0]}' is not recognized as an internal command or external command, operable program or batch file. Type the help command to display a list of available commands.`;else if("list"===n.responseType&&Array.isArray(n.value))s="";else if("text"===n.responseType)s=n.value;else if("table"===n.responseType){const e=n.headers,t=n.rows;s=`${e.map((e=>``)).join("")}${t.map((e=>`${e.map((e=>``)).join("")}`)).join("")}
${e}
${e}
`}else"code"===n.responseType&&(s=`
${n.value.join("\n")}
`);return s}(f),l&&(l.innerHTML=p,h.push(f),m(i.target.id))}}else if(9===i.keyCode){if(i.preventDefault(),""===f)this.value="help";else{const e=a.find((e=>e.startsWith(f)));e&&(this.value=e)}d=!1}else 38!==i.keyCode&&40!==i.keyCode||(h.length>0&&(!1===d?l=h.length-1:38===i.keyCode&&0!==l?l--:40===i.keyCode&&l!==h.length-1&&l++,this.value=h[l]),d=!0)}window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&o(!0),document.body.addEventListener("click",(function(e){if("INPUT"!==e.target.tagName){document.querySelector("input[data-active]").focus()}})),document.querySelector(".fake-close").addEventListener("click",(function(e){const t=document.querySelector(".terminal");t.parentElement.removeChild(t)})); //# sourceMappingURL=index.aeb8f1b0.js.map