!function(a){"function"==typeof define&&define.amd?define([],a):"undefined"!=typeof module&&null!==module&&module.exports?module.exports=a:a()}(function(){function a(a){return new CustomEvent(a,Q)}function b(a){return a[R]||(a[R]={})}function c(a,c,d,e,f){function g(a){d(a,e)}c=c.split(P);for(var h,i,j=b(a),k=c.length;k--;)i=c[k],h=j[i]||(j[i]=[]),h.push([d,g]),a.addEventListener(i,g)}function d(a,c,d,e){c=c.split(P);var f,g,h,i=b(a),j=c.length;if(i)for(;j--;)if(f=c[j],g=i[f])for(h=g.length;h--;)g[h][0]===d&&(a.removeEventListener(f,g[h][1]),g.splice(h,1))}function e(b,c,d){var e=a(c);d&&J(e,d),b.dispatchEvent(e)}function f(a){function b(a){d?(c(),L(b),e=!0,d=!1):e=!1}var c=a,d=!1,e=!1;this.kick=function(a){d=!0,e||b()},this.end=function(a){var b=c;a&&(e?(c=d?function(){b(),a()}:a,d=!0):a())}}function g(){}function h(a){a.preventDefault()}function i(a){return!!M[a.target.tagName.toLowerCase()]}function j(a){return 1===a.which&&!a.ctrlKey&&!a.altKey}function k(a,b){var c,d;if(a.identifiedTouch)return a.identifiedTouch(b);for(c=-1,d=a.length;++c