diff --git a/fr/app.js b/fr/app.js index 983408f..da5a7f5 100644 --- a/fr/app.js +++ b/fr/app.js @@ -1 +1 @@ -(()=>{"use strict";var t={999:(t,e,n)=>{n.r(e)},502:(t,e,n)=>{n.r(e)},174:(t,e,n)=>{n.r(e)},966:(t,e,n)=>{n.r(e)},832:(t,e,n)=>{n.r(e)},242:(t,e,n)=>{n.r(e)},314:(t,e,n)=>{n.r(e)},407:(t,e,n)=>{n.r(e)},523:(t,e,n)=>{n.r(e)},558:(t,e,n)=>{n.r(e)},91:(t,e,n)=>{n.r(e)},763:(t,e,n)=>{n.r(e)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{const t=function(t,e){for(var n=Math.abs(t)+"",i=t<0,r=e-n.length;r>0;r--)n="0"+n;return(i?"-":"")+n};var e={create:function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n=-1===e.SVG_ELEMENTS.indexOf(t)?document.createElement(t):document.createElementNS(e.SVG_NAMESPACE,t),i.constructor===String)n.setAttribute("class",i);else for(var a in i)n.setAttribute(a,i[a]);if(r instanceof Array)for(var s=0;s=0;e--)t.childNodes[e].remove()},SVG_NAMESPACE:"http://www.w3.org/2000/svg",XLINK_NAMESPACE:"http://www.w3.org/1999/xlink",SVG_ELEMENTS:["svg","g","circle","line","path","use","rect"]};const i=e;function r(t,e){for(var n=0;n0?this.remaining:0,this.el.classList[this.remaining>10?"remove":"add"]("alert"),this.counterEl.textContent=t(this.remaining,3),this.barEl.style.width=this.remaining/this.duration*100+"%",0==this.remaining&&(this.stop(),this.endCallback&&this.endCallback())}}],a&&r(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),e}();const s=a;function o(t,e){for(var n=0;n0&&window.requestAnimationFrame(this.scrollToStart.bind(this))}},{key:"clear",value:function(t){this.lastPattern=null,this.containerEl.remove(),this.containerEl=i.create("div",{class:"history-container","data-helper":t}),this.el.appendChild(this.containerEl)}}],n&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const h=u;function d(t,e){for(var n=0;n>0===n&&e%3-n%3==n%3-t%3&&Math.floor(e/3)-Math.floor(n/3)==Math.floor(n/3)-Math.floor(t/3)){var i=this.addDot(n);return this.isComplete()||(this.suite.push(t),i.push(t)),i}return this.suite.push(t),[t]}},{key:"isComplete",value:function(){return this.suite.length>=this.dotLength}},{key:"gotDot",value:function(t){return~this.suite.indexOf(t)}},{key:"compare",value:function(t){for(var e=0,n=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff",r=[];n=n instanceof Array?n:[n];for(var a=1;a0&&void 0!==arguments[0]?arguments[0]:3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];e.fill=e.fill||"#fff";for(var r=0;r<9;r++)n.push(i.create("circle",{cx:r%3*this.GRID_GUTTER+this.SVG_MARGIN,cy:Math.floor(r/3)*this.GRID_GUTTER+this.SVG_MARGIN,rel:r,r:t}));return this.addGroup(e,n)}},{key:"addGroup",value:function(t,e){var n=i.create("g",t,e);return this.el.appendChild(n),n}},{key:"addCombinaison",value:function(t,e,n){var r=t+e+n,a=Math.min(Math.floor(this.SVG_WIDTH/r),this.SVG_COMB_EXP),s=Math.floor(.75*a),o=s+Math.floor(.25*a),l=Math.floor((this.SVG_WIDTH-(r-1)*o)/2),c=this.SVG_WIDTH+Math.floor(this.SVG_COMB_EXP/2);this.el.setAttribute("viewBox","0 0 "+this.SVG_WIDTH+" "+(this.SVG_WIDTH+this.SVG_COMB_EXP));for(var u=[],h=0;h=t?a:n,i=s<=e&&o>=e?a:i}if(void 0!==n&&null!=i){var l=3*i+n;r=this.triggerDot(l)}return r||this.updateLine(t,e),!0}}},{key:"triggerDot",value:function(t){var e=this;if(!this.pattern.gotDot(t)){var n=this.pattern.addDot(t);navigator.vibrate&&navigator.vibrate(20),n.forEach((function(t,i){var r=b.prototype.GRID_GUTTER*(t%3)+b.prototype.SVG_MARGIN,a=b.prototype.GRID_GUTTER*Math.floor(t/3)+b.prototype.SVG_MARGIN;if(e.closeLine(r,a),e.bigDotsEl.childNodes[t].classList.add("active"),i+1===n.length&&e.pattern.isComplete())return e.checkPattern();e.startLine(r,a)}))}}},{key:"reset",value:function(){clearTimeout(this.isPendingReset),this.isPendingReset=null,this.pattern.reset(),this.currentLine=null;for(var t=0;t<9;t++)this.bigDotsEl.childNodes[t].classList.remove("active");for(var e=this.patternEl.childNodes.length-1;e>=0;e--)this.patternEl.childNodes[e].remove();this.patternEl.setAttribute("stroke",m.COLORS.BRIGHT)}},{key:"checkPattern",value:function(){var t=this.onNewPattern(this.pattern);return this.isPendingReset=setTimeout(this.reset.bind(this),1e3),this.patternEl.setAttribute("stroke",t?m.COLORS.SUCCESS:m.COLORS.ERROR),t}},{key:"startLine",value:function(t,e){this.currentLine=i.create("line",{x1:t,y1:e}),this.patternEl.appendChild(this.currentLine)}},{key:"updateLine",value:function(t,e){this.currentLine&&(this.currentLine.setAttribute("x2",t),this.currentLine.setAttribute("y2",e))}},{key:"closeLine",value:function(t,e){this.updateLine(t,e),this.currentLine=null}}])&&E(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();var w={ru:function(t,e){if(0===t)return 0;var n=t>10&&t<20;return n||t%10!=1?!n&&t%10>=2&&t%10<=4||e<4?2:3:1}},T=function(t,e){var n=t.split(" | "),i=document.documentElement.lang;return 1!==n.length&&w[i]&&n[w[i](e,n.length)]||t},k=[{min:1,max:3,text:"Ce n’était que de la chance, c’est tout. Arrêtez de rêver."},{min:2,max:4,text:"Vous avez êtes chanceux."},{min:1,max:2,text:"Aucun mérite. Absolument aucun."},{min:2,max:5,text:"C’était offert sur un plateau d’argent."},{min:1,max:4,text:"Absolument aucune synapse n'a été utilisé durant cette partie."},{min:2,max:5,text:"N’osez meme pas tweeter votre score."},{min:8,max:10,text:"Damn son!! C’était limite."},{min:4,max:8,text:"Semble légitime, avec un peu de chance."},{min:7,max:10,text:"Pas mal!"},{min:9,max:10,text:"Dur! Mais vous l’avez réussi!"},{min:11,max:50,text:"Essayer des combinaisons aléatoire ne constitue pas une bonne stratégie..."},{min:11,max:50,text:"C’était loooooonnnnnnng..."},{min:11,max:50,text:"Au moins vous avez réussi."},{min:11,max:50,text:"Je parie que vous détestez ce jeu dès à présent."},{min:11,max:50,text:"J’espère que vous avez pas triché."},{min:41,max:403,text:"Votre dévouement est impressionnant."},{min:404,max:404,text:"Logique absente."},{min:405,max:999,text:"Sans commentaires."}],_=["Ya du travail...","Vous avez compris le jeu? Ne le prenez pas personnellement, mais vous me faites douter.","Vous y arriverez un jour...","C’est pas marrant pour vous, mais ca l’est énormément pour moi ;)","Pas de stress, vous allez y arriver.","C’est laborieux tout ca.","Il faudrait considérer utiliser ses neurones! C’est pas Candy Crush ici!","Belle démonstration d’une partie de Kamoulox."];var C=[];function L(t){for(var e=C.length-1;e>=0;e--)if(C[e].el===t)return C.splice(e,1)[0]}function G(t){if(t.counter-=1,t.counter<=0)return t.el.textContent=t.originalText,void L(t.el);var e=Math.floor(t.originalLength-t.counter/3);t.el.textContent=t.originalText.substr(0,e)+function(t){var e="",n="abcdefghijklmnopqrstuvwxyz0123456789 _*%!?#/\\|@";if(t<=0)return e;for(var i=0;i=e})).map((function(t){return t.text}))):(n="Désolé, ca n'a pas marché.",i=_),n+" "+i[Math.floor(i.length*Math.random())]}(t,e),this.revealEl.classList[t?"add":"remove"]("hide"),this.toggle(!0)}},{key:"toggle",value:function(t){t=null!=t?t:!this.el.classList.contains("active"),this.el.classList[t?"add":"remove"]("active")}},{key:"triggerAction",value:function(t){var e=parseInt(t.currentTarget.getAttribute("rel")||0,10);this.onAction(e)}}])&&M(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),R=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t="string"==typeof t?parseInt(t,16):t,e="string"==typeof e?parseInt(e,16):e,t=Math.min(255,Math.max(0,t));for(var i=[],r=((e=Math.min(255,Math.max(0,e)))-t)/++n,a=0;a<=n;a++){var s=Math.round(t+a*r),o=s.toString(16);i.push("#"+o+o+o)}return i};function P(t,e){for(var n=0;n"),this.labelEl=i.create("span","selectbox-item selector-label"),this.el=i.create("div","selector selectbox",[this.btnLeft,this.btnRight,this.labelEl]),this.el}},{key:"init",value:function(){this.btnLeft.addEventListener("click",this.previous.bind(this)),this.btnLeft.addEventListener("touchstart",this.previous.bind(this)),this.btnRight.addEventListener("click",this.next.bind(this)),this.btnRight.addEventListener("touchstart",this.next.bind(this))}},{key:"setChoices",value:function(t){this.choices=t;for(var e=this.choices.length-1;e>=0;e--)this.selectionIndex=this.choices[e].default?e:this.selectionIndex;this.selectionIndex=this.selectionIndex||0,this.updateLabel()}},{key:"updateLabel",value:function(){this.selectionIndex=(this.selectionIndex+this.choices.length)%this.choices.length;var t=this.choices[this.selectionIndex];return this.labelEl.textContent=t.label,this.selectCallback&&this.selectCallback(this.choices[this.selectionIndex]),this.selectionIndex}},{key:"next",value:function(t){return t.preventDefault(),t.stopPropagation(),this.selectionIndex++,this.updateLabel()}},{key:"previous",value:function(t){return t.preventDefault(),t.stopPropagation(),this.selectionIndex--,this.updateLabel()}},{key:"onSelect",value:function(t){this.selectCallback=t,this.updateLabel()}},{key:"getValue",value:function(){var t=this.choices[this.selectionIndex];return t&&t.value}}])&&j(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function q(t,e){for(var n=0;n{"use strict";var t={999:(t,e,n)=>{n.r(e)},502:(t,e,n)=>{n.r(e)},174:(t,e,n)=>{n.r(e)},966:(t,e,n)=>{n.r(e)},832:(t,e,n)=>{n.r(e)},242:(t,e,n)=>{n.r(e)},314:(t,e,n)=>{n.r(e)},407:(t,e,n)=>{n.r(e)},523:(t,e,n)=>{n.r(e)},558:(t,e,n)=>{n.r(e)},91:(t,e,n)=>{n.r(e)},763:(t,e,n)=>{n.r(e)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{const t=function(t,e){for(var n=Math.abs(t)+"",i=t<0,r=e-n.length;r>0;r--)n="0"+n;return(i?"-":"")+n};var e={create:function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n=-1===e.SVG_ELEMENTS.indexOf(t)?document.createElement(t):document.createElementNS(e.SVG_NAMESPACE,t),i.constructor===String)n.setAttribute("class",i);else for(var a in i)n.setAttribute(a,i[a]);if(r instanceof Array)for(var s=0;s=0;e--)t.childNodes[e].remove()},SVG_NAMESPACE:"http://www.w3.org/2000/svg",XLINK_NAMESPACE:"http://www.w3.org/1999/xlink",SVG_ELEMENTS:["svg","g","circle","line","path","use","rect"]};const i=e;function r(t,e){for(var n=0;n0?this.remaining:0,this.el.classList[this.remaining>10?"remove":"add"]("alert"),this.counterEl.textContent=t(this.remaining,3),this.barEl.style.width=this.remaining/this.duration*100+"%",0==this.remaining&&(this.stop(),this.endCallback&&this.endCallback())}}],a&&r(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),e}();const s=a;function o(t,e){for(var n=0;n0&&window.requestAnimationFrame(this.scrollToStart.bind(this))}},{key:"clear",value:function(t){this.lastPattern=null,this.containerEl.remove(),this.containerEl=i.create("div",{class:"history-container","data-helper":t}),this.el.appendChild(this.containerEl)}}],n&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const h=u;function d(t,e){for(var n=0;n>0===n&&e%3-n%3==n%3-t%3&&Math.floor(e/3)-Math.floor(n/3)==Math.floor(n/3)-Math.floor(t/3)){var i=this.addDot(n);return this.isComplete()||(this.suite.push(t),i.push(t)),i}return this.suite.push(t),[t]}},{key:"isComplete",value:function(){return this.suite.length>=this.dotLength}},{key:"gotDot",value:function(t){return~this.suite.indexOf(t)}},{key:"compare",value:function(t){for(var e=0,n=0,i=0;i1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff",r=[];n=n instanceof Array?n:[n];for(var a=1;a0&&void 0!==arguments[0]?arguments[0]:3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];e.fill=e.fill||"#fff";for(var r=0;r<9;r++)n.push(i.create("circle",{cx:r%3*this.GRID_GUTTER+this.SVG_MARGIN,cy:Math.floor(r/3)*this.GRID_GUTTER+this.SVG_MARGIN,rel:r,r:t}));return this.addGroup(e,n)}},{key:"addGroup",value:function(t,e){var n=i.create("g",t,e);return this.el.appendChild(n),n}},{key:"addCombinaison",value:function(t,e,n){var r=t+e+n,a=Math.min(Math.floor(this.SVG_WIDTH/r),this.SVG_COMB_EXP),s=Math.floor(.75*a),o=s+Math.floor(.25*a),l=Math.floor((this.SVG_WIDTH-(r-1)*o)/2),c=this.SVG_WIDTH+Math.floor(this.SVG_COMB_EXP/2);this.el.setAttribute("viewBox","0 0 "+this.SVG_WIDTH+" "+(this.SVG_WIDTH+this.SVG_COMB_EXP));for(var u=[],h=0;h=t?a:n,i=s<=e&&o>=e?a:i}if(void 0!==n&&null!=i){var l=3*i+n;r=this.triggerDot(l)}return r||this.updateLine(t,e),!0}}},{key:"triggerDot",value:function(t){var e=this;if(!this.pattern.gotDot(t)){var n=this.pattern.addDot(t);navigator.vibrate&&navigator.vibrate(20),n.forEach((function(t,i){var r=b.prototype.GRID_GUTTER*(t%3)+b.prototype.SVG_MARGIN,a=b.prototype.GRID_GUTTER*Math.floor(t/3)+b.prototype.SVG_MARGIN;if(e.closeLine(r,a),e.bigDotsEl.childNodes[t].classList.add("active"),i+1===n.length&&e.pattern.isComplete())return e.checkPattern();e.startLine(r,a)}))}}},{key:"reset",value:function(){clearTimeout(this.isPendingReset),this.isPendingReset=null,this.pattern.reset(),this.currentLine=null;for(var t=0;t<9;t++)this.bigDotsEl.childNodes[t].classList.remove("active");for(var e=this.patternEl.childNodes.length-1;e>=0;e--)this.patternEl.childNodes[e].remove();this.patternEl.setAttribute("stroke",m.COLORS.BRIGHT)}},{key:"checkPattern",value:function(){var t=this.onNewPattern(this.pattern);return this.isPendingReset=setTimeout(this.reset.bind(this),1e3),this.patternEl.setAttribute("stroke",t?m.COLORS.SUCCESS:m.COLORS.ERROR),t}},{key:"startLine",value:function(t,e){this.currentLine=i.create("line",{x1:t,y1:e}),this.patternEl.appendChild(this.currentLine)}},{key:"updateLine",value:function(t,e){this.currentLine&&(this.currentLine.setAttribute("x2",t),this.currentLine.setAttribute("y2",e))}},{key:"closeLine",value:function(t,e){this.updateLine(t,e),this.currentLine=null}}])&&E(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();var w={ru:function(t,e){if(0===t)return 0;var n=t>10&&t<20;return n||t%10!=1?!n&&t%10>=2&&t%10<=4||e<4?2:3:1}},T=function(t,e){var n=t.split(" | "),i=document.documentElement.lang;return 1!==n.length&&w[i]&&n[w[i](e,n.length)]||t},k=[{min:1,max:3,text:"Ce n’était que de la chance, c’est tout. Arrêtez de rêver."},{min:2,max:4,text:"Vous avez êtes chanceux."},{min:1,max:2,text:"Aucun mérite. Absolument aucun."},{min:2,max:5,text:"C’était offert sur un plateau d’argent."},{min:1,max:4,text:"Absolument aucune synapse n'a été utilisé durant cette partie."},{min:2,max:5,text:"N’osez même pas tweeter votre score."},{min:8,max:10,text:"Damn son !! C’était limite."},{min:4,max:8,text:"Semble légitime, avec un peu de chance."},{min:7,max:10,text:"Pas mal !"},{min:9,max:10,text:"Dur ! Mais vous l’avez réussi !"},{min:11,max:50,text:"Essayer des combinaisons aléatoire ne constitue pas une bonne stratégie..."},{min:11,max:50,text:"C’était loooooonnnnnnng..."},{min:11,max:50,text:"Au moins vous avez réussi."},{min:11,max:50,text:"Je parie que vous détestez ce jeu dès à présent."},{min:11,max:50,text:"J’espère que vous n'avez pas triché."},{min:41,max:403,text:"Votre dévouement est impressionnant."},{min:404,max:404,text:"Logique absente."},{min:405,max:999,text:"Sans commentaires."}],_=["Y'a du travail...","Vous avez compris le jeu ? Ne le prenez pas personnellement, mais vous me faites douter.","Vous y arriverez un jour...","C’est pas marrant pour vous, mais ça l’est énormément pour moi ;)","Pas de stress, vous allez y arriver.","C’est laborieux tout ça.","Il faudrait penser à utiliser ses neurones ! C’est pas Candy Crush ici !","Belle démonstration d’une partie de Kamoulox."];var C=[];function L(t){for(var e=C.length-1;e>=0;e--)if(C[e].el===t)return C.splice(e,1)[0]}function G(t){if(t.counter-=1,t.counter<=0)return t.el.textContent=t.originalText,void L(t.el);var e=Math.floor(t.originalLength-t.counter/3);t.el.textContent=t.originalText.substr(0,e)+function(t){var e="",n="abcdefghijklmnopqrstuvwxyz0123456789 _*%!?#/\\|@";if(t<=0)return e;for(var i=0;i=e})).map((function(t){return t.text}))):(n="Désolé, ça n'a pas marché.",i=_),n+" "+i[Math.floor(i.length*Math.random())]}(t,e),this.revealEl.classList[t?"add":"remove"]("hide"),this.toggle(!0)}},{key:"toggle",value:function(t){t=null!=t?t:!this.el.classList.contains("active"),this.el.classList[t?"add":"remove"]("active")}},{key:"triggerAction",value:function(t){var e=parseInt(t.currentTarget.getAttribute("rel")||0,10);this.onAction(e)}}])&&M(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),R=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t="string"==typeof t?parseInt(t,16):t,e="string"==typeof e?parseInt(e,16):e,t=Math.min(255,Math.max(0,t));for(var i=[],r=((e=Math.min(255,Math.max(0,e)))-t)/++n,a=0;a<=n;a++){var s=Math.round(t+a*r),o=s.toString(16);i.push("#"+o+o+o)}return i};function P(t,e){for(var n=0;n"),this.labelEl=i.create("span","selectbox-item selector-label"),this.el=i.create("div","selector selectbox",[this.btnLeft,this.btnRight,this.labelEl]),this.el}},{key:"init",value:function(){this.btnLeft.addEventListener("click",this.previous.bind(this)),this.btnLeft.addEventListener("touchstart",this.previous.bind(this)),this.btnRight.addEventListener("click",this.next.bind(this)),this.btnRight.addEventListener("touchstart",this.next.bind(this))}},{key:"setChoices",value:function(t){this.choices=t;for(var e=this.choices.length-1;e>=0;e--)this.selectionIndex=this.choices[e].default?e:this.selectionIndex;this.selectionIndex=this.selectionIndex||0,this.updateLabel()}},{key:"updateLabel",value:function(){this.selectionIndex=(this.selectionIndex+this.choices.length)%this.choices.length;var t=this.choices[this.selectionIndex];return this.labelEl.textContent=t.label,this.selectCallback&&this.selectCallback(this.choices[this.selectionIndex]),this.selectionIndex}},{key:"next",value:function(t){return t.preventDefault(),t.stopPropagation(),this.selectionIndex++,this.updateLabel()}},{key:"previous",value:function(t){return t.preventDefault(),t.stopPropagation(),this.selectionIndex--,this.updateLabel()}},{key:"onSelect",value:function(t){this.selectCallback=t,this.updateLabel()}},{key:"getValue",value:function(){var t=this.choices[this.selectionIndex];return t&&t.value}}])&&j(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function q(t,e){for(var n=0;n BreakLock - + @@ -96,12 +96,12 @@ data="assets/intro.svg" type="image/svg+xml" > -

Reliez les points pour trouver la combinaison secrete. Après chaque essai le jeu vous informera du nombre de points correctement placé.

+

Reliez les points pour trouver la combinaison secrète. Après chaque essai le jeu vous informera du nombre de points correctement placés.

- + @@ -109,7 +109,7 @@
un point de la combinaison est au bon endroit et dans le bon ordreun point est dans la combinaison et est dans le bon ordre

Le paramètre de difficulté fait varier le nombre de points dans la combinaison à trouver. Facile est en 4 points, moyen est en 5 points et difficile est en 6 points.

-

Bonne chance!_

+

Bonne chance !_

par / sur