From 8efe8a388daa9adccf4bba64a3e48bff022552f3 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Wed, 20 Jan 2016 00:32:11 +0700 Subject: [PATCH] fix crazyhouse drag cancelation --- conf/base.conf | 2 +- public/javascripts/vendor/chessground.min.js | 2 +- ui/analyse/package.json | 2 +- ui/editor/package.json | 2 +- ui/lobby/package.json | 2 +- ui/opening/package.json | 2 +- ui/puzzle/package.json | 2 +- ui/round/package.json | 2 +- ui/simul/package.json | 2 +- ui/tournament/package.json | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/conf/base.conf b/conf/base.conf index 508f2c3874..e8030f3a1c 100644 --- a/conf/base.conf +++ b/conf/base.conf @@ -9,7 +9,7 @@ net { ip = "5.196.91.160" asset { domain = ${net.domain} - version = 803 + version = 807 } } play { diff --git a/public/javascripts/vendor/chessground.min.js b/public/javascripts/vendor/chessground.min.js index 963673f007..284c392b4e 100755 --- a/public/javascripts/vendor/chessground.min.js +++ b/public/javascripts/vendor/chessground.min.js @@ -1,2 +1,2 @@ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Chessground=e()}}(function(){var e;return function t(e,n,r){function o(i,u){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[i]={exports:{}};e[i][0].call(l.exports,function(t){var n=e[i][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;ic;++c){var s=r[c],l=o(s);if("object"===l)for(var d in s){var f=e?a.clone(s[d]):s[d];i[d]=t?n(i[d],f):f}}return i}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var a=function(e){return r(e===!0,!1,arguments)},i="merge";a.recursive=function(e){return r(e===!0,!0,arguments)},a.clone=function(e){var t,n,r=e,i=o(e);if("array"===i)for(r=[],n=e.length,t=0;n>t;++t)r[t]=a.clone(e[t]);else if("object"===i){r={};for(t in e)r[t]=a.clone(e[t])}return r},e?t.exports=a:window[i]=a}("object"==typeof t&&t&&"object"==typeof t.exports&&t.exports)},{}],3:[function(t,n,r){var o=function a(e,t){"use strict";function n(e){return"function"==typeof e}function r(e){return"[object Object]"===ge.call(e)}function o(e){return"[object String]"===ge.call(e)}function i(e){le=e.document,de=e.location,pe=e.cancelAnimationFrame||e.clearTimeout,fe=e.requestAnimationFrame||e.setTimeout}function u(e,t){for(var n=[],a=1;a1)&&(U(t.nodes,t),i=[le.createTextNode(e)]),d(n,i[0],o,e))),t=new e.constructor(e),t.nodes=i,t}function P(e,t,n,r,o,a,i){return 0===e.nodes.length?E(t,r,n):e.valueOf()!==t.valueOf()||o===!0?C(t,e,r,a,n,i):(e.nodes.intact=!0,e)}function M(e){if(e.$trusted){var t=e.match(/<[^\/]|\>\s*[^<]/g);if(null!=t)return t.length}else if(ve(e))return e.length;return 1}function O(e,n,r,o,a,i,u,c,l){e=f(e);var d=[],p=n.length===e.length,h=0,b={},y=!1;s(n,function(e,t){y=!0,b[n[t].attrs.key]={action:xe,index:t}}),m(e),y&&(n=v(e,n,b,r));for(var w=0,k=0,x=e.length;x>k;k++){var E=K(r,a,n,o,e[k],n[w],i,o+h||h,u,c,l);E!==t&&(p=p&&E.nodes.intact,h+=M(E),n[w++]=E)}return p||g(e,n,d),n}function A(e,t,n,r,o){if(null!=t){if(ge.call(t)===ge.call(e))return t;if(o&&o.nodes){var a=n-r,i=a+(ve(e)?e:t.nodes).length;U(o.nodes.slice(a,i),o.slice(a,i))}else t.nodes&&U(t.nodes,t)}return t=new e.constructor,t.tag&&(t={}),t.nodes=[],t}function T(e,n){return n===t?e.attrs.is?le.createElement(e.tag,e.attrs.is):le.createElement(e.tag):e.attrs.is?le.createElementNS(n,e.tag,e.attrs.is):le.createElementNS(n,e.tag)}function N(e,t,n,r){return r?I(t,e.tag,e.attrs,{},n):e.attrs}function j(e,n,r,o,a,i){return null!=e.children&&e.children.length>0?K(n,e.tag,t,t,e.children,r.children,!0,0,e.attrs.contenteditable?n:o,a,i):e.children}function D(e,t,n,r,o,a,i){var u={tag:e.tag,attrs:t,children:n,nodes:[r]};return w(u,a,i),u.children&&!u.children.nodes&&(u.children.nodes=[]),"select"===e.tag&&"value"in e.attrs&&I(r,e.tag,{value:e.attrs.value},{},o),u}function S(e,t,n,r){var o="diff"===u.redraw.strategy()&&e?e.indexOf(t):-1;return o>-1?n[o]:"function"==typeof r?new r:{}}function R(e,t,n,r){null!=r.onunload&&Fe.push({controller:r,handler:r.onunload}),e.push(n),t.push(r)}function q(e,t,n,r,o,a){var i=S(n.views,t,r,e.controller),u=+(e&&e.attrs&&e.attrs.key);return e=0===Ue||Ie||r&&r.indexOf(i)>-1?e.view(i):{tag:"placeholder"},"retain"===e.subtree?n:(u===u&&((e.attrs=e.attrs||{}).key=u),R(a,o,t,i),e)}function L(e,t,n,r){for(var o=t&&t.controllers;null!=e.view;)e=q(e,e.view.$original||e.view,t,o,r,n);return e}function F(e,t,n,r,a,i,u,c){var s=[],l=[];if(e=L(e,t,s,l),!e.tag&&l.length)throw new Error("Component template must return a virtual element, not an array, string, etc.");e.attrs=e.attrs||{},t.attrs=t.attrs||{};var d=Object.keys(e.attrs),f=d.length>("key"in e.attrs?1:0);if(b(e,t,d),o(e.tag)){var h=0===t.nodes.length;u=y(e,u);var v;if(h){v=T(e,u);var g=N(e,v,u,f),m=j(e,v,t,n,u,c);t=D(e,g,m,v,u,s,l)}else v=x(t,e,n,f,u,s,c,l);return(h||i===!0&&null!=v)&&p(r,v,a),k(c,e,v,h,t),t}}function K(e,t,o,a,i,u,c,s,d,f,p){return i=l(i),"retain"===i.subtree?u:(u=A(i,u,s,a,o),ve(i)?O(i,u,e,s,t,c,d,f,p):null!=i&&r(i)?F(i,u,d,e,s,c,f,p):n(i)?u:P(u,i,s,e,c,d,t))}function B(e,t){return e.action-t.action||e.index-t.index}function I(e,t,o,a,i){for(var u in o){var c=o[u],s=a[u];if(u in a&&s===c)"value"===u&&"input"===t&&e.value!=c&&(e.value=c);else{if(a[u]=c,"config"===u||"key"===u)continue;if(n(c)&&"on"===u.slice(0,2))e[u]=X(c,e);else if("style"===u&&null!=c&&r(c)){for(var l in c)(null==s||s[l]!==c[l])&&(e.style[l]=c[l]);for(var l in s)l in c||(e.style[l]="")}else null!=i?"href"===u?e.setAttributeNS("http://www.w3.org/1999/xlink","href",c):e.setAttribute("className"===u?"class":u,c):u in e&&"list"!==u&&"style"!==u&&"form"!==u&&"type"!==u&&"width"!==u&&"height"!==u?("input"!==t||e[u]!==c)&&(e[u]=c):e.setAttribute(u,c)}}return a}function U(e,t){for(var n=e.length-1;n>-1;n--)if(e[n]&&e[n].parentNode){try{e[n].parentNode.removeChild(e[n])}catch(r){}t=[].concat(t),t[n]&&z(t[n])}e.length&&(e.length=0)}function z(e){e.configContext&&n(e.configContext.onunload)&&(e.configContext.onunload(),e.configContext.onunload=null),e.controllers&&c(e.controllers,function(e){n(e.onunload)&&e.onunload({preventDefault:we})}),e.children&&(ve(e.children)?c(e.children,z):e.children.tag&&z(e.children))}function $(e,t,n){var r=e.childNodes[t];if(r){var o=1!==r.nodeType,a=le.createElement("span");o?(e.insertBefore(a,r||null),a.insertAdjacentHTML("beforebegin",n),e.removeChild(a)):r.insertAdjacentHTML("beforebegin",n)}else Pe(e,n);for(var i=[];e.childNodes[t]!==r;)i.push(e.childNodes[t]),t++;return i}function X(e,t){return function(n){n=n||event,u.redraw.strategy("diff"),u.startComputation();try{return e.call(t,n)}finally{Y()}}}function G(e){var t=Oe.indexOf(e);return 0>t?Oe.push(e)-1:t}function H(e){var t=function(){return arguments.length&&(e=arguments[0]),e};return t.toJSON=function(){return e},t}function W(e,t){var n=function(){return(e.controller||we).apply(this,t)||this};e.controller&&(n.prototype=e.controller.prototype);var r=function(n){var r=arguments.length>1?t.concat([].slice.call(arguments,1)):t;return e.view.apply(e,r?[n].concat(r):[n])};r.$original=e.view;var o={controller:n,view:r};return t[0]&&null!=t[0].key&&(o.attrs={key:t[0].key}),o}function _(e,t){Ne.splice(t,1),De.splice(t,1),je.splice(t,1),re(e),Oe.splice(G(e),1)}function J(){qe&&(qe(),qe=null),c(Ne,function(e,t){var n=je[t];if(De[t]){var r=[De[t]];u.render(e,n.view?n.view(De[t],r):"")}}),Le&&(Le(),Le=null),Se=null,Re=new Date,u.redraw.strategy("diff")}function Y(){"none"===u.redraw.strategy()?(Ue--,u.redraw.strategy("diff")):u.endComputation()}function V(e){return e.slice(Xe[u.route.mode].length)}function Q(e,t,n){ze={};var r=n.indexOf("?");-1!==r&&(ze=ne(n.substr(r+1,n.length)),n=n.substr(0,r));var o=Object.keys(t),a=o.indexOf(n);if(-1!==a)return u.mount(e,t[o[a]]),!0;for(var i in t){if(i===n)return u.mount(e,t[i]),!0;var s=new RegExp("^"+i.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(s.test(n))return n.replace(s,function(){var n=i.match(/:[^\/]+/g)||[],r=[].slice.call(arguments,1,-2);c(n,function(e,t){ze[e.replace(/:|\./g,"")]=decodeURIComponent(r[t])}),u.mount(e,t[i])}),!0}}function Z(e){if(e=e||event,!e.ctrlKey&&!e.metaKey&&2!==e.which){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var t=e.currentTarget||e.srcElement,n="pathname"===u.route.mode&&t.search?ne(t.search.slice(1)):{};t&&"A"!==t.nodeName.toUpperCase();)t=t.parentNode;u.route(t[u.route.mode].slice(Xe[u.route.mode].length),n)}}function ee(){"hash"!==u.route.mode&&de.hash?de.hash=de.hash:e.scrollTo(0,0)}function te(e,n){var o={},a=[];for(var i in e){var u=n?n+"["+i+"]":i,s=e[i];if(null===s)a.push(encodeURIComponent(u));else if(r(s))a.push(te(s,u));else if(ve(s)){var l=[];o[u]=o[u]||{},c(s,function(e){o[u][e]||(o[u][e]=!0,l.push(encodeURIComponent(u)+"="+encodeURIComponent(e)))}),a.push(l.join("&"))}else s!==t&&a.push(encodeURIComponent(u)+"="+encodeURIComponent(s))}return a.join("&")}function ne(e){if(""===e||null==e)return{};"?"===e.charAt(0)&&(e=e.slice(1));var t=e.split("&"),n={};return c(t,function(e){var t=e.split("="),r=decodeURIComponent(t[0]),o=2===t.length?decodeURIComponent(t[1]):null;null!=n[r]?(ve(n[r])||(n[r]=[n[r]]),n[r].push(o)):n[r]=o}),n}function re(e){var n=G(e);U(e.childNodes,Ae[n]),Ae[n]=t}function oe(e,t){var n=u.prop(t);return e.then(n),n.then=function(n,r){return oe(e.then(n,r),t)},n["catch"]=n.then.bind(null,null),n["finally"]=function(e){var r=function(){return u.deferred().resolve(e()).promise};return n.then(function(e){return oe(r().then(function(){return e}),t)},function(e){return oe(r().then(function(){throw new Error(e)}),t)})},n}function ae(e,t){function o(e){p=e||d,v.map(function(e){p===l?e.resolve(h):e.reject(h)})}function a(e,t,o,a){if((null!=h&&r(h)||n(h))&&n(e))try{var i=0;e.call(h,function(e){i++||(h=e,t())},function(e){i++||(h=e,o())})}catch(c){u.deferred.onerror(c),h=c,o()}else a()}function i(){var r;try{r=h&&h.then}catch(d){return u.deferred.onerror(d),h=d,p=s,i()}a(r,function(){p=c,i()},function(){p=s,i()},function(){try{p===c&&n(e)?h=e(h):p===s&&n(t)&&(h=t(h),p=c)}catch(i){return u.deferred.onerror(i),h=i,o()}h===f?(h=TypeError(),o()):a(r,function(){o(l)},o,function(){o(p===c&&l)})})}var c=1,s=2,l=3,d=4,f=this,p=0,h=0,v=[];f.promise={},f.resolve=function(e){return p||(h=e,p=c,i()),this},f.reject=function(e){return p||(h=e,p=s,i()),this},f.promise.then=function(e,t){var n=new ae(e,t);return p===l?n.resolve(h):p===d?n.reject(h):v.push(n),n.promise}}function ie(e){return e}function ue(r){if(!r.dataType||"jsonp"!==r.dataType.toLowerCase()){var a=new e.XMLHttpRequest;if(a.open(r.method,r.url,!0,r.user,r.password),a.onreadystatechange=function(){4===a.readyState&&(a.status>=200&&a.status<300?r.onload({type:"load",target:a}):r.onerror({type:"error",target:a}))},r.serialize===JSON.stringify&&r.data&&"GET"!==r.method&&a.setRequestHeader("Content-Type","application/json; charset=utf-8"),r.deserialize===JSON.parse&&a.setRequestHeader("Accept","application/json, text/*"),n(r.config)){var i=r.config(a,r);null!=i&&(a=i)}var u="GET"!==r.method&&r.data?r.data:"";if(u&&!o(u)&&u.constructor!==e.FormData)throw new Error("Request data should be either be a string or FormData. Check the `serialize` option in `m.request`");return a.send(u),a}var c="mithril_callback_"+(new Date).getTime()+"_"+Math.round(1e16*Math.random()).toString(36),s=le.createElement("script");e[c]=function(n){s.parentNode.removeChild(s),r.onload({type:"load",target:{responseText:n}}),e[c]=t},s.onerror=function(){return s.parentNode.removeChild(s),r.onerror({type:"error",target:{status:500,responseText:JSON.stringify({error:"Error making jsonp request"})}}),e[c]=t,!1},s.onload=function(){return!1},s.src=r.url+(r.url.indexOf("?")>0?"&":"?")+(r.callbackKey?r.callbackKey:"callback")+"="+c+"&"+te(r.data||{}),le.body.appendChild(s)}function ce(e,t,n){if("GET"===e.method&&"jsonp"!==e.dataType){var r=e.url.indexOf("?")<0?"?":"&",o=te(t);e.url=e.url+(o?r+o:"")}else e.data=n(t);return e}function se(e,t){var n=e.match(/:[a-z]\w+/gi);return n&&t&&c(n,function(n){var r=n.slice(1);e=e.replace(n,t[r]),delete t[r]}),e}var le,de,fe,pe,he="v0.2.1",ve=Array.isArray||function(e){return"[object Array]"===ge.call(e)},ge={}.toString,me=/(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g,be=/\[(.+?)(?:=("|'|)(.*?)\2)?\]/,ye=/^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/,we=function(){};i(e),u.version=function(){return he};var ke,xe=1,Ee=2,Ce=3,Pe=function(){var e=function(e,t){e.appendChild(le.createRange().createContextualFragment(t))},t=function(e,t){e.insertAdjacentHTML("beforeend",t)};try{return le.createRange().createContextualFragment("x"),e}catch(n){return t}}(),Me={appendChild:function(e){ke===t&&(ke=le.createElement("html")),le.documentElement&&le.documentElement!==e?le.replaceChild(e,le.documentElement):le.appendChild(e),this.childNodes=le.childNodes},insertBefore:function(e){this.appendChild(e)},childNodes:[]},Oe=[],Ae={};u.render=function(e,n,r){var o=[];if(!e)throw new Error("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var a=G(e),i=e===le,u=i||e===le.documentElement?Me:e;i&&"html"!==n.tag&&(n={tag:"html",attrs:{},children:n}),Ae[a]===t&&U(u.childNodes),r===!0&&re(e),Ae[a]=K(u,null,t,t,n,Ae[a],!1,0,null,t,o),c(o,function(e){e()})},u.trust=function(e){return e=new String(e),e.$trusted=!0,e},u.prop=function(e){return(null!=e&&r(e)||n(e))&&n(e.then)?oe(e):H(e)};var Te,Ne=[],je=[],De=[],Se=null,Re=0,qe=null,Le=null,Fe=[],Ke=16;u.component=function(e){for(var t=[],n=1;nr&&(r=Ne.length);var o=!1,a={preventDefault:function(){o=!0,qe=Le=null}};c(Fe,function(e){e.handler.call(e.controller,a),e.controller.onunload=null}),o?c(Fe,function(e){e.controller.onunload=e.handler}):Fe=[],De[r]&&n(De[r].onunload)&&De[r].onunload(a);var i=null===t;if(!o){u.redraw.strategy("all"),u.startComputation(),Ne[r]=e;var s=Te=t?t:t={controller:we},l=new(t.controller||we);return s===Te&&(De[r]=l,je[r]=t),Y(),i&&_(e,r),De[r]}i&&_(e,r)};var Be=!1,Ie=!1;u.redraw=function(t){if(!Be){Be=!0,t&&(Ie=!0);try{Se&&!t?(fe===e.requestAnimationFrame||new Date-Re>Ke)&&(Se>0&&pe(Se),Se=fe(J,Ke)):(J(),Se=fe(function(){Se=null},Ke))}finally{Be=Ie=!1}}},u.redraw.strategy=u.prop();var Ue=0;u.startComputation=function(){Ue++},u.endComputation=function(){Ue>1?Ue--:(Ue=0,u.redraw())},u.withAttr=function(e,t,n){return function(r){r=r||event;var o=r.currentTarget||this,a=n||this;t.call(a,e in o?o[e]:o.getAttribute(e))}};var ze,$e,Xe={pathname:"",hash:"#",search:"?"},Ge=we,He=!1;return u.route=function(t,n,r,a){if(0===arguments.length)return $e;if(3===arguments.length&&o(n)){Ge=function(e){var o=$e=V(e);if(!Q(t,r,o)){if(He)throw new Error("Ensure the default route matches one of the routes defined in m.route");He=!0,u.route(n,!0),He=!1}};var i="hash"===u.route.mode?"onhashchange":"onpopstate";e[i]=function(){var e=de[u.route.mode];"pathname"===u.route.mode&&(e+=de.search),$e!==V(e)&&Ge(e)},qe=ee,e[i]()}else if(t.addEventListener||t.attachEvent)t.href=("pathname"!==u.route.mode?de.pathname:"")+Xe[u.route.mode]+a.attrs.href,t.addEventListener?(t.removeEventListener("click",Z),t.addEventListener("click",Z)):(t.detachEvent("onclick",Z),t.attachEvent("onclick",Z));else if(o(t)){var c=$e;$e=t;var s=n||{},l=$e.indexOf("?"),d=l>-1?ne($e.slice(l+1)):{};for(var f in s)d[f]=s[f];var p=te(d),h=l>-1?$e.slice(0,l):$e;p&&($e=h+(-1===h.indexOf("?")?"?":"&")+p);var v=(3===arguments.length?r:n)===!0||c===t;e.history.pushState?(qe=ee,Le=function(){e.history[v?"replaceState":"pushState"](null,le.title,Xe[u.route.mode]+$e)},Ge(Xe[u.route.mode]+$e)):(de[u.route.mode]=$e,Ge(Xe[u.route.mode]+$e))}},u.route.param=function(e){if(!ze)throw new Error("You must call m.route(element, defaultRoute, routes) before calling m.route.param()");return e?ze[e]:ze},u.route.mode="search",u.route.buildQueryString=te,u.route.parseQueryString=ne,u.deferred=function(){var e=new ae;return e.promise=oe(e.promise),e},u.deferred.onerror=function(e){if("[object Error]"===ge.call(e)&&!e.constructor.toString().match(/ Error/))throw Ue=0,e},u.sync=function(e){function t(e,t){return function(i){return a[e]=i,t||(n="reject"),0===--o&&(r.promise(a),r[n](a)),i}}var n="resolve",r=u.deferred(),o=e.length,a=new Array(o);return e.length>0?c(e,function(e,n){e.then(t(n,!0),t(n,!1))}):r.resolve([]),r.promise},u.request=function(e){e.background!==!0&&u.startComputation();var t=new ae,n=e.dataType&&"jsonp"===e.dataType.toLowerCase(),r=e.serialize=n?ie:e.serialize||JSON.stringify,o=e.deserialize=n?ie:e.deserialize||JSON.parse,a=n?function(e){return e.responseText}:e.extract||function(e){return 0===e.responseText.length&&o===JSON.parse?null:e.responseText};return e.method=(e.method||"GET").toUpperCase(),e.url=se(e.url,e.data),e=ce(e,e.data,r),e.onload=e.onerror=function(n){try{n=n||event;var r=("load"===n.type?e.unwrapSuccess:e.unwrapError)||ie,i=r(o(a(n.target,e)),n.target);"load"===n.type&&(ve(i)&&e.type?c(i,function(t,n){i[n]=new e.type(t)}):e.type&&(i=new e.type(i))),t["load"===n.type?"resolve":"reject"](i)}catch(n){u.deferred.onerror(n),t.reject(n)}e.background!==!0&&u.endComputation()},ue(e),t.promise=oe(t.promise,e.initialValue),t.promise},u.deps=function(t){return i(e=t||e),e},u.deps.factory=a,u}("undefined"!=typeof window?window:{});"object"==typeof n&&null!=n&&n.exports?n.exports=o:"function"==typeof e&&e.amd&&e(function(){return o})},{}],4:[function(e,t,n){function r(e,t,n){var r=n?l.invertKey(e):e;return{key:r,pos:l.key2pos(r),role:t.role,color:t.color}}function o(e,t){return e.role===t.role&&e.color===t.color}function a(e,t){return t.sort(function(t,n){return l.distance(e.pos,t.pos)-l.distance(e.pos,n.pos)})[0]}function i(e,t){var n=t.bounds(),i=n.width/8,u=n.height/8,c={},s=[],d=[],f=[],p=[],h=e.orientation!==t.orientation,v={},g="white"===t.orientation;for(var m in e.pieces){var b=r(m,e.pieces[m],h);v[b.key]=b}for(var y=0;y=t)e.animation.current={},e.render();else{var n=d.easeInOutCubic(t);for(var r in e.animation.current.anims){var o=e.animation.current.anims[r];o[1]=[u(o[0][0]*n,10),u(o[0][1]*n,10)]}for(var a in e.animation.current.fadings)e.animation.current.fadings[a].opacity=u(n,100);e.render(),l.requestAnimationFrame(function(){c(e)})}}}function s(e,t){var n={orientation:t.orientation,pieces:{}};for(var r in t.pieces)n.pieces[r]={role:t.pieces[r].role,color:t.pieces[r].color};var o=e(),a=i(n,t);if(Object.keys(a.anims).length>0||a.fadings.length>0){var u=t.animation.current.start;t.animation.current={start:(new Date).getTime(),duration:t.animation.duration,anims:a.anims,fadings:a.fadings},u||c(t)}else t.renderRAF();return o}var l=e("./util"),d={easeInOutCubic:function(e){return.5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}};t.exports=function(e,t,n){return function(){var r=[t].concat(Array.prototype.slice.call(arguments,0));if(t.render){if(t.animation.enabled&&!n)return s(l.partialApply(e,r),t);var o=e.apply(null,r);return t.renderRAF(),o}return e.apply(null,r)}}},{"./util":16}],5:[function(e,t,n){var r=e("./board");t.exports=function(e){return{set:e.set,toggleOrientation:e.toggleOrientation,getOrientation:function(){return e.data.orientation},getPieces:function(){return e.data.pieces},getMaterialDiff:function(){return r.getMaterialDiff(e.data)},getFen:e.getFen,dump:function(){return e.data},move:e.apiMove,newPiece:e.apiNewPiece,setPieces:e.setPieces,setCheck:e.setCheck,playPremove:e.playPremove,cancelPremove:e.cancelPremove,cancelMove:e.cancelMove,stop:e.stop,explode:e.explode,setAutoShapes:e.setAutoShapes}}},{"./board":6}],6:[function(e,t,n){function r(e){setTimeout(e,1)}function o(e){e.orientation=N.opposite(e.orientation)}function a(e){e.lastMove=null,y(e,null),s(e)}function i(e,t){Object.keys(t).forEach(function(n){t[n]?e.pieces[n]=t[n]:delete e.pieces[n]}),e.movable.dropped=[]}function u(e,t){var n=t||e.turnColor;Object.keys(e.pieces).forEach(function(t){e.pieces[t].color===n&&"king"===e.pieces[t].role&&(e.check=t)})}function c(e,t,n){e.premovable.current=[t,n],r(N.partial(e.premovable.events.set,t,n))}function s(e){e.premovable.current&&(e.premovable.current=null,r(e.premovable.events.unset))}function l(e,t,n){if(e.autoCastle){var r=e.pieces[n];if("king"===r.role){var o=N.key2pos(t);if(5===o[0]&&(1===o[1]||8===o[1])){var a,i,u,c=N.key2pos(n);if(7===c[0]||8===c[0])a=N.pos2key([8,o[1]]),i=N.pos2key([6,o[1]]),u=N.pos2key([7,o[1]]);else{if(3!==c[0]&&1!==c[0])return;a=N.pos2key([1,o[1]]),i=N.pos2key([4,o[1]]),u=N.pos2key([3,o[1]])}delete e.pieces[t],delete e.pieces[n],delete e.pieces[a],e.pieces[u]={role:"king",color:r.color},e.pieces[i]={role:"rook",color:r.color}}}}}function d(e,t,n){var o=D(function(){if(t===n||!e.pieces[t])return!1;var o=e.pieces[n]&&e.pieces[n].color!==e.pieces[t].color?e.pieces[n]:null;return r(N.partial(e.events.move,t,n,o)),e.pieces[n]=e.pieces[t],delete e.pieces[t],e.lastMove=[t,n],e.check=null,l(e,t,n),r(e.events.change),!0},e)();return o&&(e.movable.dropped=[]),o}function f(e,t,n){return e.pieces[n]?!1:(r(N.partial(e.events.dropNewPiece,t,n)),e.pieces[n]=t,e.lastMove=[n,n],e.check=null,r(e.events.change),e.movable.dropped=[],e.renderRAF(),!0)}function p(e,t,n){var r=d(e,t,n);return r&&(e.movable.dests={},e.turnColor=N.opposite(e.turnColor)),r}function h(e,t,n){return d(e,t,n)}function v(e,t,n){return f(e,t,n)}function g(e,t,n){if(n)if(k(e,t,n)){if(p(e,t,n)){var o=S.stop();y(e,null),r(N.partial(e.movable.events.after,t,n,{premove:!1,holdTime:o}))}}else E(e,t,n)?(c(e,t,n),y(e,null)):w(e,n)||x(e,n)?(y(e,n),S.start()):y(e,null);else S.cancel(),y(e,null),"trash"===e.movable.dropOff&&(delete e.pieces[t],r(e.events.change))}function m(e,t,n){var o=e.pieces[t];!n||e.pieces[n]&&t!==n?delete e.pieces[t]:o?(delete e.pieces[t],f(e,o,n),e.movable.dropped=[],y(e,null),r(N.partial(e.movable.events.afterNewPiece,o,n))):y(e,null)}function b(e,t){e.selected?t?e.selected!==t?g(e,e.selected,t)&&(e.stats.dragged=!1):S.start():(y(e,null),S.cancel()):(w(e,t)||x(e,t))&&(y(e,t),S.start()),t&&r(N.partial(e.events.select,t))}function y(e,t){e.selected=t,e.premovable.dests=t&&x(e,t)?j(e.pieces,t,e.premovable.castle):null}function w(e,t){var n=e.pieces[t];return n&&("both"===e.movable.color||e.movable.color===n.color&&e.turnColor===n.color)}function k(e,t,n){return t!==n&&w(e,t)&&(e.movable.free||N.containsX(e.movable.dests[t],n))}function x(e,t){var n=e.pieces[t];return n&&e.premovable.enabled&&e.movable.color===n.color&&e.turnColor!==n.color}function E(e,t,n){return t!==n&&x(e,t)&&N.containsX(j(e.pieces,t,e.premovable.castle),n)}function C(e,t){var n=e.pieces[t];return n&&e.draggable.enabled&&("both"===e.movable.color||e.movable.color===n.color&&(e.turnColor===n.color||e.premovable.enabled))}function P(e){var t=e.premovable.current;if(t){var n=t[0],o=t[1],a=!1;return k(e,n,o)&&p(e,n,o)&&(r(N.partial(e.movable.events.after,n,o,{premove:!0})),a=!0),s(e),a}}function M(e){s(e),b(e,null)}function O(e){e.movable.color=null,e.movable.dests={},M(e)}function A(e,t,n){if(n||e.bounds){n=n||e.bounds();var r=Math.ceil(8*((t[0]-n.left)/n.width));r="white"===e.orientation?r:9-r;var o=Math.ceil(8-8*((t[1]-n.top)/n.height));return o="white"===e.orientation?o:9-o,r>0&&9>r&&o>0&&9>o?N.pos2key([r,o]):void 0}}function T(e){var t={king:0,queen:0,rook:0,bishop:0,knight:0,pawn:0};for(var n in e.pieces){var r=e.pieces[n];t[r.role]+="white"===r.color?1:-1}var o={white:{},black:{}};for(var a in t){var i=t[a];i>0?o.white[a]=i:0>i&&(o.black[a]=-i)}return o}var N=e("./util"),j=e("./premove"),D=e("./anim"),S=e("./hold");t.exports={reset:a,toggleOrientation:o,setPieces:i,setCheck:u,selectSquare:b,setSelected:y,isDraggable:C,canMove:k,userMove:g,dropNewPiece:m,apiMove:h,apiNewPiece:v,playPremove:P,unsetPremove:s,cancelMove:M,stop:O,getKeyAtDomPos:A,getMaterialDiff:T}},{"./anim":4,"./hold":13,"./premove":14,"./util":16}],7:[function(e,t,n){var r=e("merge"),o=e("./board"),a=e("./fen");t.exports=function(e,t){t&&(t.movable&&t.movable.dests&&delete e.movable.dests,r.recursive(e,t),e.fen&&(e.pieces=a.read(e.fen),e.check=t.check,e.drawable.shapes=[],delete e.fen),e.check===!0&&o.setCheck(e),e.movable.dropped=[],e.selected&&o.setSelected(e,e.selected),(!e.animation.duration||e.animation.duration<10)&&(e.animation.enabled=!1))}},{"./board":6,"./fen":12,merge:2}],8:[function(e,t,n){var r=e("./board"),o=e("./data"),a=e("./fen"),i=e("./configure"),u=e("./anim"),c=e("./drag");t.exports=function(e){this.data=o(e),this.vm={exploding:!1},this.getFen=function(){return a.write(this.data.pieces)}.bind(this),this.set=u(i,this.data),this.toggleOrientation=u(r.toggleOrientation,this.data),this.setPieces=u(r.setPieces,this.data),this.selectSquare=u(r.selectSquare,this.data,!0),this.apiMove=u(r.apiMove,this.data),this.apiNewPiece=u(r.apiNewPiece,this.data),this.playPremove=u(r.playPremove,this.data),this.cancelPremove=u(r.unsetPremove,this.data,!0),this.setCheck=u(r.setCheck,this.data,!0),this.cancelMove=u(function(e){r.cancelMove(e),c.cancel(e)}.bind(this),this.data,!0),this.stop=u(function(e){r.stop(e),c.cancel(e)}.bind(this),this.data,!0),this.explode=function(e){this.data.render&&(this.vm.exploding=e,this.data.renderRAF(),setTimeout(function(){this.vm.exploding=!1,this.data.renderRAF()}.bind(this),200))}.bind(this),this.setAutoShapes=function(e){u(function(t){t.drawable.autoShapes=e},this.data,!1)()}.bind(this)}},{"./anim":4,"./board":6,"./configure":7,"./data":9,"./drag":10,"./fen":12}],9:[function(e,t,n){var r=e("./fen"),o=e("./configure");t.exports=function(e){var t={pieces:r.read(r.initial),orientation:"white",turnColor:"white",check:null,lastMove:null,selected:null,coordinates:!0,render:null,renderRAF:null,element:null,bounds:null,autoCastle:!1,viewOnly:!1,minimalDom:!1,disableContextMenu:!1,resizable:!0,highlight:{lastMove:!0,check:!0,dragOver:!0},animation:{enabled:!0,duration:200,current:{}},movable:{free:!0,color:"both",dests:{},dropOff:"revert",dropped:[],showDests:!0,events:{after:function(e,t,n){},afterNewPiece:function(e,t){}}},premovable:{enabled:!0,showDests:!0,castle:!0,dests:[],current:null,events:{set:function(e,t){},unset:function(){}}},draggable:{enabled:!0,distance:3,autoDistance:!0,squareTarget:!1,centerPiece:!0,showGhost:!0,current:{}},stats:{dragged:!("ontouchstart"in window)},events:{change:function(){},move:function(e,t,n){},dropNewPiece:function(e,t){},capture:function(e,t){},select:function(e){}},drawable:{enabled:!1,shapes:[],autoShapes:[],current:{},brushes:{green:{key:"g",color:"#15781B",opacity:1,lineWidth:10,circleMargin:0},red:{key:"r",color:"#882020",opacity:1,lineWidth:10,circleMargin:1},blue:{key:"b",color:"#003088",opacity:1,lineWidth:10,circleMargin:2},yellow:{key:"y",color:"#e68f00",opacity:1,lineWidth:10,circleMargin:3},paleBlue:{key:"pb",color:"#003088",opacity:.45,lineWidth:15,circleMargin:0},paleGreen:{key:"pg",color:"#15781B",opacity:.55,lineWidth:15,circleMargin:0}}}};return o(t,e||{}),t}},{"./configure":7,"./fen":12}],10:[function(e,t,n){function r(e){return e?e.color+e.role:""}function o(e,t,n){var r=f.key2pos(n);return"white"!==e.orientation&&(r[0]=9-r[0],r[1]=9-r[1]),{left:t.left+t.width*(r[0]-1)/8,top:t.top+t.height*(8-r[1])/8,width:t.width/8,height:t.height/8}}function a(e,t){if(!(void 0!==t.button&&0!==t.button||t.touches&&t.touches.length>1)){t.stopPropagation(),t.preventDefault(), -l=t.target;var n=e.selected,a=f.eventPosition(t),u=e.bounds(),c=d.getKeyAtDomPos(e,a,u),s=!!e.premovable.current;d.selectSquare(e,c);var p=e.selected===c;if(e.pieces[c]&&p&&d.isDraggable(e,c)){var h=o(e,u,c);e.draggable.current={previouslySelected:n,orig:c,piece:r(e.pieces[c]),rel:a,epos:a,pos:[0,0],dec:e.draggable.centerPiece?[a[0]-(h.left+h.width/2),a[1]-(h.top+h.height/2)]:[0,0],bounds:u,started:e.draggable.autoDistance&&e.stats.dragged}}else s&&d.unsetPremove(e);i(e)}}function i(e){f.requestAnimationFrame(function(){var t=e.draggable.current;t.orig&&(e.animation.current.start&&e.animation.current.anims[t.orig]&&(e.animation.current={}),r(e.pieces[t.orig])!==t.piece?s(e):(!t.started&&f.distance(t.epos,t.rel)>=e.draggable.distance&&(t.started=!0),t.started&&(t.pos=[t.epos[0]-t.rel[0],t.epos[1]-t.rel[1]],t.over=d.getKeyAtDomPos(e,t.epos,t.bounds)))),e.render(),t.orig&&i(e)})}function u(e,t){t.touches&&t.touches.length>1||e.draggable.current.orig&&(e.draggable.current.epos=f.eventPosition(t))}function c(e,t){var n=e.draggable,r=n.current?n.current.orig:null;if(r&&(!t||"touchend"!==t.type||l===t.target)){d.unsetPremove(e);var o=n.current.over;n.current.started&&(n.current.newPiece?d.dropNewPiece(e,r,o):(r!==o&&(e.movable.dropped=[r,o]),d.userMove(e,r,o)&&(e.stats.dragged=!0))),r!==n.current.previouslySelected||r!==o&&o||d.setSelected(e,null),n.current={}}}function s(e){e.draggable.current.orig&&(e.draggable.current={},d.selectSquare(e,null))}var l,d=e("./board"),f=e("./util");t.exports={start:a,move:u,end:c,cancel:s,processDrag:i}},{"./board":6,"./util":16}],11:[function(e,t,n){function r(e,t){if(!(t.touches&&t.touches.length>1)){t.stopPropagation(),t.preventDefault(),f.cancelMove(e);var n=p.eventPosition(t),r=e.bounds(),a=f.getKeyAtDomPos(e,n,r);e.drawable.current={orig:a,epos:n,bounds:r,brush:h[(t.shiftKey&p.isRightButton(t))+(t.altKey?2:0)]},o(e)}}function o(e){p.requestAnimationFrame(function(){var t=e.drawable.current;if(t.orig){var n=f.getKeyAtDomPos(e,t.epos,t.bounds);t.dest=t.orig===n?void 0:n}e.render(),t.orig&&o(e)})}function a(e,t){e.drawable.current.orig&&(e.drawable.current.epos=p.eventPosition(t))}function i(e,t){var n=e.drawable,r=n.current.orig,o=n.current.dest;r&&o?d(n,r,o):r&&l(n,r),n.current={},e.render()}function u(e){e.drawable.current.orig&&(e.drawable.current={})}function c(e,t){0!==t.button||t.shiftKey||e.drawable.shapes.length&&(e.drawable.shapes=[],e.render())}function s(e){return function(t){return!e(t)}}function l(e,t){var n=e.current.brush,r=function(e){return e.brush===n&&e.orig===t&&!e.dest},o=e.shapes.filter(r).length>0;o?e.shapes=e.shapes.filter(s(r)):e.shapes.push({brush:n,orig:t})}function d(e,t,n){var r=e.current.brush,o=function(e){return e.orig&&e.dest&&(e.orig===t&&e.dest===n||e.dest===t&&e.orig===n)},a=e.shapes.filter(o).length>0;a?e.shapes=e.shapes.filter(s(o)):e.shapes.push({brush:r,orig:t,dest:n})}var f=e("./board"),p=e("./util"),h=["green","red","blue","yellow"];t.exports={start:r,move:a,end:i,cancel:u,clear:c,processDraw:o}},{"./board":6,"./util":16}],12:[function(e,t,n){function r(e){"start"===e&&(e=i);var t={};return e.replace(/ .+$/,"").replace(/~/g,"").split("/").forEach(function(e,n){var r=0;e.split("").forEach(function(e){var o=parseInt(e);o?r+=o:(r++,t[a.pos2key([r,8-n])]={role:u[e.toLowerCase()],color:e===e.toLowerCase()?"black":"white"})})}),t}function o(e){return[8,7,6,5,4,3,2].reduce(function(e,t){return e.replace(new RegExp(Array(t+1).join("1"),"g"),t)},a.invRanks.map(function(t){return a.ranks.map(function(n){var r=e[a.pos2key([n,t])];if(r){var o=c[r.role];return"white"===r.color?o.toUpperCase():o}return"1"}).join("")}).join("/"))}var a=e("./util"),i="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR",u={p:"pawn",r:"rook",n:"knight",b:"bishop",q:"queen",k:"king"},c={pawn:"p",rook:"r",knight:"n",bishop:"b",queen:"q",king:"k"};t.exports={initial:i,read:r,write:o}},{"./util":16}],13:[function(e,t,n){var r,o=function(){r=new Date},a=function(){r=null},i=function(){if(!r)return 0;var e=new Date-r;return r=null,e};t.exports={start:o,cancel:a,stop:i}},{}],14:[function(e,t,n){function r(e,t){return Math.abs(e-t)}function o(e,t,n,o,a){return r(t,o)<2&&("white"===e?a===n+1||2>=n&&a===n+2&&t===o:a===n-1||n>=7&&a===n-2&&t===o)}function a(e,t,n,o){var a=r(e,n),i=r(t,o);return 1===a&&2===i||2===a&&1===i}function i(e,t,n,o){return r(e,n)===r(t,o)}function u(e,t,n,r){return e===n||t===r}function c(e,t,n,r){return i(e,t,n,r)||u(e,t,n,r)}function s(e,t,n,o,a,i,u){return r(o,i)<2&&r(a,u)<2||n&&a===u&&a===("white"===e?1:8)&&(5===o&&(3===i||7===i)||f.containsX(t,i))}function l(e,t){return Object.keys(e).filter(function(n){var r=e[n];return r&&r.color===t&&"rook"===r.role}).map(function(e){return f.key2pos(e)[0]})}function d(e,t,n){var r,d=e[t],p=f.key2pos(t);switch(d.role){case"pawn":r=o.bind(null,d.color);break;case"knight":r=a;break;case"bishop":r=i;break;case"rook":r=u;break;case"queen":r=c;break;case"king":r=s.bind(null,d.color,l(e,d.color),n)}return f.allPos.filter(function(e){return(p[0]!==e[0]||p[1]!==e[1])&&r(p[0],p[1],e[0],e[1])}).map(f.pos2key)}var f=e("./util");t.exports=d},{"./util":16}],15:[function(e,t,n){function r(e,t){return(e?2:4)/512*t.width}function o(e,t,n){return(e.lineWidth||10)*(t?.7:1)/512*n.width}function a(e,t){return(e.opacity||1)*(t?.6:1)}function i(e,t){return(e?12:24)/512*t.width}function u(e,t){var n=t.width/8;return[(e[0]-.5)*n,(8.5-e[1])*n]}function c(e,t,n,o){var i=u(t,o),c=r(n,o),s=o.width/16;return{tag:"circle",attrs:{key:n?"current":t+e.key,stroke:e.color,"stroke-width":c,fill:"none",opacity:a(e,n),cx:i[0],cy:i[1],r:s-c/2-e.circleMargin*c*1.5}}}function s(e,t,n,r,c){var s=i(r,c),l=u(t,c),d=u(n,c),f=d[0]-l[0],p=d[1]-l[1],h=Math.atan2(p,f),v=Math.cos(h)*s,g=Math.sin(h)*s;return{tag:"line",attrs:{key:r?"current":t+n+e.key,stroke:e.color,"stroke-width":o(e,r,c),"stroke-linecap":"round","marker-end":"url(#arrowhead-"+e.key+")",opacity:a(e,r),x1:l[0],y1:l[1],x2:d[0]-v,y2:d[1]-g}}}function l(e){return{tag:"defs",children:[e.map(function(e){return{key:e.key,tag:"marker",attrs:{id:"arrowhead-"+e.key,orient:"auto",markerWidth:4,markerHeight:8,refX:2.05,refY:2.01},children:[{tag:"path",attrs:{d:"M0,0 V4 L3,2 Z",fill:e.color}}]}})]}}function d(e,t){return"white"===t?e:[9-e[0],9-e[1]]}function f(e,t,n,r){return function(o){return o.orig&&o.dest?s(n[o.brush],d(p(o.orig),e),d(p(o.dest),e),t,r):o.orig?c(n[o.brush],d(p(o.orig),e),t,r):void 0}}var p=(e("mithril"),e("./util").key2pos);t.exports=function(e){if(e.data.bounds){var t=e.data.bounds();if(t.width===t.height){var n=e.data.drawable,r=n.shapes.concat(n.autoShapes);if(r.length||n.current.orig){var o=Object.keys(e.data.drawable.brushes).filter(function(e){return n.current&&n.current.dest&&n.current.brush===e||r.filter(function(t){return t.dest&&t.brush===e}).length}).map(function(t){return e.data.drawable.brushes[t]});return{tag:"svg",children:[l(o),r.map(f(e.data.orientation,!1,e.data.drawable.brushes,t)),f(e.data.orientation,!0,e.data.drawable.brushes,t)(n.current)]}}}}}},{"./util":16,mithril:3}],16:[function(e,t,n){function r(e){return w[e[0]-1]+e[1]}function o(e){return[w.indexOf(e[0])+1,parseInt(e[1])]}function a(e){return w[7-w.indexOf(e[0])]+(9-parseInt(e[1]))}function i(e){var t=[];for(var n in e)e[n]&&t.push(n);return t.join(" ")}function u(e){return"white"===e?"black":"white"}function c(e,t){return e&&(e[0]===t||e[1]===t)}function s(e,t){return e&&-1!==e.indexOf(t)}function l(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function d(){return"transform"in document.body.style?"transform":"webkitTransform"in document.body.style?"webkitTransform":"mozTransform"in document.body.style?"mozTransform":"oTransform"in document.body.style?"oTransform":"msTransform"}function f(){return y||(y=d()),y}function p(e){return"translate("+e[0]+"px,"+e[1]+"px)"}function h(e){return e.touches?[e.targetTouches[0].clientX,e.targetTouches[0].clientY]:[e.clientX,e.clientY]}function v(e,t){return e.bind.apply(e,[null].concat(t))}function g(){return v(arguments[0],Array.prototype.slice.call(arguments,1))}function m(e){return 2===e.buttons||2===e.button}function b(e){var t,n=function(){return void 0===t&&(t=e()),t};return n.clear=function(){t=void 0},n}var y,w="abcdefgh".split(""),k=[1,2,3,4,5,6,7,8],x=[8,7,6,5,4,3,2,1],E=function(){var e=[];return x.forEach(function(t){k.forEach(function(n){e.push([n,t])})}),e}(),C=E.slice().reverse(),P=E.map(r);t.exports={files:w,ranks:k,invRanks:x,allPos:E,invPos:C,allKeys:P,pos2key:r,key2pos:o,invertKey:a,classSet:i,opposite:u,translate:p,contains2:c,containsX:s,distance:l,eventPosition:h,partialApply:v,partial:g,transformProp:f,requestAnimationFrame:(window.requestAnimationFrame||window.setTimeout).bind(window),isRightButton:m,memo:b}},{}],17:[function(e,t,n){function r(e){return e.role+" "+e.color}function o(e,t,n){var o={style:{},"class":r(n)},a=e.data.draggable.current;if(a.orig===t&&a.started)o.style[g.transformProp()]=g.translate([a.pos[0]+a.dec[0],a.pos[1]+a.dec[1]]),o["class"]+=" dragging";else if(e.data.animation.current.anims){var i=e.data.animation.current.anims[t];i&&(o.style[g.transformProp()]=g.translate(i[1]))}return{tag:"piece",attrs:o}}function a(e){return{tag:"piece",attrs:{"class":r(e)+" ghost"}}}function i(e,t,n){var r=e.data,i=g.files[t[0]-1],u=t[1],c=i+u,s=r.pieces[c],l=r.highlight.dragOver&&r.draggable.current.over===c,d=g.classSet({selected:r.selected===c,check:r.highlight.check&&r.check===c,"last-move":r.highlight.lastMove&&g.contains2(r.lastMove,c),"move-dest":(l||r.movable.showDests)&&g.containsX(r.movable.dests[r.selected],c),"premove-dest":(l||r.premovable.showDests)&&g.containsX(r.premovable.dests,c),"current-premove":g.contains2(r.premovable.current,c),"drag-over":l,oc:!!s,exploding:e.vm.exploding&&-1!==e.vm.exploding.indexOf(c)}),f={style:{left:12.5*(n?t[0]-1:8-t[0])+"%",bottom:12.5*(n?t[1]-1:8-t[1])+"%"}};d&&(f["class"]=d),r.coordinates&&(t[1]===(n?1:8)&&(f["data-coord-x"]=i),t[0]===(n?8:1)&&(f["data-coord-y"]=u));var p=[];return s&&(p.push(o(e,c,s)),r.draggable.current.orig===c&&r.draggable.showGhost&&!r.draggable.current.newPiece&&p.push(a(s))),{tag:"square",attrs:f,children:p}}function u(e,t){var n=g.key2pos(t.over),r="white"===e.data.orientation?n[0]:9-n[0],o="white"===e.data.orientation?n[1]:9-n[1];return{tag:"div",attrs:{id:"cg-square-target",style:{width:t.bounds.width/4+"px",height:t.bounds.height/4+"px",left:(r-1.5)*t.bounds.width/8+"px",top:(7.5-o)*t.bounds.height/8+"px"}}}}function c(e){return{tag:"square",attrs:{"class":"fading",style:{left:e.left,bottom:e.bottom,opacity:e.opacity}},children:[{tag:"piece",attrs:{"class":r(e.piece)}}]}}function s(e,t){var n=[];e.data.lastMove&&e.data.lastMove.forEach(function(e){var r=g.key2pos(e);n.push({tag:"square",attrs:{"class":"last-move",style:{left:12.5*(t?r[0]-1:8-r[0])+"%",bottom:12.5*(t?r[1]-1:8-r[1])+"%"}}})});for(var o=Object.keys(e.data.pieces),a=0,i=o.length;i>a;a++){var u=o[a],c=g.key2pos(u),s={style:{left:12.5*(t?c[0]-1:8-c[0])+"%",bottom:12.5*(t?c[1]-1:8-c[1])+"%"},"class":r(e.data.pieces[u])};if(e.data.animation.current.anims){var l=e.data.animation.current.anims[u];l&&(s.style[g.transformProp()]=g.translate(l[1]))}n.push({tag:"piece",attrs:s})}return n}function l(e){var t="white"===e.data.orientation;if(e.data.minimalDom)return s(e,t);for(var n=t?g.allPos:g.invPos,r=[],o=0,a=n.length;a>o;o++)r.push(i(e,n[o],t));return e.data.draggable.current.over&&e.data.draggable.squareTarget&&r.push(u(e,e.data.draggable.current)),e.data.animation.current.fadings&&e.data.animation.current.fadings.forEach(function(e){r.push(c(e))}),e.data.drawable.enabled&&r.push(m(e)),r}function d(e,t,n){return function(r){g.isRightButton(r)&&e.draggable.current.orig?(e.draggable.current={},e.selected=null):e.drawable.enabled&&(r.shiftKey||g.isRightButton(r))?n(e,r):e.viewOnly||t(e,r)}}function f(e,t,n){var r=e.data,o=d(r,h.start,v.start),a=d(r,h.move,v.move),i=d(r,h.end,v.end),u=g.partial(v.clear,r),c=["touchstart","mousedown"],s=["touchmove","mousemove"],l=["touchend","mouseup"];c.forEach(function(e){t.addEventListener(e,o)}),s.forEach(function(e){document.addEventListener(e,a)}),l.forEach(function(e){document.addEventListener(e,i)}),t.addEventListener("mousedown",u),n.onunload=function(){c.forEach(function(e){t.removeEventListener(e,o)}),s.forEach(function(e){document.removeEventListener(e,a)}),l.forEach(function(e){document.removeEventListener(e,i)}),t.removeEventListener("mousedown",u)}}function p(e){return{tag:"div",attrs:{"class":"cg-board orientation-"+e.data.orientation,config:function(t,n,r){n||((!e.data.viewOnly||e.data.drawable.enabled)&&f(e,t,r),e.data.render=function(){b.render(t,l(e))},e.data.renderRAF=function(){g.requestAnimationFrame(e.data.render)},e.data.bounds=g.memo(t.getBoundingClientRect.bind(t)),e.data.element=t,e.data.render())}},children:[]}}var h=e("./drag"),v=e("./draw"),g=e("./util"),m=e("./svg"),b=e("mithril");t.exports=function(e){return{tag:"div",attrs:{config:function(t,n){n||(t.addEventListener("contextmenu",function(t){return e.data.disableContextMenu||e.data.drawable.enabled?(t.preventDefault(),!1):void 0}),e.data.resizable&&document.body.addEventListener("chessground.resize",function(t){e.data.bounds.clear(),e.data.render()},!1),["onscroll","onresize"].forEach(function(t){var n=window[t];window[t]=function(){n&&n(),e.data.bounds.clear()}}))},"class":["cg-board-wrap",e.data.viewOnly?"view-only":"manipulable",e.data.minimalDom?"minimal-dom":"full-dom"].join(" ")},children:[p(e)]}}},{"./drag":10,"./draw":11,"./svg":15,"./util":16,mithril:3}]},{},[1])(1)}); \ No newline at end of file +l=t.target;var n=e.selected,a=f.eventPosition(t),u=e.bounds(),c=d.getKeyAtDomPos(e,a,u),s=!!e.premovable.current;d.selectSquare(e,c);var p=e.selected===c;if(e.pieces[c]&&p&&d.isDraggable(e,c)){var h=o(e,u,c);e.draggable.current={previouslySelected:n,orig:c,piece:r(e.pieces[c]),rel:a,epos:a,pos:[0,0],dec:e.draggable.centerPiece?[a[0]-(h.left+h.width/2),a[1]-(h.top+h.height/2)]:[0,0],bounds:u,started:e.draggable.autoDistance&&e.stats.dragged}}else s&&d.unsetPremove(e);i(e)}}function i(e){f.requestAnimationFrame(function(){var t=e.draggable.current;t.orig&&(e.animation.current.start&&e.animation.current.anims[t.orig]&&(e.animation.current={}),r(e.pieces[t.orig])!==t.piece?s(e):(!t.started&&f.distance(t.epos,t.rel)>=e.draggable.distance&&(t.started=!0),t.started&&(t.pos=[t.epos[0]-t.rel[0],t.epos[1]-t.rel[1]],t.over=d.getKeyAtDomPos(e,t.epos,t.bounds)))),e.render(),t.orig&&i(e)})}function u(e,t){t.touches&&t.touches.length>1||e.draggable.current.orig&&(e.draggable.current.epos=f.eventPosition(t))}function c(e,t){var n=e.draggable,r=n.current?n.current.orig:null;if(r&&(!t||"touchend"!==t.type||l===t.target)){d.unsetPremove(e);var o=n.current.over;n.current.started&&(n.current.newPiece?d.dropNewPiece(e,r,o):(r!==o&&(e.movable.dropped=[r,o]),d.userMove(e,r,o)&&(e.stats.dragged=!0))),r!==n.current.previouslySelected||r!==o&&o||d.setSelected(e,null),n.current={}}}function s(e){e.draggable.current.orig&&(e.draggable.current={},d.selectSquare(e,null))}var l,d=e("./board"),f=e("./util");t.exports={start:a,move:u,end:c,cancel:s,processDrag:i}},{"./board":6,"./util":16}],11:[function(e,t,n){function r(e,t){if(!(t.touches&&t.touches.length>1)){t.stopPropagation(),t.preventDefault(),f.cancelMove(e);var n=p.eventPosition(t),r=e.bounds(),a=f.getKeyAtDomPos(e,n,r);e.drawable.current={orig:a,epos:n,bounds:r,brush:h[(t.shiftKey&p.isRightButton(t))+(t.altKey?2:0)]},o(e)}}function o(e){p.requestAnimationFrame(function(){var t=e.drawable.current;if(t.orig){var n=f.getKeyAtDomPos(e,t.epos,t.bounds);t.dest=t.orig===n?void 0:n}e.render(),t.orig&&o(e)})}function a(e,t){e.drawable.current.orig&&(e.drawable.current.epos=p.eventPosition(t))}function i(e,t){var n=e.drawable,r=n.current.orig,o=n.current.dest;r&&o?d(n,r,o):r&&l(n,r),n.current={},e.render()}function u(e){e.drawable.current.orig&&(e.drawable.current={})}function c(e,t){0!==t.button||t.shiftKey||e.drawable.shapes.length&&(e.drawable.shapes=[],e.render())}function s(e){return function(t){return!e(t)}}function l(e,t){var n=e.current.brush,r=function(e){return e.brush===n&&e.orig===t&&!e.dest},o=e.shapes.filter(r).length>0;o?e.shapes=e.shapes.filter(s(r)):e.shapes.push({brush:n,orig:t})}function d(e,t,n){var r=e.current.brush,o=function(e){return e.orig&&e.dest&&(e.orig===t&&e.dest===n||e.dest===t&&e.orig===n)},a=e.shapes.filter(o).length>0;a?e.shapes=e.shapes.filter(s(o)):e.shapes.push({brush:r,orig:t,dest:n})}var f=e("./board"),p=e("./util"),h=["green","red","blue","yellow"];t.exports={start:r,move:a,end:i,cancel:u,clear:c,processDraw:o}},{"./board":6,"./util":16}],12:[function(e,t,n){function r(e){"start"===e&&(e=i);var t={};return e.replace(/ .+$/,"").replace(/~/g,"").split("/").forEach(function(e,n){var r=0;e.split("").forEach(function(e){var o=parseInt(e);o?r+=o:(r++,t[a.pos2key([r,8-n])]={role:u[e.toLowerCase()],color:e===e.toLowerCase()?"black":"white"})})}),t}function o(e){return[8,7,6,5,4,3,2].reduce(function(e,t){return e.replace(new RegExp(Array(t+1).join("1"),"g"),t)},a.invRanks.map(function(t){return a.ranks.map(function(n){var r=e[a.pos2key([n,t])];if(r){var o=c[r.role];return"white"===r.color?o.toUpperCase():o}return"1"}).join("")}).join("/"))}var a=e("./util"),i="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR",u={p:"pawn",r:"rook",n:"knight",b:"bishop",q:"queen",k:"king"},c={pawn:"p",rook:"r",knight:"n",bishop:"b",queen:"q",king:"k"};t.exports={initial:i,read:r,write:o}},{"./util":16}],13:[function(e,t,n){var r,o=function(){r=new Date},a=function(){r=null},i=function(){if(!r)return 0;var e=new Date-r;return r=null,e};t.exports={start:o,cancel:a,stop:i}},{}],14:[function(e,t,n){function r(e,t){return Math.abs(e-t)}function o(e,t,n,o,a){return r(t,o)<2&&("white"===e?a===n+1||2>=n&&a===n+2&&t===o:a===n-1||n>=7&&a===n-2&&t===o)}function a(e,t,n,o){var a=r(e,n),i=r(t,o);return 1===a&&2===i||2===a&&1===i}function i(e,t,n,o){return r(e,n)===r(t,o)}function u(e,t,n,r){return e===n||t===r}function c(e,t,n,r){return i(e,t,n,r)||u(e,t,n,r)}function s(e,t,n,o,a,i,u){return r(o,i)<2&&r(a,u)<2||n&&a===u&&a===("white"===e?1:8)&&(5===o&&(3===i||7===i)||f.containsX(t,i))}function l(e,t){return Object.keys(e).filter(function(n){var r=e[n];return r&&r.color===t&&"rook"===r.role}).map(function(e){return f.key2pos(e)[0]})}function d(e,t,n){var r,d=e[t],p=f.key2pos(t);switch(d.role){case"pawn":r=o.bind(null,d.color);break;case"knight":r=a;break;case"bishop":r=i;break;case"rook":r=u;break;case"queen":r=c;break;case"king":r=s.bind(null,d.color,l(e,d.color),n)}return f.allPos.filter(function(e){return(p[0]!==e[0]||p[1]!==e[1])&&r(p[0],p[1],e[0],e[1])}).map(f.pos2key)}var f=e("./util");t.exports=d},{"./util":16}],15:[function(e,t,n){function r(e,t){return(e?2:4)/512*t.width}function o(e,t,n){return(e.lineWidth||10)*(t?.7:1)/512*n.width}function a(e,t){return(e.opacity||1)*(t?.6:1)}function i(e,t){return(e?12:24)/512*t.width}function u(e,t){var n=t.width/8;return[(e[0]-.5)*n,(8.5-e[1])*n]}function c(e,t,n,o){var i=u(t,o),c=r(n,o),s=o.width/16;return{tag:"circle",attrs:{key:n?"current":t+e.key,stroke:e.color,"stroke-width":c,fill:"none",opacity:a(e,n),cx:i[0],cy:i[1],r:s-c/2-e.circleMargin*c*1.5}}}function s(e,t,n,r,c){var s=i(r,c),l=u(t,c),d=u(n,c),f=d[0]-l[0],p=d[1]-l[1],h=Math.atan2(p,f),v=Math.cos(h)*s,g=Math.sin(h)*s;return{tag:"line",attrs:{key:r?"current":t+n+e.key,stroke:e.color,"stroke-width":o(e,r,c),"stroke-linecap":"round","marker-end":"url(#arrowhead-"+e.key+")",opacity:a(e,r),x1:l[0],y1:l[1],x2:d[0]-v,y2:d[1]-g}}}function l(e){return{tag:"defs",children:[e.map(function(e){return{key:e.key,tag:"marker",attrs:{id:"arrowhead-"+e.key,orient:"auto",markerWidth:4,markerHeight:8,refX:2.05,refY:2.01},children:[{tag:"path",attrs:{d:"M0,0 V4 L3,2 Z",fill:e.color}}]}})]}}function d(e,t){return"white"===t?e:[9-e[0],9-e[1]]}function f(e,t,n,r){return function(o){return o.orig&&o.dest?s(n[o.brush],d(p(o.orig),e),d(p(o.dest),e),t,r):o.orig?c(n[o.brush],d(p(o.orig),e),t,r):void 0}}var p=(e("mithril"),e("./util").key2pos);t.exports=function(e){if(e.data.bounds){var t=e.data.bounds();if(t.width===t.height){var n=e.data.drawable,r=n.shapes.concat(n.autoShapes);if(r.length||n.current.orig){var o=Object.keys(e.data.drawable.brushes).filter(function(e){return n.current&&n.current.dest&&n.current.brush===e||r.filter(function(t){return t.dest&&t.brush===e}).length}).map(function(t){return e.data.drawable.brushes[t]});return{tag:"svg",children:[l(o),r.map(f(e.data.orientation,!1,e.data.drawable.brushes,t)),f(e.data.orientation,!0,e.data.drawable.brushes,t)(n.current)]}}}}}},{"./util":16,mithril:3}],16:[function(e,t,n){function r(e){return w[e[0]-1]+e[1]}function o(e){return[w.indexOf(e[0])+1,parseInt(e[1])]}function a(e){return w[7-w.indexOf(e[0])]+(9-parseInt(e[1]))}function i(e){var t=[];for(var n in e)e[n]&&t.push(n);return t.join(" ")}function u(e){return"white"===e?"black":"white"}function c(e,t){return e&&(e[0]===t||e[1]===t)}function s(e,t){return e&&-1!==e.indexOf(t)}function l(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function d(){return"transform"in document.body.style?"transform":"webkitTransform"in document.body.style?"webkitTransform":"mozTransform"in document.body.style?"mozTransform":"oTransform"in document.body.style?"oTransform":"msTransform"}function f(){return y||(y=d()),y}function p(e){return"translate("+e[0]+"px,"+e[1]+"px)"}function h(e){return e.touches?[e.targetTouches[0].clientX,e.targetTouches[0].clientY]:[e.clientX,e.clientY]}function v(e,t){return e.bind.apply(e,[null].concat(t))}function g(){return v(arguments[0],Array.prototype.slice.call(arguments,1))}function m(e){return 2===e.buttons||2===e.button}function b(e){var t,n=function(){return void 0===t&&(t=e()),t};return n.clear=function(){t=void 0},n}var y,w="abcdefgh".split(""),k=[1,2,3,4,5,6,7,8],x=[8,7,6,5,4,3,2,1],E=function(){var e=[];return x.forEach(function(t){k.forEach(function(n){e.push([n,t])})}),e}(),C=E.slice().reverse(),P=E.map(r);t.exports={files:w,ranks:k,invRanks:x,allPos:E,invPos:C,allKeys:P,pos2key:r,key2pos:o,invertKey:a,classSet:i,opposite:u,translate:p,contains2:c,containsX:s,distance:l,eventPosition:h,partialApply:v,partial:g,transformProp:f,requestAnimationFrame:(window.requestAnimationFrame||window.setTimeout).bind(window),isRightButton:m,memo:b}},{}],17:[function(e,t,n){function r(e){return e.role+" "+e.color}function o(e,t,n){var o={style:{},"class":r(n)},a=e.data.draggable.current;if(a.orig===t&&a.started)o.style[g.transformProp()]=g.translate([a.pos[0]+a.dec[0],a.pos[1]+a.dec[1]]),o["class"]+=" dragging";else if(e.data.animation.current.anims){var i=e.data.animation.current.anims[t];i&&(o.style[g.transformProp()]=g.translate(i[1]))}return{tag:"piece",attrs:o}}function a(e){return{tag:"piece",attrs:{"class":r(e)+" ghost"}}}function i(e,t,n){var r=e.data,i=g.files[t[0]-1],u=t[1],c=i+u,s=r.pieces[c],l=r.highlight.dragOver&&r.draggable.current.over===c,d=g.classSet({selected:r.selected===c,check:r.highlight.check&&r.check===c,"last-move":r.highlight.lastMove&&g.contains2(r.lastMove,c),"move-dest":(l||r.movable.showDests)&&g.containsX(r.movable.dests[r.selected],c),"premove-dest":(l||r.premovable.showDests)&&g.containsX(r.premovable.dests,c),"current-premove":g.contains2(r.premovable.current,c),"drag-over":l,oc:!!s,exploding:e.vm.exploding&&-1!==e.vm.exploding.indexOf(c)}),f={style:{left:12.5*(n?t[0]-1:8-t[0])+"%",bottom:12.5*(n?t[1]-1:8-t[1])+"%"}};d&&(f["class"]=d),r.coordinates&&(t[1]===(n?1:8)&&(f["data-coord-x"]=i),t[0]===(n?8:1)&&(f["data-coord-y"]=u));var p=[];return s&&(p.push(o(e,c,s)),r.draggable.current.orig===c&&r.draggable.showGhost&&!r.draggable.current.newPiece&&p.push(a(s))),{tag:"square",attrs:f,children:p}}function u(e,t){var n=g.key2pos(t.over),r="white"===e.data.orientation?n[0]:9-n[0],o="white"===e.data.orientation?n[1]:9-n[1];return{tag:"div",attrs:{id:"cg-square-target",style:{width:t.bounds.width/4+"px",height:t.bounds.height/4+"px",left:(r-1.5)*t.bounds.width/8+"px",top:(7.5-o)*t.bounds.height/8+"px"}}}}function c(e){return{tag:"square",attrs:{"class":"fading",style:{left:e.left,bottom:e.bottom,opacity:e.opacity}},children:[{tag:"piece",attrs:{"class":r(e.piece)}}]}}function s(e,t){var n=[];e.data.lastMove&&e.data.lastMove.forEach(function(e){var r=g.key2pos(e);n.push({tag:"square",attrs:{"class":"last-move",style:{left:12.5*(t?r[0]-1:8-r[0])+"%",bottom:12.5*(t?r[1]-1:8-r[1])+"%"}}})});for(var o=Object.keys(e.data.pieces),a=0,i=o.length;i>a;a++){var u=o[a],c=g.key2pos(u),s={style:{left:12.5*(t?c[0]-1:8-c[0])+"%",bottom:12.5*(t?c[1]-1:8-c[1])+"%"},"class":r(e.data.pieces[u])};if(e.data.animation.current.anims){var l=e.data.animation.current.anims[u];l&&(s.style[g.transformProp()]=g.translate(l[1]))}n.push({tag:"piece",attrs:s})}return n}function l(e){var t="white"===e.data.orientation;if(e.data.minimalDom)return s(e,t);for(var n=t?g.allPos:g.invPos,r=[],o=0,a=n.length;a>o;o++)r.push(i(e,n[o],t));return e.data.draggable.current.over&&e.data.draggable.squareTarget&&r.push(u(e,e.data.draggable.current)),e.data.animation.current.fadings&&e.data.animation.current.fadings.forEach(function(e){r.push(c(e))}),e.data.drawable.enabled&&r.push(m(e)),r}function d(e,t,n){return function(r){g.isRightButton(r)&&e.draggable.current.orig?(e.draggable.current.newPiece&&delete e.pieces[e.draggable.current.orig],e.draggable.current={},e.selected=null):e.drawable.enabled&&(r.shiftKey||g.isRightButton(r))?n(e,r):e.viewOnly||t(e,r)}}function f(e,t,n){var r=e.data,o=d(r,h.start,v.start),a=d(r,h.move,v.move),i=d(r,h.end,v.end),u=g.partial(v.clear,r),c=["touchstart","mousedown"],s=["touchmove","mousemove"],l=["touchend","mouseup"];c.forEach(function(e){t.addEventListener(e,o)}),s.forEach(function(e){document.addEventListener(e,a)}),l.forEach(function(e){document.addEventListener(e,i)}),t.addEventListener("mousedown",u),n.onunload=function(){c.forEach(function(e){t.removeEventListener(e,o)}),s.forEach(function(e){document.removeEventListener(e,a)}),l.forEach(function(e){document.removeEventListener(e,i)}),t.removeEventListener("mousedown",u)}}function p(e){return{tag:"div",attrs:{"class":"cg-board orientation-"+e.data.orientation,config:function(t,n,r){n||((!e.data.viewOnly||e.data.drawable.enabled)&&f(e,t,r),e.data.render=function(){b.render(t,l(e))},e.data.renderRAF=function(){g.requestAnimationFrame(e.data.render)},e.data.bounds=g.memo(t.getBoundingClientRect.bind(t)),e.data.element=t,e.data.render())}},children:[]}}var h=e("./drag"),v=e("./draw"),g=e("./util"),m=e("./svg"),b=e("mithril");t.exports=function(e){return{tag:"div",attrs:{config:function(t,n){n||(t.addEventListener("contextmenu",function(t){return e.data.disableContextMenu||e.data.drawable.enabled?(t.preventDefault(),!1):void 0}),e.data.resizable&&document.body.addEventListener("chessground.resize",function(t){e.data.bounds.clear(),e.data.render()},!1),["onscroll","onresize"].forEach(function(t){var n=window[t];window[t]=function(){n&&n(),e.data.bounds.clear()}}))},"class":["cg-board-wrap",e.data.viewOnly?"view-only":"manipulable",e.data.minimalDom?"minimal-dom":"full-dom"].join(" ")},children:[p(e)]}}},{"./drag":10,"./draw":11,"./svg":15,"./util":16,mithril:3}]},{},[1])(1)}); \ No newline at end of file diff --git a/ui/analyse/package.json b/ui/analyse/package.json index 2bce63652d..f49c607663 100644 --- a/ui/analyse/package.json +++ b/ui/analyse/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "game": "file:../game", "mithril": "github:ornicar/mithril.js#v1.0.0" } diff --git a/ui/editor/package.json b/ui/editor/package.json index 366e4ff489..d14a5f0a53 100644 --- a/ui/editor/package.json +++ b/ui/editor/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "lodash": "~3.7.0", "mithril": "github:ornicar/mithril.js#v1.0.0" } diff --git a/ui/lobby/package.json b/ui/lobby/package.json index 6686532f71..d0e8b77452 100644 --- a/ui/lobby/package.json +++ b/ui/lobby/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "mithril": "github:ornicar/mithril.js#v1.0.0" } } diff --git a/ui/opening/package.json b/ui/opening/package.json index 7df28a5e1d..eb58ba8b5c 100644 --- a/ui/opening/package.json +++ b/ui/opening/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "chessli.js": "file:../chessli", "lodash": "~3.7.0", "merge": "~1.2.0", diff --git a/ui/puzzle/package.json b/ui/puzzle/package.json index 96d63870dc..6110c32ffd 100644 --- a/ui/puzzle/package.json +++ b/ui/puzzle/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "chessli.js": "file:../chessli", "lodash": "~3.7.0", "merge": "~1.2.0", diff --git a/ui/round/package.json b/ui/round/package.json index cc5f0124cc..42734fb3da 100644 --- a/ui/round/package.json +++ b/ui/round/package.json @@ -29,7 +29,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "game": "file:../game", "mithril": "github:ornicar/mithril.js#v1.0.0" } diff --git a/ui/simul/package.json b/ui/simul/package.json index 96a1c50935..97de44b469 100644 --- a/ui/simul/package.json +++ b/ui/simul/package.json @@ -28,7 +28,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "game": "file:../game", "lodash": "~3.7.0", "mithril": "github:ornicar/mithril.js#v1.0.0" diff --git a/ui/tournament/package.json b/ui/tournament/package.json index 67b511d97e..8f9e2b185c 100644 --- a/ui/tournament/package.json +++ b/ui/tournament/package.json @@ -28,7 +28,7 @@ "watchify": "~3.1.1" }, "dependencies": { - "chessground": "github:ornicar/chessground#v3.3.3", + "chessground": "github:ornicar/chessground#v3.3.4", "game": "file:../game", "lodash": "~3.7.0", "mithril": "github:ornicar/mithril.js#v1.0.0"