vue-games
Version:
[](https://badge.fury.io/js/vue-games) [](https://github.com/apertureless/vue-chartjs/blob/master/LICENSE.txt)
2 lines • 48.9 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-games"]=e(require("vue")):t["vue-games"]=e(t["Vue"])})("undefined"!==typeof self?self:this,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),s=n("84f2"),c=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",p="keys",v="values",b=function(){return this};t.exports=function(t,e,n,g,w,m,y){c(n,e,g);var x,_,k,S=function(t){if(!d&&t in T)return T[t];switch(t){case p:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",C=w==v,A=!1,T=t.prototype,P=T[l]||T[h]||w&&T[w],M=P||S(w),j=w?C?S("entries"):M:void 0,L="Array"==e&&T.entries||P;if(L&&(k=f(L.call(new t)),k!==Object.prototype&&k.next&&(u(k,O,!0),r||"function"==typeof k[l]||a(k,l,b))),C&&P&&P.name!==v&&(A=!0,M=function(){return P.call(this)}),r&&!y||!d&&!A&&T[l]||a(T,l,M),s[e]=M,s[O]=b,w)if(x={values:C?M:S(v),keys:m?M:S(p),entries:j},y)for(_ in x)_ in T||i(T,_,x[_]);else o(o.P+o.F*(d||A),e,x);return x}},"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},"0fc9":function(t,e,n){var r=n("3a38"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var r=n("f772"),o=n("e53d").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),o=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},2350:function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"===typeof btoa){var i=r(o),a=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function r(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,"+e;return"/*# "+n+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"===typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"===typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"===typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"26af":function(t,e,n){var r=n("6b24");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("023b1f16",r,!0,{sourceMap:!1,shadowMode:!1})},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),c="toString",u=(""+s).split(c);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||s.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"2b4c":function(t,e,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,a="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2f21":function(t,e,n){"use strict";var r=n("79e5");t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),o=n("63b6"),i=n("9138"),a=n("35e8"),s=n("481b"),c=n("8f60"),u=n("45f2"),f=n("53e2"),l=n("5168")("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",p="keys",v="values",b=function(){return this};t.exports=function(t,e,n,g,w,m,y){c(n,e,g);var x,_,k,S=function(t){if(!d&&t in T)return T[t];switch(t){case p:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",C=w==v,A=!1,T=t.prototype,P=T[l]||T[h]||w&&T[w],M=P||S(w),j=w?C?S("entries"):M:void 0,L="Array"==e&&T.entries||P;if(L&&(k=f(L.call(new t)),k!==Object.prototype&&k.next&&(u(k,O,!0),r||"function"==typeof k[l]||a(k,l,b))),C&&P&&P.name!==v&&(A=!0,M=function(){return P.call(this)}),r&&!y||!d&&!A&&T[l]||a(T,l,M),s[e]=M,s[O]=b,w)if(x={values:C?M:S(v),keys:m?M:S(p),entries:j},y)for(_ in x)_ in T||i(T,_,x[_]);else o(o.P+o.F*(d||A),e,x);return x}},"32e9":function(t,e,n){var r=n("86cc"),o=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"35e8":function(t,e,n){var r=n("d9f6"),o=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},"36bd":function(t,e,n){"use strict";var r=n("4bf8"),o=n("77f1"),i=n("9def");t.exports=function(t){var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:o(c,n);while(u>s)e[s++]=t;return e}},"36c3":function(t,e,n){var r=n("335c"),o=n("25eb");t.exports=function(t){return r(o(t))}},3702:function(t,e,n){var r=n("481b"),o=n("5168")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},"38fd":function(t,e,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"3a9e":function(t,e,n){"use strict";var r=n("d5da"),o=n.n(r);o.a},"40c3":function(t,e,n){var r=n("6b4c"),o=n("5168")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),o=n("0d58");n("5eda")("keys",function(){return function(t){return o(r(t))}})},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"45f2":function(t,e,n){var r=n("d9f6").f,o=n("07e3"),i=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"481b":function(t,e){t.exports={}},"499e":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],s=i[1],c=i[2],u=i[3],f={id:t+":"+o,css:s,media:c,sourceMap:u};r[a]?r[a].parts.push(f):n.push(r[a]={id:a,parts:[f]})}return n}n.r(e),n.d(e,"default",function(){return p});var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,f=function(){},l=null,d="data-vue-ssr-id",h="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,e,n,o){u=n,l=o||{};var a=r(t,e);return v(a),function(e){for(var n=[],o=0;o<a.length;o++){var s=a[o],c=i[s.id];c.refs--,n.push(c)}e?(a=r(t,e),v(a)):a=[];for(o=0;o<n.length;o++){c=n[o];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}}function v(t){for(var e=0;e<t.length;e++){var n=t[e],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function b(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,n,r=document.querySelector("style["+d+'~="'+t.id+'"]');if(r){if(u)return f;r.parentNode.removeChild(r)}if(h){var o=c++;r=s||(s=b()),e=m.bind(null,r,o,!1),n=m.bind(null,r,o,!0)}else r=b(),e=y.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var w=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function y(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),l.ssrId&&t.setAttribute(d,e.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(a){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5168:function(t,e,n){var r=n("dbdb")("wks"),o=n("62a0"),i=n("e53d").Symbol,a="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},"53e2":function(t,e,n){var r=n("07e3"),o=n("241e"),i=n("5559")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"549b":function(t,e,n){"use strict";var r=n("d864"),o=n("63b6"),i=n("241e"),a=n("b0dc"),s=n("3702"),c=n("b447"),u=n("20fd"),f=n("7cd6");o(o.S+o.F*!n("4ee1")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,d=i(t),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,b=void 0!==v,g=0,w=f(d);if(b&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==w||h==Array&&s(w))for(e=c(d.length),n=new h(e);e>g;g++)u(n,g,b?v(d[g],g):d[g]);else for(l=w.call(d),n=new h;!(o=l.next()).done;g++)u(n,g,b?a(l,v,[o.value,g],!0):o.value);return n.length=g,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5537:function(t,e,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(t,e,n){var r=n("dbdb")("keys"),o=n("62a0");t.exports=function(t){return r[t]||(r[t]=o(t))}},"55dd":function(t,e,n){"use strict";var r=n("5ca1"),o=n("d8e8"),i=n("4bf8"),a=n("79e5"),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n("2f21")(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},"584a":function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(t,e,n){var r=n("36c3"),o=n("b447"),i=n("0fc9");t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){while(u>f)if(s=c[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),s=n("9b43"),c="prototype",u=function(t,e,n){var f,l,d,h,p=t&u.F,v=t&u.G,b=t&u.S,g=t&u.P,w=t&u.B,m=v?r:b?r[e]||(r[e]={}):(r[e]||{})[c],y=v?o:o[e]||(o[e]={}),x=y[c]||(y[c]={});for(f in v&&(n=e),n)l=!p&&m&&void 0!==m[f],d=(l?m:n)[f],h=w&&l?s(d,r):g&&"function"==typeof d?s(Function.call,d):d,m&&a(m,f,d,t&u.U),y[f]!=d&&i(y,f,h),g&&x[f]!=d&&(x[f]=d)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"5eda":function(t,e,n){var r=n("5ca1"),o=n("8378"),i=n("79e5");t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},"613b":function(t,e,n){var r=n("5537")("keys"),o=n("ca5a");t.exports=function(t){return r[t]||(r[t]=o(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),o=n("584a"),i=n("d864"),a=n("35e8"),s=n("07e3"),c="prototype",u=function(t,e,n){var f,l,d,h=t&u.F,p=t&u.G,v=t&u.S,b=t&u.P,g=t&u.B,w=t&u.W,m=p?o:o[e]||(o[e]={}),y=m[c],x=p?r:v?r[e]:(r[e]||{})[c];for(f in p&&(n=e),n)l=!h&&x&&void 0!==x[f],l&&s(m,f)||(d=l?x[f]:n[f],m[f]=p&&"function"!=typeof x[f]?n[f]:g&&l?i(d,r):w&&x[f]==d?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[c]=t[c],e}(d):b&&"function"==typeof d?i(Function.call,d):d,b&&((m.virtual||(m.virtual={}))[f]=d,t&u.R&&y&&!y[f]&&a(y,f,d)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},"6b24":function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,"body[data-v-b9783970],html[data-v-b9783970]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f6;color:#333;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-family:Roboto,sans-serif;height:100%;width:100%}.hidden[data-v-b9783970]{display:none}.orange[data-v-b9783970]{background-color:#ff9800}#hangman[data-v-b9783970]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;margin:0;width:100%}#board[data-v-b9783970]{background-color:#fff;-webkit-box-shadow:0 2px 5px #d0d0d0;box-shadow:0 2px 5px #d0d0d0;-webkit-box-flex:2;-ms-flex:2 1 auto;flex:2 1 auto;margin:10px 0 0 0;max-width:500px;width:95%;min-height:400px}#word[data-v-b9783970]{-ms-flex-wrap:wrap;flex-wrap:wrap;margin:20px 0 18px 0}#word[data-v-b9783970],.word-blankletter[data-v-b9783970]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.word-blankletter[data-v-b9783970]{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;background-color:#ff9800;-webkit-box-shadow:0 2px 5px #d0d0d0;box-shadow:0 2px 5px #d0d0d0;height:30px;margin:0 2px 2px 2px;width:20px}#keyboard[data-v-b9783970]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:2;-ms-flex:2 1 auto;flex:2 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#keyboard[data-v-b9783970],.keyboard-row[data-v-b9783970]{display:-webkit-box;display:-ms-flexbox;display:flex}.keyboard-row-letter[data-v-b9783970]{height:40px;width:28px}#buttons[data-v-b9783970]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin:0 0 5px 0;max-width:700px;width:95%}.buttons-button[data-v-b9783970]{height:25px;font-size:1em;margin:auto}",""])},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),o=n("35e8"),i=n("481b"),a=n("5168")("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(","),c=0;c<s.length;c++){var u=s[c],f=r[u],l=f&&f.prototype;l&&!l[a]&&o(l,a,u),i[u]=i.Array}},"6c7b":function(t,e,n){var r=n("5ca1");r(r.P,"Array",{fill:n("36bd")}),n("9c6c")("fill")},"71c1":function(t,e,n){var r=n("3a38"),o=n("25eb");t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536)}}},7726:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(t,e,n){t.exports=n("d2d5")},"77f1":function(t,e,n){var r=n("4588"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"794b":function(t,e,n){t.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7cd6":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},"7e90":function(t,e,n){var r=n("d9f6"),o=n("e4ae"),i=n("c3a1");t.exports=n("8e60")?Object.defineProperties:function(t,e){o(t);var n,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},"7f20":function(t,e,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n("9e1e")&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8378:function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(t,e){t.exports=function(){}},8499:function(t,e,n){"use strict";var r=n("26af"),o=n.n(r);o.a},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8bbf":function(e,n){e.exports=t},"8bcd":function(t,e,n){"use strict";var r=n("c29c"),o=n.n(r);o.a},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var r=n("a159"),o=n("aebd"),i=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,e,n){t.exports=n("35e8")},"95d5":function(t,e,n){var r=n("40c3"),o=n("5168")("iterator"),i=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||i.hasOwnProperty(r(e))}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),t.exports=function(t){o[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(t,e,n){var r=n("e4ae"),o=n("7e90"),i=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n("1ec9")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},a745:function(t,e,n){t.exports=n("f410")},ac6a:function(t,e,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),a=n("7726"),s=n("32e9"),c=n("84f2"),u=n("2b4c"),f=u("iterator"),l=u("toStringTag"),d=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=o(h),v=0;v<p.length;v++){var b,g=p[v],w=h[g],m=a[g],y=m&&m.prototype;if(y&&(y[f]||s(y,f,d),y[l]||s(y,l,g),c[g]=d,w))for(b in r)y[b]||i(y,b,r[b],!0)}},aebd:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},b0dc:function(t,e,n){var r=n("e4ae");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t["return"];throw void 0!==i&&r(i.call(t)),a}}},b447:function(t,e,n){var r=n("3a38"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},b7bc:function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,"button[data-v-5520117e]{background-color:#fff;border:none;color:#333;-webkit-box-shadow:0 2px 5px #d0d0d0;box-shadow:0 2px 5px #d0d0d0;font-family:Roboto,sans-serif;margin:2px}button[data-v-5520117e]:disabled{color:#ccc}",""])},b8e3:function(t,e){t.exports=!0},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c29c:function(t,e,n){var r=n("eed2");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("cddd38be",r,!0,{sourceMap:!1,shadowMode:!1})},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){while(u>f)if(s=c[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},c367:function(t,e,n){"use strict";var r=n("8436"),o=n("50ed"),i=n("481b"),a=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),o=n("1691");t.exports=Object.keys||function(t){return r(t,o)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c8bb:function(t,e,n){t.exports=n("54a1")},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d5da:function(t,e,n){var r=n("b7bc");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("f4ceef84",r,!0,{sourceMap:!1,shadowMode:!1})},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,e,n){var r=n("e4ae"),o=n("794b"),i=n("1bc3"),a=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),o=n("e53d"),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var r=n("07e3"),o=n("36c3"),i=n("5b4e")(!1),a=n("5559")("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},eed2:function(t,e,n){e=t.exports=n("2350")(!1),e.push([t.i,".crossword-board__item--valid{background:#9aff67}.hightlighted{background:hsla(0,0%,100%,.95);padding:3px 5px;margin:-3px -5px;line-height:1.7;display:inline}.crossword-board-container{position:relative}.crossword-board{position:relative;z-index:1;background:transparent;border:1px solid #000;width:650px;height:650px;display:grid;grid-template:repeat(13,7.69231%)/repeat(13,7.69231%);list-style-type:none;padding:0;margin:0 auto}.crossword-board__item{border:1px solid #000;position:relative;z-index:100;text-align:center;font-size:20px;font-weight:700;text-transform:uppercase}.crossword-board__item:not(.crossword-board__item--valid){background-color:#fff}.crossword-board__item:active:not(.crossword-board__item--valid),.crossword-board__item:focus:not(.crossword-board__item--valid){background:#ffff74;border:1px solid #000;outline:1px solid #000}.crossword-board__item--blank{background-color:rgba(117,72,151,.58);border:1px solid #000;outline:1px solid #000}.crossword-clues{color:#000}.crossword-clues__list{margin:0 0 0 60px;padding:0;display:inline-block;vertical-align:top}.crossword-clues__list-title{font-weight:700;padding:4px}.crossword-clues__list-item{margin:0;padding:4px}",""])},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},fa5b:function(t,e,n){t.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fb15:function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7f7f"),n("cadf"),n("456d"),n("ac6a");var o=n("8bbf"),i=n.n(o),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"keyboard-row-letter",attrs:{id:t.letter,disabled:t.disabled},on:{click:function(e){return t.clicked()}}},[t._v("\n "+t._s(t.letter)+"\n")])},s=[],c={props:["letter","gameOver","twoPlayers"],data:function(){return{disabled:!1}},methods:{clicked:function(){this.disabled=!0,this.$emit("check")}},watch:{gameOver:function(t){this.disabled=t}}},u=c;n("3a9e");function f(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}var l=f(u,a,s,!1,null,"5520117e",null),d=l.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"hangman"}},[n("b-row",{attrs:{"align-h":"center"}},[t.showPlayAgain?n("b-button",{staticClass:"m-3",attrs:{size:"sm"},on:{click:t.playAgain}},[t._v("\n Play Again\n ")]):t._e()],1),t._m(0),n("div",{attrs:{id:"word"}},t._l(t.wordDivs,function(e,r){return n("div",{key:r,staticClass:"word-blankletter"},[t._v("\n "+t._s(e)+"\n ")])}),0),n("div",{attrs:{id:"keyboard"}},t._l(t.letters,function(e,r){return n("div",{key:r,staticClass:"keyboard-row"},t._l(e,function(e){return n("letter-button",{key:e,attrs:{letter:e,"game-over":t.gameOver,"two-players":t.twoPlayers},on:{check:function(n){return t.check(e)}}})}),1)}),0)],1)},p=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"board"}},[n("canvas",{attrs:{id:"board-canvas"}})])}],v={components:{LetterButton:d},props:{words:{type:Array,default:function(){return["Pear","Apple","Tomatoe","Blackberry","Strawberry"]}},showPlayAgain:{type:Boolean,default:!0},lang:{type:String,default:"EN",validator:function(t){return-1!==["EN","ES"].indexOf(t)}}},computed:{wordsUpperCased:function(){return this.words.map(function(t){return t.toUpperCase()})},winMessage:function(){var t;switch(this.lang){case"ES":t="Ganaste!";break;default:t="You win!";break}return t},loseMessage:function(){var t;switch(this.lang){case"ES":t="Perdiste!";break;default:t="You lost!";break}return t}},filters:{capitalize:function(t){return t.toUpperCase()}},data:function(){return{letters:[["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],currentWord:"",wordDivs:[],guesses:0,gameOver:!1,lose:!1,twoPlayers:!1,canvas:"",ctx:""}},methods:{randomInteger:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},drawGallows:function(t){t.clearRect(0,0,this.canvas.width,this.canvas.height),t.fillStyle="#FF9800",t.strokeStyle="#FF9800",t.beginPath(),t.moveTo(this.canvas.width/10,this.canvas.height/10),t.lineTo(this.canvas.width/10,.95*this.canvas.height),t.lineTo(.8*this.canvas.width,.95*this.canvas.height),t.moveTo(this.canvas.width/10,this.canvas.height/10),t.lineTo(.4*this.canvas.width,this.canvas.height/10),t.lineTo(.4*this.canvas.width,this.canvas.height/5),t.stroke(),t.closePath()},makeBlanks:function(){for(var t=0;t<this.currentWord.length;t++)this.wordDivs.push("")},updateCanvas:function(t){if(0===this.guesses)t.beginPath(),t.arc(.4*this.canvas.width,this.canvas.height/5+20,20,0,2*Math.PI),t.stroke(),t.closePath();else if(1===this.guesses)t.beginPath(),t.moveTo(.4*this.canvas.width,this.canvas.height/5+40),t.lineTo(.4*this.canvas.width,this.canvas.height/2),t.stroke(),t.closePath();else if(2===this.guesses)t.beginPath(),t.moveTo(.4*this.canvas.width,this.canvas.height/2),t.lineTo(.4*this.canvas.width+30,.7*this.canvas.height),t.stroke(),t.closePath();else if(3===this.guesses)t.beginPath(),t.moveTo(.4*this.canvas.width,this.canvas.height/2),t.lineTo(.4*this.canvas.width-30,.7*this.canvas.height),t.stroke(),t.closePath();else if(4===this.guesses)t.beginPath(),t.moveTo(.4*this.canvas.width,this.canvas.height/5+55),t.lineTo(.4*this.canvas.width+35,this.canvas.height/2+10),t.stroke(),t.closePath();else if(5===this.guesses){t.beginPath(),t.moveTo(.4*this.canvas.width,this.canvas.height/5+55),t.lineTo(.4*this.canvas.width-35,this.canvas.height/2+10),t.stroke(),t.closePath(),t.font="24px Roboto, sans-serif",t.fillText(this.loseMessage,.4*this.canvas.width-30,.9*this.canvas.height),this.gameOver=!0,this.lose=!0,this.$emit("gameFinished",this.currentWord,this.lose);for(var e=0;e<this.currentWord.length;e++)this.$set(this.wordDivs,e,this.currentWord[e])}this.guesses++},check:function(t){if(!this.gameOver){for(var e=!1,n=0;n<this.currentWord.length;n++)t==this.currentWord[n]&&(this.$set(this.wordDivs,n,t),e=!0);this.wordDivs.some(function(t){return""==t})||(this.gameOver=!0,this.ctx.font="24px Roboto, sans-serif",this.ctx.fillText(this.winMessage,.4*this.canvas.width-30,.9*this.canvas.height),this.$emit("gameFinished",this.currentWord,this.lose)),e||this.updateCanvas(this.ctx)}},restart:function(){this.gameOver=!1,this.lose=!1,this.guesses=0,this.wordDivs.splice(0),this.drawGallows(this.ctx),this.makeBlanks()},playAgain:function(){this.currentWord=this.getRandomWord(),this.restart()},getRandomWord:function(){return this.wordsUpperCased[this.randomInteger(0,this.wordsUpperCased.length-1)]}},mounted:function(){this.canvas=document.getElementById("board-canvas"),this.canvas.width=document.getElementById("board").offsetWidth,this.canvas.height=document.getElementById("board").offsetHeight,this.ctx=this.canvas.getContext("2d"),this.ctx.lineWidth=2,this.drawGallows(this.ctx),this.currentWord=this.getRandomWord(),this.makeBlanks()}},b=v,g=(n("8499"),f(b,h,p,!1,null,"b9783970",null)),w=g.exports,m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"crossword-container",staticClass:"crossword-container"},[t.showPlayAgain?n("b-row",{attrs:{"align-h":"center"}},[n("b-button",{staticClass:"m-3",attrs:{size:"sm"},on:{click:t.playAgain}},[t._v("\n Play Again\n ")])],1):t._e(),t.grid?n("div",{staticClass:"crossword-board-container"},[n("b-row",[n("b-col",{class:[t.smallContainer?"col-12":"col-7"]},[n("div",{staticClass:"crossword-board"},[t._l(t.grid,function(e,r){return[t._l(e,function(e,o){return[e?n("input",{directives:[{name:"model",rawName:"v-model",value:t.form[r][o],expression:"form[index1][index2]"}],key:"row-"+r+"-"+o,staticClass:"crossword-board__item",class:{"crossword-board__item--valid":t.equalsLetters(t.form[r][o],e.char)},attrs:{id:t.index(r,o),type:"text",minlength:"1",maxlength:"1",pattern:t.pattern(e.char),required:"required"},domProps:{value:t.form[r][o]},on:{input:function(e){e.target.composing||t.$set(t.form[r],o,e.target.value)}}}):n("span",{key:"row-"+r+"-"+o,staticClass:"crossword-board__item--blank",attrs:{id:t.index(r,o)}})]})]})],2)]),n("b-col",{class:[t.smallContainer?["col-12","px-5","my-5"]:"col-4"]},[n("div",{staticClass:"crossword-clues"},[t.across.length>0?n("dl",{staticClass:"crossword-clues__list crossword-clues__list--across"},[n("dt",{staticClass:"crossword-clues__list-title"},[t._v(t._s(this.across))]),t._l(t.acrossWords,function(e,r){return n("dd",{key:"across-"+e.word+"-"+r,staticClass:"crossword-clues__list-item"},[n("span",{staticClass:"hightlighted"},[t._v(t._s(r+1)+". "+t._s(e.clue)+" ("+t._s(e.word)+")")])])})],2):t._e(),t.down.length>0?n("dl",{staticClass:"crossword-clues__list crossword-clues__list--down"},[n("dt",{staticClass:"crossword-clues__list-title"},[t._v(t._s(this.down))]),t._l(t.downWords,function(e,r){return n("dd",{key:"down-"+e.word+"-"+r,staticClass:"crossword-clues__list-item"},[n("span",{staticClass:"hightlighted"},[t._v(t._s(r+1)+". "+t._s(e.clue)+" ("+t._s(e.word)+")")])])})],2):t._e()])])],1)],1):t._e()],1)},y=[],x=(n("6c7b"),n("a745")),_=n.n(x);function k(t){if(_()(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}var S=n("774e"),O=n.n(S),C=n("c8bb"),A=n.n(C);function T(t){if(A()(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return O()(t)}function P(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M(t){return k(t)||T(t)||P()}n("55dd");function j(t){this.char=t,this.across=null,this.down=null}function L(t,e){this.is_start_of_word=t,this.index=e}function E(t,e){this.word=t,this.index=e}function W(t,e){var n,r=50,o=50,i={};this.getSquareGrid=function(t){for(var e=null,n=0,r=0;r<t;r++){var o=this.getGrid(1);if(null!=o){var i=1*Math.min(o.length,o[0].length)/Math.max(o.length,o[0].length);if(i>n&&(e=o,n=i),1==n)break}}return e},this.getGrid=function(t){for(var e=0;e<t;e++){h();var r=l(),o=Math.floor(p.length/2),i=Math.floor(p[0].length/2),s=b[0];if("across"==r?i-=Math.floor(s.word.length/2):o-=Math.floor(s.word.length/2),!1===f(s.word,o,i,r))return n=[s],null;c(s.word,s.index,o,i,r);var u=[],v=void 0;u.push(b.slice(1));for(var g=0;g<u.length;g++){v=!1;for(var w=0;w<u[g].length;w++){s=u[g][w];var m=d(s.word);if(m){o=m["row"],i=m["col"];var y=m["direction"];c(s.word,s.index,o,i,y),v=!0}else u.length-1==g&&u.push([]),u[g+1].push(s)}if(!v)break}if(v)return a()}return n=u[u.length-1],null},this.getBadWords=function(){return n},this.getLegend=function(n){for(var r={across:[],down:[]},o=1,i=0;i<n.length;i++)for(var a=0;a<n[i].length;a++){var s=n[i][a],c=!1;for(var u in r)if(s&&s[u]&&s[u]["is_start_of_word"]){var f=s[u]["index"];r[u].push({position:o,index:f,clue:e[f],word:t[f]}),c=!0}c&&o++}return r};var a=function(){for(var t=r-1,e=0,n=o-1,i=0,a=0;a<r;a++)for(var s=0;s<o;s++){var c=p[a][s];null!=c&&(a<t&&(t=a),a>e&&(e=a),s<n&&(n=s),s>i&&(i=s))}for(var u=e-t+1,f=i-n+1,l=new Array(u),d=0;d<u;d++)for(var h=0;h<f;h++)l[d]=new Array(f);for(var v=t,b=0;b<u;v++,b++)for(var g=n,w=0;w<f;g++,w++)l[b][w]=p[v][g];return l},s=function(t,e,n,r,o,a){var s=t.charAt(n);null==p[r][o]&&(p[r][o]=new j(s),i[s]||(i[s]=[]),i[s].push({row:r,col:o}));var c=0==n;p[r][o][a]=new L(c,e)},c=function(t,e,n,r,o){if("across"==o)for(var i=r,a=0;i<r+t.length;i++,a++)s(t,e,a,n,i,o);else{if("down"!=o)throw"Invalid Direction";for(var c=n,u=0;c<n+t.length;c++,u++)s(t,e,u,c,r,o)}},u=function(t,e,n){return null==p[e][n]?0:p[e][n]["char"]==t&&1},f=function(t,e,n,r){if(e<0||e>=p.length||n<0||n>=p[e].length)return!1;var o;if("across"==r){if(n+t.length>p[e].length)return!1;if(n-1>=0&&null!=p[e][n-1])return!1;if(n+t.length<p[e].length&&null!=p[e][n+t.length])return!1;for(var i=e-1,a=n,s=0;i>=0&&a<n+t.length;a++,s++){var c=null==p[i][a],f=null!=p[e][a]&&p[e][a]["char"]==t.charAt(s),l=c||f;if(!l)return!1}for(var d=e+1,h=n,v=0;d<p.length&&h<n+t.length;h++,v++){var b=null==p[d][h],g=null!=p[e][h]&&p[e][h]["char"]==t.charAt(v),w=b||g;if(!w)return!1}o=0;for(var m=n,y=0;m<n+t.length;m++,y++){var x=u(t.charAt(y),e,m);if(!1===x)return!1;o+=x}}else{if("down"!=r)throw"Invalid Direction";if(e+t.length>p.length)return!1;if(e-1>=0&&null!=p[e-1][n])return!1;if(e+t.length<p.length&&null!=p[e+t.length][n])return!1;for(var _=n-1,k=e,S=0;_>=0&&k<e+t.length;k++,S++){var O=null==p[k][_],C=null!=p[k][n]&&p[k][n]["char"]==t.charAt(S),A=O||C;if(!A)return!1}for(var T=n+1,P=e,M=0;P<e+t.length&&T<p[P].length;P++,M++){var j=null==p[P][T],L=null!=p[P][n]&&p[P][n]["char"]==t.charAt(M),E=j||L;if(!E)return!1}o=0;for(var W=e,R=0;W<e+t.length;W++,R++){var F=u(t.charAt(R,1),W,n);if(!1===F)return!1;o+=F}}return o},l=function(){return Math.floor(2*Math.random())?"across":"down"},d=function(t){for(var e=[],n=0;n<t.length;n++){var r=i[t.charAt(n)];if(r)for(var o=0;o<r.length;o++){var a=r[o],s=a["row"],c=a["col"],u=f(t,s,c-n,"across"),l=f(t,s-n,c,"down");!1!==u&&e.push({intersections:u,row:s,col:c-n,direction:"across"}),!1!==l&&e.push({intersections:l,row:s-n,col:c,direction:"down"})}}if(0==e.length)return!1;var d=e[Math.floor(Math.random()*e.length)];return d},h=function(){for(var t=0;t<p.length;t++)for(var e=0;e<p[t].length;e++)p[t][e]=null;i={}};if(t.length<2)throw"A crossword must have at least 2 words";if(t.length!=e.length)throw"The number of words must equal the number of clues";for(var p=new Array(r),v=0;v<r;v++)p[v]=new Array(o);for(var b=[],g=0;g<t.length;g++)b.push(new E(t[g],g));b.sort(function(t,e){return e.word.length-t.word.length})}var R={props:{wordsWithReflexions:{type:Array,default:function(){return[{word:"Coffee",description:"Many people drink it in the morning with milk or cream."},{word:"Tea",description:"British people drink it at 5 o' clock."},{word:"Peach",description:"Juicy, round fruit with a stone-like seed."},{word:"Grape",description:"You make wine from this fruit."},{word:"Primero",description:"Que ocupa el lugar número uno en una serie ordenada. Dicho de una persona o de una cosa: Que precede a las demás de su especie en orden, tiempo, lugar, situación, clase o jerarquía."},{word:"Lemon",description:"You make lemonade from this fruit."},{word:"Cake",description:"You serve it at birthday parties."},{word:"Fish",description:"You can find them in an aquarium."},{word:"Egg",description:"Hens lay it."},{word:"Pork",description:"Meat from a pig."},{word:"Apple",description:"Eve gave one to Adam."},{word:"Chicken",description:"An animal which lays eggs"},{word:"Goat",description:"Used for milk and cheese"},{word:"Horse",description:"Found in races"},{word:"Kitten",description:"A baby cat"},{word:"Snake",description:"An animal with no feet"},{word:"Cat",description:"A popular house pet"},{word:"Cow",description:"Relative of a bull"}]}},lang:{type:String,default:"EN",validator:function(t){return-1!==["EN","ES"].indexOf(t)}},showPlayAgain:{type:Boolean,default:!0}},data:function(){return{selectedWords:[],acrossWords:[],downWords:[],matrix:null,grid:null,form:null,smallContainer:!1}},computed:{words:function(){return this.selectedWords.map(function(t){return t.word})},clues:function(){return this.selectedWords.map(function(t){return t.description})},across:function(){var t;switch(this.lang){case"ES":t="Horizontales";break;default:t="Across";break}return t},down:function(){var t;switch(this.lang){case"ES":t="Verticales";break;default:t="Down";break}return t}},methods:{index:function(t,e){var n="item".concat(t+1,"-").concat(e+1);return n},pattern:function(t){var e="^[".concat(t.toLowerCase()).concat(t.toUpperCase(),"]{1}$");return e},equalsLetters:function(t,e){return t.toUpperCase()===e.toUpperCase()||t.toLowerCase()===e.toLowerCase()},setRandomWords:function(){var t=[];while(t.length<8){var e=this.wordsWithReflexions[Math.floor(Math.random()*this.wordsWithReflexions.length)];t.indexOf(e)<0&&t.push(e)}this.selectedWords=t},generateGrid:function(){var t,e=13;while(!t||t.length>e){this.setRandomWords();var n=new W(this.words,this.clues),r=10;t=n.getSquareGrid(r)}if(this.grid=t,this.form=M(Array(e)).map(function(){return Array(e).fill("")}),this.grid.length<e){while(this.grid.length<e)this.grid.push([]);this.grid.forEach(function(t){while(t.length<e)t.push(null)});var o=n.getLegend(this.grid);this.acrossWords=o.across,this.downWords=o.down}},playAgain:function(){this.generateGrid()},getWindowWidth:function(){this.$refs["crossword-container"].parentElement.parentElement.clientWidth<1200&&(this.smallContainer=!0)}},mounted:function(){this.generateGrid(),this.$nextTick(function(){window.addEventListener("resize",this.getWindowWidth),this.getWindowWidth()})},beforeDestroy:function(){window.removeEventListener("resize",this.getWindowWidth)}},F=R,G=(n("8bcd"),f(F,m,y,!1,null,null,null)),I=G.exports,N={LetterButton:d,HangmanGame:w,CrosswordGame:I};Object.keys(N).forEach(function(t){i.a.component(t,N[t])});var D=N;e["default"]=D}})});
//# sourceMappingURL=vue-games.umd.min.js.map