OwlCyberSecurity - MANAGER
Edit File: app.73d0c4dd.js
(function(t){function e(e){for(var n,a,o=e[0],l=e[1],c=e[2],u=0,d=[];u<o.length;u++)a=o[u],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&d.push(r[a][0]),r[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(t[n]=l[n]);h&&h(e);while(d.length)d.shift()();return s.push.apply(s,c||[]),i()}function i(){for(var t,e=0;e<s.length;e++){for(var i=s[e],n=!0,o=1;o<i.length;o++){var l=i[o];0!==r[l]&&(n=!1)}n&&(s.splice(e--,1),t=a(a.s=i[0]))}return t}var n={},r={app:0},s=[];function a(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=t,a.c=n,a.d=function(t,e,i){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(i,n,function(e){return t[e]}.bind(null,n));return i},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=e,o=o.slice();for(var c=0;c<o.length;c++)e(o[c]);var h=l;s.push([0,"chunk-vendors"]),i()})({0:function(t,e,i){t.exports=i("56d7")},"01ac":function(t,e,i){},"034f":function(t,e,i){"use strict";var n=i("27fb"),r=i.n(n);r.a},"03ff":function(t,e,i){"use strict";(function(t,n){i("3b2b"),i("a481"),i("386d"),i("b54a"),i("ac6a"),i("4917"),i("28a5"),i("7f7f"),i("6b54");var r=i("7618"),a=function(){this.createjs=this.createjs||{},function(){var t=o.PreloadJS=o.PreloadJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:47 GMT"}(),this.createjs=this.createjs||{},o.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},o.promote=function(t,e){var i=t.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(n)for(var r in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(r)&&"function"==typeof n[r]&&(i[e+r]=n[r]);return t},this.createjs=this.createjs||{},o.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){o.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}}}(),this.createjs=this.createjs||{},o.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},o.Event=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}var e=o.extend(t,o.Event);e.clone=function(){return new o.ErrorEvent(this.title,this.message,this.data)},o.ErrorEvent=o.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]==e){1==a?delete n[t]:r.splice(s,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new o.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(c){}if(t.bubbles&&this.parent){var r=this,s=[r];while(r.parent)s.push(r=r.parent);var a,l=s.length;for(a=l-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a<l&&!t.propagationStopped;a++)s[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!t.immediatePropagationStopped;s++){var a=n[s];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}2===e&&this._dispatchEvent(t,2.1)},o.EventDispatcher=t}(),this.createjs=this.createjs||{},function(t){function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}var i=o.extend(e,o.Event);i.clone=function(){return new o.ProgressEvent(this.loaded,this.total)},o.ProgressEvent=o.promote(e,"Event")}(window),function(){var e="function"===typeof define&&i("3c35"),s={function:!0,object:!0},a=s["undefined"===typeof exports?"undefined":Object(r["a"])(exports)]&&exports&&!exports.nodeType&&exports,o=s["undefined"===typeof window?"undefined":Object(r["a"])(window)]&&window||this,l=a&&s[Object(r["a"])(t)]&&t&&!t.nodeType&&"object"==("undefined"===typeof n?"undefined":Object(r["a"])(n))&&n;function c(t,e){t||(t=o["Object"]()),e||(e=o["Object"]());var i=t["Number"]||o["Number"],n=t["String"]||o["String"],a=t["Object"]||o["Object"],l=t["Date"]||o["Date"],h=t["SyntaxError"]||o["SyntaxError"],u=t["TypeError"]||o["TypeError"],d=t["Math"]||o["Math"],f=t["JSON"]||o["JSON"];"object"==a(r["a"])(f)&&f&&(e.stringify=f.stringify,e.parse=f.parse);var p,m,_,v=a.prototype,g=v.toString,b=new l(-0xc782b5b800cec);try{b=-109252==b.getUTCFullYear()&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(W){}function y(t){if(y[t]!==_)return y[t];var r;if("bug-string-char-index"==t)r="a"!="a"[0];else if("json"==t)r=y("json-stringify")&&y("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var o=e.stringify,c="function"==typeof o&&b;if(c){(s=function(){return 1}).toJSON=s;try{c="0"===o(0)&&"0"===o(new i)&&'""'==o(new n)&&o(g)===_&&o(_)===_&&o()===_&&"1"===o(s)&&"[1]"==o([s])&&"[null]"==o([_])&&"null"==o(null)&&"[null,null,null]"==o([_,g,null])&&o({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===o(null,s)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new l(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new l(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new l(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new l(-1))}catch(W){c=!1}}r=c}if("json-parse"==t){var h=e.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){s=h(a);var u=5==s["a"].length&&1===s["a"][0];if(u){try{u=!h('"\t"')}catch(W){}if(u)try{u=1!==h("01")}catch(W){}if(u)try{u=1!==h("1.")}catch(W){}}}}catch(W){u=!1}r=u}}return y[t]=!!r}if(!y("json")){var w="[object Function]",x="[object Date]",E="[object Number]",C="[object String]",S="[object Array]",T="[object Boolean]",R=y("bug-string-char-index");if(!b)var L=d.floor,k=[0,31,59,90,120,151,181,212,243,273,304,334],O=function(t,e){return k[e]+365*(t-1970)+L((t-1969+(e=+(e>1)))/4)-L((t-1901+e)/100)+L((t-1601+e)/400)};if((p=v.hasOwnProperty)||(p=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=g?p=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,p=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,p.call(this,t)}),m=function(t,e){var i,n,o,l=0;for(o in(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i,n)p.call(n,o)&&l++;return i=n=null,l?m=2==l?function(t,e){var i,n={},r=g.call(t)==w;for(i in t)r&&"prototype"==i||p.call(n,i)||!(n[i]=1)||!p.call(t,i)||e(i)}:function(t,e){var i,n,r=g.call(t)==w;for(i in t)r&&"prototype"==i||!p.call(t,i)||(n="constructor"===i)||e(i);(n||p.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var i,o,l=g.call(t)==w,c=!l&&"function"!=typeof t.constructor&&s[a(r["a"])(t.hasOwnProperty)]&&t.hasOwnProperty||p;for(i in t)l&&"prototype"==i||!c.call(t,i)||e(i);for(o=n.length;i=n[--o];c.call(t,i)&&e(i));}),m(t,e)},!y("json-stringify")){var I={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",D=function(t,e){return(A+(e||0)).slice(-t)},P="\\u00",M=function(t){for(var e='"',i=0,n=t.length,r=!R||n>10,s=r&&(R?t.split(""):t);i<n;i++){var a=t.charCodeAt(i);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=I[a];break;default:if(a<32){e+=P+D(2,a.toString(16));break}e+=r?s[i]:t.charAt(i)}}return e+'"'},j=function t(e,i,n,s,o,l,c){var h,d,f,v,b,y,w,R,k,I,A,P,j,B,F,U;try{h=i[e]}catch(W){}if("object"==a(r["a"])(h)&&h)if(d=g.call(h),d!=x||p.call(h,"toJSON"))"function"==typeof h.toJSON&&(d!=E&&d!=C&&d!=S||p.call(h,"toJSON"))&&(h=h.toJSON(e));else if(h>-1/0&&h<1/0){if(O){for(b=L(h/864e5),f=L(b/365.2425)+1970-1;O(f+1,0)<=b;f++);for(v=L((b-O(f,0))/30.42);O(f,v+1)<=b;v++);b=1+b-O(f,v),y=(h%864e5+864e5)%864e5,w=L(y/36e5)%24,R=L(y/6e4)%60,k=L(y/1e3)%60,I=y%1e3}else f=h.getUTCFullYear(),v=h.getUTCMonth(),b=h.getUTCDate(),w=h.getUTCHours(),R=h.getUTCMinutes(),k=h.getUTCSeconds(),I=h.getUTCMilliseconds();h=(f<=0||f>=1e4?(f<0?"-":"+")+D(6,f<0?-f:f):D(4,f))+"-"+D(2,v+1)+"-"+D(2,b)+"T"+D(2,w)+":"+D(2,R)+":"+D(2,k)+"."+D(3,I)+"Z"}else h=null;if(n&&(h=n.call(i,e,h)),null===h)return"null";if(d=g.call(h),d==T)return""+h;if(d==E)return h>-1/0&&h<1/0?""+h:"null";if(d==C)return M(""+h);if("object"==a(r["a"])(h)){for(B=c.length;B--;)if(c[B]===h)throw u();if(c.push(h),A=[],F=l,l+=o,d==S){for(j=0,B=h.length;j<B;j++)P=t(j,h,n,s,o,l,c),A.push(P===_?"null":P);U=A.length?o?"[\n"+l+A.join(",\n"+l)+"\n"+F+"]":"["+A.join(",")+"]":"[]"}else m(s||h,(function(e){var i=t(e,h,n,s,o,l,c);i!==_&&A.push(M(e)+":"+(o?" ":"")+i)})),U=A.length?o?"{\n"+l+A.join(",\n"+l)+"\n"+F+"}":"{"+A.join(",")+"}":"{}";return c.pop(),U}};e.stringify=function(t,e,i){var n,o,l,c;if(s[a(r["a"])(e)]&&e)if((c=g.call(e))==w)o=e;else if(c==S){l={};for(var h,u=0,d=e.length;u<d;h=e[u++],c=g.call(h),(c==C||c==E)&&(l[h]=1));}if(i)if((c=g.call(i))==E){if((i-=i%1)>0)for(n="",i>10&&(i=10);n.length<i;n+=" ");}else c==C&&(n=i.length<=10?i:i.slice(0,10));return j("",(h={},h[""]=t,h),o,l,n,"",[])}}if(!y("json-parse")){var B,F,U=n.fromCharCode,N={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},G=function(){throw B=F=null,h()},X=function(){var t,e,i,n,r,s=F,a=s.length;while(B<a)switch(r=s.charCodeAt(B),r){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=R?s.charAt(B):s[B],B++,t;case 34:for(t="@",B++;B<a;)if(r=s.charCodeAt(B),r<32)G();else if(92==r)switch(r=s.charCodeAt(++B),r){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=N[r],B++;break;case 117:for(e=++B,i=B+4;B<i;B++)r=s.charCodeAt(B),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||G();t+=U("0x"+s.slice(e,B));break;default:G()}else{if(34==r)break;r=s.charCodeAt(B),e=B;while(r>=32&&92!=r&&34!=r)r=s.charCodeAt(++B);t+=s.slice(e,B)}if(34==s.charCodeAt(B))return B++,t;G();default:if(e=B,45==r&&(n=!0,r=s.charCodeAt(++B)),r>=48&&r<=57){for(48==r&&(r=s.charCodeAt(B+1),r>=48&&r<=57)&&G(),n=!1;B<a&&(r=s.charCodeAt(B),r>=48&&r<=57);B++);if(46==s.charCodeAt(B)){for(i=++B;i<a&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&G(),B=i}if(r=s.charCodeAt(B),101==r||69==r){for(r=s.charCodeAt(++B),43!=r&&45!=r||B++,i=B;i<a&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&G(),B=i}return+s.slice(e,B)}if(n&&G(),"true"==s.slice(B,B+4))return B+=4,!0;if("false"==s.slice(B,B+5))return B+=5,!1;if("null"==s.slice(B,B+4))return B+=4,null;G()}return"$"},H=function t(e){var i,n;if("$"==e&&G(),"string"==typeof e){if("@"==(R?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(i=[];;n||(n=!0)){if(e=X(),"]"==e)break;n&&(","==e?(e=X(),"]"==e&&G()):G()),","==e&&G(),i.push(t(e))}return i}if("{"==e){for(i={};;n||(n=!0)){if(e=X(),"}"==e)break;n&&(","==e?(e=X(),"}"==e&&G()):G()),","!=e&&"string"==typeof e&&"@"==(R?e.charAt(0):e[0])&&":"==X()||G(),i[e.slice(1)]=t(X())}return i}G()}return e},Y=function(t,e,i){var n=V(t,e,i);n===_?delete t[e]:t[e]=n},V=function(t,e,i){var n,s=t[e];if("object"==a(r["a"])(s)&&s)if(g.call(s)==S)for(n=s.length;n--;)Y(s,n,i);else m(s,(function(t){Y(s,t,i)}));return i.call(t,e,s)};e.parse=function(t,e){var i,n;return B=0,F=""+t,i=H(X()),"$"!=X()&&G(),B=F=null,e&&g.call(e)==w?V((n={},n[""]=i,n),"",e):i}}}return e["runInContext"]=c,e}if(!l||l["global"]!==l&&l["window"]!==l&&l["self"]!==l||(o=l),a&&!e)c(o,a);else{var h=o.JSON,u=o["JSON3"],d=!1,f=c(o,o["JSON3"]={noConflict:function(){return d||(d=!0,o.JSON=h,o["JSON3"]=u,h=u=null),f}});o.JSON={parse:f.parse,stringify:f.stringify}}e&&define((function(){return f}))}.call(this),function(){var t={a:function(){return t.el("a")},svg:function(){return t.el("svg")},object:function(){return t.el("object")},image:function(){return t.el("image")},img:function(){return t.el("img")},style:function(){return t.el("style")},link:function(){return t.el("link")},script:function(){return t.el("script")},audio:function(){return t.el("audio")},video:function(){return t.el("video")},text:function(t){return document.createTextNode(t)},el:function(t){return document.createElement(t)}};o.Elements=t}(),function(){var t={ABSOLUTE_PATT:/^(?:\w+:)?\/{2}/i,RELATIVE_PATT:/^[./]*?\//i,EXTENSION_PATT:/\/?[^/]+\.(\w{1,5})$/i,parseURI:function(e){var i={absolute:!1,relative:!1,protocol:null,hostname:null,port:null,pathname:null,search:null,hash:null,host:null};if(null==e)return i;var n=o.Elements.a();for(var r in n.href=e,i)r in n&&(i[r]=n[r]);var s,a=e.indexOf("?");return a>-1&&(e=e.substr(0,a)),t.ABSOLUTE_PATT.test(e)?i.absolute=!0:t.RELATIVE_PATT.test(e)&&(i.relative=!0),(s=e.match(t.EXTENSION_PATT))&&(i.extension=s[1].toLowerCase()),i},formatQueryString:function(t,e){if(null==t)throw new Error("You must specify data.");var i=[];for(var n in t)i.push(n+"="+escape(t[n]));return e&&(i=i.concat(e)),i.join("&")},buildURI:function(t,e){if(null==e)return t;var i=[],n=t.indexOf("?");if(-1!=n){var r=t.slice(n+1);i=i.concat(r.split("&"))}return-1!=n?t.slice(0,n)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},isCrossDomain:function(t){var e=o.Elements.a();e.href=t.src;var i=o.Elements.a();i.href=location.href;var n=""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname);return n},isLocal:function(t){var e=o.Elements.a();return e.href=t.src,""==e.hostname&&"file:"==e.protocol}};o.URLUtils=t}(),function(){var t={container:null,appendToHead:function(e){t.getHead().appendChild(e)},appendToBody:function(e){if(null==t.container){t.container=document.createElement("div"),t.container.id="preloadjs-container";var i=t.container.style;i.visibility="hidden",i.position="absolute",i.width=t.container.style.height="10px",i.overflow="hidden",i.transform=i.msTransform=i.webkitTransform=i.oTransform="translate(-10px, -10px)",t.getBody().appendChild(t.container)}t.container.appendChild(e)},getHead:function(){return document.head||document.getElementsByTagName("head")[0]},getBody:function(){return document.body||document.getElementsByTagName("body")[0]},removeChild:function(t){t.parent&&t.parent.removeChild(t)},isImageTag:function(t){return t instanceof HTMLImageElement},isAudioTag:function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},isVideoTag:function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement}};o.DomUtils=t}(),function(){var t={parseXML:function(t){var e=null;try{if(window.DOMParser){var i=new DOMParser;e=i.parseFromString(t,"text/xml")}}catch(n){}if(!e)try{e=new ActiveXObject("Microsoft.XMLDOM"),e.async=!1,e.loadXML(t)}catch(n){e=null}return e},parseJSON:function(t){if(null==t)return null;try{return JSON.parse(t)}catch(e){throw e}}};o.DataUtils=t}(),this.createjs=this.createjs||{},function(){var t={BINARY:"binary",CSS:"css",FONT:"font",FONTCSS:"fontcss",IMAGE:"image",JAVASCRIPT:"javascript",JSON:"json",JSONP:"jsonp",MANIFEST:"manifest",SOUND:"sound",VIDEO:"video",SPRITESHEET:"spritesheet",SVG:"svg",TEXT:"text",XML:"xml"};o.Types=t}(),this.createjs=this.createjs||{},function(){var t={POST:"POST",GET:"GET"};o.Methods=t}(),this.createjs=this.createjs||{},function(){function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=o.Methods.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var n=new t;return n.src=e,n}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw new Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},o.LoadItem=i}(),function(){var t={isBinary:function(t){switch(t){case o.Types.IMAGE:case o.Types.BINARY:return!0;default:return!1}},isText:function(t){switch(t){case o.Types.TEXT:case o.Types.JSON:case o.Types.MANIFEST:case o.Types.XML:case o.Types.CSS:case o.Types.SVG:case o.Types.JAVASCRIPT:case o.Types.SPRITESHEET:return!0;default:return!1}},getTypeByExtension:function(t){if(null==t)return o.Types.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return o.Types.IMAGE;case"ogg":case"mp3":case"webm":return o.Types.SOUND;case"mp4":case"webm":case"ts":return o.Types.VIDEO;case"json":return o.Types.JSON;case"xml":return o.Types.XML;case"css":return o.Types.CSS;case"js":return o.Types.JAVASCRIPT;case"svg":return o.Types.SVG;default:return o.Types.TEXT}}};o.RequestUtils=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,this._item=t?o.LoadItem.create(t):null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=o.extend(t,o.EventDispatcher),i=t;try{Object.defineProperties(i,{POST:{get:o.deprecate((function(){return o.Methods.POST}),"AbstractLoader.POST")},GET:{get:o.deprecate((function(){return o.Methods.GET}),"AbstractLoader.GET")},BINARY:{get:o.deprecate((function(){return o.Types.BINARY}),"AbstractLoader.BINARY")},CSS:{get:o.deprecate((function(){return o.Types.CSS}),"AbstractLoader.CSS")},FONT:{get:o.deprecate((function(){return o.Types.FONT}),"AbstractLoader.FONT")},FONTCSS:{get:o.deprecate((function(){return o.Types.FONTCSS}),"AbstractLoader.FONTCSS")},IMAGE:{get:o.deprecate((function(){return o.Types.IMAGE}),"AbstractLoader.IMAGE")},JAVASCRIPT:{get:o.deprecate((function(){return o.Types.JAVASCRIPT}),"AbstractLoader.JAVASCRIPT")},JSON:{get:o.deprecate((function(){return o.Types.JSON}),"AbstractLoader.JSON")},JSONP:{get:o.deprecate((function(){return o.Types.JSONP}),"AbstractLoader.JSONP")},MANIFEST:{get:o.deprecate((function(){return o.Types.MANIFEST}),"AbstractLoader.MANIFEST")},SOUND:{get:o.deprecate((function(){return o.Types.SOUND}),"AbstractLoader.SOUND")},VIDEO:{get:o.deprecate((function(){return o.Types.VIDEO}),"AbstractLoader.VIDEO")},SPRITESHEET:{get:o.deprecate((function(){return o.Types.SPRITESHEET}),"AbstractLoader.SPRITESHEET")},SVG:{get:o.deprecate((function(){return o.Types.SVG}),"AbstractLoader.SVG")},TEXT:{get:o.deprecate((function(){return o.Types.TEXT}),"AbstractLoader.TEXT")},XML:{get:o.deprecate((function(){return o.Types.XML}),"AbstractLoader.XML")}})}catch(n){}e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var t=new o.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new o.XHRRequest(this._item):this._request=new o.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new o.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new o.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new o.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,o.proxy(this._resultFormatSuccess,this),o.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new o.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"));break}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.toString=function(){return"[PreloadJS AbstractLoader]"},o.AbstractLoader=o.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=o.extend(t,o.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new o.XHRRequest(this._item):this._request=new o.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},o.AbstractMediaLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=function(t){this._item=t},e=o.extend(t,o.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},o.AbstractRequest=o.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=o.proxy(this._handleTagComplete,this),this._addedToDOM=!1}var e=o.extend(t,o.AbstractRequest);e.load=function(){this._tag.onload=o.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=o.proxy(this._handleReadyStateChange,this),this._tag.onerror=o.proxy(this._handleError,this);var t=new o.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(o.DomUtils.appendToBody(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new o.Event("timeout"))},e._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},e._handleStalled=function(){},o.TagRequest=o.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=o.proxy(this._handleTagComplete,this)}var e=o.extend(t,o.TagRequest);e.load=function(){var t=o.proxy(this._handleStalled,this);this._stalledCallback=t;var e=o.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;"loaded"!=t.readyState&&"complete"!=t.readyState||this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new o.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},o.MediaTagRequest=o.promote(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractRequest_constructor(t),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=o.proxy(this._handleLoadStart,this),this._handleProgressProxy=o.proxy(this._handleProgress,this),this._handleAbortProxy=o.proxy(this._handleAbort,this),this._handleErrorProxy=o.proxy(this._handleError,this),this._handleTimeoutProxy=o.proxy(this._handleTimeout,this),this._handleLoadProxy=o.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=o.proxy(this._handleReadyStateChange,this),this._createXHR(t)}var e=o.extend(t,o.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.load=function(){if(null!=this._request){null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values?this._request.send(o.URLUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new o.ErrorEvent("XHR_SEND",null,t))}}else this._handleError()},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new o.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new o.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new o.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)this._handleError(e);else{if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(n){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===n.name&&window.BlobBuilder){var i=new BlobBuilder;i.append(this._response),this._response=i.getBlob()}}this._clean(),this.dispatchEvent(new o.Event("complete"))}}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new o.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);return t>=400&&t<=599?new Error(t):0==t&&/^https?:/.test(location.protocol)?new Error(0):null},e._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(t){}return null},e._createXHR=function(t){var e=o.URLUtils.isCrossDomain(t),i={},n=null;if(window.XMLHttpRequest)n=new XMLHttpRequest,e&&void 0===n.withCredentials&&window.XDomainRequest&&(n=new XDomainRequest);else{for(var r=0,a=s.ACTIVEX_VERSIONS.length;r<a;r++){var l=s.ACTIVEX_VERSIONS[r];try{n=new ActiveXObject(l);break}catch(u){}}if(null==n)return!1}null==t.mimeType&&o.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&n.overrideMimeType&&n.overrideMimeType(t.mimeType),this._xhrLevel="string"===typeof n.responseType?2:1;var c=null;if(c=t.method==o.Methods.GET?o.URLUtils.buildURI(t.src,t.values):t.src,n.open(t.method||o.Methods.GET,c,!0),e&&n instanceof XMLHttpRequest&&1==this._xhrLevel&&(i["Origin"]=location.origin),t.values&&t.method==o.Methods.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var h in t.headers)i[h]=t.headers[h];for(h in i)n.setRequestHeader(h,i[h]);return n instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(n.withCredentials=t.withCredentials),this._request=n,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},o.XHRRequest=o.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[o.FontLoader,o.ImageLoader,o.JavaScriptLoader,o.CSSLoader,o.JSONLoader,o.JSONPLoader,o.SoundLoader,o.ManifestLoader,o.SpriteSheetLoader,o.XMLLoader,o.SVGLoader,o.BinaryLoader,o.VideoLoader,o.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(t,e,i)}var e=o.extend(t,o.AbstractLoader),i=t;try{Object.defineProperties(i,{POST:{get:o.deprecate((function(){return o.Methods.POST}),"AbstractLoader.POST")},GET:{get:o.deprecate((function(){return o.Methods.GET}),"AbstractLoader.GET")},BINARY:{get:o.deprecate((function(){return o.Types.BINARY}),"AbstractLoader.BINARY")},CSS:{get:o.deprecate((function(){return o.Types.CSS}),"AbstractLoader.CSS")},FONT:{get:o.deprecate((function(){return o.Types.FONT}),"AbstractLoader.FONT")},FONTCSS:{get:o.deprecate((function(){return o.Types.FONTCSS}),"AbstractLoader.FONTCSS")},IMAGE:{get:o.deprecate((function(){return o.Types.IMAGE}),"AbstractLoader.IMAGE")},JAVASCRIPT:{get:o.deprecate((function(){return o.Types.JAVASCRIPT}),"AbstractLoader.JAVASCRIPT")},JSON:{get:o.deprecate((function(){return o.Types.JSON}),"AbstractLoader.JSON")},JSONP:{get:o.deprecate((function(){return o.Types.JSONP}),"AbstractLoader.JSONP")},MANIFEST:{get:o.deprecate((function(){return o.Types.MANIFEST}),"AbstractLoader.MANIFEST")},SOUND:{get:o.deprecate((function(){return o.Types.SOUND}),"AbstractLoader.SOUND")},VIDEO:{get:o.deprecate((function(){return o.Types.VIDEO}),"AbstractLoader.VIDEO")},SPRITESHEET:{get:o.deprecate((function(){return o.Types.SPRITESHEET}),"AbstractLoader.SPRITESHEET")},SVG:{get:o.deprecate((function(){return o.Types.SVG}),"AbstractLoader.SVG")},TEXT:{get:o.deprecate((function(){return o.Types.TEXT}),"AbstractLoader.TEXT")},XML:{get:o.deprecate((function(){return o.Types.XML}),"AbstractLoader.XML")}})}catch(n){}e.init=function(t,e,i){this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(t),this._paused=!1,this._basePath=e,this._crossOrigin=i,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=NaN},e.registerLoader=function(t){if(!t||!t.canLoadItem)throw new Error("loader is of an incorrect type.");if(-1!=this._availableLoaders.indexOf(t))throw new Error("loader already exists.");this._availableLoaders.unshift(t)},e.unregisterLoader=function(t){var e=this._availableLoaders.indexOf(t);-1!=e&&e<this._defaultLoaderLength-1&&this._availableLoaders.splice(e,1)},e.setPreferXHR=function(t){return this.preferXHR=0!=t&&null!=window.XMLHttpRequest,this.preferXHR},e.removeAll=function(){this.remove()},e.remove=function(t){var e=null;if(t&&!Array.isArray(t))e=[t];else if(t)e=t;else if(arguments.length>0)return;var i=!1;if(e){while(e.length){var n=e.pop(),r=this.getResult(n);for(s=this._loadQueue.length-1;s>=0;s--)if(a=this._loadQueue[s].getItem(),a.id==n||a.src==n){this._loadQueue.splice(s,1)[0].cancel();break}for(s=this._loadQueueBackup.length-1;s>=0;s--)if(a=this._loadQueueBackup[s].getItem(),a.id==n||a.src==n){this._loadQueueBackup.splice(s,1)[0].cancel();break}if(r)this._disposeItem(this.getItem(n));else for(var s=this._currentLoads.length-1;s>=0;s--){var a=this._currentLoads[s].getItem();if(a.id==n||a.src==n){this._currentLoads.splice(s,1)[0].cancel(),i=!0;break}}}i&&this._loadNext()}else{for(var o in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[o]);this.init(this.preferXHR,this._basePath)}},e.reset=function(){for(var t in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[t]);for(var e=[],i=0,n=this._loadQueueBackup.length;i<n;i++)e.push(this._loadQueueBackup[i].getItem());this.loadManifest(e,!1)},e.installPlugin=function(t){if(null!=t&&null!=t.getPreloadHandlers){this._plugins.push(t);var e=t.getPreloadHandlers();if(e.scope=t,null!=e.types)for(var i=0,n=e.types.length;i<n;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,n=e.extensions.length;i<n;i++)this._extensionCallbacks[e.extensions[i]]=e}},e.setMaxConnections=function(t){this._maxConnections=t,!this._paused&&this._loadQueue.length>0&&this._loadNext()},e.loadFile=function(t,e,i){if(null!=t)this._addItem(t,null,i),!1!==e?this.setPaused(!1):this.setPaused(!0);else{var n=new o.ErrorEvent("PRELOAD_NO_FILE");this._sendError(n)}},e.loadManifest=function(t,e,n){var s=null,a=null;if(Array.isArray(t)){if(0==t.length){var l=new o.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(l)}s=t}else if("string"===typeof t)s=[{src:t,type:i.MANIFEST}];else{if("object"!=Object(r["a"])(t)){l=new o.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(l)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var l=new o.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(l)}s=[t]}else void 0!==t.manifest&&(s=t.manifest,a=t.path)}for(var c=0,h=s.length;c<h;c++)this._addItem(s[c],a,n);!1!==e?this.setPaused(!1):this.setPaused(!0)},e.load=function(){this.setPaused(!1)},e.getItem=function(t){return this._loadItemsById[t]||this._loadItemsBySrc[t]},e.getResult=function(t,e){var i=this._loadItemsById[t]||this._loadItemsBySrc[t];if(null==i)return null;var n=i.id;return e&&this._loadedRawResults[n]?this._loadedRawResults[n]:this._loadedResults[n]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var n=this._loadItemsById[i],r=this.getResult(i);!0===t&&null==r||e.push({item:n,result:r,rawResult:this.getResult(i,!0)})}return e},e.setPaused=function(t){this._paused=t,this._paused||this._loadNext()},e.close=function(){while(this._currentLoads.length)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=NaN},e._addItem=function(t,e,i){var n=this._createLoadItem(t,e,i);if(null!=n){var r=this._createLoader(n);null!=r&&("plugins"in r&&(r.plugins=this._plugins),n._loader=r,this._loadQueue.push(r),this._loadQueueBackup.push(r),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&n.type==o.Types.JAVASCRIPT||!0===n.maintainOrder)&&(this._scriptOrder.push(n),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var n=o.LoadItem.create(t);if(null==n)return null;var r="",s=i||this._basePath;if(n.src instanceof Object){if(!n.type)return null;if(e){r=e;var a=o.URLUtils.parseURI(e);null==s||a.absolute||a.relative||(r=s+r)}else null!=s&&(r=s)}else{var l=o.URLUtils.parseURI(n.src);l.extension&&(n.ext=l.extension),null==n.type&&(n.type=o.RequestUtils.getTypeByExtension(n.ext));var c=n.src;if(!l.absolute&&!l.relative)if(e){r=e;a=o.URLUtils.parseURI(e);c=e+c,null==s||a.absolute||a.relative||(r=s+r)}else null!=s&&(r=s);n.src=r+n.src}n.path=r,void 0!==n.id&&null!==n.id&&""!==n.id||(n.id=c);var h=this._typeCallbacks[n.type]||this._extensionCallbacks[n.ext];if(h){var u=h.callback.call(h.scope,n,this);if(!1===u)return null;!0===u||null!=u&&(n._loader=u),l=o.URLUtils.parseURI(n.src),null!=l.extension&&(n.ext=l.extension)}return this._loadItemsById[n.id]=n,this._loadItemsBySrc[n.src]=n,null==n.crossOrigin&&(n.crossOrigin=this._crossOrigin),n},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i<this._availableLoaders.length;i++){var n=this._availableLoaders[i];if(n&&n.canLoadItem(t))return new n(t,e)}return null},e._loadNext=function(){if(!this._paused){this._loadStartWasDispatched||(this._sendLoadStart(),this._loadStartWasDispatched=!0),this._numItems==this._numItemsLoaded?(this.loaded=!0,this._sendComplete(),this.next&&this.next.load&&this.next.load()):this.loaded=!1;for(var t=0;t<this._loadQueue.length;t++){if(this._currentLoads.length>=this._maxConnections)break;var e=this._loadQueue[t];this._canStartLoad(e)&&(this._loadQueue.splice(t,1),t--,this._loadItem(e))}}},e._loadItem=function(t){t.on("fileload",this._handleFileLoad,this),t.on("progress",this._handleProgress,this),t.on("complete",this._handleFileComplete,this),t.on("error",this._handleError,this),t.on("fileerror",this._handleFileError,this),this._currentLoads.push(t),this._sendFileStart(t.getItem()),t.load()},e._handleFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleFileError=function(t){var e=new o.ErrorEvent("FILE_LOAD_ERROR",null,t.item);this._sendError(e)},e._handleError=function(t){var e=t.target;this._numItemsLoaded++,this._finishOrderedItem(e,!0),this._updateProgress();var i=new o.ErrorEvent("FILE_LOAD_ERROR",null,e.getItem());this._sendError(i),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(e),this._cleanLoadItem(e),this._loadNext())},e._handleFileComplete=function(t){var e=t.target,i=e.getItem(),n=e.getResult();this._loadedResults[i.id]=n;var r=e.getResult(!0);null!=r&&r!==n&&(this._loadedRawResults[i.id]=r),this._saveLoadedItems(e),this._removeLoadItem(e),this._finishOrderedItem(e)||this._processFinishedLoad(i,e),this._cleanLoadItem(e)},e._saveLoadedItems=function(t){var e=t.getLoadedItems();if(null!==e)for(var i=0;i<e.length;i++){var n=e[i].item;this._loadItemsBySrc[n.src]=n,this._loadItemsById[n.id]=n,this._loadedResults[n.id]=e[i].result,this._loadedRawResults[n.id]=e[i].rawResult}},e._finishOrderedItem=function(t,e){var i=t.getItem();if(this.maintainScriptOrder&&i.type==o.Types.JAVASCRIPT||i.maintainOrder){t instanceof o.JavaScriptLoader&&(this._currentlyLoadingScript=!1);var n=o.indexOf(this._scriptOrder,i);return-1!=n&&(this._loadedScripts[n]=!0===e||i,this._checkScriptLoadOrder(),!0)}return!1},e._checkScriptLoadOrder=function(){for(var t=this._loadedScripts.length,e=0;e<t;e++){var i=this._loadedScripts[e];if(null===i)break;if(!0!==i){var n=this._loadedResults[i.id];i.type==o.Types.JAVASCRIPT&&o.DomUtils.appendToHead(n);var r=i._loader;this._processFinishedLoad(i,r),this._loadedScripts[e]=!0}}},e._processFinishedLoad=function(t,e){if(this._numItemsLoaded++,!this.maintainScriptOrder&&t.type==o.Types.JAVASCRIPT){var i=e.getTag();o.DomUtils.appendToHead(i)}this._updateProgress(),this._sendFileComplete(t,e),this._loadNext()},e._canStartLoad=function(t){if(!this.maintainScriptOrder||t.preferXHR)return!0;var e=t.getItem();if(e.type!=o.Types.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;var i=this._scriptOrder.indexOf(e),n=0;while(n<i){var r=this._loadedScripts[n];if(null==r)return!1;n++}return this._currentlyLoadingScript=!0,!0},e._removeLoadItem=function(t){for(var e=this._currentLoads.length,i=0;i<e;i++)if(this._currentLoads[i]==t){this._currentLoads.splice(i,1);break}},e._cleanLoadItem=function(t){var e=t.getItem();e&&delete e._loader},e._handleProgress=function(t){var e=t.target;this._sendFileProgress(e.getItem(),e.progress),this._updateProgress()},e._updateProgress=function(){var t=this._numItemsLoaded/this._numItems,e=this._numItems-this._numItemsLoaded;if(e>0){for(var i=0,n=0,r=this._currentLoads.length;n<r;n++)i+=this._currentLoads[n].progress;t+=i/e*(e/this._numItems)}this._lastProgress!=t&&(this._sendProgress(t),this._lastProgress=t)},e._disposeItem=function(t){delete this._loadedResults[t.id],delete this._loadedRawResults[t.id],delete this._loadItemsById[t.id],delete this._loadItemsBySrc[t.src]},e._sendFileProgress=function(t,e){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var i=new o.Event("fileprogress");i.progress=e,i.loaded=e,i.total=1,i.item=t,this.dispatchEvent(i)}},e._sendFileComplete=function(t,e){if(!this._isCanceled()&&!this._paused){var i=new o.Event("fileload");i.loader=e,i.item=t,i.result=this._loadedResults[t.id],i.rawResult=this._loadedRawResults[t.id],t.completeHandler&&t.completeHandler(i),this.hasEventListener("fileload")&&this.dispatchEvent(i)}},e._sendFileStart=function(t){var e=new o.Event("filestart");e.item=t,this.hasEventListener("filestart")&&this.dispatchEvent(e)},e.toString=function(){return"[PreloadJS LoadQueue]"},o.LoadQueue=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.TEXT)}o.extend(t,o.AbstractLoader);var e=t;e.canLoadItem=function(t){return t.type==o.Types.TEXT},o.TextLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.BINARY),this.on("initialize",this._updateXHR,this)}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.BINARY},e._updateXHR=function(t){t.loader.setResponseType("arraybuffer")},o.BinaryLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",this._tag=e?o.Elements.style():o.Elements.link(),this._tag.rel="stylesheet",this._tag.type="text/css"}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.CSS},e._formatResult=function(t){if(this._preferXHR){var e=t.getTag();if(e.styleSheet)e.styleSheet.cssText=t.getResult(!0);else{var i=o.Elements.text(t.getResult(!0));e.appendChild(i)}}else e=this._tag;return o.DomUtils.appendToHead(e),e},o.CSSLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,t.type),this._faces={},this._watched=[],this._count=0,this._watchInterval=null,this._loadTimeout=null,this._injectCSS=void 0===t.injectCSS||t.injectCSS,this.dispatchEvent("initialize")}var e=o.extend(t,o.AbstractLoader);t.canLoadItem=function(t){return t.type==o.Types.FONT||t.type==o.Types.FONTCSS},t.sampleText="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ",t._ctx=document.createElement("canvas").getContext("2d"),t._referenceFonts=["serif","monospace"],t.WEIGHT_REGEX=/[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/gi,t.STYLE_REGEX=/[- ._]*(italic|oblique)[- ._]*/gi,t.FONT_FORMAT={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"truetype"},t.FONT_WEIGHT={thin:100,extralight:200,ultralight:200,light:300,semilight:300,demilight:300,book:"normal",regular:"normal",semibold:600,demibold:600,extrabold:800,ultrabold:800,black:900,heavy:900},t.WATCH_DURATION=10,e.load=function(){if(this.type==o.Types.FONTCSS){var t=this._watchCSS();if(!t)return void this.AbstractLoader_load()}else if(this._item.src instanceof Array)this._watchFontArray();else{var e=this._defFromSrc(this._item.src);this._watchFont(e),this._injectStyleTag(this._cssFromDef(e))}this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout),this.dispatchEvent("loadstart")},e._handleTimeout=function(){this._stopWatching(),this.dispatchEvent(new o.ErrorEvent("PRELOAD_TIMEOUT"))},e._createRequest=function(){return this._request},e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response,this._result=!0,this._parseCSS(this._rawResult);break;case"error":this._stopWatching(),this.AbstractLoader_handleEvent(t);break}},e._watchCSS=function(){var t=this._item.src;return t instanceof HTMLStyleElement&&(this._injectCSS&&!t.parentNode&&(document.head||document.getElementsByTagName("head")[0]).appendChild(t),this._injectCSS=!1,t="\n"+t.textContent),-1!==t.search(/\n|\r|@font-face/i)?(this._parseCSS(t),!0):(this._request=new o.XHRRequest(this._item),!1)},e._parseCSS=function(t){var e=/@font-face\s*\{([^}]+)}/g;while(1){var i=e.exec(t);if(!i)break;this._watchFont(this._parseFontFace(i[1]))}this._injectStyleTag(t)},e._watchFontArray=function(){for(var t,e=this._item.src,i="",n=e.length-1;n>=0;n--){var r=e[n];t="string"===typeof r?this._defFromSrc(r):this._defFromObj(r),this._watchFont(t),i+=this._cssFromDef(t)+"\n"}this._injectStyleTag(i)},e._injectStyleTag=function(t){if(this._injectCSS){var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)}},e._parseFontFace=function(t){var e=this._getCSSValue(t,"font-family"),i=this._getCSSValue(t,"src");return e&&i?this._defFromObj({family:e,src:i,style:this._getCSSValue(t,"font-style"),weight:this._getCSSValue(t,"font-weight")}):null},e._watchFont=function(t){t&&!this._faces[t.id]&&(this._faces[t.id]=t,this._watched.push(t),this._count++,this._calculateReferenceSizes(t),this._startWatching())},e._startWatching=function(){null==this._watchInterval&&(this._watchInterval=setInterval(o.proxy(this._watch,this),t.WATCH_DURATION))},e._stopWatching=function(){clearInterval(this._watchInterval),clearTimeout(this._loadTimeout),this._watchInterval=null},e._watch=function(){for(var e=this._watched,i=t._referenceFonts,n=e.length,r=n-1;r>=0;r--)for(var s=e[r],a=s.refs,l=a.length-1;l>=0;l--){var c=this._getTextWidth(s.family+","+i[l],s.weight,s.style);if(c!=a[l]){var h=new o.Event("fileload");s.type="font-family",h.item=s,this.dispatchEvent(h),e.splice(r,1);break}}if(n!==e.length){h=new o.ProgressEvent(this._count-e.length,this._count);this.dispatchEvent(h)}0===n&&(this._stopWatching(),this._sendComplete())},e._calculateReferenceSizes=function(e){for(var i=t._referenceFonts,n=e.refs=[],r=0;r<i.length;r++)n[r]=this._getTextWidth(i[r],e.weight,e.style)},e._defFromSrc=function(e){var i,n=/[- ._]+/g,r=e,s=null;i=r.search(/[?#]/),-1!==i&&(r=r.substr(0,i)),i=r.lastIndexOf("."),-1!==i&&(s=r.substr(i+1),r=r.substr(0,i)),i=r.lastIndexOf("/"),-1!==i&&(r=r.substr(i+1));var a=r,o=a.match(t.WEIGHT_REGEX);o&&(o=o[0],a=a.replace(o,""),o=o.replace(n,"").toLowerCase());var l=r.match(t.STYLE_REGEX);l&&(a=a.replace(l[0],""),l="italic"),a=a.replace(n,"");var c="local('"+r.replace(n," ")+"'), url('"+e+"')",h=t.FONT_FORMAT[s];return h&&(c+=" format('"+h+"')"),this._defFromObj({family:a,weight:t.FONT_WEIGHT[o]||o,style:l,src:c})},e._defFromObj=function(t){var e={family:t.family,src:t.src,style:t.style||"normal",weight:t.weight||"normal"};return e.id=e.family+";"+e.style+";"+e.weight,e},e._cssFromDef=function(t){return"@font-face {\n\tfont-family: '"+t.family+"';\n\tfont-style: "+t.style+";\n\tfont-weight: "+t.weight+";\n\tsrc: "+t.src+";\n}"},e._getTextWidth=function(e,i,n){var r=t._ctx;return r.font=n+" "+i+" 72px "+e,r.measureText(t.sampleText).width},e._getCSSValue=function(t,e){var i=new RegExp(e+":s*([^;}]+?)s*[;}]"),n=i.exec(t);return n&&n[1]?n[1]:null},o.FontLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",o.DomUtils.isImageTag(t)?this._tag=t:o.DomUtils.isImageTag(t.src)?this._tag=t.src:o.DomUtils.isImageTag(t.tag)&&(this._tag=t.tag),null!=this._tag?this._preferXHR=!1:this._tag=o.Elements.img(),this.on("initialize",this._updateXHR,this)}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.IMAGE},e.load=function(){if(""!=this._tag.src&&this._tag.complete)this._sendComplete();else{var t=this._item.crossOrigin;1==t&&(t="Anonymous"),null==t||o.URLUtils.isLocal(this._item)||(this._tag.crossOrigin=t),this.AbstractLoader_load()}},e._updateXHR=function(t){t.loader.mimeType="text/plain; charset=x-user-defined-binary",t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){return this._formatImage},e._formatImage=function(t,e){var i=this._tag,n=window.URL||window.webkitURL;if(this._preferXHR)if(n){var r=n.createObjectURL(this.getResult(!0));i.src=r,i.addEventListener("load",this._cleanUpURL,!1),i.addEventListener("error",this._cleanUpURL,!1)}else i.src=this._item.src;else;i.complete?t(i):(i.onload=o.proxy((function(){t(this._tag),i.onload=i.onerror=null}),this),i.onerror=o.proxy((function(t){e(new o.ErrorEvent("IMAGE_FORMAT",null,t)),i.onload=i.onerror=null}),this))},e._cleanUpURL=function(t){var e=window.URL||window.webkitURL;e.revokeObjectURL(t.target.src)},o.ImageLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(o.Elements.script())}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.JAVASCRIPT},e._formatResult=function(t){var e=t.getTag();return this._preferXHR&&(e.text=t.getResult(!0)),e},o.JavaScriptLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.JSON),this.resultFormatter=this._formatResult}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.JSON},e._formatResult=function(t){var e=null;try{e=o.DataUtils.parseJSON(t.getResult(!0))}catch(n){var i=new o.ErrorEvent("JSON_FORMAT",null,n);return this._sendError(i),n}return e},o.JSONLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!1,o.Types.JSONP),this.setTag(o.Elements.script()),this.getTag().type="text/javascript"}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.JSONP},e.cancel=function(){this.AbstractLoader_cancel(),this._dispose()},e.load=function(){if(null==this._item.callback)throw new Error("callback is required for loading JSONP requests.");if(null!=window[this._item.callback])throw new Error("JSONP callback '"+this._item.callback+"' already exists on window. You need to specify a different callback or re-name the current one.");window[this._item.callback]=o.proxy(this._handleLoad,this),o.DomUtils.appendToBody(this._tag),this._loadTimeout=setTimeout(o.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag.src=this._item.src},e._handleLoad=function(t){this._result=this._rawResult=t,this._sendComplete(),this._dispose()},e._handleTimeout=function(){this._dispose(),this.dispatchEvent(new o.ErrorEvent("timeout"))},e._dispose=function(){o.DomUtils.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},o.JSONPLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.MANIFEST),this.plugins=null,this._manifestQueue=null}var e=o.extend(t,o.AbstractLoader),i=t;i.MANIFEST_PROGRESS=.25,i.canLoadItem=function(t){return t.type==o.Types.MANIFEST},e.load=function(){this.AbstractLoader_load()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new o.JSONPLoader(this._item):new o.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.MANIFEST_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.MANIFEST_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._loadManifest=function(t){if(t&&t.manifest){var e=this._manifestQueue=new o.LoadQueue(this._preferXHR);e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("complete",this._handleManifestComplete,this,!0),e.on("error",this._handleManifestError,this,!0);for(var i=0,n=this.plugins.length;i<n;i++)e.installPlugin(this.plugins[i]);e.loadManifest(t)}else this._sendComplete()},e._handleManifestFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleManifestComplete=function(t){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.MANIFEST_PROGRESS)+i.MANIFEST_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new o.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},o.ManifestLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,o.Types.SOUND),o.DomUtils.isAudioTag(t)||o.DomUtils.isAudioTag(t.src)?this._tag=t:o.DomUtils.isAudioTag(t.tag)&&(this._tag=o.DomUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=o.extend(t,o.AbstractMediaLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.SOUND},e._createTag=function(t){var e=o.Elements.audio();return e.autoplay=!1,e.preload="none",e.src=t,e},o.SoundLoader=o.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractMediaLoader_constructor(t,e,o.Types.VIDEO),o.DomUtils.isVideoTag(t)||o.DomUtils.isVideoTag(t.src)?(this.setTag(o.DomUtils.isVideoTag(t)?t:t.src),this._preferXHR=!1):this.setTag(this._createTag())}var e=o.extend(t,o.AbstractMediaLoader),i=t;e._createTag=function(){return o.Elements.video()},i.canLoadItem=function(t){return t.type==o.Types.VIDEO},o.VideoLoader=o.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.SPRITESHEET),this._manifestQueue=null}var e=o.extend(t,o.AbstractLoader),i=t;i.SPRITESHEET_PROGRESS=.25,i.canLoadItem=function(t){return t.type==o.Types.SPRITESHEET},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._createRequest=function(){var t=this._item.callback;this._request=null!=t?new o.JSONPLoader(this._item):new o.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.SPRITESHEET_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e._loadManifest=function(t){if(t&&t.images){var e=this._manifestQueue=new o.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);e.on("complete",this._handleManifestComplete,this,!0),e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("error",this._handleManifestError,this,!0),e.loadManifest(t.images)}},e._handleManifestFileLoad=function(t){var e=t.result;if(null!=e){var i=this.getResult().images,n=i.indexOf(t.item.src);i[n]=e}},e._handleManifestComplete=function(t){this._result=new o.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.SPRITESHEET_PROGRESS)+i.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new o.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},o.SpriteSheetLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.AbstractLoader_constructor(t,e,o.Types.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",e?this.setTag(o.Elements.svg()):(this.setTag(o.Elements.object()),this.getTag().type="image/svg+xml")}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.SVG},e._formatResult=function(t){var e=o.DataUtils.parseXML(t.getResult(!0)),i=t.getTag();if(!this._preferXHR&&document.body.contains(i)&&document.body.removeChild(i),null!=e.documentElement){var n=e.documentElement;return document.importNode&&(n=document.importNode(n,!0)),i.appendChild(n),i}return e},o.SVGLoader=o.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){function t(t){this.AbstractLoader_constructor(t,!0,o.Types.XML),this.resultFormatter=this._formatResult}var e=o.extend(t,o.AbstractLoader),i=t;i.canLoadItem=function(t){return t.type==o.Types.XML},e._formatResult=function(t){return o.DataUtils.parseXML(t.getResult(!0))},o.XMLLoader=o.promote(t,"AbstractLoader")}()},o=window.createjs=window.createjs||{};a.call(window),e["a"]=o}).call(this,i("dd40")(t),i("c8ba"))},"0577":function(t,e,i){"use strict";var n=i("09a2"),r=i.n(n);r.a},"0663":function(t,e,i){},"07e9":function(t,e,i){"use strict";var n=i("ae02"),r=i.n(n);r.a},"085b":function(t,e,i){},"087c":function(t,e,i){"use strict";var n=i("3096"),r=i.n(n);r.a},"09a2":function(t,e,i){},"0c56":function(t,e,i){},"0c68":function(t,e,i){"use strict";var n=i("8291"),r=i.n(n);r.a},"0d40":function(t,e,i){},"122b":function(t,e,i){},1412:function(t,e,i){},"1f0d":function(t,e,i){"use strict";var n=i("b244"),r=i.n(n);r.a},2050:function(t,e,i){},"24b4":function(t,e,i){},"276d":function(t,e,i){"use strict";var n=i("0c56"),r=i.n(n);r.a},"279f":function(t,e,i){"use strict";var n=i("846e"),r=i.n(n);r.a},"27fb":function(t,e,i){},"2d1d":function(t,e,i){},"2f77":function(t,e,i){"use strict";var n=i("2050"),r=i.n(n);r.a},3096:function(t,e,i){},3111:function(t,e,i){},"319f":function(t,e,i){"use strict";var n=i("1412"),r=i.n(n);r.a},3305:function(t,e,i){"use strict";var n=i("d404"),r=i.n(n);r.a},"3ca1":function(t,e,i){"use strict";var n=i("567d"),r=i.n(n);r.a},4165:function(t,e,i){},"468d":function(t,e,i){},4762:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),l=i("6bb5"),c=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(l["a"])(t);if(e){var r=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t;return Object(n["a"])(this,i),t=e.call(this),t.id=0,t.offsetX=0,t.offsetY=0,t}return Object(r["a"])(i,[{key:"parse",value:function(){this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset,5)),9===this.data.byteLength&&(this.offsetX=this.data.getInt16(5,!1),this.offsetY=this.data.getInt16(7,!1))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<9&&(this.offsetX||this.offsetY))&&this.setData(new DataView(new ArrayBuffer(9))),this.offsetX||this.offsetY?this.dataByteLength=9:this.dataByteLength=5,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData();for(var n=Object(h["b"])(this.id.toString(16),5),r=0;r<5;r++)this.data.setInt8(r,n[r]);return(this.offsetX||this.offsetY)&&(this.data.setInt16(5,this.offsetX||0,!1),this.data.setInt16(7,this.offsetY||0,!1)),Object(s["a"])(Object(l["a"])(i.prototype),"writeIn",this).call(this,t,e)}}]),i}(c["b"]);e["default"]=f},"4a4b":function(t,e,i){"use strict";var n=i("dde5"),r=i.n(n);r.a},"4c0d":function(t,e,i){},"4d5c":function(t,e,i){"use strict";var n=i("843f"),r=i.n(n);r.a},"4d8a":function(t,e,i){"use strict";var n=i("89ab"),r=i.n(n);r.a},"521a":function(t,e,i){"use strict";var n=i("0d40"),r=i.n(n);r.a},"560f":function(t,e,i){},"567d":function(t,e,i){},"56d7":function(t,e,i){"use strict";i.r(e);i("cadf"),i("551c"),i("f751"),i("097d");var n=i("2b0e"),r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app"}},[!this.error&&this.visible?i("Player",{ref:"game",attrs:{id:"game-container",theme:t.theme,transparent:!1},on:{play:function(e){return t.evtProxy("play")},"save-image":function(e){return t.evtProxy("save-image")}}}):t._e(),this.error?i("div",{staticClass:"error_popup"},[i("div",{staticClass:"title"},[t._v("Oops!")]),i("span",{staticClass:"content"},[t._v(t._s(t.error))])]):t._e()],1)},s=[],a=(i("96cf"),i("3b8d")),o=(i("aef6"),i("6b54"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("GameWrapper",{ref:"wrapper",attrs:{buttons:t.selectedItemMoveButtons,colors:t.selectedItemColors,loadingStatus:t.loadingStatus,bgColor:t.manifest.bgColor,playing:t.gameStarted,saveImage:t.saveImage,homeUrl:t.siteHomeLink},on:{"prepare-save":t.handlePrepareSave,random:t.handleRandomClick,color:t.handleSelectColorClick,gamepad:t.handleGamePadClick},scopedSlots:t._u([{key:"welcomescreen",fn:function(){return[t.welcomeScreenData?i("WelcomeScreen",{attrs:{data:t.welcomeScreenData,showPlayButton:null===t.loadingStatus},on:{"click-play":t.startLoadingGame}}):t._e()]},proxy:!0},{key:"display",fn:function(){return[i("GameCanvas",{ref:"display",attrs:{canvasWidth:t.manifest.gameWidth,canvasHeight:t.manifest.gameHeight}})]},proxy:!0},{key:"items",fn:function(){return[i("ScrollDiv",{attrs:{size:"40",orientation:"vertical","scroll-arrows":"",items:t.selectedCategory.children},on:{select:t.handleImageClick},scopedSlots:t._u([{key:"default",fn:function(e){return[e.item.delete?i("div",[i("button",{staticClass:"item btn-default"},[i("i",{staticClass:"svg-icon svg-delete",staticStyle:{width:"20pt",height:"20pt"}})])]):i("div",{class:[e.item.visible?"active":"",e.item===t.selectedItem?"selected":""]},[i("div",{staticClass:"item",style:{"background-image":e.item.image?"url("+e.item.image+")":""}})])]}}])})]},proxy:!0},{key:"categories",fn:function(){return[i("ScrollDiv",{attrs:{size:"40",orientation:"vertical","scroll-arrows":"",items:t.categories},on:{select:t.handleCategoryClick},scopedSlots:t._u([{key:"default",fn:function(t){return[i("div",[i("div",{staticClass:"item",style:{"background-image":t.item.image?"url("+t.item.image+")":""}})])]}}])})]},proxy:!0}])})}),l=[],c=(i("8e6e"),i("456d"),i("34ef"),i("28a5"),i("75fc")),h=i("bd86"),u=(i("7f7f"),i("ac6a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div")}),d=[],f=(i("5fa9"),i("2877")),p={},m=Object(f["a"])(p,u,d,!1,null,null,null),_=(m.exports,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.wrapperClasses},[i("div",{staticClass:"size-limit"},[i("div",{style:{display:t.playing||t.loadingStatus?"block":"none"},attrs:{id:"ad-container"}}),t.playing?t._e():i("div",{staticClass:"game-loading"},[i("div",{class:["progress-div",t.loadingStatus?"":"hidden"]},[i("LoadingEllipsis")],1),t._t("welcomescreen")],2),i("OverlayAnimation",{attrs:{visible:t.saveMode}}),i("div",{staticClass:"g-wrapper-content"},[i("ColorPicker",{ref:"colorPicker",attrs:{visible:!t.saveMode,colors:t.colors},on:{color:t.handleColor,open:function(e){return t.$refs.gamePad.close()}}}),i("GamePad",{ref:"gamePad",attrs:{visible:!t.saveMode,buttons:t.buttons},on:{buttonclick:t.handleMove,open:function(e){return t.$refs.colorPicker.close()}}}),i("div",{staticClass:"close-click",on:{click:t.handleClickClose}}),i("div",{staticClass:"g-save-buttons"},[i("a",{staticClass:"btn-default btn-shadow btn-save-mode",attrs:{target:t.saveImageTarget,href:t.saveImage?t.saveImage.link:"",download:t.saveImage?t.saveImage.name:""},on:{click:t.onClickSave}},[i("i",{staticClass:"svg-icon svg-checked"}),t._v(" Save\n ")]),i("button",{staticClass:"btn-default btn-shadow cancel-save-mode",on:{click:t.exitSaveMode}},[i("i",{staticClass:"svg-icon svg-arrow-right"}),t._v(" Back\n ")])]),i("div",{staticClass:"g-display",style:t.displayStyles},[t._t("display"),i("button",{staticClass:"btn-default btn-shadow enter-save-mode",on:{click:t.enterSaveMode}},[i("i",{staticClass:"svg-icon svg-checked"})]),i("button",{staticClass:"btn-default btn-shadow random-items",on:{click:function(e){return t.$emit("random")}}},[i("i",{staticClass:"svg-icon svg-dices"})]),t.homeUrl?i("PoweredBy",{attrs:{href:t.homeUrl,by:"meiker.io"}}):t._e(),null!==t.loadingStatus?i("LoadingOverlay"):t._e()],2),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],staticClass:"g-categories"},[t._t("categories")],2),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],staticClass:"g-items"},[t._t("items"),i("button",{staticClass:"btn-default g-backbuttom",on:{click:t.handleClickClose}},[i("i",{staticClass:"svg-icon svg-arrow-right"})])],2)],1)],1)])}),v=[],g=(i("b54a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("button",{staticClass:"btn-default btn-shadow color-items",on:{click:t.toggleColor}},[i("i",{staticClass:"svg-icon svg-color-picker"})]),t.colors?i("div",{staticClass:"selector"},[t.colors?i("ScrollDiv",{attrs:{size:"40",orientation:"vertical",items:t.colors},on:{select:t.handleColor},scopedSlots:t._u([{key:"default",fn:function(t){return[i("div",{staticClass:"color btn-shadow",style:{"background-color":t.item}})]}}],null,!1,1106364485)}):t._e()],1):t._e()])}),b=[],y=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"scroll-wrapper"},[t.items instanceof Array?i("vuescroll",{ref:"scroll",style:{"white-space":"horizontal"===t.orientation?"nowrap":"normal"},attrs:{ops:t.ops},on:{"handle-scroll":t.handleScroll,"handle-scroll-complete":t.handleScrollComplete}},[[i("div",{staticClass:"slot-base vertical empty-slot first"})],t._l(t.items,(function(e,n){return[i("div",{key:n,class:"slot-base "+t.orientation+" "+t.arrowPadding(t.items,n),style:{margin:t.margin+"pt",width:t.size,height:t.size},on:{click:function(i){return i.preventDefault(),t.handleClick(e,n)}}},[t._t("default",[t._v("\n "+t._s(e)+"\n ")],{item:e})],2)]})),[i("div",{staticClass:"slot-base vertical empty-slot latest"})]],2):t._e(),t.scrollArrows?i("div",{staticClass:"scroll-arrow arrow-up clicable",on:{click:t.handleScrollUp}},[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"}},[i("polyline",{staticStyle:{fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48px"},attrs:{points:"112 328 256 184 400 328"}})])]):t._e(),t.scrollArrows?i("div",{staticClass:"scroll-arrow arrow-down clicable",on:{click:t.handleScrollDown}},[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"}},[i("polyline",{staticStyle:{fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"48px"},attrs:{points:"112 184 256 328 400 184"}})])]):t._e()],1)},w=[],x=i("c67f"),E=i.n(x),C=function(t,e){var i="onwheel"in window.document||window.document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];i.forEach((function(i){return t.addEventListener(i,e)}))},S=function(){return{bind:function(t,e,i){C(t,(function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()}))}}},T={name:"ScrollDiv",components:{vuescroll:E.a},data:function(){return{scrolling:!1,ops:{vuescroll:{mode:"slide",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1},scrollPanel:{scrollingX:"horizontal"===this.orientation,scrollingY:"vertical"===this.orientation,speed:800,easing:"easeOutCubic"},bar:{disable:!1,showDelay:200,keepShow:!1,background:"#c1c1c1",opacity:.5,hoverStyle:!1,specifyBorderRadius:!1,minSize:0,size:"4pt"}}}},props:{orientation:{type:String,default:"horizontal"},items:{type:Array,default:null},margin:{type:String,default:"0pt"},size:{type:String,default:"100%"},scrollArrows:{type:Boolean,default:!1}},methods:{handleScroll:function(){this.scrolling||(this.scrolling=!0)},handleMouseWhell:function(t){var e=Math.abs(Math.round(t.deltaY)),i=Math.round(t.deltaY)/e;this.$refs["scroll"].scrollBy({dy:(e>20?e:20)*i})},handleScrollUp:function(){this.$refs["scroll"].scrollBy({dy:"-200"},200,"easeOutCubic")},handleScrollDown:function(){this.$refs["scroll"].scrollBy({dy:"200"},200,"easeOutCubic")},handleScrollComplete:function(){var t=this;this.$nextTick((function(){t.scrolling=!1}))},handleClick:function(t,e){this.scrolling||this.$emit("select",t,e)},arrowPadding:function(t,e){return this.scrollArrows?0===e?"first":e+1===t.length?"latest":"":""}},watch:{orientation:function(t,e){this.ops.scrollPanel.scrollingX="horizontal"===t,this.ops.scrollPanel.scrollingY="vertical"===t}},mounted:function(){var t=this;C(this.$el,(function(e){e.preventDefault(),t.handleMouseWhell(e)})),this.$nextTick((function(){t.scrolling=!1}))}},R=T,L=(i("d7db"),Object(f["a"])(R,y,w,!1,null,"f5224da4",null)),k=L.exports,O={name:"ColorPicker",components:{ScrollDiv:k},data:function(){return{opened:!1}},computed:{classes:function(){return["color-picker",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},size:{type:String,default:"30pt"},colors:{type:Array,default:function(){return[]}}},methods:{toggleColor:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleColor:function(t){this.$emit("color",t)}},mounted:function(){}},I=O,A=(i("087c"),Object(f["a"])(I,g,b,!1,null,"e46b8694",null)),D=A.exports,P=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("button",{staticClass:"btn-default btn-shadow btn-gamepad",on:{click:t.toggleGamePad}},[i("i",{staticClass:"svg-icon svg-move"})]),i("div",{staticClass:"game-pad-wrapper"},[i("div",{staticClass:"game-pad-buttons"},[i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("up")},expression:"() => handleClick('up')"}],staticClass:"btn-default btn-shadow btn-top",attrs:{disabled:-1===t.buttons.indexOf("up")},on:{click:function(e){return t.handleClick("up")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("right")},expression:"() => handleClick('right')"}],staticClass:"btn-default btn-shadow btn-right",attrs:{disabled:-1===t.buttons.indexOf("right")},on:{click:function(e){return t.handleClick("right")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("down")},expression:"() => handleClick('down')"}],staticClass:"btn-default btn-shadow btn-bottom",attrs:{disabled:-1===t.buttons.indexOf("down")},on:{click:function(e){return t.handleClick("down")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("left")},expression:"() => handleClick('left')"}],staticClass:"btn-default btn-shadow btn-left",attrs:{disabled:-1===t.buttons.indexOf("left")},on:{click:function(e){return t.handleClick("left")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})])]),i("div",{staticClass:"game-pad-rotate"},[i("button",{staticClass:"btn-default btn-shadow btn-cancel",on:{click:function(e){return t.handleClick("default")}}},[t._v("\n Default\n ")])])])])},M=[],j={DEFAULT:"default",ROTATE_RIGHT:"rotate-right",ROTATE_LEFT:"rotate-left",LEFT:"left",DOWN:"down",RIGHT:"right",UP:"up"},B={Buttons:j,name:"GamePad",data:function(){return{opened:!1}},computed:{classes:function(){return["game-pad",this.opened&&this.visible?"opened":"",0!==this.buttons.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},buttons:{type:Array,default:function(){return[]}}},methods:{toggleGamePad:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleClick:function(t){this.$emit("buttonclick",{source:t})}},mounted:function(){}},F=B,U=(i("5fb1"),Object(f["a"])(F,P,M,!1,null,"1d2edbe0",null)),N=U.exports,G=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("span",{staticClass:"color overlay--a"}),i("span",{staticClass:"color overlay--b"}),i("span",{staticClass:"color overlay--c"}),i("span",{staticClass:"color overlay--d"})])},X=[],H={name:"OverlayAnimation",data:function(){return{hidden:!1}},watch:{visible:function(t){var e=this;this.hidden=!t,t&&setTimeout((function(){e.hidden=!0}),2500)}},computed:{classes:function(){return["overlay",this.visible?"expanded":"",this.hidden?"hide":""]}},props:{visible:{type:Boolean,default:!1}}},Y=H,V=(i("fc31"),Object(f["a"])(Y,G,X,!1,null,"35b310fe",null)),W=V.exports,q=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"btn-default powered-by"},[i("i",{staticClass:"svg-icon svg-logo",on:{click:t.toggleClick}}),t.opened?i("span",[t._v("\n powered by\n "),i("a",{attrs:{href:t.href,target:t.target}},[t._v(t._s(t.by))])]):t._e()])},$=[],z={name:"PoweredBy",data:function(){return{opened:!1,target:"_self"}},computed:{classes:function(){return["color-picker",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{href:{type:String,default:"#"},by:{type:String,default:"meiker.io"}},methods:{toggleClick:function(){this.opened=!this.opened}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")}},J=z,Q=(i("ae13"),Object(f["a"])(J,q,$,!1,null,"18197f20",null)),Z=Q.exports,K=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-anim"},[i("LoadingEllipsis")],1)},tt=[],et=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},it=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-ellipsis"},[i("div"),i("div"),i("div"),i("div")])}],nt={name:"LoadingEllipsis"},rt=nt,st=(i("78ab"),Object(f["a"])(rt,et,it,!1,null,"8cf97e42",null)),at=st.exports,ot={name:"LoadingOverlay",components:{LoadingEllipsis:at},data:function(){return{}},computed:{},props:{label:{type:String,default:""}},methods:{},created:function(){}},lt=ot,ct=(i("5bb9"),Object(f["a"])(lt,K,tt,!1,null,"66b4214a",null)),ht=ct.exports,ut={name:"GameWrapper",components:{ColorPicker:D,GamePad:N,OverlayAnimation:W,PoweredBy:Z,LoadingOverlay:ht,LoadingEllipsis:at},data:function(){return{opened:!1,saveMode:!1}},computed:{wrapperClasses:function(){return["g-wrapper","noselect",this.opened?"opened":"",this.saveMode?"save-mode":""]},displayStyles:function(){return this.bgColor?{background:this.bgColor}:{}},saveImageTarget:function(){return this.isInAppBrowsing()?"_self":"_blank"}},props:{orientation:{type:String,default:"horizontal"},colors:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},bgColor:{type:String,default:null},loadingStatus:{type:String,default:null},playing:{type:Boolean,default:!1},saveImage:{type:Object,default:function(){return null}},homeUrl:{type:String,default:null}},methods:{handleClickClose:function(){this.$emit("update",{opened:!1})},handleColor:function(t){this.$emit("color",t)},handleMove:function(t){this.$emit("gamepad",t)},enterSaveMode:function(t){this.saveMode=!0,this.$emit("prepare-save",t)},exitSaveMode:function(){this.saveMode=!1,this.saveMode&&(window.URL||window.webkitURL).revokeObjectURL(this.saveMode.link)},onClickSave:function(t){this.$emit("save",t)},isInAppBrowsing:function(){try{var t=navigator.userAgent||navigator.vendor||window.opera;return t.indexOf("FBAN")>-1||t.indexOf("FBAV")>-1||t.indexOf("Instagram")>-1}catch(e){return!1}}},mounted:function(){var t=this;this.$on("update",(function(e){void 0!==e.opened&&(t.opened=!!e.opened),void 0!==e.saveMode&&(t.saveMode=!!e.saveMode)}))}},dt=ut,ft=(i("eebb"),Object(f["a"])(dt,_,v,!1,null,"2a1140c7",null)),pt=ft.exports,mt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"display"},[i("canvas",{ref:"display",attrs:{id:"game",width:t.canvasWidth+"px",height:t.canvasHeight+"px"}})])},_t=[],vt=(i("c5f6"),{name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs.display}}}),gt=vt,bt=(i("279f"),Object(f["a"])(gt,mt,_t,!1,null,"4b0af933",null)),yt=bt.exports,wt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"w-creen"},[t.resolveHomeHref()?i("PoweredBy",{attrs:{href:t.resolveHomeHref(),by:"meiker.io"}}):t._e(),i("div",{staticClass:"floating-box"},[i("div",{staticClass:"content"},[i("h2",{staticClass:"name"},[t._v(t._s(t.data.name))]),t.data.owner?i("p",{staticClass:"owner"},[t._v("by "),i("a",{attrs:{href:t.resolveOwnerHref(t.data.owner.id),target:t.target}},[t._v(t._s(t.data.owner.nickname))])]):t._e(),i("div",{staticClass:"description can-select"},[t.data.tags&&t.data.tags.length>0?i("div",{staticClass:"tags"},[i("svg",{attrs:{height:"18pt",width:"18pt",version:"1.1",viewBox:"0 0 32 32"}},[i("g",{attrs:{"fill-rule":"evenodd",stroke:"none"}},[i("g",{attrs:{stroke:"none"}},[i("path",{attrs:{d:"M12,4 L3.99961498,4 C2.89525812,4 2,4.88743329 2,5.99961498 L2,14 L15.3809027,27.3809027 C16.1646418,28.1646418 17.433119,28.1668566 18.2115341,27.3884415 L25.3884415,20.2115341 C26.168017,19.4319586 26.1640508,18.1640508 25.3809027,17.3809027 L12,4 L12,4 Z M7.5,11 C8.32842717,11 9,10.3284272 9,9.5 C9,8.67157283 8.32842717,8 7.5,8 C6.67157283,8 6,8.67157283 6,9.5 C6,10.3284272 6.67157283,11 7.5,11 L7.5,11 Z"}})])])]),t._l(t.data.tags||[],(function(e,n){return i("a",{key:n,staticClass:"tag",attrs:{href:t.resolveTagHref(e),target:t.target}},[t._v("\n "+t._s(e)+"\n ")])}))],2):t._e(),i("p",[t._v(t._s(t.data.description||"No description"))])])])]),i("div",{staticClass:"floating-icon-wrapper"},[i("img",{staticClass:"game-icon",attrs:{src:t.data.icon,alt:t.data.name}})]),t.showPlayButton?i("div",{staticClass:"floating-button-wrapper"},[i("a",{class:["button",t.showPlayButton?"":"hidden"],on:{click:t.onClickPlay}},[t._v("Play")])]):t._e()],1)},xt=[],Et={name:"WelcomeScreen",components:{PoweredBy:Z},data:function(){return{target:"_self"}},props:{showPlayButton:{type:Boolean,default:!1},data:{type:Object,default:function(){return{}}}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")},methods:{onClickPlay:function(){this.$emit("click-play")},resolveOwnerHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.ownerLinkResolver?this.data.resolvers.ownerLinkResolver(t):"javascript:;"},resolveTagHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.tagLinkResolver?this.data.resolvers.tagLinkResolver(t):"javascript:;"},resolveHomeHref:function(){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.siteHomeLink?this.data.resolvers.siteHomeLink():""}}},Ct=Et,St=(i("57ea"),Object(f["a"])(Ct,wt,xt,!1,null,"01de2544",null)),Tt=St.exports;i("a481");String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var i=this.toString();("number"!==typeof e||!isFinite(e)||Math.floor(e)!==e||e>i.length)&&(e=i.length),e-=t.length;var n=i.lastIndexOf(t,e);return-1!==n&&n===e}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")});i("7514");var Rt=i("d225"),Lt=i("b0b4"),kt=(i("20d6"),i("7618")),Ot=i("03ff"),It=(i("63d9"),i("55dd"),i("6c7b"),function(){this.createjs=this.createjs||{},At.extend=function(t,e){function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i},this.createjs=this.createjs||{},At.promote=function(t,e){var i=t.prototype,n=Object.getPrototypeOf&&Object.getPrototypeOf(i)||i.__proto__;if(n)for(var r in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(r)&&"function"==typeof n[r]&&(i[e+r]=n[r]);return t},this.createjs=this.createjs||{},At.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(e===t[i])return i;return-1},this.createjs=this.createjs||{},function(){function t(){throw"UID cannot be instantiated"}t._nextID=0,t.get=function(){return t._nextID++},At.UID=t}(),this.createjs=this.createjs||{},At.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},At.Event=t}(),this.createjs=this.createjs||{},function(){function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n;n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var r=n[t];return r&&this.removeEventListener(t,e,i),r=n[t],r?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,s){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,r),n&&t.remove()}),s)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r)for(var s=0,a=r.length;s<a;s++)if(r[s]==e){1==a?delete n[t]:r.splice(s,1);break}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var n=this._listeners;if(!e&&(!n||!n[t]))return!0;t=new At.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(l){}if(t.bubbles&&this.parent){var r=this,s=[r];while(r.parent)s.push(r=r.parent);var a,o=s.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)s[a]._dispatchEvent(t,1+(0==a));for(a=1;a<o&&!t.propagationStopped;a++)s[a]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){var e=this;while(e){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=e<=2?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(o){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var s=0;s<i&&!t.immediatePropagationStopped;s++){var a=n[s];a.handleEvent?a.handleEvent(t):a(t),t.removed&&(this.off(t.type,a,1==e),t.removed=!1)}}2===e&&this._dispatchEvent(t,2.1)},At.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){function t(){throw"Ticker cannot be instantiated."}t.RAF_SYNCHED="synched",t.RAF="raf",t.TIMEOUT="timeout",t.timingMode=null,t.maxDelta=0,t.paused=!1,t.removeEventListener=null,t.removeAllEventListeners=null,t.dispatchEvent=null,t.hasEventListener=null,t._listeners=null,At.EventDispatcher.initialize(t),t._addEventListener=t.addEventListener,t.addEventListener=function(){return!t._inited&&t.init(),t._addEventListener.apply(t,arguments)},t._inited=!1,t._startTime=0,t._pausedTime=0,t._ticks=0,t._pausedTicks=0,t._interval=50,t._lastTime=0,t._times=null,t._tickTimes=null,t._timerId=null,t._raf=!0,t._setInterval=function(e){t._interval=e,t._inited&&t._setupTick()},t.setInterval=At.deprecate(t._setInterval,"Ticker.setInterval"),t._getInterval=function(){return t._interval},t.getInterval=At.deprecate(t._getInterval,"Ticker.getInterval"),t._setFPS=function(e){t._setInterval(1e3/e)},t.setFPS=At.deprecate(t._setFPS,"Ticker.setFPS"),t._getFPS=function(){return 1e3/t._interval},t.getFPS=At.deprecate(t._getFPS,"Ticker.getFPS");try{Object.defineProperties(t,{interval:{get:t._getInterval,set:t._setInterval},framerate:{get:t._getFPS,set:t._setFPS}})}catch(n){console.log(n)}t.init=function(){t._inited||(t._inited=!0,t._times=[],t._tickTimes=[],t._startTime=t._getTime(),t._times.push(t._lastTime=0),t.interval=t._interval)},t.reset=function(){if(t._raf){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;e&&e(t._timerId)}else clearTimeout(t._timerId);t.removeAllEventListeners("tick"),t._timerId=t._times=t._tickTimes=null,t._startTime=t._lastTime=t._ticks=t._pausedTime=0,t._inited=!1},t.getMeasuredTickTime=function(e){var i=0,n=t._tickTimes;if(!n||n.length<1)return-1;e=Math.min(n.length,e||0|t._getFPS());for(var r=0;r<e;r++)i+=n[r];return i/e},t.getMeasuredFPS=function(e){var i=t._times;return!i||i.length<2?-1:(e=Math.min(i.length-1,e||0|t._getFPS()),1e3/((i[0]-i[e])/e))},t.getTime=function(e){return t._startTime?t._getTime()-(e?t._pausedTime:0):-1},t.getEventTime=function(e){return t._startTime?(t._lastTime||t._startTime)-(e?t._pausedTime:0):-1},t.getTicks=function(e){return t._ticks-(e?t._pausedTicks:0)},t._handleSynch=function(){t._timerId=null,t._setupTick(),t._getTime()-t._lastTime>=.97*(t._interval-1)&&t._tick()},t._handleRAF=function(){t._timerId=null,t._setupTick(),t._tick()},t._handleTimeout=function(){t._timerId=null,t._setupTick(),t._tick()},t._setupTick=function(){if(null==t._timerId){var e=t.timingMode;if(e==t.RAF_SYNCHED||e==t.RAF){var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(i)return t._timerId=i(e==t.RAF?t._handleRAF:t._handleSynch),void(t._raf=!0)}t._raf=!1,t._timerId=setTimeout(t._handleTimeout,t._interval)}},t._tick=function(){var e=t.paused,i=t._getTime(),n=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=n),t.hasEventListener("tick")){var r=new At.Event("tick"),s=t.maxDelta;r.delta=s&&n>s?s:n,r.paused=e,r.time=i,r.runTime=i-t._pausedTime,t.dispatchEvent(r)}t._tickTimes.unshift(t._getTime()-i);while(t._tickTimes.length>100)t._tickTimes.pop();t._times.unshift(i);while(t._times.length>100)t._times.pop()};var e=window,i=e.performance.now||e.performance.mozNow||e.performance.msNow||e.performance.oNow||e.performance.webkitNow;t._getTime=function(){return(i&&i.call(e.performance)||(new Date).getTime())-t._startTime},At.Ticker=t}(),this.createjs=this.createjs||{},function(){function t(t){this.readyState=t.readyState,this._video=t,this._canvas=null,this._lastTime=-1,this.readyState<2&&t.addEventListener("canplaythrough",this._videoReady.bind(this))}var e=t.prototype;e.getImage=function(){if(!(this.readyState<2)){var t=this._canvas,e=this._video;if(t||(t=this._canvas=At.createCanvas?At.createCanvas():document.createElement("canvas"),t.width=e.videoWidth,t.height=e.videoHeight),e.readyState>=2&&e.currentTime!==this._lastTime){var i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),i.drawImage(e,0,0,t.width,t.height),this._lastTime=e.currentTime}return t}},e._videoReady=function(){this.readyState=2},At.VideoBuffer=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a,o,l,c,h){this.Event_constructor(t,e,i),this.stageX=n,this.stageY=r,this.rawX=null==l?n:l,this.rawY=null==c?r:c,this.nativeEvent=s,this.pointerID=a,this.primary=!!o,this.relatedTarget=h}var e=At.extend(t,At.Event);e._get_localX=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).x},e._get_localY=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).y},e._get_isTouch=function(){return-1!==this.pointerID};try{Object.defineProperties(e,{localX:{get:e._get_localX},localY:{get:e._get_localY},isTouch:{get:e._get_isTouch}})}catch(i){}e.clone=function(){return new t(this.type,this.bubbles,this.cancelable,this.stageX,this.stageY,this.nativeEvent,this.pointerID,this.primary,this.rawX,this.rawY)},e.toString=function(){return"[MouseEvent (type="+this.type+" stageX="+this.stageX+" stageY="+this.stageY+")]"},At.MouseEvent=At.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s){this.setValues(t,e,i,n,r,s)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,n,r,s){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==n?1:n,this.tx=r||0,this.ty=s||0,this},e.append=function(t,e,i,n,r,s){var a=this.a,o=this.b,l=this.c,c=this.d;return 1==t&&0==e&&0==i&&1==n||(this.a=a*t+l*e,this.b=o*t+c*e,this.c=a*i+l*n,this.d=o*i+c*n),this.tx=a*r+l*s+this.tx,this.ty=o*r+c*s+this.ty,this},e.prepend=function(t,e,i,n,r,s){var a=this.a,o=this.c,l=this.tx;return this.a=t*a+i*this.b,this.b=e*a+n*this.b,this.c=t*o+i*this.d,this.d=e*o+n*this.d,this.tx=t*l+i*this.ty+r,this.ty=e*l+n*this.ty+s,this},e.appendMatrix=function(t){return this.append(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.prependMatrix=function(t){return this.prepend(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.appendTransform=function(e,i,n,r,s,a,o,l,c){if(s%360)var h=s*t.DEG_TO_RAD,u=Math.cos(h),d=Math.sin(h);else u=1,d=0;return a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.append(Math.cos(o),Math.sin(o),-Math.sin(a),Math.cos(a),e,i),this.append(u*n,d*n,-d*r,u*r,0,0)):this.append(u*n,d*n,-d*r,u*r,e,i),(l||c)&&(this.tx-=l*this.a+c*this.c,this.ty-=l*this.b+c*this.d),this},e.prependTransform=function(e,i,n,r,s,a,o,l,c){if(s%360)var h=s*t.DEG_TO_RAD,u=Math.cos(h),d=Math.sin(h);else u=1,d=0;return(l||c)&&(this.tx-=l,this.ty-=c),a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.prepend(u*n,d*n,-d*r,u*r,0,0),this.prepend(Math.cos(o),Math.sin(o),-Math.sin(a),Math.cos(a),e,i)):this.prepend(u*n,d*n,-d*r,u*r,e,i),this},e.rotate=function(e){e*=t.DEG_TO_RAD;var i=Math.cos(e),n=Math.sin(e),r=this.a,s=this.b;return this.a=r*i+this.c*n,this.b=s*i+this.d*n,this.c=-r*n+this.c*i,this.d=-s*n+this.d*i,this},e.skew=function(e,i){return e*=t.DEG_TO_RAD,i*=t.DEG_TO_RAD,this.append(Math.cos(i),Math.sin(i),-Math.sin(e),Math.cos(e),0,0),this},e.scale=function(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this},e.translate=function(t,e){return this.tx+=this.a*t+this.c*e,this.ty+=this.b*t+this.d*e,this},e.identity=function(){return this.a=this.d=1,this.b=this.c=this.tx=this.ty=0,this},e.invert=function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=this.tx,s=t*n-e*i;return this.a=n/s,this.b=-e/s,this.c=-i/s,this.d=t/s,this.tx=(i*this.ty-n*r)/s,this.ty=-(t*this.ty-e*r)/s,this},e.isIdentity=function(){return 0===this.tx&&0===this.ty&&1===this.a&&0===this.b&&0===this.c&&1===this.d},e.equals=function(t){return this.tx===t.tx&&this.ty===t.ty&&this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d},e.transformPoint=function(t,e,i){return i=i||{},i.x=t*this.a+e*this.c+this.tx,i.y=t*this.b+e*this.d+this.ty,i},e.decompose=function(e){null==e&&(e={}),e.x=this.tx,e.y=this.ty,e.scaleX=Math.sqrt(this.a*this.a+this.b*this.b),e.scaleY=Math.sqrt(this.c*this.c+this.d*this.d);var i=Math.atan2(-this.c,this.d),n=Math.atan2(this.b,this.a),r=Math.abs(1-i/n);return r<1e-5?(e.rotation=n/t.DEG_TO_RAD,this.a<0&&this.d>=0&&(e.rotation+=e.rotation<=0?180:-180),e.skewX=e.skewY=0):(e.skewX=i/t.DEG_TO_RAD,e.skewY=n/t.DEG_TO_RAD),e},e.copy=function(t){return this.setValues(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.tx,this.ty)},e.toString=function(){return"[Matrix2D (a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+")]"},t.identity=new t,At.Matrix2D=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r){this.setValues(t,e,i,n,r)}var e=t.prototype;e.setValues=function(t,e,i,n,r){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=n,this.matrix=r||this.matrix&&this.matrix.identity()||new At.Matrix2D,this},e.append=function(t,e,i,n,r){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=n||this.compositeOperation,this.visible=this.visible&&t,r&&this.matrix.appendMatrix(r),this},e.prepend=function(t,e,i,n,r){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||n,this.visible=this.visible&&t,r&&this.matrix.prependMatrix(r),this},e.identity=function(){return this.visible=!0,this.alpha=1,this.shadow=this.compositeOperation=null,this.matrix.identity(),this},e.clone=function(){return new t(this.alpha,this.shadow,this.compositeOperation,this.visible,this.matrix.clone())},At.DisplayProps=t}(),this.createjs=this.createjs||{},function(){function t(t,e){this.setValues(t,e)}var e=t.prototype;e.setValues=function(t,e){return this.x=t||0,this.y=e||0,this},e.copy=function(t){return this.x=t.x,this.y=t.y,this},e.clone=function(){return new t(this.x,this.y)},e.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},At.Point=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.setValues(t,e,i,n)}var e=t.prototype;e.setValues=function(t,e,i,n){return this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0,this},e.extend=function(t,e,i,n){return i=i||0,n=n||0,t+i>this.x+this.width&&(this.width=t+i-this.x),e+n>this.y+this.height&&(this.height=e+n-this.y),t<this.x&&(this.width+=this.x-t,this.x=t),e<this.y&&(this.height+=this.y-e,this.y=e),this},e.pad=function(t,e,i,n){return this.x-=e,this.y-=t,this.width+=e+n,this.height+=t+i,this},e.copy=function(t){return this.setValues(t.x,t.y,t.width,t.height)},e.contains=function(t,e,i,n){return i=i||0,n=n||0,t>=this.x&&t+i<=this.x+this.width&&e>=this.y&&e+n<=this.y+this.height},e.union=function(t){return this.clone().extend(t.x,t.y,t.width,t.height)},e.intersection=function(e){var i=e.x,n=e.y,r=i+e.width,s=n+e.height;return this.x>i&&(i=this.x),this.y>n&&(n=this.y),this.x+this.width<r&&(r=this.x+this.width),this.y+this.height<s&&(s=this.y+this.height),r<=i||s<=n?null:new t(i,n,r-i,s-n)},e.intersects=function(t){return t.x<=this.x+this.width&&this.x<=t.x+t.width&&t.y<=this.y+this.height&&this.y<=t.y+t.height},e.isEmpty=function(){return this.width<=0||this.height<=0},e.clone=function(){return new t(this.x,this.y,this.width,this.height)},e.toString=function(){return"[Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")]"},At.Rectangle=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a){t.addEventListener&&(this.target=t,this.overLabel=null==i?"over":i,this.outLabel=null==e?"out":e,this.downLabel=null==n?"down":n,this.play=r,this._isPressed=!1,this._isOver=!1,this._enabled=!1,t.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),s&&(a&&(s.actionsEnabled=!1,s.gotoAndStop&&s.gotoAndStop(a)),t.hitArea=s))}var e=t.prototype;e._setEnabled=function(t){if(t!=this._enabled){var e=this.target;this._enabled=t,t?(e.cursor="pointer",e.addEventListener("rollover",this),e.addEventListener("rollout",this),e.addEventListener("mousedown",this),e.addEventListener("pressup",this),e._reset&&(e.__reset=e._reset,e._reset=this._reset)):(e.cursor=null,e.removeEventListener("rollover",this),e.removeEventListener("rollout",this),e.removeEventListener("mousedown",this),e.removeEventListener("pressup",this),e.__reset&&(e._reset=e.__reset,delete e.__reset))}},e.setEnabled=At.deprecate(e._setEnabled,"ButtonHelper.setEnabled"),e._getEnabled=function(){return this._enabled},e.getEnabled=At.deprecate(e._getEnabled,"ButtonHelper.getEnabled");try{Object.defineProperties(e,{enabled:{get:e._getEnabled,set:e._setEnabled}})}catch(i){}e.toString=function(){return"[ButtonHelper]"},e.handleEvent=function(t){var e,i=this.target,n=t.type;"mousedown"==n?(this._isPressed=!0,e=this.downLabel):"pressup"==n?(this._isPressed=!1,e=this._isOver?this.overLabel:this.outLabel):"rollover"==n?(this._isOver=!0,e=this._isPressed?this.downLabel:this.overLabel):(this._isOver=!1,e=this._isPressed?this.overLabel:this.outLabel),this.play?i.gotoAndPlay&&i.gotoAndPlay(e):i.gotoAndStop&&i.gotoAndStop(e)},e._reset=function(){var t=this.paused;this.__reset(),this.paused=t},At.ButtonHelper=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.color=t||"black",this.offsetX=e||0,this.offsetY=i||0,this.blur=n||0}var e=t.prototype;t.identity=new t("transparent",0,0,0),e.toString=function(){return"[Shadow]"},e.clone=function(){return new t(this.color,this.offsetX,this.offsetY,this.blur)},At.Shadow=t}(),this.createjs=this.createjs||{},function(){function t(t){this.EventDispatcher_constructor(),this.complete=!0,this.framerate=0,this._animations=null,this._frames=null,this._images=null,this._data=null,this._loadCount=0,this._frameHeight=0,this._frameWidth=0,this._numFrames=0,this._regX=0,this._regY=0,this._spacing=0,this._margin=0,this._parseData(t)}var e=At.extend(t,At.EventDispatcher);e._getAnimations=function(){return this._animations.slice()},e.getAnimations=At.deprecate(e._getAnimations,"SpriteSheet.getAnimations");try{Object.defineProperties(e,{animations:{get:e._getAnimations}})}catch(i){}e.getNumFrames=function(t){if(null==t)return this._frames?this._frames.length:this._numFrames||0;var e=this._data[t];return null==e?0:e.frames.length},e.getAnimation=function(t){return this._data[t]},e.getFrame=function(t){var e;return this._frames&&(e=this._frames[t])?e:null},e.getFrameBounds=function(t,e){var i=this.getFrame(t);return i?(e||new At.Rectangle).setValues(-i.regX,-i.regY,i.rect.width,i.rect.height):null},e.toString=function(){return"[SpriteSheet]"},e.clone=function(){throw"SpriteSheet cannot be cloned."},e._parseData=function(t){var e,i,n,r;if(null!=t){if(this.framerate=t.framerate||0,t.images&&(i=t.images.length)>0)for(r=this._images=[],e=0;e<i;e++){var s=t.images[e];if("string"==typeof s){var a=s;s=document.createElement("img"),s.src=a}r.push(s),s.getContext||s.naturalWidth||(this._loadCount++,this.complete=!1,function(t,e){s.onload=function(){t._handleImageLoad(e)}}(this,a),function(t,e){s.onerror=function(){t._handleImageError(e)}}(this,a))}if(null==t.frames);else if(Array.isArray(t.frames))for(this._frames=[],r=t.frames,e=0,i=r.length;e<i;e++){var o=r[e];this._frames.push({image:this._images[o[4]?o[4]:0],rect:new At.Rectangle(o[0],o[1],o[2],o[3]),regX:o[5]||0,regY:o[6]||0})}else n=t.frames,this._frameWidth=n.width,this._frameHeight=n.height,this._regX=n.regX||0,this._regY=n.regY||0,this._spacing=n.spacing||0,this._margin=n.margin||0,this._numFrames=n.count,0==this._loadCount&&this._calculateFrames();var l;if(this._animations=[],null!=(n=t.animations))for(l in this._data={},n){var c={name:l},h=n[l];if("number"==typeof h)r=c.frames=[h];else if(Array.isArray(h))if(1==h.length)c.frames=[h[0]];else for(c.speed=h[3],c.next=h[2],r=c.frames=[],e=h[0];e<=h[1];e++)r.push(e);else{c.speed=h.speed,c.next=h.next;var u=h.frames;r=c.frames="number"==typeof u?[u]:u.slice(0)}!0!==c.next&&void 0!==c.next||(c.next=l),(!1===c.next||r.length<2&&c.next==l)&&(c.next=null),c.speed||(c.speed=1),this._animations.push(l),this._data[l]=c}}},e._handleImageLoad=function(t){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},e._handleImageError=function(t){var e=new At.Event("error");e.src=t,this.dispatchEvent(e),0==--this._loadCount&&this.dispatchEvent("complete")},e._calculateFrames=function(){if(!this._frames&&0!=this._frameWidth){this._frames=[];var t=this._numFrames||1e5,e=0,i=this._frameWidth,n=this._frameHeight,r=this._spacing,s=this._margin;t:for(var a=0,o=this._images;a<o.length;a++){var l=o[a],c=l.width||l.naturalWidth,h=l.height||l.naturalHeight,u=s;while(u<=h-s-n){var d=s;while(d<=c-s-i){if(e>=t)break t;e++,this._frames.push({image:l,rect:new At.Rectangle(d,u,i,n),regX:this._regX,regY:this._regY}),d+=i+r}u+=n+r}}this._numFrames=e}},At.SpriteSheet=At.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(){this.command=null,this._stroke=null,this._strokeStyle=null,this._oldStrokeStyle=null,this._strokeDash=null,this._oldStrokeDash=null,this._strokeIgnoreScale=!1,this._fill=null,this._instructions=[],this._commitIndex=0,this._activeInstructions=[],this._dirty=!1,this._storeIndex=0,this.clear()}var e=t.prototype,i=t;t.getRGB=function(t,e,i,n){return null!=t&&null==i&&(n=e,i=255&t,e=t>>8&255,t=t>>16&255),null==n?"rgb("+t+","+e+","+i+")":"rgba("+t+","+e+","+i+","+n+")"},t.getHSL=function(t,e,i,n){return null==n?"hsl("+t%360+","+e+"%,"+i+"%)":"hsla("+t%360+","+e+"%,"+i+"%,"+n+")"},t.BASE_64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63},t.STROKE_CAPS_MAP=["butt","round","square"],t.STROKE_JOINTS_MAP=["miter","round","bevel"];var n=At.createCanvas?At.createCanvas():document.createElement("canvas");n.getContext&&(t._ctx=n.getContext("2d"),n.width=n.height=1),e._getInstructions=function(){return this._updateInstructions(),this._instructions},e.getInstructions=At.deprecate(e._getInstructions,"Graphics.getInstructions");try{Object.defineProperties(e,{instructions:{get:e._getInstructions}})}catch(r){}e.isEmpty=function(){return!(this._instructions.length||this._activeInstructions.length)},e.draw=function(t,e){this._updateInstructions();for(var i=this._instructions,n=this._storeIndex,r=i.length;n<r;n++)i[n].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,n=this._storeIndex,r=i.length;n<r;n++)!1!==(e=i[n]).path&&e.exec(t)},e.moveTo=function(t,e){return this.append(new i.MoveTo(t,e),!0)},e.lineTo=function(t,e){return this.append(new i.LineTo(t,e))},e.arcTo=function(t,e,n,r,s){return this.append(new i.ArcTo(t,e,n,r,s))},e.arc=function(t,e,n,r,s,a){return this.append(new i.Arc(t,e,n,r,s,a))},e.quadraticCurveTo=function(t,e,n,r){return this.append(new i.QuadraticCurveTo(t,e,n,r))},e.bezierCurveTo=function(t,e,n,r,s,a){return this.append(new i.BezierCurveTo(t,e,n,r,s,a))},e.rect=function(t,e,n,r){return this.append(new i.Rect(t,e,n,r))},e.closePath=function(){return this._activeInstructions.length?this.append(new i.ClosePath):this},e.clear=function(){return this._instructions.length=this._activeInstructions.length=this._commitIndex=0,this._strokeStyle=this._oldStrokeStyle=this._stroke=this._fill=this._strokeDash=this._oldStrokeDash=null,this._dirty=this._strokeIgnoreScale=!1,this},e.beginFill=function(t){return this._setFill(t?new i.Fill(t):null)},e.beginLinearGradientFill=function(t,e,n,r,s,a){return this._setFill((new i.Fill).linearGradient(t,e,n,r,s,a))},e.beginRadialGradientFill=function(t,e,n,r,s,a,o,l){return this._setFill((new i.Fill).radialGradient(t,e,n,r,s,a,o,l))},e.beginBitmapFill=function(t,e,n){return this._setFill(new i.Fill(null,n).bitmap(t,e))},e.endFill=function(){return this.beginFill()},e.setStrokeStyle=function(t,e,n,r,s){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,n,r,s),this._stroke&&(this._stroke.ignoreScale=s),this._strokeIgnoreScale=s,this},e.setStrokeDash=function(t,e){return this._updateInstructions(!0),this._strokeDash=this.command=new i.StrokeDash(t,e),this},e.beginStroke=function(t){return this._setStroke(t?new i.Stroke(t):null)},e.beginLinearGradientStroke=function(t,e,n,r,s,a){return this._setStroke((new i.Stroke).linearGradient(t,e,n,r,s,a))},e.beginRadialGradientStroke=function(t,e,n,r,s,a,o,l){return this._setStroke((new i.Stroke).radialGradient(t,e,n,r,s,a,o,l))},e.beginBitmapStroke=function(t,e){return this._setStroke((new i.Stroke).bitmap(t,e))},e.endStroke=function(){return this.beginStroke()},e.curveTo=e.quadraticCurveTo,e.drawRect=e.rect,e.drawRoundRect=function(t,e,i,n,r){return this.drawRoundRectComplex(t,e,i,n,r,r,r,r)},e.drawRoundRectComplex=function(t,e,n,r,s,a,o,l){return this.append(new i.RoundRect(t,e,n,r,s,a,o,l))},e.drawCircle=function(t,e,n){return this.append(new i.Circle(t,e,n))},e.drawEllipse=function(t,e,n,r){return this.append(new i.Ellipse(t,e,n,r))},e.drawPolyStar=function(t,e,n,r,s,a){return this.append(new i.PolyStar(t,e,n,r,s,a))},e.append=function(t,e){return this._activeInstructions.push(t),this.command=t,e||(this._dirty=!0),this},e.decodePath=function(e){var i=[this.moveTo,this.lineTo,this.quadraticCurveTo,this.bezierCurveTo,this.closePath],n=[2,2,4,6,0],r=0,s=e.length,a=[],o=0,l=0,c=t.BASE_64;while(r<s){var h=e.charAt(r),u=c[h],d=u>>3,f=i[d];if(!f||3&u)throw"bad path data (@"+r+"): "+h;var p=n[d];d||(o=l=0),a.length=0,r++;for(var m=2+(u>>2&1),_=0;_<p;_++){var v=c[e.charAt(r)],g=v>>5?-1:1;v=(31&v)<<6|c[e.charAt(r+1)],3==m&&(v=v<<6|c[e.charAt(r+2)]),v=g*v/10,_%2?o=v+=o:l=v+=l,a[_]=v,r+=m}f.apply(this,a)}return this},e.store=function(){return this._updateInstructions(!0),this._storeIndex=this._instructions.length,this},e.unstore=function(){return this._storeIndex=0,this},e.clone=function(){var e=new t;return e.command=this.command,e._stroke=this._stroke,e._strokeStyle=this._strokeStyle,e._strokeDash=this._strokeDash,e._strokeIgnoreScale=this._strokeIgnoreScale,e._fill=this._fill,e._instructions=this._instructions.slice(),e._commitIndex=this._commitIndex,e._activeInstructions=this._activeInstructions.slice(),e._dirty=this._dirty,e._storeIndex=this._storeIndex,e},e.toString=function(){return"[Graphics]"},e.mt=e.moveTo,e.lt=e.lineTo,e.at=e.arcTo,e.bt=e.bezierCurveTo,e.qt=e.quadraticCurveTo,e.a=e.arc,e.r=e.rect,e.cp=e.closePath,e.c=e.clear,e.f=e.beginFill,e.lf=e.beginLinearGradientFill,e.rf=e.beginRadialGradientFill,e.bf=e.beginBitmapFill,e.ef=e.endFill,e.ss=e.setStrokeStyle,e.sd=e.setStrokeDash,e.s=e.beginStroke,e.ls=e.beginLinearGradientStroke,e.rs=e.beginRadialGradientStroke,e.bs=e.beginBitmapStroke,e.es=e.endStroke,e.dr=e.drawRect,e.rr=e.drawRoundRect,e.rc=e.drawRoundRectComplex,e.dc=e.drawCircle,e.de=e.drawEllipse,e.dp=e.drawPolyStar,e.p=e.decodePath,e._updateInstructions=function(e){var i=this._instructions,n=this._activeInstructions,r=this._commitIndex;if(this._dirty&&n.length){i.length=r,i.push(t.beginCmd);var s=n.length,a=i.length;i.length=a+s;for(var o=0;o<s;o++)i[o+a]=n[o];this._fill&&i.push(this._fill),this._stroke&&(this._strokeDash!==this._oldStrokeDash&&i.push(this._strokeDash),this._strokeStyle!==this._oldStrokeStyle&&i.push(this._strokeStyle),e&&(this._oldStrokeStyle=this._strokeStyle,this._oldStrokeDash=this._strokeDash),i.push(this._stroke)),this._dirty=!1}e&&(n.length=0,this._commitIndex=i.length)},e._setFill=function(t){return this._updateInstructions(!0),this.command=this._fill=t,this},e._setStroke=function(t){return this._updateInstructions(!0),(this.command=this._stroke=t)&&(t.ignoreScale=this._strokeIgnoreScale),this},(i.LineTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.lineTo(this.x,this.y)},(i.MoveTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.moveTo(this.x,this.y)},(i.ArcTo=function(t,e,i,n,r){this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.radius=r}).prototype.exec=function(t){t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(i.Arc=function(t,e,i,n,r,s){this.x=t,this.y=e,this.radius=i,this.startAngle=n,this.endAngle=r,this.anticlockwise=!!s}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.anticlockwise)},(i.QuadraticCurveTo=function(t,e,i,n){this.cpx=t,this.cpy=e,this.x=i,this.y=n}).prototype.exec=function(t){t.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(i.BezierCurveTo=function(t,e,i,n,r,s){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=n,this.x=r,this.y=s}).prototype.exec=function(t){t.bezierCurveTo(this.cp1x,this.cp1y,this.cp2x,this.cp2y,this.x,this.y)},(i.Rect=function(t,e,i,n){this.x=t,this.y=e,this.w=i,this.h=n}).prototype.exec=function(t){t.rect(this.x,this.y,this.w,this.h)},(i.ClosePath=function(){}).prototype.exec=function(t){t.closePath()},(i.BeginPath=function(){}).prototype.exec=function(t){t.beginPath()},e=(i.Fill=function(t,e){this.style=t,this.matrix=e}).prototype,e.exec=function(t){if(this.style){t.fillStyle=this.style;var e=this.matrix;e&&(t.save(),t.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),t.fill(),e&&t.restore()}},e.linearGradient=function(e,i,n,r,s,a){for(var o=this.style=t._ctx.createLinearGradient(n,r,s,a),l=0,c=e.length;l<c;l++)o.addColorStop(i[l],e[l]);return o.props={colors:e,ratios:i,x0:n,y0:r,x1:s,y1:a,type:"linear"},this},e.radialGradient=function(e,i,n,r,s,a,o,l){for(var c=this.style=t._ctx.createRadialGradient(n,r,s,a,o,l),h=0,u=e.length;h<u;h++)c.addColorStop(i[h],e[h]);return c.props={colors:e,ratios:i,x0:n,y0:r,r0:s,x1:a,y1:o,r1:l,type:"radial"},this},e.bitmap=function(e,i){if(e.naturalWidth||e.getContext||e.readyState>=2){var n=this.style=t._ctx.createPattern(e,i||"");n.props={image:e,repetition:i,type:"bitmap"}}return this},e.path=!1,e=(i.Stroke=function(t,e){this.style=t,this.ignoreScale=e}).prototype,e.exec=function(t){this.style&&(t.strokeStyle=this.style,this.ignoreScale&&(t.save(),t.setTransform(1,0,0,1,0,0)),t.stroke(),this.ignoreScale&&t.restore())},e.linearGradient=i.Fill.prototype.linearGradient,e.radialGradient=i.Fill.prototype.radialGradient,e.bitmap=i.Fill.prototype.bitmap,e.path=!1,e=(i.StrokeStyle=function(t,e,i,n,r){this.width=t,this.caps=e,this.joints=i,this.miterLimit=n,this.ignoreScale=r}).prototype,e.exec=function(e){e.lineWidth=null==this.width?"1":this.width,e.lineCap=null==this.caps?"butt":isNaN(this.caps)?this.caps:t.STROKE_CAPS_MAP[this.caps],e.lineJoin=null==this.joints?"miter":isNaN(this.joints)?this.joints:t.STROKE_JOINTS_MAP[this.joints],e.miterLimit=null==this.miterLimit?"10":this.miterLimit,e.ignoreScale=null!=this.ignoreScale&&this.ignoreScale},e.path=!1,(i.StrokeDash=function(t,e){this.segments=t,this.offset=e||0}).prototype.exec=function(t){t.setLineDash&&(t.setLineDash(this.segments||i.StrokeDash.EMPTY_SEGMENTS),t.lineDashOffset=this.offset||0)},i.StrokeDash.EMPTY_SEGMENTS=[],(i.RoundRect=function(t,e,i,n,r,s,a,o){this.x=t,this.y=e,this.w=i,this.h=n,this.radiusTL=r,this.radiusTR=s,this.radiusBR=a,this.radiusBL=o}).prototype.exec=function(t){var e=(l<c?l:c)/2,i=0,n=0,r=0,s=0,a=this.x,o=this.y,l=this.w,c=this.h,h=this.radiusTL,u=this.radiusTR,d=this.radiusBR,f=this.radiusBL;h<0&&(h*=i=-1),h>e&&(h=e),u<0&&(u*=n=-1),u>e&&(u=e),d<0&&(d*=r=-1),d>e&&(d=e),f<0&&(f*=s=-1),f>e&&(f=e),t.moveTo(a+l-u,o),t.arcTo(a+l+u*n,o-u*n,a+l,o+u,u),t.lineTo(a+l,o+c-d),t.arcTo(a+l+d*r,o+c+d*r,a+l-d,o+c,d),t.lineTo(a+f,o+c),t.arcTo(a-f*s,o+c+f*s,a,o+c-f,f),t.lineTo(a,o+h),t.arcTo(a-h*i,o-h*i,a+h,o,h),t.closePath()},(i.Circle=function(t,e,i){this.x=t,this.y=e,this.radius=i}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,0,2*Math.PI)},(i.Ellipse=function(t,e,i,n){this.x=t,this.y=e,this.w=i,this.h=n}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.w,r=this.h,s=.5522848,a=n/2*s,o=r/2*s,l=e+n,c=i+r,h=e+n/2,u=i+r/2;t.moveTo(e,u),t.bezierCurveTo(e,u-o,h-a,i,h,i),t.bezierCurveTo(h+a,i,l,u-o,l,u),t.bezierCurveTo(l,u+o,h+a,c,h,c),t.bezierCurveTo(h-a,c,e,u+o,e,u)},(i.PolyStar=function(t,e,i,n,r,s){this.x=t,this.y=e,this.radius=i,this.sides=n,this.pointSize=r,this.angle=s}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.radius,r=(this.angle||0)/180*Math.PI,s=this.sides,a=1-(this.pointSize||0),o=Math.PI/s;t.moveTo(e+Math.cos(r)*n,i+Math.sin(r)*n);for(var l=0;l<s;l++)r+=o,1!=a&&t.lineTo(e+Math.cos(r)*n*a,i+Math.sin(r)*n*a),r+=o,t.lineTo(e+Math.cos(r)*n,i+Math.sin(r)*n);t.closePath()},t.beginCmd=new i.BeginPath,At.Graphics=t}(),this.createjs=this.createjs||{},function(){function t(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.bitmapCache=null,this.id=At.UID.get(),this.mouseEnabled=!0,this.tickEnabled=!0,this.name=null,this.parent=null,this.regX=0,this.regY=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.skewX=0,this.skewY=0,this.shadow=null,this.visible=!0,this.x=0,this.y=0,this.transformMatrix=null,this.compositeOperation=null,this.snapToPixel=!0,this.filters=null,this.mask=null,this.hitArea=null,this.cursor=null,this._props=new At.DisplayProps,this._rectangle=new At.Rectangle,this._bounds=null,this._webGLRenderStyle=t._StageGL_NONE}var e=At.extend(t,At.EventDispatcher);t._MOUSE_EVENTS=["click","dblclick","mousedown","mouseout","mouseover","pressmove","pressup","rollout","rollover"],t.suppressCrossDomainErrors=!1,t._snapToPixelEnabled=!1,t._StageGL_NONE=0,t._StageGL_SPRITE=1,t._StageGL_BITMAP=2;var i=At.createCanvas?At.createCanvas():document.createElement("canvas");i.getContext&&(t._hitTestCanvas=i,t._hitTestContext=i.getContext("2d"),i.width=i.height=1),e._getStage=function(){var t=this,e=At["Stage"];while(t.parent)t=t.parent;return t instanceof e?t:null},e.getStage=At.deprecate(e._getStage,"DisplayObject.getStage");try{Object.defineProperties(e,{stage:{get:e._getStage},cacheID:{get:function(){return this.bitmapCache&&this.bitmapCache.cacheID},set:function(t){this.bitmapCache&&(this.bitmapCache.cacheID=t)}},scale:{get:function(){return this.scaleX},set:function(t){this.scaleX=this.scaleY=t}}})}catch(n){}e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){var i=this.bitmapCache;return!(!i||e)&&i.draw(t)},e.updateContext=function(e){var i=this,n=i.mask,r=i._props.matrix;n&&n.graphics&&!n.graphics.isEmpty()&&(n.getMatrix(r),e.transform(r.a,r.b,r.c,r.d,r.tx,r.ty),n.graphics.drawAsPath(e),e.clip(),r.invert(),e.transform(r.a,r.b,r.c,r.d,r.tx,r.ty)),this.getMatrix(r);var s=r.tx,a=r.ty;t._snapToPixelEnabled&&i.snapToPixel&&(s=s+(s<0?-.5:.5)|0,a=a+(a<0?-.5:.5)|0),e.transform(r.a,r.b,r.c,r.d,s,a),e.globalAlpha*=i.alpha,i.compositeOperation&&(e.globalCompositeOperation=i.compositeOperation),i.shadow&&this._applyShadow(e,i.shadow)},e.cache=function(t,e,i,n,r,s){this.bitmapCache||(this.bitmapCache=new At.BitmapCache),this.bitmapCache.define(this,t,e,i,n,r,s)},e.updateCache=function(t){if(!this.bitmapCache)throw"cache() must be called before updateCache()";this.bitmapCache.update(t)},e.uncache=function(){this.bitmapCache&&(this.bitmapCache.release(),this.bitmapCache=void 0)},e.getCacheDataURL=function(){return this.bitmapCache?this.bitmapCache.getDataURL():null},e.localToGlobal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).transformPoint(t,e,i||new At.Point)},e.globalToLocal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t,e,i||new At.Point)},e.localToLocal=function(t,e,i,n){return n=this.localToGlobal(t,e,n),i.globalToLocal(n.x,n.y,n)},e.setTransform=function(t,e,i,n,r,s,a,o,l){return this.x=t||0,this.y=e||0,this.scaleX=null==i?1:i,this.scaleY=null==n?1:n,this.rotation=r||0,this.skewX=s||0,this.skewY=a||0,this.regX=o||0,this.regY=l||0,this},e.getMatrix=function(t){var e=this,i=t&&t.identity()||new At.Matrix2D;return e.transformMatrix?i.copy(e.transformMatrix):i.appendTransform(e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.skewX,e.skewY,e.regX,e.regY)},e.getConcatenatedMatrix=function(t){var e=this,i=this.getMatrix(t);while(e=e.parent)i.prependMatrix(e.getMatrix(e._props.matrix));return i},e.getConcatenatedDisplayProps=function(t){t=t?t.identity():new At.DisplayProps;var e=this,i=e.getMatrix(t.matrix);do{t.prepend(e.visible,e.alpha,e.shadow,e.compositeOperation),e!=this&&i.prependMatrix(e.getMatrix(e._props.matrix))}while(e=e.parent);return t},e.hitTest=function(e,i){var n=t._hitTestContext;n.setTransform(1,0,0,1,-e,-i),this.draw(n);var r=this._testHit(n);return n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,2,2),r},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.getBounds=function(){if(this._bounds)return this._rectangle.copy(this._bounds);var t=this.cacheCanvas;if(t){var e=this._cacheScale;return this._rectangle.setValues(this._cacheOffsetX,this._cacheOffsetY,t.width/e,t.height/e)}return null},e.getTransformedBounds=function(){return this._getBounds()},e.setBounds=function(t,e,i,n){this._bounds=null!=t?(this._bounds||new At.Rectangle).setValues(t,e,i,n):t},e.clone=function(){return this._cloneProps(new t)},e.toString=function(){return"[DisplayObject (name="+this.name+")]"},e._updateState=null,e._cloneProps=function(t){return t.alpha=this.alpha,t.mouseEnabled=this.mouseEnabled,t.tickEnabled=this.tickEnabled,t.name=this.name,t.regX=this.regX,t.regY=this.regY,t.rotation=this.rotation,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shadow=this.shadow,t.skewX=this.skewX,t.skewY=this.skewY,t.visible=this.visible,t.x=this.x,t.y=this.y,t.compositeOperation=this.compositeOperation,t.snapToPixel=this.snapToPixel,t.filters=null==this.filters?null:this.filters.slice(0),t.mask=this.mask,t.hitArea=this.hitArea,t.cursor=this.cursor,t._bounds=this._bounds,t},e._applyShadow=function(t,e){e=e||Shadow.identity,t.shadowColor=e.color,t.shadowOffsetX=e.offsetX,t.shadowOffsetY=e.offsetY,t.shadowBlur=e.blur},e._tick=function(t){var e=this._listeners;e&&e["tick"]&&(t.target=null,t.propagationStopped=t.immediatePropagationStopped=!1,this.dispatchEvent(t))},e._testHit=function(e){try{var i=e.getImageData(0,0,1,1).data[3]>1}catch(n){if(!t.suppressCrossDomainErrors)throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."}return i},e._getBounds=function(t,e){return this._transformBounds(this.getBounds(),t,e)},e._transformBounds=function(t,e,i){if(!t)return t;var n=t.x,r=t.y,s=t.width,a=t.height,o=this._props.matrix;o=i?o.identity():this.getMatrix(o),(n||r)&&o.appendTransform(0,0,1,1,0,0,0,-n,-r),e&&o.prependMatrix(e);var l=s*o.a,c=s*o.b,h=a*o.c,u=a*o.d,d=o.tx,f=o.ty,p=d,m=d,_=f,v=f;return(n=l+d)<p?p=n:n>m&&(m=n),(n=l+h+d)<p?p=n:n>m&&(m=n),(n=h+d)<p?p=n:n>m&&(m=n),(r=c+f)<_?_=r:r>v&&(v=r),(r=c+u+f)<_?_=r:r>v&&(v=r),(r=u+f)<_?_=r:r>v&&(v=r),t.setValues(p,_,m-p,v-_)},e._hasMouseEventListener=function(){for(var e=t._MOUSE_EVENTS,i=0,n=e.length;i<n;i++)if(this.hasEventListener(e[i]))return!0;return!!this.cursor},At.DisplayObject=At.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var e=At.extend(t,At.DisplayObject);e._getNumChildren=function(){return this.children.length},e.getNumChildren=At.deprecate(e._getNumChildren,"Container.getNumChildren");try{Object.defineProperties(e,{numChildren:{get:e._getNumChildren}})}catch(i){}e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;for(var i=this.children.slice(),n=0,r=i.length;n<r;n++){var s=i[n];s.isVisible()&&(t.save(),s.updateContext(t),s.draw(t),t.restore())}return!0},e.addChild=function(t){if(null==t)return t;var e=arguments.length;if(e>1){for(var i=0;i<e;i++)this.addChild(arguments[i]);return arguments[e-1]}var n=t.parent,r=n===this;return n&&n._removeChildAt(At.indexOf(n.children,t),r),t.parent=this,this.children.push(t),r||t.dispatchEvent("added"),t},e.addChildAt=function(t,e){var i=arguments.length,n=arguments[i-1];if(n<0||n>this.children.length)return arguments[i-2];if(i>2){for(var r=0;r<i-1;r++)this.addChildAt(arguments[r],n+r);return arguments[i-2]}var s=t.parent,a=s===this;return s&&s._removeChildAt(At.indexOf(s.children,t),a),t.parent=this,this.children.splice(e,0,t),a||t.dispatchEvent("added"),t},e.removeChild=function(t){var e=arguments.length;if(e>1){for(var i=!0,n=0;n<e;n++)i=i&&this.removeChild(arguments[n]);return i}return this._removeChildAt(At.indexOf(this.children,t))},e.removeChildAt=function(t){var e=arguments.length;if(e>1){for(var i=[],n=0;n<e;n++)i[n]=arguments[n];i.sort((function(t,e){return e-t}));var r=!0;for(n=0;n<e;n++)r=r&&this._removeChildAt(i[n]);return r}return this._removeChildAt(t)},e.removeAllChildren=function(){var t=this.children;while(t.length)this._removeChildAt(0)},e.getChildAt=function(t){return this.children[t]},e.getChildByName=function(t){for(var e=this.children,i=0,n=e.length;i<n;i++)if(e[i].name==t)return e[i];return null},e.sortChildren=function(t){this.children.sort(t)},e.getChildIndex=function(t){return At.indexOf(this.children,t)},e.swapChildrenAt=function(t,e){var i=this.children,n=i[t],r=i[e];n&&r&&(i[t]=r,i[e]=n)},e.swapChildren=function(t,e){for(var i,n,r=this.children,s=0,a=r.length;s<a;s++)if(r[s]==t&&(i=s),r[s]==e&&(n=s),null!=i&&null!=n)break;s!=a&&(r[i]=e,r[n]=t)},e.setChildIndex=function(t,e){var i=this.children,n=i.length;if(!(t.parent!=this||e<0||e>=n)){for(var r=0;r<n;r++)if(i[r]==t)break;r!=n&&r!=e&&(i.splice(r,1),i.splice(e,0,t))}},e.contains=function(t){while(t){if(t==this)return!0;t=t.parent}return!1},e.hitTest=function(t,e){return null!=this.getObjectUnderPoint(t,e)},e.getObjectsUnderPoint=function(t,e,i){var n=[],r=this.localToGlobal(t,e);return this._getObjectsUnderPoint(r.x,r.y,n,i>0,1==i),n},e.getObjectUnderPoint=function(t,e,i){var n=this.localToGlobal(t,e);return this._getObjectsUnderPoint(n.x,n.y,null,i>0,1==i)},e.getBounds=function(){return this._getBounds(null,!0)},e.getTransformedBounds=function(){return this._getBounds()},e.clone=function(e){var i=this._cloneProps(new t);return e&&this._cloneChildren(i),i},e.toString=function(){return"[Container (name="+this.name+")]"},e._tick=function(t){if(this.tickChildren)for(var e=this.children.length-1;e>=0;e--){var i=this.children[e];i.tickEnabled&&i._tick&&i._tick(t)}this.DisplayObject__tick(t)},e._cloneChildren=function(t){t.children.length&&t.removeAllChildren();for(var e=t.children,i=0,n=this.children.length;i<n;i++){var r=this.children[i].clone(!0);r.parent=t,e.push(r)}},e._removeChildAt=function(t,e){if(t<0||t>this.children.length-1)return!1;var i=this.children[t];return i&&(i.parent=null),this.children.splice(t,1),e||i.dispatchEvent("removed"),!0},e._getObjectsUnderPoint=function(e,i,n,r,s,a){if(a=a||0,!a&&!this._testMask(this,e,i))return null;var o,l=At.DisplayObject._hitTestContext;s=s||r&&this._hasMouseEventListener();for(var c=this.children,h=c.length,u=h-1;u>=0;u--){var d=c[u],f=d.hitArea;if(d.visible&&(f||d.isVisible())&&(!r||d.mouseEnabled)&&(f||this._testMask(d,e,i)))if(!f&&d instanceof t){var p=d._getObjectsUnderPoint(e,i,n,r,s,a+1);if(!n&&p)return r&&!this.mouseChildren?this:p}else{if(r&&!s&&!d._hasMouseEventListener())continue;var m=d.getConcatenatedDisplayProps(d._props);if(o=m.matrix,f&&(o.appendMatrix(f.getMatrix(f._props.matrix)),m.alpha=f.alpha),l.globalAlpha=m.alpha,l.setTransform(o.a,o.b,o.c,o.d,o.tx-e,o.ty-i),(f||d).draw(l),!this._testHit(l))continue;if(l.setTransform(1,0,0,1,0,0),l.clearRect(0,0,2,2),!n)return r&&!this.mouseChildren?this:d;n.push(d)}}return null},e._testMask=function(t,e,i){var n=t.mask;if(!n||!n.graphics||n.graphics.isEmpty())return!0;var r=this._props.matrix,s=t.parent;r=s?s.getConcatenatedMatrix(r):r.identity(),r=n.getMatrix(n._props.matrix).prependMatrix(r);var a=At.DisplayObject._hitTestContext;return a.setTransform(r.a,r.b,r.c,r.d,r.tx-e,r.ty-i),n.graphics.drawAsPath(a),a.fillStyle="#000",a.fill(),!!this._testHit(a)&&(a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,2,2),!0)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();if(i)return this._transformBounds(i,t,e);var n=this._props.matrix;n=e?n.identity():this.getMatrix(n),t&&n.prependMatrix(t);for(var r=this.children.length,s=null,a=0;a<r;a++){var o=this.children[a];o.visible&&(i=o._getBounds(n))&&(s?s.extend(i.x,i.y,i.width,i.height):s=i.clone())}return s},At.Container=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof t?document.getElementById(t):t,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var e=At.extend(t,At.Container);e._get_nextStage=function(){return this._nextStage},e._set_nextStage=function(t){this._nextStage&&(this._nextStage._prevStage=null),t&&(t._prevStage=this),this._nextStage=t};try{Object.defineProperties(e,{nextStage:{get:e._get_nextStage,set:e._set_nextStage}})}catch(i){}e.update=function(t){if(this.canvas&&(this.tickOnUpdate&&this.tick(t),!1!==this.dispatchEvent("drawstart",!1,!0))){At.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var e=this.drawRect,i=this.canvas.getContext("2d");i.setTransform(1,0,0,1,0,0),this.autoClear&&(e?i.clearRect(e.x,e.y,e.width,e.height):i.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),i.save(),this.drawRect&&(i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()),this.updateContext(i),this.draw(i,!1),i.restore(),this.dispatchEvent("drawend")}},e.tick=function(t){if(this.tickEnabled&&!1!==this.dispatchEvent("tickstart",!1,!0)){var e=new At.Event("tick");if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);this._tick(e),this.dispatchEvent("tickend")}},e.handleEvent=function(t){"tick"==t.type&&this.update(t)},e.clear=function(){if(this.canvas){var t=this.canvas.getContext("2d");t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},e.toDataURL=function(t,e){var i,n=this.canvas.getContext("2d"),r=this.canvas.width,s=this.canvas.height;if(t){i=n.getImageData(0,0,r,s);var a=n.globalCompositeOperation;n.globalCompositeOperation="destination-over",n.fillStyle=t,n.fillRect(0,0,r,s)}var o=this.canvas.toDataURL(e||"image/png");return t&&(n.putImageData(i,0,0),n.globalCompositeOperation=a),o},e.enableMouseOver=function(t){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==t&&this._testMouseOver(!0)),null==t)t=20;else if(t<=0)return;var e=this;this._mouseOverIntervalID=setInterval((function(){e._testMouseOver()}),1e3/Math.min(50,t))},e.enableDOMEvents=function(t){null==t&&(t=!0);var e,i,n=this._eventListeners;if(!t&&n){for(e in n)i=n[e],i.t.removeEventListener(e,i.f,!1);this._eventListeners=null}else if(t&&!n&&this.canvas){var r=window.addEventListener?window:document,s=this;for(e in n=this._eventListeners={},n["mouseup"]={t:r,f:function(t){s._handleMouseUp(t)}},n["mousemove"]={t:r,f:function(t){s._handleMouseMove(t)}},n["dblclick"]={t:this.canvas,f:function(t){s._handleDoubleClick(t)}},n["mousedown"]={t:this.canvas,f:function(t){s._handleMouseDown(t)}},n)i=n[e],i.t.addEventListener(e,i.f,!1)}},e.clone=function(){throw"Stage cannot be cloned."},e.toString=function(){return"[Stage (name="+this.name+")]"},e._getElementRect=function(t){var e;try{e=t.getBoundingClientRect()}catch(c){e={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}var i=(window.pageXOffset||document.scrollLeft||0)-(document.clientLeft||document.body.clientLeft||0),n=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),r=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,s=parseInt(r.paddingLeft)+parseInt(r.borderLeftWidth),a=parseInt(r.paddingTop)+parseInt(r.borderTopWidth),o=parseInt(r.paddingRight)+parseInt(r.borderRightWidth),l=parseInt(r.paddingBottom)+parseInt(r.borderBottomWidth);return{left:e.left+i+s,right:e.right+i-o,top:e.top+n+a,bottom:e.bottom+n-l}},e._getPointerData=function(t){var e=this._pointerData[t];return e||(e=this._pointerData[t]={x:0,y:0}),e},e._handleMouseMove=function(t){t||(t=window.event),this._handlePointerMove(-1,t,t.pageX,t.pageY)},e._handlePointerMove=function(t,e,i,n,r){if((!this._prevStage||void 0!==r)&&this.canvas){var s=this._nextStage,a=this._getPointerData(t),o=a.inBounds;this._updatePointerPosition(t,e,i,n),(o||a.inBounds||this.mouseMoveOutside)&&(-1===t&&a.inBounds==!o&&this._dispatchMouseEvent(this,o?"mouseleave":"mouseenter",!1,t,a,e),this._dispatchMouseEvent(this,"stagemousemove",!1,t,a,e),this._dispatchMouseEvent(a.target,"pressmove",!0,t,a,e)),s&&s._handlePointerMove(t,e,i,n,null)}},e._updatePointerPosition=function(t,e,i,n){var r=this._getElementRect(this.canvas);i-=r.left,n-=r.top;var s=this.canvas.width,a=this.canvas.height;i/=(r.right-r.left)/s,n/=(r.bottom-r.top)/a;var o=this._getPointerData(t);(o.inBounds=i>=0&&n>=0&&i<=s-1&&n<=a-1)?(o.x=i,o.y=n):this.mouseMoveOutside&&(o.x=i<0?0:i>s-1?s-1:i,o.y=n<0?0:n>a-1?a-1:n),o.posEvtObj=e,o.rawX=i,o.rawY=n,t!==this._primaryPointerID&&-1!==t||(this.mouseX=o.x,this.mouseY=o.y,this.mouseInBounds=o.inBounds)},e._handleMouseUp=function(t){this._handlePointerUp(-1,t,!1)},e._handlePointerUp=function(t,e,i,n){var r=this._nextStage,s=this._getPointerData(t);if(!this._prevStage||void 0!==n){var a=null,o=s.target;n||!o&&!r||(a=this._getObjectsUnderPoint(s.x,s.y,null,!0)),s.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,t,s,e,a),s.down=!1),a==o&&this._dispatchMouseEvent(o,"click",!0,t,s,e),this._dispatchMouseEvent(o,"pressup",!0,t,s,e),i?(t==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[t]):s.target=null,r&&r._handlePointerUp(t,e,i,n||a&&this)}},e._handleMouseDown=function(t){this._handlePointerDown(-1,t,t.pageX,t.pageY)},e._handlePointerDown=function(t,e,i,n,r){this.preventSelection&&e.preventDefault(),null!=this._primaryPointerID&&-1!==t||(this._primaryPointerID=t),null!=n&&this._updatePointerPosition(t,e,i,n);var s=null,a=this._nextStage,o=this._getPointerData(t);r||(s=o.target=this._getObjectsUnderPoint(o.x,o.y,null,!0)),o.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,t,o,e,s),o.down=!0),this._dispatchMouseEvent(s,"mousedown",!0,t,o,e),a&&a._handlePointerDown(t,e,i,n,r||s&&this)},e._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var n=this._nextStage;if(this._mouseOverIntervalID){var r=this._getPointerData(-1);if(r&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var s,a,o,l=r.posEvtObj,c=i||l&&l.target==this.canvas,h=null,u=-1,d="";!e&&(t||this.mouseInBounds&&c)&&(h=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var f=this._mouseOverTarget||[],p=f[f.length-1],m=this._mouseOverTarget=[];s=h;while(s)m.unshift(s),d||(d=s.cursor),s=s.parent;for(this.canvas.style.cursor=d,!e&&i&&(i.canvas.style.cursor=d),a=0,o=m.length;a<o;a++){if(m[a]!=f[a])break;u=a}for(p!=h&&this._dispatchMouseEvent(p,"mouseout",!0,-1,r,l,h),a=f.length-1;a>u;a--)this._dispatchMouseEvent(f[a],"rollout",!1,-1,r,l,h);for(a=m.length-1;a>u;a--)this._dispatchMouseEvent(m[a],"rollover",!1,-1,r,l,p);p!=h&&this._dispatchMouseEvent(h,"mouseover",!0,-1,r,l,p),n&&n._testMouseOver(t,e||h&&this,i||c&&this)}}else n&&n._testMouseOver(t,e,i)}},e._handleDoubleClick=function(t,e){var i=null,n=this._nextStage,r=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(r.x,r.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,r,t)),n&&n._handleDoubleClick(t,e||i&&this)},e._dispatchMouseEvent=function(t,e,i,n,r,s,a){if(t&&(i||t.hasEventListener(e))){var o=new At.MouseEvent(e,i,!1,r.x,r.y,s,n,n===this._primaryPointerID||-1===n,r.rawX,r.rawY,a);t.dispatchEvent(o)}},At.Stage=At.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e,i){if(this.Stage_constructor(e),void 0!==i){if("object"!==Object(kt["a"])(i))throw"Invalid options object";var n=i.premultiply,r=i.transparent,s=i.antialias,a=i.preserveBuffer,o=i.autoPurge}this.vocalDebug=!1,this._preserveBuffer=a||!1,this._antialias=s||!1,this._transparent=r||!1,this._premultiply=n||!1,this._autoPurge=void 0,this.autoPurge=o,this._viewportWidth=0,this._viewportHeight=0,this._projectionMatrix=null,this._webGLContext=null,this._clearColor={r:.5,g:.5,b:.5,a:0},this._maxCardsPerBatch=t.DEFAULT_MAX_BATCH_SIZE,this._activeShader=null,this._vertices=null,this._vertexPositionBuffer=null,this._uvs=null,this._uvPositionBuffer=null,this._indices=null,this._textureIndexBuffer=null,this._alphas=null,this._alphaBuffer=null,this._textureDictionary=[],this._textureIDs={},this._batchTextures=[],this._baseTextures=[],this._batchTextureCount=8,this._lastTextureInsert=-1,this._batchID=0,this._drawID=0,this._slotBlacklist=[],this._isDrawing=0,this._lastTrackedCanvas=0,this.isCacheControlled=!1,this._cacheContainer=new At.Container,this._initializeWebGL()}var e=At.extend(t,At.Stage);t.buildUVRects=function(t,e,i){if(!t||!t._frames)return null;void 0===e&&(e=-1),void 0===i&&(i=!1);for(var n=-1!=e&&i?e:0,r=-1!=e&&i?e+1:t._frames.length,s=n;s<r;s++){var a=t._frames[s];if(!(a.uvRect||a.image.width<=0||a.image.height<=0)){var o=a.rect;a.uvRect={t:o.y/a.image.height,l:o.x/a.image.width,b:(o.y+o.height)/a.image.height,r:(o.x+o.width)/a.image.width}}}return t._frames[-1!=e?e:0].uvRect||{t:0,l:0,b:1,r:1}},t.isWebGLActive=function(t){return t&&t instanceof WebGLRenderingContext&&"undefined"!==typeof WebGLRenderingContext},t.VERTEX_PROPERTY_COUNT=6,t.INDICIES_PER_CARD=6,t.DEFAULT_MAX_BATCH_SIZE=1e4,t.WEBGL_MAX_INDEX_NUM=Math.pow(2,16),t.UV_RECT={t:0,l:0,b:1,r:1};try{t.COVER_VERT=new Float32Array([-1,1,1,1,-1,-1,1,1,1,-1,-1,-1]),t.COVER_UV=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]),t.COVER_UV_FLIP=new Float32Array([0,1,1,1,0,0,1,1,1,0,0,0])}catch(i){}t.REGULAR_VARYING_HEADER="precision mediump float;varying vec2 vTextureCoord;varying lowp float indexPicker;varying lowp float alphaValue;",t.REGULAR_VERTEX_HEADER=t.REGULAR_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;attribute lowp float textureIndex;attribute lowp float objectAlpha;uniform mat4 pMatrix;",t.REGULAR_FRAGMENT_HEADER=t.REGULAR_VARYING_HEADER+"uniform sampler2D uSampler[{{count}}];",t.REGULAR_VERTEX_BODY="void main(void) {gl_Position = vec4((vertexPosition.x * pMatrix[0][0]) + pMatrix[3][0],(vertexPosition.y * pMatrix[1][1]) + pMatrix[3][1],pMatrix[3][2],1.0);alphaValue = objectAlpha;indexPicker = textureIndex;vTextureCoord = uvPosition;}",t.REGULAR_FRAGMENT_BODY="void main(void) {vec4 color = vec4(1.0, 0.0, 0.0, 1.0);if (indexPicker <= 0.5) {color = texture2D(uSampler[0], vTextureCoord);{{alternates}}}{{fragColor}}}",t.REGULAR_FRAG_COLOR_NORMAL="gl_FragColor = vec4(color.rgb, color.a * alphaValue);",t.REGULAR_FRAG_COLOR_PREMULTIPLY="if(color.a > 0.0035) {gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);} else {gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);}",t.PARTICLE_VERTEX_BODY=t.REGULAR_VERTEX_BODY,t.PARTICLE_FRAGMENT_BODY=t.REGULAR_FRAGMENT_BODY,t.COVER_VARYING_HEADER="precision mediump float;varying highp vec2 vRenderCoord;varying highp vec2 vTextureCoord;",t.COVER_VERTEX_HEADER=t.COVER_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;uniform float uUpright;",t.COVER_FRAGMENT_HEADER=t.COVER_VARYING_HEADER+"uniform sampler2D uSampler;",t.COVER_VERTEX_BODY="void main(void) {gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);vRenderCoord = uvPosition;vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));}",t.COVER_FRAGMENT_BODY="void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = color;}",e._get_isWebGL=function(){return!!this._webGLContext},e._set_autoPurge=function(t){t=isNaN(t)?1200:t,-1!=t&&(t=t<10?10:t),this._autoPurge=t},e._get_autoPurge=function(){return Number(this._autoPurge)};try{Object.defineProperties(e,{isWebGL:{get:e._get_isWebGL},autoPurge:{get:e._get_autoPurge,set:e._set_autoPurge}})}catch(i){}e._initializeWebGL=function(){if(this.canvas){if(!this._webGLContext||this._webGLContext.canvas!==this.canvas){var t={depth:!1,alpha:this._transparent,stencil:!0,antialias:this._antialias,premultipliedAlpha:this._premultiply,preserveDrawingBuffer:this._preserveBuffer},e=this._webGLContext=this._fetchWebGLContext(this.canvas,t);if(!e)return null;this.updateSimultaneousTextureCount(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),this._maxTextureSlots=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._createBuffers(e),this._initTextures(e),e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._premultiply),this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a),this.updateViewport(this._viewportWidth||this.canvas.width,this._viewportHeight||this.canvas.height)}}else this._webGLContext=null;return this._webGLContext},e.update=function(t){if(this.canvas){if(this.tickOnUpdate&&this.tick(t),this.dispatchEvent("drawstart"),this.autoClear&&this.clear(),this._webGLContext)this._batchDraw(this,this._webGLContext),-1==this._autoPurge||this._drawID%(this._autoPurge/2|0)||this.purgeTextures(this._autoPurge);else{var e=this.canvas.getContext("2d");e.save(),this.updateContext(e),this.draw(e,!1),e.restore()}this.dispatchEvent("drawend")}},e.clear=function(){if(this.canvas)if(t.isWebGLActive(this._webGLContext)){var e=this._webGLContext,i=this._clearColor,n=this._transparent?i.a:1;this._webGLContext.clearColor(i.r*n,i.g*n,i.b*n,n),e.clear(e.COLOR_BUFFER_BIT),this._webGLContext.clearColor(i.r,i.g,i.b,i.a)}else this.Stage_clear()},e.draw=function(e,i){if(e===this._webGLContext&&t.isWebGLActive(this._webGLContext)){var n=this._webGLContext;return this._batchDraw(this,n,i),!0}return this.Stage_draw(e,i)},e.cacheDraw=function(e,i,n){if(t.isWebGLActive(this._webGLContext)){var r=this._webGLContext;return this._cacheDraw(r,e,i,n),!0}return!1},e.protectTextureSlot=function(t,e){if(t>this._maxTextureSlots||t<0)throw"Slot outside of acceptable range";this._slotBlacklist[t]=!!e},e.getTargetRenderTexture=function(t,e,i){var n,r=!1,s=this._webGLContext;if(void 0!==t.__lastRT&&t.__lastRT===t.__rtA&&(r=!0),r?(void 0===t.__rtB?t.__rtB=this.getRenderBufferTexture(e,i):(e==t.__rtB._width&&i==t.__rtB._height||this.resizeTexture(t.__rtB,e,i),this.setTextureParams(s)),n=t.__rtB):(void 0===t.__rtA?t.__rtA=this.getRenderBufferTexture(e,i):(e==t.__rtA._width&&i==t.__rtA._height||this.resizeTexture(t.__rtA,e,i),this.setTextureParams(s)),n=t.__rtA),!n)throw"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances";return t.__lastRT=n,n},e.releaseTexture=function(t){var e,i;if(t){if(t.children)for(e=0,i=t.children.length;e<i;e++)this.releaseTexture(t.children[e]);t.cacheCanvas&&t.uncache();var n=void 0;if(void 0!==t._storeID){if(t===this._textureDictionary[t._storeID])return this._killTextureObject(t),void(t._storeID=void 0);n=t}else if(2===t._webGLRenderStyle)n=t.image;else if(1===t._webGLRenderStyle){for(e=0,i=t.spriteSheet._images.length;e<i;e++)this.releaseTexture(t.spriteSheet._images[e]);return}void 0!==n?(this._killTextureObject(this._textureDictionary[n._storeID]),n._storeID=void 0):this.vocalDebug&&console.log("No associated texture found on release")}},e.purgeTextures=function(t){void 0==t&&(t=100);for(var e=this._textureDictionary,i=e.length,n=0;n<i;n++){var r=e[n];r&&(r._drawID+t<=this._drawID&&this._killTextureObject(r))}},e.updateSimultaneousTextureCount=function(t){var e=this._webGLContext,n=!1;(t<1||isNaN(t))&&(t=1),this._batchTextureCount=t;while(!n)try{this._activeShader=this._fetchShaderProgram(e),n=!0}catch(i){if(1==this._batchTextureCount)throw"Cannot compile shader "+i;this._batchTextureCount-=4,this._batchTextureCount<1&&(this._batchTextureCount=1),this.vocalDebug&&console.log("Reducing desired texture count due to errors: "+this._batchTextureCount)}},e.updateViewport=function(t,e){this._viewportWidth=0|t,this._viewportHeight=0|e;var i=this._webGLContext;i&&(i.viewport(0,0,this._viewportWidth,this._viewportHeight),this._projectionMatrix=new Float32Array([2/this._viewportWidth,0,0,0,0,-2/this._viewportHeight,1,0,0,0,1,0,-1,1,.1,0]),this._projectionMatrixFlip=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),this._projectionMatrixFlip.set(this._projectionMatrix),this._projectionMatrixFlip[5]*=-1,this._projectionMatrixFlip[13]*=-1)},e.getFilterShader=function(t){t||(t=this);var e=this._webGLContext,n=this._activeShader;if(t._builtShader)n=t._builtShader,t.shaderParamSetup&&(e.useProgram(n),t.shaderParamSetup(e,this,n));else try{n=this._fetchShaderProgram(e,"filter",t.VTX_SHADER_BODY,t.FRAG_SHADER_BODY,t.shaderParamSetup&&t.shaderParamSetup.bind(t)),t._builtShader=n,n._name=t.toString()}catch(i){console&&console.log("SHADER SWITCH FAILURE",i)}return n},e.getBaseTexture=function(t,e){var i=Math.ceil(t>0?t:1)||1,n=Math.ceil(e>0?e:1)||1,r=this._webGLContext,s=r.createTexture();return this.resizeTexture(s,i,n),this.setTextureParams(r,!1),s},e.resizeTexture=function(t,e,i){var n=this._webGLContext;n.bindTexture(n.TEXTURE_2D,t),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,i,0,n.RGBA,n.UNSIGNED_BYTE,null),t.width=e,t.height=i},e.getRenderBufferTexture=function(t,e){var i=this._webGLContext,n=this.getBaseTexture(t,e);if(!n)return null;var r=i.createFramebuffer();return r?(n.width=t,n.height=e,i.bindFramebuffer(i.FRAMEBUFFER,r),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,n,0),r._renderTexture=n,n._frameBuffer=r,n._storeID=this._textureDictionary.length,this._textureDictionary[n._storeID]=n,i.bindFramebuffer(i.FRAMEBUFFER,null),n):null},e.setTextureParams=function(t,e){e&&this._antialias?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},e.setClearColor=function(t){var e,i,n,r,s;"string"==typeof t?0==t.indexOf("#")?(4==t.length&&(t="#"+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)+t.charAt(3)+t.charAt(3)),e=Number("0x"+t.slice(1,3))/255,i=Number("0x"+t.slice(3,5))/255,n=Number("0x"+t.slice(5,7))/255,r=Number("0x"+t.slice(7,9))/255):0==t.indexOf("rgba(")&&(s=t.slice(5,-1).split(","),e=Number(s[0])/255,i=Number(s[1])/255,n=Number(s[2])/255,r=Number(s[3])):(e=((4278190080&t)>>>24)/255,i=((16711680&t)>>>16)/255,n=((65280&t)>>>8)/255,r=(255&t)/255),this._clearColor.r=e||0,this._clearColor.g=i||0,this._clearColor.b=n||0,this._clearColor.a=r||0,this._webGLContext&&this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a)},e.toString=function(){return"[StageGL (name="+this.name+")]"},e._fetchWebGLContext=function(t,e){var n;try{n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch(i){}if(n)n.viewportWidth=t.width,n.viewportHeight=t.height;else{var r="Could not initialize WebGL";console.error?console.error(r):console.log(r)}return n},e._fetchShaderProgram=function(e,i,n,r,s){var a,o;switch(e.useProgram(null),i){case"filter":o=t.COVER_VERTEX_HEADER+(n||t.COVER_VERTEX_BODY),a=t.COVER_FRAGMENT_HEADER+(r||t.COVER_FRAGMENT_BODY);break;case"particle":o=t.REGULAR_VERTEX_HEADER+t.PARTICLE_VERTEX_BODY,a=t.REGULAR_FRAGMENT_HEADER+t.PARTICLE_FRAGMENT_BODY;break;case"override":o=t.REGULAR_VERTEX_HEADER+(n||t.REGULAR_VERTEX_BODY),a=t.REGULAR_FRAGMENT_HEADER+(r||t.REGULAR_FRAGMENT_BODY);break;case"regular":default:o=t.REGULAR_VERTEX_HEADER+t.REGULAR_VERTEX_BODY,a=t.REGULAR_FRAGMENT_HEADER+t.REGULAR_FRAGMENT_BODY;break}var l=this._createShader(e,e.VERTEX_SHADER,o),c=this._createShader(e,e.FRAGMENT_SHADER,a),h=e.createProgram();if(e.attachShader(h,l),e.attachShader(h,c),e.linkProgram(h),h._type=i,!e.getProgramParameter(h,e.LINK_STATUS))throw e.useProgram(this._activeShader),e.getProgramInfoLog(h);switch(e.useProgram(h),i){case"filter":h.vertexPositionAttribute=e.getAttribLocation(h,"vertexPosition"),e.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=e.getAttribLocation(h,"uvPosition"),e.enableVertexAttribArray(h.uvPositionAttribute),h.samplerUniform=e.getUniformLocation(h,"uSampler"),e.uniform1i(h.samplerUniform,0),h.uprightUniform=e.getUniformLocation(h,"uUpright"),e.uniform1f(h.uprightUniform,0),s&&s(e,this,h);break;case"override":case"particle":case"regular":default:h.vertexPositionAttribute=e.getAttribLocation(h,"vertexPosition"),e.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=e.getAttribLocation(h,"uvPosition"),e.enableVertexAttribArray(h.uvPositionAttribute),h.textureIndexAttribute=e.getAttribLocation(h,"textureIndex"),e.enableVertexAttribArray(h.textureIndexAttribute),h.alphaAttribute=e.getAttribLocation(h,"objectAlpha"),e.enableVertexAttribArray(h.alphaAttribute);for(var u=[],d=0;d<this._batchTextureCount;d++)u[d]=d;h.samplerData=u,h.samplerUniform=e.getUniformLocation(h,"uSampler"),e.uniform1iv(h.samplerUniform,u),h.pMatrixUniform=e.getUniformLocation(h,"pMatrix");break}return e.useProgram(this._activeShader),h},e._createShader=function(e,i,n){n=n.replace(/{{count}}/g,this._batchTextureCount);for(var r="",s=1;s<this._batchTextureCount;s++)r+="} else if (indexPicker <= "+s+".5) { color = texture2D(uSampler["+s+"], vTextureCoord);";n=n.replace(/{{alternates}}/g,r),n=n.replace(/{{fragColor}}/g,this._premultiply?t.REGULAR_FRAG_COLOR_PREMULTIPLY:t.REGULAR_FRAG_COLOR_NORMAL);var a=e.createShader(i);if(e.shaderSource(a,n),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS))throw e.getShaderInfoLog(a);return a},e._createBuffers=function(e){var i,n,r,s=this._maxCardsPerBatch*t.INDICIES_PER_CARD,a=this._vertexPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,a),i=2;var o=this._vertices=new Float32Array(s*i);for(n=0,r=o.length;n<r;n+=i)o[n]=o[n+1]=0;e.bufferData(e.ARRAY_BUFFER,o,e.DYNAMIC_DRAW),a.itemSize=i,a.numItems=s;var l=this._uvPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),i=2;var c=this._uvs=new Float32Array(s*i);for(n=0,r=c.length;n<r;n+=i)c[n]=c[n+1]=0;e.bufferData(e.ARRAY_BUFFER,c,e.DYNAMIC_DRAW),l.itemSize=i,l.numItems=s;var h=this._textureIndexBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,h),i=1;var u=this._indices=new Float32Array(s*i);for(n=0,r=u.length;n<r;n++)u[n]=0;e.bufferData(e.ARRAY_BUFFER,u,e.DYNAMIC_DRAW),h.itemSize=i,h.numItems=s;var d=this._alphaBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),i=1;var f=this._alphas=new Float32Array(s*i);for(n=0,r=f.length;n<r;n++)f[n]=1;e.bufferData(e.ARRAY_BUFFER,f,e.DYNAMIC_DRAW),d.itemSize=i,d.numItems=s},e._initTextures=function(){this._lastTextureInsert=-1,this._textureDictionary=[],this._textureIDs={},this._baseTextures=[],this._batchTextures=[];for(var t=0;t<this._batchTextureCount;t++){var e=this.getBaseTexture();if(this._baseTextures[t]=this._batchTextures[t]=e,!e)throw"Problems creating basic textures, known causes include using too much VRAM by not releasing WebGL texture instances"}},e._loadTextureImage=function(t,e){var i=e.src;i||(e._isCanvas=!0,i=e.src="canvas_"+this._lastTrackedCanvas++);var n=this._textureIDs[i];void 0===n&&(n=this._textureIDs[i]=this._textureDictionary.length),void 0===this._textureDictionary[n]&&(this._textureDictionary[n]=this.getBaseTexture());var r=this._textureDictionary[n];if(r)r._batchID=this._batchID,r._storeID=n,r._imageData=e,this._insertTextureInBatch(t,r),e._storeID=n,e.complete||e.naturalWidth||e._isCanvas?this._updateTextureImageData(t,e):e.addEventListener("load",this._updateTextureImageData.bind(this,t,e));else{var s="Problem creating desired texture, known causes include using too much VRAM by not releasing WebGL texture instances";console.error&&console.error(s)||console.log(s),r=this._baseTextures[0],r._batchID=this._batchID,r._storeID=-1,r._imageData=r,this._insertTextureInBatch(t,r)}return r},e._updateTextureImageData=function(t,e){var n=e.width&e.width-1||e.height&e.height-1,r=this._textureDictionary[e._storeID];t.activeTexture(t.TEXTURE0+r._activeIndex),t.bindTexture(t.TEXTURE_2D,r),r.isPOT=!n,this.setTextureParams(t,r.isPOT);try{t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}catch(i){var s="\nAn error has occurred. This is most likely due to security restrictions on WebGL images with local or cross-domain origins";console.error?(console.error(s),console.error(i)):console&&(console.log(s),console.log(i))}e._invalid=!1,r._w=e.width,r._h=e.height,this.vocalDebug&&(n&&console.warn("NPOT(Non Power of Two) Texture: "+e.src),(e.width>t.MAX_TEXTURE_SIZE||e.height>t.MAX_TEXTURE_SIZE)&&console&&console.error("Oversized Texture: "+e.width+"x"+e.height+" vs "+t.MAX_TEXTURE_SIZE+"max"))},e._insertTextureInBatch=function(t,e){if(this._batchTextures[e._activeIndex]!==e){var i=-1,n=(this._lastTextureInsert+1)%this._batchTextureCount,r=n;do{if(this._batchTextures[r]._batchID!=this._batchID&&!this._slotBlacklist[r]){i=r;break}r=(r+1)%this._batchTextureCount}while(r!==n);-1===i&&(this.batchReason="textureOverflow",this._drawBuffers(t),this.batchCardCount=0,i=n),this._batchTextures[i]=e,e._activeIndex=i;var s=e._imageData;s&&s._invalid&&void 0!==e._drawID?this._updateTextureImageData(t,s):(t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e),this.setTextureParams(t)),this._lastTextureInsert=i}else{s=e._imageData;void 0!=e._storeID&&s&&s._invalid&&this._updateTextureImageData(t,s)}e._drawID=this._drawID,e._batchID=this._batchID},e._killTextureObject=function(t){if(t){var e=this._webGLContext;if(void 0!==t._storeID&&t._storeID>=0){for(var n in this._textureDictionary[t._storeID]=void 0,this._textureIDs)this._textureIDs[n]==t._storeID&&delete this._textureIDs[n];t._imageData&&(t._imageData._storeID=void 0),t._imageData=t._storeID=void 0}void 0!==t._activeIndex&&this._batchTextures[t._activeIndex]===t&&(this._batchTextures[t._activeIndex]=this._baseTextures[t._activeIndex]);try{t._frameBuffer&&e.deleteFramebuffer(t._frameBuffer),t._frameBuffer=void 0}catch(i){this.vocalDebug&&console.log(i)}try{e.deleteTexture(t)}catch(i){this.vocalDebug&&console.log(i)}}},e._backupBatchTextures=function(t,e){var i=this._webGLContext;this._backupTextures||(this._backupTextures=[]),void 0===e&&(e=this._backupTextures);for(var n=0;n<this._batchTextureCount;n++)i.activeTexture(i.TEXTURE0+n),t?this._batchTextures[n]=e[n]:(e[n]=this._batchTextures[n],this._batchTextures[n]=this._baseTextures[n]),i.bindTexture(i.TEXTURE_2D,this._batchTextures[n]),this.setTextureParams(i,this._batchTextures[n].isPOT);t&&e===this._backupTextures&&(this._backupTextures=[])},e._batchDraw=function(t,e,i){this._isDrawing>0&&this._drawBuffers(e),this._isDrawing++,this._drawID++,this.batchCardCount=0,this.depth=0,this._appendToBatchGroup(t,e,new At.Matrix2D,this.alpha,i),this.batchReason="drawFinish",this._drawBuffers(e),this._isDrawing--},e._cacheDraw=function(t,e,i,n){var r,s=this._activeShader,a=this._slotBlacklist,o=this._maxTextureSlots-1,l=this._viewportWidth,c=this._viewportHeight;this.protectTextureSlot(o,!0);var h=e.getMatrix();h=h.clone(),h.scale(1/n.scale,1/n.scale),h=h.invert(),h.translate(-n.offX/n.scale*e.scaleX,-n.offY/n.scale*e.scaleY);var u=this._cacheContainer;u.children=[e],u.transformMatrix=h,this._backupBatchTextures(!1),i&&i.length?this._drawFilters(e,i,n):this.isCacheControlled?(t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0)):(t.activeTexture(t.TEXTURE0+o),e.cacheCanvas=this.getTargetRenderTexture(e,n._drawWidth,n._drawHeight),r=e.cacheCanvas,t.bindFramebuffer(t.FRAMEBUFFER,r._frameBuffer),this.updateViewport(n._drawWidth,n._drawHeight),this._projectionMatrix=this._projectionMatrixFlip,t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(u,t,!0),t.bindFramebuffer(t.FRAMEBUFFER,null),this.updateViewport(l,c)),this._backupBatchTextures(!0),this.protectTextureSlot(o,!1),this._activeShader=s,this._slotBlacklist=a},e._drawFilters=function(t,e,i){var n,r=this._webGLContext,s=this._maxTextureSlots-1,a=this._viewportWidth,o=this._viewportHeight,l=this._cacheContainer,c=e.length;r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this.updateViewport(i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._batchDraw(l,r,!0),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r);var h=!1,u=0,d=e[u];do{this._activeShader=this.getFilterShader(d),this._activeShader&&(r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r),(c>1||e[0]._multiPass)&&(h=!h),d=null!==d._multiPass?d._multiPass:e[++u])}while(d);this.isCacheControlled?(r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(a,o),this._activeShader=this.getFilterShader(this),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h)):(h&&(r.activeTexture(r.TEXTURE0+s),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this._activeShader=this.getFilterShader(this),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,!h)),r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(a,o),t.cacheCanvas=n)},e._appendToBatchGroup=function(e,i,n,r,s){e._glMtx||(e._glMtx=new At.Matrix2D);var a,o,l,c,h=e._glMtx;h.copy(n),e.transformMatrix?h.appendMatrix(e.transformMatrix):h.appendTransform(e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.skewX,e.skewY,e.regX,e.regY);for(var u=e.children.length,d=0;d<u;d++){var f=e.children[d];if(f.visible&&r)if(f.cacheCanvas&&!s||(f._updateState&&f._updateState(),!f.children)){this.batchCardCount+1>this._maxCardsPerBatch&&(this.batchReason="vertexOverflow",this._drawBuffers(i),this.batchCardCount=0),f._glMtx||(f._glMtx=new At.Matrix2D);var p,m,_,v,g,b,y=f._glMtx;y.copy(h),f.transformMatrix?y.appendMatrix(f.transformMatrix):y.appendTransform(f.x,f.y,f.scaleX,f.scaleY,f.rotation,f.skewX,f.skewY,f.regX,f.regY);var w=f.cacheCanvas&&!s;if(2===f._webGLRenderStyle||w)_=!s&&f.cacheCanvas||f.image;else{if(1!==f._webGLRenderStyle)continue;if(v=f.spriteSheet.getFrame(f.currentFrame),null===v)continue;_=v.image}var x=this._uvs,E=this._vertices,C=this._indices,S=this._alphas;if(_){if(void 0===_._storeID)g=this._loadTextureImage(i,_),this._insertTextureInBatch(i,g);else{if(g=this._textureDictionary[_._storeID],!g){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}g._batchID!==this._batchID&&this._insertTextureInBatch(i,g)}if(m=g._activeIndex,2===f._webGLRenderStyle||w)!w&&f.sourceRect?(f._uvRect||(f._uvRect={}),b=f.sourceRect,p=f._uvRect,p.t=b.y/_.height,p.l=b.x/_.width,p.b=(b.y+b.height)/_.height,p.r=(b.x+b.width)/_.width,a=0,o=0,l=b.width+a,c=b.height+o):(p=t.UV_RECT,w?(b=f.bitmapCache,a=b.x+b._filterOffX/b.scale,o=b.y+b._filterOffY/b.scale,l=b._drawWidth/b.scale+a,c=b._drawHeight/b.scale+o):(a=0,o=0,l=_.width+a,c=_.height+o));else if(1===f._webGLRenderStyle){var T=v.rect;p=v.uvRect,p||(p=t.buildUVRects(f.spriteSheet,f.currentFrame,!1)),a=-v.regX,o=-v.regY,l=T.width-v.regX,c=T.height-v.regY}var R=this.batchCardCount*t.INDICIES_PER_CARD,L=2*R;E[L]=a*y.a+o*y.c+y.tx,E[L+1]=a*y.b+o*y.d+y.ty,E[L+2]=a*y.a+c*y.c+y.tx,E[L+3]=a*y.b+c*y.d+y.ty,E[L+4]=l*y.a+o*y.c+y.tx,E[L+5]=l*y.b+o*y.d+y.ty,E[L+6]=E[L+2],E[L+7]=E[L+3],E[L+8]=E[L+4],E[L+9]=E[L+5],E[L+10]=l*y.a+c*y.c+y.tx,E[L+11]=l*y.b+c*y.d+y.ty,x[L]=p.l,x[L+1]=p.t,x[L+2]=p.l,x[L+3]=p.b,x[L+4]=p.r,x[L+5]=p.t,x[L+6]=p.l,x[L+7]=p.b,x[L+8]=p.r,x[L+9]=p.t,x[L+10]=p.r,x[L+11]=p.b,C[R]=C[R+1]=C[R+2]=C[R+3]=C[R+4]=C[R+5]=m,S[R]=S[R+1]=S[R+2]=S[R+3]=S[R+4]=S[R+5]=f.alpha*r,this.batchCardCount++}}else this._appendToBatchGroup(f,i,h,f.alpha*r)}},e._drawBuffers=function(e){if(!(this.batchCardCount<=0)){this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : "+this.batchReason);var i=this._activeShader,n=this._vertexPositionBuffer,r=this._textureIndexBuffer,s=this._uvPositionBuffer,a=this._alphaBuffer;e.useProgram(i),e.bindBuffer(e.ARRAY_BUFFER,n),e.vertexAttribPointer(i.vertexPositionAttribute,n.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._vertices),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(i.textureIndexAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._indices),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(i.uvPositionAttribute,s.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._uvs),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(i.alphaAttribute,a.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._alphas),e.uniformMatrix4fv(i.pMatrixUniform,e.FALSE,this._projectionMatrix);for(var o=0;o<this._batchTextureCount;o++){var l=this._batchTextures[o];e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,l),this.setTextureParams(e,l.isPOT)}e.drawArrays(e.TRIANGLES,0,this.batchCardCount*t.INDICIES_PER_CARD),this._batchID++}},e._drawCover=function(e,i){this._isDrawing>0&&this._drawBuffers(e),this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : Cover");var n=this._activeShader,r=this._vertexPositionBuffer,s=this._uvPositionBuffer;e.clear(e.COLOR_BUFFER_BIT),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(n.vertexPositionAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,t.COVER_VERT),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(n.uvPositionAttribute,s.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,i?t.COVER_UV_FLIP:t.COVER_UV),e.uniform1i(n.samplerUniform,0),e.uniform1f(n.uprightUniform,i?0:1),e.drawArrays(e.TRIANGLES,0,t.INDICIES_PER_CARD)},At.StageGL=At.promote(t,"Stage")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),"string"==typeof t?(this.image=document.createElement("img"),this.image.src=t):this.image=t,this.sourceRect=null,this._webGLRenderStyle=At.DisplayObject._StageGL_BITMAP}var e=At.extend(t,At.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.image,e=this.cacheCanvas||t&&(t.naturalWidth||t.getContext||t.readyState>=2);return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&e)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;var i=this.image,n=this.sourceRect;if(i.getImage&&(i=i.getImage()),!i)return!0;if(n){var r=n.x,s=n.y,a=r+n.width,o=s+n.height,l=0,c=0,h=i.width,u=i.height;r<0&&(l-=r,r=0),a>h&&(a=h),s<0&&(c-=s,s=0),o>u&&(o=u),t.drawImage(i,r,s,a-r,o-s,l,c,a-r,o-s)}else t.drawImage(i,0,0);return!0},e.getBounds=function(){var t=this.DisplayObject_getBounds();if(t)return t;var e=this.image,i=this.sourceRect||e,n=e&&(e.naturalWidth||e.getContext||e.readyState>=2);return n?this._rectangle.setValues(0,0,i.width,i.height):null},e.clone=function(e){var i=this.image;i&&e&&(i=i.cloneNode());var n=new t(i);return this.sourceRect&&(n.sourceRect=this.sourceRect.clone()),this._cloneProps(n),n},e.toString=function(){return"[Bitmap (name="+this.name+")]"},At.Bitmap=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.DisplayObject_constructor(),this.currentFrame=0,this.currentAnimation=null,this.paused=!0,this.spriteSheet=t,this.currentAnimationFrame=0,this.framerate=0,this._animation=null,this._currentFrame=null,this._skipAdvance=!1,this._webGLRenderStyle=At.DisplayObject._StageGL_SPRITE,null!=e&&this.gotoAndPlay(e)}var e=At.extend(t,At.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet.complete;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;this._normalizeFrame();var i=this.spriteSheet.getFrame(0|this._currentFrame);if(!i)return!1;var n=i.rect;return n.width&&n.height&&t.drawImage(i.image,n.x,n.y,n.width,n.height,-i.regX,-i.regY,n.width,n.height),!0},e.play=function(){this.paused=!1},e.stop=function(){this.paused=!0},e.gotoAndPlay=function(t){this.paused=!1,this._skipAdvance=!0,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.advance=function(t){var e=this.framerate||this.spriteSheet.framerate,i=e&&null!=t?t/(1e3/e):1;this._normalizeFrame(i)},e.getBounds=function(){return this.DisplayObject_getBounds()||this.spriteSheet.getFrameBounds(this.currentFrame,this._rectangle)},e.clone=function(){return this._cloneProps(new t(this.spriteSheet))},e.toString=function(){return"[Sprite (name="+this.name+")]"},e._cloneProps=function(t){return this.DisplayObject__cloneProps(t),t.currentFrame=this.currentFrame,t.currentAnimation=this.currentAnimation,t.paused=this.paused,t.currentAnimationFrame=this.currentAnimationFrame,t.framerate=this.framerate,t._animation=this._animation,t._currentFrame=this._currentFrame,t._skipAdvance=this._skipAdvance,t},e._tick=function(t){this.paused||(this._skipAdvance||this.advance(t&&t.delta),this._skipAdvance=!1),this.DisplayObject__tick(t)},e._normalizeFrame=function(t){t=t||0;var e,i=this._animation,n=this.paused,r=this._currentFrame;if(i){var s=i.speed||1,a=this.currentAnimationFrame;if(e=i.frames.length,a+t*s>=e){var o=i.next;if(this._dispatchAnimationEnd(i,r,n,o,e-1))return;if(o)return this._goto(o,t-(e-a)/s);this.paused=!0,a=i.frames.length-1}else a+=t*s;this.currentAnimationFrame=a,this._currentFrame=i.frames[0|a]}else if(r=this._currentFrame+=t,e=this.spriteSheet.getNumFrames(),r>=e&&e>0&&!this._dispatchAnimationEnd(i,r,n,e-1)&&(this._currentFrame-=e)>=e)return this._normalizeFrame();r=0|this._currentFrame,this.currentFrame!=r&&(this.currentFrame=r,this.dispatchEvent("change"))},e._dispatchAnimationEnd=function(t,e,i,n,r){var s=t?t.name:null;if(this.hasEventListener("animationend")){var a=new At.Event("animationend");a.name=s,a.next=n,this.dispatchEvent(a)}var o=this._animation!=t||this._currentFrame!=e;return o||i||!this.paused||(this.currentAnimationFrame=r,o=!0),o},e._goto=function(t,e){if(this.currentAnimationFrame=0,isNaN(t)){var i=this.spriteSheet.getAnimation(t);i&&(this._animation=i,this.currentAnimation=t,this._normalizeFrame(e))}else this.currentAnimation=this._animation=null,this._currentFrame=t,this._normalizeFrame()},At.Sprite=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),this.graphics=t||new At.Graphics}var e=At.extend(t,At.DisplayObject);e.isVisible=function(){var t=this.cacheCanvas||this.graphics&&!this.graphics.isEmpty();return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){return this.DisplayObject_draw(t,e)||this.graphics.draw(t,this),!0},e.clone=function(e){var i=e&&this.graphics?this.graphics.clone():this.graphics;return this._cloneProps(new t(i))},e.toString=function(){return"[Shape (name="+this.name+")]"},At.Shape=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.DisplayObject_constructor(),this.text=t,this.font=e,this.color=i,this.textAlign="left",this.textBaseline="top",this.maxWidth=null,this.outline=0,this.lineHeight=0,this.lineWidth=null}var e=At.extend(t,At.DisplayObject),i=At.createCanvas?At.createCanvas():document.createElement("canvas");i.getContext&&(t._workingContext=i.getContext("2d"),i.width=i.height=1),t.H_OFFSETS={start:0,left:0,center:-.5,end:-1,right:-1},t.V_OFFSETS={top:0,hanging:-.01,middle:-.4,alphabetic:-.8,ideographic:-.85,bottom:-1},e.isVisible=function(){var t=this.cacheCanvas||null!=this.text&&""!==this.text;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;var i=this.color||"#000";return this.outline?(t.strokeStyle=i,t.lineWidth=1*this.outline):t.fillStyle=i,this._drawText(this._prepContext(t)),!0},e.getMeasuredWidth=function(){return this._getMeasuredWidth(this.text)},e.getMeasuredLineHeight=function(){return 1.2*this._getMeasuredWidth("M")},e.getMeasuredHeight=function(){return this._drawText(null,{}).height},e.getBounds=function(){var e=this.DisplayObject_getBounds();if(e)return e;if(null==this.text||""===this.text)return null;var i=this._drawText(null,{}),n=this.maxWidth&&this.maxWidth<i.width?this.maxWidth:i.width,r=n*t.H_OFFSETS[this.textAlign||"left"],s=this.lineHeight||this.getMeasuredLineHeight(),a=s*t.V_OFFSETS[this.textBaseline||"top"];return this._rectangle.setValues(r,a,n,i.height)},e.getMetrics=function(){var e={lines:[]};return e.lineHeight=this.lineHeight||this.getMeasuredLineHeight(),e.vOffset=e.lineHeight*t.V_OFFSETS[this.textBaseline||"top"],this._drawText(null,e,e.lines)},e.clone=function(){return this._cloneProps(new t(this.text,this.font,this.color))},e.toString=function(){return"[Text (text="+(this.text.length>20?this.text.substr(0,17)+"...":this.text)+")]"},e._cloneProps=function(t){return this.DisplayObject__cloneProps(t),t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,t.maxWidth=this.maxWidth,t.outline=this.outline,t.lineHeight=this.lineHeight,t.lineWidth=this.lineWidth,t},e._prepContext=function(t){return t.font=this.font||"10px sans-serif",t.textAlign=this.textAlign||"left",t.textBaseline=this.textBaseline||"top",t.lineJoin="miter",t.miterLimit=2.5,t},e._drawText=function(e,i,n){var r=!!e;r||(e=t._workingContext,e.save(),this._prepContext(e));for(var s=this.lineHeight||this.getMeasuredLineHeight(),a=0,o=0,l=String(this.text).split(/(?:\r\n|\r|\n)/),c=0,h=l.length;c<h;c++){var u=l[c],d=null;if(null!=this.lineWidth&&(d=e.measureText(u).width)>this.lineWidth){var f=u.split(/(\s)/);u=f[0],d=e.measureText(u).width;for(var p=1,m=f.length;p<m;p+=2){var _=e.measureText(f[p]+f[p+1]).width;d+_>this.lineWidth?(r&&this._drawTextLine(e,u,o*s),n&&n.push(u),d>a&&(a=d),u=f[p+1],d=e.measureText(u).width,o++):(u+=f[p]+f[p+1],d+=_)}}r&&this._drawTextLine(e,u,o*s),n&&n.push(u),i&&null==d&&(d=e.measureText(u).width),d>a&&(a=d),o++}return i&&(i.width=a,i.height=o*s),r||e.restore(),i},e._drawTextLine=function(t,e,i){this.outline?t.strokeText(e,0,i,this.maxWidth||65535):t.fillText(e,0,i,this.maxWidth||65535)},e._getMeasuredWidth=function(e){var i=t._workingContext;i.save();var n=this._prepContext(i).measureText(e).width;return i.restore(),n},At.Text=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(t,e){this.Container_constructor(),this.text=t||"",this.spriteSheet=e,this.lineHeight=0,this.letterSpacing=0,this.spaceWidth=0,this._oldProps={text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0},this._oldStage=null,this._drawAction=null}var e=At.extend(t,At.Container);t.maxPoolSize=100,t._spritePool=[],e.draw=function(t,e){this.DisplayObject_draw(t,e)||(this._updateState(),this.Container_draw(t,e))},e.getBounds=function(){return this._updateText(),this.Container_getBounds()},e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet&&this.spriteSheet.complete&&this.text;return!!(this.visible&&this.alpha>0&&0!==this.scaleX&&0!==this.scaleY&&t)},e.clone=function(){return this._cloneProps(new t(this.text,this.spriteSheet))},e.addChild=e.addChildAt=e.removeChild=e.removeChildAt=e.removeAllChildren=function(){},e._updateState=function(){this._updateText()},e._cloneProps=function(t){return this.Container__cloneProps(t),t.lineHeight=this.lineHeight,t.letterSpacing=this.letterSpacing,t.spaceWidth=this.spaceWidth,t},e._getFrameIndex=function(t,e){var i,n=e.getAnimation(t);return n||(t!=(i=t.toUpperCase())||t!=(i=t.toLowerCase())||(i=null),i&&(n=e.getAnimation(i))),n&&n.frames[0]},e._getFrame=function(t,e){var i=this._getFrameIndex(t,e);return null==i?i:e.getFrame(i)},e._getLineHeight=function(t){var e=this._getFrame("1",t)||this._getFrame("T",t)||this._getFrame("L",t)||t.getFrame(0);return e?e.rect.height:1},e._getSpaceWidth=function(t){var e=this._getFrame("1",t)||this._getFrame("l",t)||this._getFrame("e",t)||this._getFrame("a",t)||t.getFrame(0);return e?e.rect.width:1},e._updateText=function(){var e,i=0,n=0,r=this._oldProps,s=!1,a=this.spaceWidth,o=this.lineHeight,l=this.spriteSheet,c=t._spritePool,h=this.children,u=0,d=h.length;for(var f in r)r[f]!=this[f]&&(r[f]=this[f],s=!0);if(s){var p=!!this._getFrame(" ",l);p||a||(a=this._getSpaceWidth(l)),o||(o=this._getLineHeight(l));for(var m=0,_=this.text.length;m<_;m++){var v=this.text.charAt(m);if(" "!=v||p)if("\n"!=v&&"\r"!=v){var g=this._getFrameIndex(v,l);null!=g&&(u<d?e=h[u]:(h.push(e=c.length?c.pop():new At.Sprite),e.parent=this,d++),e.spriteSheet=l,e.gotoAndStop(g),e.x=i,e.y=n,u++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==v&&"\n"==this.text.charAt(m+1)&&m++,i=0,n+=o;else i+=a}while(d>u)c.push(e=h.pop()),e.parent=null,d--;c.length>t.maxPoolSize&&(c.length=t.maxPoolSize)}},At.BitmapText=At.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e){var i,n,r,s;this.Container_constructor(),!t.inited&&t.init(),e instanceof String||arguments.length>1?(i=e,n=arguments[1],r=arguments[2],s=arguments[3],null==r&&(r=-1),e=null):e&&(i=e.mode,n=e.startPosition,r=e.loop,s=e.labels),e||(e={labels:s}),this.mode=i||t.INDEPENDENT,this.startPosition=n||0,this.loop=!0===r?-1:r||0,this.currentFrame=0,this.paused=e.paused||!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||e.frameBounds,this.framerate=null,e.useTicks=e.paused=!0,this.timeline=new At.Timeline(e),this._synchOffset=0,this._rawPosition=-1,this._bound_resolveState=this._resolveState.bind(this),this._t=0,this._managed={}}var e=At.extend(t,At.Container);t.INDEPENDENT="independent",t.SINGLE_FRAME="single",t.SYNCHED="synched",t.inited=!1,t.init=function(){t.inited||(i.install(),t.inited=!0)},e._getLabels=function(){return this.timeline.getLabels()},e.getLabels=At.deprecate(e._getLabels,"MovieClip.getLabels"),e._getCurrentLabel=function(){return this.timeline.currentLabel},e.getCurrentLabel=At.deprecate(e._getCurrentLabel,"MovieClip.getCurrentLabel"),e._getDuration=function(){return this.timeline.duration},e.getDuration=At.deprecate(e._getDuration,"MovieClip.getDuration");try{Object.defineProperties(e,{labels:{get:e._getLabels},currentLabel:{get:e._getCurrentLabel},totalFrames:{get:e._getDuration},duration:{get:e._getDuration}})}catch(n){}function i(){throw"MovieClipPlugin cannot be instantiated."}e.initialize=t,e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){return this.DisplayObject_draw(t,e)||(this._updateState(),this.Container_draw(t,e)),!0},e.play=function(){this.paused=!1},e.stop=function(){this.paused=!0},e.gotoAndPlay=function(t){this.paused=!1,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.advance=function(e){var i=t.INDEPENDENT;if(this.mode===i){var n=this,r=n.framerate;while((n=n.parent)&&null===r)n.mode===i&&(r=n._framerate);if(this._framerate=r,!this.paused){var s=null!==r&&-1!==r&&null!==e?e/(1e3/r)+this._t:1,a=0|s;this._t=s-a;while(a--)this._updateTimeline(this._rawPosition+1,!1)}}},e.clone=function(){throw"MovieClip cannot be cloned."},e.toString=function(){return"[MovieClip (name="+this.name+")]"},e._updateState=function(){-1!==this._rawPosition&&this.mode===t.INDEPENDENT||this._updateTimeline(-1)},e._tick=function(t){this.advance(t&&t.delta),this.Container__tick(t)},e._goto=function(t){var e=this.timeline.resolve(t);null!=e&&(this._t=0,this._updateTimeline(e,!0))},e._reset=function(){this._rawPosition=-1,this._t=this.currentFrame=0,this.paused=!1},e._updateTimeline=function(e,i){var n=this.mode!==t.INDEPENDENT,r=this.timeline;n&&(e=this.startPosition+(this.mode===t.SINGLE_FRAME?0:this._synchOffset)),e<0&&(e=0),(this._rawPosition!==e||n)&&(this._rawPosition=e,r.loop=this.loop,r.setPosition(e,n||!this.actionsEnabled,i,this._bound_resolveState))},e._renderFirstFrame=function(){var t=this.timeline,e=t.rawPosition;t.setPosition(0,!0,!0,this._bound_resolveState),t.rawPosition=e},e._resolveState=function(){var t=this.timeline;for(var e in this.currentFrame=t.position,this._managed)this._managed[e]=1;for(var i=t.tweens,n=0,r=i.length;n<r;n++){var s=i[n],a=s.target;if(a!==this&&!s.passive){var o=s._stepPosition;a instanceof At.DisplayObject?this._addManagedChild(a,o):this._setState(a.state,o)}}var l=this.children;for(n=l.length-1;n>=0;n--){var c=l[n].id;1===this._managed[c]&&(this.removeChildAt(n),delete this._managed[c])}},e._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var n=t[i],r=n.t,s=n.p;for(var a in s)r[a]=s[a];this._addManagedChild(r,e)}},e._addManagedChild=function(e,i){e._off||(this.addChildAt(e,0),e instanceof t&&(e._synchOffset=i,e.mode===t.INDEPENDENT&&e.autoReset&&!this._managed[e.id]&&e._reset()),this._managed[e.id]=2)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();return i||this.frameBounds&&(i=this._rectangle.copy(this.frameBounds[this.currentFrame])),i?this._transformBounds(i,t,e):this.Container__getBounds(t,e)},At.MovieClip=At.promote(t,"Container"),i.priority=100,i.ID="MovieClip",i.install=function(){At.Tween._installPlugin(i)},i.init=function(e,n,r){"startPosition"===n&&e.target instanceof t&&e._addPlugin(i)},i.step=function(t,e,i){},i.change=function(t,e,i,n,r,s){if("startPosition"===i)return 1===r?e.props[i]:e.prev.props[i]}}(),this.createjs=this.createjs||{},function(){function t(){throw"SpriteSheetUtils cannot be instantiated"}var e=At.createCanvas?At.createCanvas():document.createElement("canvas");e.getContext&&(t._workingCanvas=e,t._workingContext=e.getContext("2d"),e.width=e.height=1),t.extractFrame=function(e,i){isNaN(i)&&(i=e.getAnimation(i).frames[0]);var n=e.getFrame(i);if(!n)return null;var r=n.rect,s=t._workingCanvas;s.width=r.width,s.height=r.height,t._workingContext.drawImage(n.image,r.x,r.y,r.width,r.height,0,0,r.width,r.height);var a=document.createElement("img");return a.src=s.toDataURL("image/png"),a},t.addFlippedFrames=At.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),t.mergeAlpha=At.deprecate(null,"SpriteSheetUtils.mergeAlpha"),t._flip=function(e,i,n,r){for(var s=e._images,a=t._workingCanvas,o=t._workingContext,l=s.length/i,c=0;c<l;c++){var h=s[c];h.__tmp=c,o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width+1,a.height+1),a.width=h.width,a.height=h.height,o.setTransform(n?-1:1,0,0,r?-1:1,n?h.width:0,r?h.height:0),o.drawImage(h,0,0);var u=document.createElement("img");u.src=a.toDataURL("image/png"),u.width=h.width||h.naturalWidth,u.height=h.height||h.naturalHeight,s.push(u)}var d=e._frames,f=d.length/i;for(c=0;c<f;c++){h=d[c];var p=h.rect.clone();u=s[h.image.__tmp+l*i];var m={image:u,rect:p,regX:h.regX,regY:h.regY};n&&(p.x=(u.width||u.naturalWidth)-p.x-p.width,m.regX=p.width-h.regX),r&&(p.y=(u.height||u.naturalHeight)-p.y-p.height,m.regY=p.height-h.regY),d.push(m)}var _="_"+(n?"h":"")+(r?"v":""),v=e._animations,g=e._data,b=v.length/i;for(c=0;c<b;c++){var y=v[c];h=g[y];var w={name:y+_,speed:h.speed,next:h.next,frames:[]};h.next&&(w.next+=_),d=h.frames;for(var x=0,E=d.length;x<E;x++)w.frames.push(d[x]+f*i);g[w.name]=w,v.push(w.name)}},At.SpriteSheetUtils=t}(),this.createjs=this.createjs||{},function(){function t(t){this.EventDispatcher_constructor(),this.maxWidth=2048,this.maxHeight=2048,this.spriteSheet=null,this.scale=1,this.padding=1,this.timeSlice=.3,this.progress=-1,this.framerate=t||0,this._frames=[],this._animations={},this._data=null,this._nextFrameIndex=0,this._index=0,this._timerID=null,this._scale=1}var e=At.extend(t,At.EventDispatcher);t.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",t.ERR_RUNNING="a build is already running",e.addFrame=function(e,i,n,r,s){if(this._data)throw t.ERR_RUNNING;var a=i||e.bounds||e.nominalBounds;return!a&&e.getBounds&&(a=e.getBounds()),a?(n=n||1,this._frames.push({source:e,sourceRect:a,scale:n,funct:r,data:s,index:this._frames.length,height:a.height*n})-1):null},e.addAnimation=function(e,i,n,r){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:n,speed:r}},e.addMovieClip=function(e,i,n,r,s,a){if(this._data)throw t.ERR_RUNNING;var o=e.frameBounds,l=i||e.bounds||e.nominalBounds;if(!l&&e.getBounds&&(l=e.getBounds()),l||o){var c,h,u=this._frames.length,d=e.timeline.duration;for(c=0;c<d;c++){var f=o&&o[c]?o[c]:l;this.addFrame(e,f,n,this._setupMovieClipFrame,{i:c,f:r,d:s})}var p=e.timeline._labels,m=[];for(var _ in p)m.push({index:p[_],label:_});if(m.length)for(m.sort((function(t,e){return t.index-e.index})),c=0,h=m.length;c<h;c++){for(var v=m[c].label,g=u+m[c].index,b=u+(c==h-1?d:m[c+1].index),y=[],w=g;w<b;w++)y.push(w);a&&(v=a(v,e,g,b),!v)||this.addAnimation(v,y,!0)}}},e.build=function(){if(this._data)throw t.ERR_RUNNING;this._startBuild();while(this._drawNext());return this._endBuild(),this.spriteSheet},e.buildAsync=function(e){if(this._data)throw t.ERR_RUNNING;this.timeSlice=e,this._startBuild();var i=this;this._timerID=setTimeout((function(){i._run()}),50-50*Math.max(.01,Math.min(.99,this.timeSlice||.3)))},e.stopAsync=function(){clearTimeout(this._timerID),this._data=null},e.clone=function(){throw"SpriteSheetBuilder cannot be cloned."},e.toString=function(){return"[SpriteSheetBuilder]"},e._startBuild=function(){var e=this.padding||0;this.progress=0,this.spriteSheet=null,this._index=0,this._scale=this.scale;var i=[];this._data={images:[],frames:i,framerate:this.framerate,animations:this._animations};var n=this._frames.slice();if(n.sort((function(t,e){return t.height<=e.height?-1:1})),n[n.length-1].height+2*e>this.maxHeight)throw t.ERR_DIMENSIONS;var r=0,s=0,a=0;while(n.length){var o=this._fillRow(n,r,a,i,e);if(o.w>s&&(s=o.w),r+=o.h,!o.h||!n.length){var l=At.createCanvas?At.createCanvas():document.createElement("canvas");l.width=this._getSize(s,this.maxWidth),l.height=this._getSize(r,this.maxHeight),this._data.images[a]=l,o.h||(s=r=0,a++)}}},e._setupMovieClipFrame=function(t,e){var i=t.actionsEnabled;t.actionsEnabled=!1,t.gotoAndStop(e.i),t.actionsEnabled=i,e.f&&e.f(t,e.d,e.i)},e._getSize=function(t,e){var i=4;while(Math.pow(2,++i)<t);return Math.min(e,Math.pow(2,i))},e._fillRow=function(e,i,n,r,s){var a=this.maxWidth,o=this.maxHeight;i+=s;for(var l=o-i,c=s,h=0,u=e.length-1;u>=0;u--){var d=e[u],f=this._scale*d.scale,p=d.sourceRect,m=d.source,_=Math.floor(f*p.x-s),v=Math.floor(f*p.y-s),g=Math.ceil(f*p.height+2*s),b=Math.ceil(f*p.width+2*s);if(b>a)throw t.ERR_DIMENSIONS;g>l||c+b>a||(d.img=n,d.rect=new At.Rectangle(c,i,b,g),h=h||g,e.splice(u,1),r[d.index]=[c,i,b,g,n,Math.round(-_+f*m.regX-s),Math.round(-v+f*m.regY-s)],c+=b)}return{w:c,h:h}},e._endBuild=function(){this.spriteSheet=new At.SpriteSheet(this._data),this._data=null,this.progress=1,this.dispatchEvent("complete")},e._run=function(){var t=50*Math.max(.01,Math.min(.99,this.timeSlice||.3)),e=(new Date).getTime()+t,i=!1;while(e>(new Date).getTime())if(!this._drawNext()){i=!0;break}if(i)this._endBuild();else{var n=this;this._timerID=setTimeout((function(){n._run()}),50-t)}var r=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var s=new At.Event("progress");s.progress=r,this.dispatchEvent(s)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,n=t.sourceRect,r=this._data.images[t.img],s=r.getContext("2d");return t.funct&&t.funct(t.source,t.data),s.save(),s.beginPath(),s.rect(i.x,i.y,i.width,i.height),s.clip(),s.translate(Math.ceil(i.x-n.x*e),Math.ceil(i.y-n.y*e)),s.scale(e,e),t.source.draw(s),s.restore(),++this._index<this._frames.length},At.SpriteSheetBuilder=At.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),"string"==typeof t&&(t=document.getElementById(t)),this.mouseEnabled=!1;var e=t.style;e.position="absolute",e.transformOrigin=e.WebkitTransformOrigin=e.msTransformOrigin=e.MozTransformOrigin=e.OTransformOrigin="0% 0%",this.htmlElement=t,this._oldProps=null,this._oldStage=null,this._drawAction=null}var e=At.extend(t,At.DisplayObject);e.isVisible=function(){return null!=this.htmlElement},e.draw=function(t,e){return!0},e.cache=function(){},e.uncache=function(){},e.updateCache=function(){},e.hitTest=function(){},e.localToGlobal=function(){},e.globalToLocal=function(){},e.localToLocal=function(){},e.clone=function(){throw"DOMElement cannot be cloned."},e.toString=function(){return"[DOMElement (name="+this.name+")]"},e._tick=function(t){var e=this.stage;e&&e!==this._oldStage&&(this._drawAction&&e.off("drawend",this._drawAction),this._drawAction=e.on("drawend",this._handleDrawEnd,this),this._oldStage=e),this.DisplayObject__tick(t)},e._handleDrawEnd=function(t){var e=this.htmlElement;if(e){var i=e.style,n=this.getConcatenatedDisplayProps(this._props),r=n.matrix,s=n.visible?"visible":"hidden";if(s!=i.visibility&&(i.visibility=s),n.visible){var a=this._oldProps,o=a&&a.matrix,l=1e4;if(!o||!o.equals(r)){var c="matrix("+(r.a*l|0)/l+","+(r.b*l|0)/l+","+(r.c*l|0)/l+","+(r.d*l|0)/l+","+(r.tx+.5|0);i.transform=i.WebkitTransform=i.OTransform=i.msTransform=c+","+(r.ty+.5|0)+")",i.MozTransform=c+"px,"+(r.ty+.5|0)+"px)",a||(a=this._oldProps=new At.DisplayProps(!0,null)),a.matrix.copy(r)}a.alpha!=n.alpha&&(i.opacity=""+(n.alpha*l|0)/l,a.alpha=n.alpha)}}},At.DOMElement=At.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){function t(){this.usesContext=!1,this._multiPass=null,this.VTX_SHADER_BODY=null,this.FRAG_SHADER_BODY=null}var e=t.prototype;e.getBounds=function(t){return t},e.shaderParamSetup=function(t,e,i){},e.applyFilter=function(t,e,i,n,r,s,a,o){s=s||t,null==a&&(a=e),null==o&&(o=i);try{var l=t.getImageData(e,i,n,r)}catch(c){return!1}return!!this._applyFilter(l)&&(s.putImageData(l,a,o),!0)},e.toString=function(){return"[Filter]"},e.clone=function(){return new t},e._applyFilter=function(t){return!0},At.Filter=t}(),this.createjs=this.createjs||{},function(){function t(){this.width=void 0,this.height=void 0,this.x=void 0,this.y=void 0,this.scale=1,this.offX=0,this.offY=0,this.cacheID=0,this._filterOffX=0,this._filterOffY=0,this._cacheDataURLID=0,this._cacheDataURL=null,this._drawWidth=0,this._drawHeight=0}var e=t.prototype;t.getFilterBounds=function(t,e){e||(e=new At.Rectangle);var i=t.filters,n=i&&i.length;if(!!n<=0)return e;for(var r=0;r<n;r++){var s=i[r];if(s&&s.getBounds){var a=s.getBounds();a&&(0==r?e.setValues(a.x,a.y,a.width,a.height):e.extend(a.x,a.y,a.width,a.height))}}return e},e.toString=function(){return"[BitmapCache]"},e.define=function(t,e,i,n,r,s,a){if(!t)throw"No symbol to cache";this._options=a,this.target=t,this.width=n>=1?n:1,this.height=r>=1?r:1,this.x=e||0,this.y=i||0,this.scale=s||1,this.update()},e.update=function(e){if(!this.target)throw"define() must be called before update()";var i=t.getFilterBounds(this.target),n=this.target.cacheCanvas;this._drawWidth=Math.ceil(this.width*this.scale)+i.width,this._drawHeight=Math.ceil(this.height*this.scale)+i.height,n&&this._drawWidth==n.width&&this._drawHeight==n.height||this._updateSurface(),this._filterOffX=i.x,this._filterOffY=i.y,this.offX=this.x*this.scale+this._filterOffX,this.offY=this.y*this.scale+this._filterOffY,this._drawToCache(e),this.cacheID=this.cacheID?this.cacheID+1:1},e.release=function(){if(this._webGLCache)this._webGLCache.isCacheControlled||(this.__lastRT&&(this.__lastRT=void 0),this.__rtA&&this._webGLCache._killTextureObject(this.__rtA),this.__rtB&&this._webGLCache._killTextureObject(this.__rtB),this.target&&this.target.cacheCanvas&&this._webGLCache._killTextureObject(this.target.cacheCanvas)),this._webGLCache=!1;else{var t=this.target.stage;t instanceof At.StageGL&&t.releaseTexture(this.target.cacheCanvas)}this.target=this.target.cacheCanvas=null,this.cacheID=this._cacheDataURLID=this._cacheDataURL=void 0,this.width=this.height=this.x=this.y=this.offX=this.offY=0,this.scale=1},e.getCacheDataURL=function(){var t=this.target&&this.target.cacheCanvas;return t?(this.cacheID!=this._cacheDataURLID&&(this._cacheDataURLID=this.cacheID,this._cacheDataURL=t.toDataURL?t.toDataURL():null),this._cacheDataURL):null},e.draw=function(t){return!!this.target&&(t.drawImage(this.target.cacheCanvas,this.x+this._filterOffX/this.scale,this.y+this._filterOffY/this.scale,this._drawWidth/this.scale,this._drawHeight/this.scale),!0)},e._updateSurface=function(){if(!this._options||!this._options.useGL){var t=this.target.cacheCanvas;return t||(t=this.target.cacheCanvas=At.createCanvas?At.createCanvas():document.createElement("canvas")),t.width=this._drawWidth,void(t.height=this._drawHeight)}if(!this._webGLCache)if("stage"===this._options.useGL){if(!this.target.stage||!this.target.stage.isWebGL){var e="Cannot use 'stage' for cache because the object's parent stage is ";throw e+=this.target.stage?"non WebGL.":"not set, please addChild to the correct stage.",e}this.target.cacheCanvas=!0,this._webGLCache=this.target.stage}else if("new"===this._options.useGL)this.target.cacheCanvas=document.createElement("canvas"),this._webGLCache=new At.StageGL(this.target.cacheCanvas,{antialias:!0,transparent:!0,autoPurge:-1}),this._webGLCache.isCacheControlled=!0;else{if(!(this._options.useGL instanceof At.StageGL))throw"Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got "+this._options.useGL;this.target.cacheCanvas=!0,this._webGLCache=this._options.useGL,this._webGLCache.isCacheControlled=!0}t=this.target.cacheCanvas;var i=this._webGLCache;i.isCacheControlled&&(t.width=this._drawWidth,t.height=this._drawHeight,i.updateViewport(this._drawWidth,this._drawHeight)),this.target.filters?(i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight),i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)):i.isCacheControlled||i.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)},e._drawToCache=function(t){var e=this.target.cacheCanvas,i=this.target,n=this._webGLCache;if(n)n.cacheDraw(i,i.filters,this),e=this.target.cacheCanvas,e.width=this._drawWidth,e.height=this._drawHeight;else{var r=e.getContext("2d");t||r.clearRect(0,0,this._drawWidth+1,this._drawHeight+1),r.save(),r.globalCompositeOperation=t,r.setTransform(this.scale,0,0,this.scale,-this._filterOffX,-this._filterOffY),r.translate(-this.x,-this.y),i.draw(r,!0),r.restore(),i.filters&&i.filters.length&&this._applyFilters(r)}e._invalid=!0},e._applyFilters=function(t){var e,i=this.target.filters,n=this._drawWidth,r=this._drawHeight,s=0,a=i[s];do{a.usesContext?(e&&(t.putImageData(e,0,0),e=null),a.applyFilter(t,0,0,n,r)):(e||(e=t.getImageData(0,0,n,r)),a._applyFilter(e)),a=null!==a._multiPass?a._multiPass:i[++s]}while(a);e&&t.putImageData(e,0,0)},At.BitmapCache=t}(),this.createjs=this.createjs||{},function(){function t(t,e,i){this.Filter_constructor(),this._blurX=t,this._blurXTable=[],this._lastBlurX=null,this._blurY=e,this._blurYTable=[],this._lastBlurY=null,this._quality,this._lastQuality=null,this.FRAG_SHADER_TEMPLATE="uniform float xWeight[{{blurX}}];uniform float yWeight[{{blurY}}];uniform vec2 textureOffset;void main(void) {vec4 color = vec4(0.0);float xAdj = ({{blurX}}.0-1.0)/2.0;float yAdj = ({{blurY}}.0-1.0)/2.0;vec2 sampleOffset;for(int i=0; i<{{blurX}}; i++) {for(int j=0; j<{{blurY}}; j++) {sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);}}gl_FragColor = color.rgba;}",(isNaN(i)||i<1)&&(i=1),this.setQuality(0|i)}var e=At.extend(t,At.Filter);e.getBlurX=function(){return this._blurX},e.getBlurY=function(){return this._blurY},e.setBlurX=function(t){(isNaN(t)||t<0)&&(t=0),this._blurX=t},e.setBlurY=function(t){(isNaN(t)||t<0)&&(t=0),this._blurY=t},e.getQuality=function(){return this._quality},e.setQuality=function(t){(isNaN(t)||t<0)&&(t=0),this._quality=0|t},e._getShader=function(){var t=this._lastBlurX!==this._blurX,e=this._lastBlurY!==this._blurY,i=this._lastQuality!==this._quality;return t||e||i?((t||i)&&(this._blurXTable=this._getTable(this._blurX*this._quality)),(e||i)&&(this._blurYTable=this._getTable(this._blurY*this._quality)),this._updateShader(),this._lastBlurX=this._blurX,this._lastBlurY=this._blurY,void(this._lastQuality=this._quality)):this._compiledShader},e._setShader=function(){this._compiledShader};try{Object.defineProperties(e,{blurX:{get:e.getBlurX,set:e.setBlurX},blurY:{get:e.getBlurY,set:e.setBlurY},quality:{get:e.getQuality,set:e.setQuality},_builtShader:{get:e._getShader,set:e._setShader}})}catch(i){console.log(i)}e._getTable=function(t){var e=4.2;if(t<=1)return[1];var i=[],n=Math.ceil(2*t);n+=n%2?0:1;for(var r=n/2|0,s=-r;s<=r;s++){var a=s/r*e;i.push(1/Math.sqrt(2*Math.PI)*Math.pow(Math.E,-Math.pow(a,2)/4))}var o=i.reduce((function(t,e){return t+e}));return i.map((function(t,e,i){return t/o}))},e._updateShader=function(){if(void 0!==this._blurX&&void 0!==this._blurY){var t=this.FRAG_SHADER_TEMPLATE;t=t.replace(/\{\{blurX\}\}/g,this._blurXTable.length.toFixed(0)),t=t.replace(/\{\{blurY\}\}/g,this._blurYTable.length.toFixed(0)),this.FRAG_SHADER_BODY=t}},e.shaderParamSetup=function(t,e,i){t.uniform1fv(t.getUniformLocation(i,"xWeight"),this._blurXTable),t.uniform1fv(t.getUniformLocation(i,"yWeight"),this._blurYTable),t.uniform2f(t.getUniformLocation(i,"textureOffset"),2/(e._viewportWidth*this._quality),2/(e._viewportHeight*this._quality))},t.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],t.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],e.getBounds=function(t){var e=0|this.blurX,i=0|this.blurY;if(e<=0&&i<=0)return t;var n=Math.pow(this.quality,.2);return(t||new At.Rectangle).pad(i*n+1,e*n+1,i*n+1,e*n+1)},e.clone=function(){return new t(this.blurX,this.blurY,this.quality)},e.toString=function(){return"[BlurFilter]"},e._applyFilter=function(e){var i=this._blurX>>1;if(isNaN(i)||i<0)return!1;var n=this._blurY>>1;if(isNaN(n)||n<0)return!1;if(0==i&&0==n)return!1;var r=this.quality;(isNaN(r)||r<1)&&(r=1),r|=0,r>3&&(r=3),r<1&&(r=1);var s=e.data,a=0,o=0,l=0,c=0,h=0,u=0,d=0,f=0,p=0,m=0,_=0,v=0,g=0,b=0,y=0,w=i+i+1|0,x=n+n+1|0,E=0|e.width,C=0|e.height,S=E-1|0,T=C-1|0,R=i+1|0,L=n+1|0,k={r:0,b:0,g:0,a:0},O=k;for(l=1;l<w;l++)O=O.n={r:0,b:0,g:0,a:0};O.n=k;var I={r:0,b:0,g:0,a:0},A=I;for(l=1;l<x;l++)A=A.n={r:0,b:0,g:0,a:0};A.n=I;var D=null,P=0|t.MUL_TABLE[i],M=0|t.SHG_TABLE[i],j=0|t.MUL_TABLE[n],B=0|t.SHG_TABLE[n];while(r-- >0){d=u=0;var F=P,U=M;for(o=C;--o>-1;){for(f=R*(v=s[0|u]),p=R*(g=s[u+1|0]),m=R*(b=s[u+2|0]),_=R*(y=s[u+3|0]),O=k,l=R;--l>-1;)O.r=v,O.g=g,O.b=b,O.a=y,O=O.n;for(l=1;l<R;l++)c=u+((S<l?S:l)<<2)|0,f+=O.r=s[c],p+=O.g=s[c+1],m+=O.b=s[c+2],_+=O.a=s[c+3],O=O.n;for(D=k,a=0;a<E;a++)s[u++]=f*F>>>U,s[u++]=p*F>>>U,s[u++]=m*F>>>U,s[u++]=_*F>>>U,c=d+((c=a+i+1)<S?c:S)<<2,f-=D.r-(D.r=s[c]),p-=D.g-(D.g=s[c+1]),m-=D.b-(D.b=s[c+2]),_-=D.a-(D.a=s[c+3]),D=D.n;d+=E}for(F=j,U=B,a=0;a<E;a++){for(u=a<<2|0,f=L*(v=s[u])|0,p=L*(g=s[u+1|0])|0,m=L*(b=s[u+2|0])|0,_=L*(y=s[u+3|0])|0,A=I,l=0;l<L;l++)A.r=v,A.g=g,A.b=b,A.a=y,A=A.n;for(h=E,l=1;l<=n;l++)u=h+a<<2,f+=A.r=s[u],p+=A.g=s[u+1],m+=A.b=s[u+2],_+=A.a=s[u+3],A=A.n,l<T&&(h+=E);if(u=a,D=I,r>0)for(o=0;o<C;o++)c=u<<2,s[c+3]=y=_*F>>>U,y>0?(s[c]=f*F>>>U,s[c+1]=p*F>>>U,s[c+2]=m*F>>>U):s[c]=s[c+1]=s[c+2]=0,c=a+((c=o+L)<T?c:T)*E<<2,f-=D.r-(D.r=s[c]),p-=D.g-(D.g=s[c+1]),m-=D.b-(D.b=s[c+2]),_-=D.a-(D.a=s[c+3]),D=D.n,u+=E;else for(o=0;o<C;o++)c=u<<2,s[c+3]=y=_*F>>>U,y>0?(y=255/y,s[c]=(f*F>>>U)*y,s[c+1]=(p*F>>>U)*y,s[c+2]=(m*F>>>U)*y):s[c]=s[c+1]=s[c+2]=0,c=a+((c=o+L)<T?c:T)*E<<2,f-=D.r-(D.r=s[c]),p-=D.g-(D.g=s[c+1]),m-=D.b-(D.b=s[c+2]),_-=D.a-(D.a=s[c+3]),D=D.n,u+=E}}return!0},At.BlurFilter=At.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.alphaMap=t,this._alphaMap=null,this._mapData=null,this._mapTexture=null,this.FRAG_SHADER_BODY="uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * (alphaMap.r * ceil(alphaMap.a)));}"}var e=At.extend(t,At.Filter);e.shaderParamSetup=function(t,e,i){this._mapTexture||(this._mapTexture=t.createTexture()),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._mapTexture),e.setTextureParams(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.alphaMap),t.uniform1i(t.getUniformLocation(i,"uAlphaSampler"),1)},e.clone=function(){var e=new t(this.alphaMap);return e._alphaMap=this._alphaMap,e._mapData=this._mapData,e},e.toString=function(){return"[AlphaMapFilter]"},e._applyFilter=function(t){if(!this.alphaMap)return!0;if(!this._prepAlphaMap())return!1;for(var e=t.data,i=this._mapData,n=0,r=e.length;n<r;n+=4)e[n+3]=i[n]||0;return!0},e._prepAlphaMap=function(){if(!this.alphaMap)return!1;if(this.alphaMap==this._alphaMap&&this._mapData)return!0;this._mapData=null;var t,e=this._alphaMap=this.alphaMap,i=e;e instanceof HTMLCanvasElement?t=i.getContext("2d"):(i=At.createCanvas?At.createCanvas():document.createElement("canvas"),i.width=e.width,i.height=e.height,t=i.getContext("2d"),t.drawImage(e,0,0));try{var n=t.getImageData(0,0,e.width,e.height)}catch(r){return!1}return this._mapData=n.data,!0},At.AlphaMapFilter=At.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.mask=t,this.usesContext=!0,this.FRAG_SHADER_BODY="uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);}"}var e=At.extend(t,At.Filter);e.shaderParamSetup=function(t,e,i){this._mapTexture||(this._mapTexture=t.createTexture()),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._mapTexture),e.setTextureParams(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.mask),t.uniform1i(t.getUniformLocation(i,"uAlphaSampler"),1)},e.applyFilter=function(t,e,i,n,r,s,a,o){return!this.mask||(s=s||t,null==a&&(a=e),null==o&&(o=i),s.save(),t==s&&(s.globalCompositeOperation="destination-in",s.drawImage(this.mask,a,o),s.restore(),!0))},e.clone=function(){return new t(this.mask)},e.toString=function(){return"[AlphaMaskFilter]"},At.AlphaMaskFilter=At.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n,r,s,a,o){this.Filter_constructor(),this.redMultiplier=null!=t?t:1,this.greenMultiplier=null!=e?e:1,this.blueMultiplier=null!=i?i:1,this.alphaMultiplier=null!=n?n:1,this.redOffset=r||0,this.greenOffset=s||0,this.blueOffset=a||0,this.alphaOffset=o||0,this.FRAG_SHADER_BODY="uniform vec4 uColorMultiplier;uniform vec4 uColorOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = (color * uColorMultiplier) + uColorOffset;}"}var e=At.extend(t,At.Filter);e.shaderParamSetup=function(t,e,i){t.uniform4f(t.getUniformLocation(i,"uColorMultiplier"),this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier),t.uniform4f(t.getUniformLocation(i,"uColorOffset"),this.redOffset/255,this.greenOffset/255,this.blueOffset/255,this.alphaOffset/255)},e.toString=function(){return"[ColorFilter]"},e.clone=function(){return new t(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},e._applyFilter=function(t){for(var e=t.data,i=e.length,n=0;n<i;n+=4)e[n]=e[n]*this.redMultiplier+this.redOffset,e[n+1]=e[n+1]*this.greenMultiplier+this.greenOffset,e[n+2]=e[n+2]*this.blueMultiplier+this.blueOffset,e[n+3]=e[n+3]*this.alphaMultiplier+this.alphaOffset;return!0},At.ColorFilter=At.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(t,e,i,n){this.setColor(t,e,i,n)}var e=t.prototype;t.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],t.IDENTITY_MATRIX=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t.LENGTH=t.IDENTITY_MATRIX.length,e.setColor=function(t,e,i,n){return this.reset().adjustColor(t,e,i,n)},e.reset=function(){return this.copy(t.IDENTITY_MATRIX)},e.adjustColor=function(t,e,i,n){return this.adjustHue(n),this.adjustContrast(e),this.adjustBrightness(t),this.adjustSaturation(i)},e.adjustBrightness=function(t){return 0==t||isNaN(t)||(t=this._cleanValue(t,255),this._multiplyMatrix([1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])),this},e.adjustContrast=function(e){return 0==e||isNaN(e)||(e=this._cleanValue(e,100),e<0?i=127+e/100*127:(i=e%1,i=0==i?t.DELTA_INDEX[e]:t.DELTA_INDEX[e<<0]*(1-i)+t.DELTA_INDEX[1+(e<<0)]*i,i=127*i+127),this._multiplyMatrix([i/127,0,0,0,.5*(127-i),0,i/127,0,0,.5*(127-i),0,0,i/127,0,.5*(127-i),0,0,0,1,0,0,0,0,0,1])),this;var i},e.adjustSaturation=function(t){if(0==t||isNaN(t))return this;t=this._cleanValue(t,100);var e=1+(t>0?3*t/100:t/100),i=.3086,n=.6094,r=.082;return this._multiplyMatrix([i*(1-e)+e,n*(1-e),r*(1-e),0,0,i*(1-e),n*(1-e)+e,r*(1-e),0,0,i*(1-e),n*(1-e),r*(1-e)+e,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.adjustHue=function(t){if(0==t||isNaN(t))return this;t=this._cleanValue(t,180)/180*Math.PI;var e=Math.cos(t),i=Math.sin(t),n=.213,r=.715,s=.072;return this._multiplyMatrix([n+e*(1-n)+i*-n,r+e*-r+i*-r,s+e*-s+i*(1-s),0,0,n+e*-n+.143*i,r+e*(1-r)+.14*i,s+e*-s+-.283*i,0,0,n+e*-n+i*-(1-n),r+e*-r+i*r,s+e*(1-s)+i*s,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.concat=function(e){return e=this._fixMatrix(e),e.length!=t.LENGTH||this._multiplyMatrix(e),this},e.clone=function(){return(new t).copy(this)},e.toArray=function(){for(var e=[],i=0,n=t.LENGTH;i<n;i++)e[i]=this[i];return e},e.copy=function(e){for(var i=t.LENGTH,n=0;n<i;n++)this[n]=e[n];return this},e.toString=function(){return"[ColorMatrix]"},e._multiplyMatrix=function(t){var e,i,n,r=[];for(e=0;e<5;e++){for(i=0;i<5;i++)r[i]=this[i+5*e];for(i=0;i<5;i++){var s=0;for(n=0;n<5;n++)s+=t[i+5*n]*r[n];this[i+5*e]=s}}},e._cleanValue=function(t,e){return Math.min(e,Math.max(-e,t))},e._fixMatrix=function(e){return e instanceof t&&(e=e.toArray()),e.length<t.LENGTH?e=e.slice(0,e.length).concat(t.IDENTITY_MATRIX.slice(e.length,t.LENGTH)):e.length>t.LENGTH&&(e=e.slice(0,t.LENGTH)),e},At.ColorMatrix=t}(),this.createjs=this.createjs||{},function(){function t(t){this.Filter_constructor(),this.matrix=t,this.FRAG_SHADER_BODY="uniform mat4 uColorMatrix;uniform vec4 uColorMatrixOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);mat4 m = uColorMatrix;vec4 newColor = vec4(0,0,0,0);newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];gl_FragColor = newColor + uColorMatrixOffset;}"}var e=At.extend(t,At.Filter);e.shaderParamSetup=function(t,e,i){var n=this.matrix,r=new Float32Array([n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]]);t.uniformMatrix4fv(t.getUniformLocation(i,"uColorMatrix"),!1,r),t.uniform4f(t.getUniformLocation(i,"uColorMatrixOffset"),n[4]/255,n[9]/255,n[14]/255,n[19]/255)},e.toString=function(){return"[ColorMatrixFilter]"},e.clone=function(){return new t(this.matrix)},e._applyFilter=function(t){for(var e,i,n,r,s=t.data,a=s.length,o=this.matrix,l=o[0],c=o[1],h=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],_=o[8],v=o[9],g=o[10],b=o[11],y=o[12],w=o[13],x=o[14],E=o[15],C=o[16],S=o[17],T=o[18],R=o[19],L=0;L<a;L+=4)e=s[L],i=s[L+1],n=s[L+2],r=s[L+3],s[L]=e*l+i*c+n*h+r*u+d,s[L+1]=e*f+i*p+n*m+r*_+v,s[L+2]=e*g+i*b+n*y+r*w+x,s[L+3]=e*E+i*C+n*S+r*T+R;return!0},At.ColorMatrixFilter=At.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){function t(){throw"Touch cannot be instantiated"}t.isSupported=function(){return!!("ontouchstart"in window||window.navigator["msPointerEnabled"]&&window.navigator["msMaxTouchPoints"]>0||window.navigator["pointerEnabled"]&&window.navigator["maxTouchPoints"]>0)},t.enable=function(e,i,n){return!!(e&&e.canvas&&t.isSupported())&&(e.__touch||(e.__touch={pointers:{},multitouch:!i,preventDefault:!n,count:0},"ontouchstart"in window?t._IOS_enable(e):(window.navigator["msPointerEnabled"]||window.navigator["pointerEnabled"])&&t._IE_enable(e)),!0)},t.disable=function(e){e&&("ontouchstart"in window?t._IOS_disable(e):(window.navigator["msPointerEnabled"]||window.navigator["pointerEnabled"])&&t._IE_disable(e),delete e.__touch)},t._IOS_enable=function(e){var i=e.canvas,n=e.__touch.f=function(i){t._IOS_handleEvent(e,i)};i.addEventListener("touchstart",n,!1),i.addEventListener("touchmove",n,!1),i.addEventListener("touchend",n,!1),i.addEventListener("touchcancel",n,!1)},t._IOS_disable=function(t){var e=t.canvas;if(e){var i=t.__touch.f;e.removeEventListener("touchstart",i,!1),e.removeEventListener("touchmove",i,!1),e.removeEventListener("touchend",i,!1),e.removeEventListener("touchcancel",i,!1)}},t._IOS_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();for(var i=e.changedTouches,n=e.type,r=0,s=i.length;r<s;r++){var a=i[r],o=a.identifier;a.target==t.canvas&&("touchstart"==n?this._handleStart(t,o,e,a.pageX,a.pageY):"touchmove"==n?this._handleMove(t,o,e,a.pageX,a.pageY):"touchend"!=n&&"touchcancel"!=n||this._handleEnd(t,o,e))}}},t._IE_enable=function(e){var i=e.canvas,n=e.__touch.f=function(i){t._IE_handleEvent(e,i)};void 0===window.navigator["pointerEnabled"]?(i.addEventListener("MSPointerDown",n,!1),window.addEventListener("MSPointerMove",n,!1),window.addEventListener("MSPointerUp",n,!1),window.addEventListener("MSPointerCancel",n,!1),e.__touch.preventDefault&&(i.style.msTouchAction="none")):(i.addEventListener("pointerdown",n,!1),window.addEventListener("pointermove",n,!1),window.addEventListener("pointerup",n,!1),window.addEventListener("pointercancel",n,!1),e.__touch.preventDefault&&(i.style.touchAction="none")),e.__touch.activeIDs={}},t._IE_disable=function(t){var e=t.__touch.f;void 0===window.navigator["pointerEnabled"]?(window.removeEventListener("MSPointerMove",e,!1),window.removeEventListener("MSPointerUp",e,!1),window.removeEventListener("MSPointerCancel",e,!1),t.canvas&&t.canvas.removeEventListener("MSPointerDown",e,!1)):(window.removeEventListener("pointermove",e,!1),window.removeEventListener("pointerup",e,!1),window.removeEventListener("pointercancel",e,!1),t.canvas&&t.canvas.removeEventListener("pointerdown",e,!1))},t._IE_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();var i=e.type,n=e.pointerId,r=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;r[n]=!0,this._handleStart(t,n,e,e.pageX,e.pageY)}else r[n]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,n,e,e.pageX,e.pageY):"MSPointerUp"!=i&&"MSPointerCancel"!=i&&"pointerup"!=i&&"pointercancel"!=i||(delete r[n],this._handleEnd(t,n,e)))}},t._handleStart=function(t,e,i,n,r){var s=t.__touch;if(s.multitouch||!s.count){var a=s.pointers;a[e]||(a[e]=!0,s.count++,t._handlePointerDown(e,i,n,r))}},t._handleMove=function(t,e,i,n,r){t.__touch.pointers[e]&&t._handlePointerMove(e,i,n,r)},t._handleEnd=function(t,e,i){var n=t.__touch,r=n.pointers;r[e]&&(n.count--,t._handlePointerUp(e,i,!0),delete r[e])},At.Touch=t}(),this.createjs=this.createjs||{},function(){var t=At.EaselJS=At.EaselJS||{};t.version="1.0.0",t.buildDate="Thu, 14 Sep 2017 19:47:53 GMT"}()}),At=window.createjs=window.createjs||{};It.call(window);var Dt=At,Pt=Ot["a"].EventDispatcher,Mt=Ot["a"].Event,jt=Ot["a"].LoadQueue,Bt=Dt.Bitmap,Ft=Dt.BitmapCache,Ut=Dt.Stage,Nt=Dt.Shape,Gt=Dt.Container,Xt=function(t){if("object"!==Object(kt["a"])(t))return null;var e=new Bt("");return e.image=t,e.mouseEnabled=!1,e.tickEnabled=!1,t.canvasCache?(e.cacheCanvas=t.canvasCache,e.bitmapCache=new Ft,e.bitmapCache.define(e,0,0,t.width,t.height)):(e.cache(0,0,t.width,t.height),t.canvasCache=e.cacheCanvas),e},Ht=function(t){if("string"!==typeof t)return null;var e=new Bt("");e.mouseEnabled=!1,e.tickEnabled=!1;var i=new Image;return i.onload=function(t){e.image=i,e.cache(0,0,i.width,i.height),e.dispatchEvent("cached")},i.crossOrigin="anonymous",i.src=t,e},Yt=function(){function t(e){Object(Rt["a"])(this,t);var i="string"===typeof e?document.getElementById(e):e;this._stage=new Ut(i,{antialias:!0}),this._stage.mouseChildren=!1,this._stage.tickChildren=!1,this._stage.tickOnUpdate=!1,this._stage.enableMouseOver(0),this._stage.enableDOMEvents(!1),this._invalidate=!0,this.setManifest(i.width,i.height),this.children=[]}return Object(Lt["a"])(t,[{key:"setManifest",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.width=t||0,this.height=e||0,this.bgColor=i||"transparent"}},{key:"addChild",value:function(t){return t.getStageDisplay?(this._stage.addChild(t.getStageDisplay()),this._invalidate=!0,t._stage=this,this.children.push(t)):-1}},{key:"getChild",value:function(t){return this.children[t]}},{key:"setChildVisible",value:function(t,e){this.children[t].setVisible(!!e),this._invalidate=!0}},{key:"invalidate",value:function(){this._invalidate=!0}},{key:"restore",value:function(){if(this.children=[],this._invalidate=!0,this._stage.removeAllChildren(),this.width&&this.height&&"transparent"!==this.bgColor){var t=new Nt;t.graphics.beginFill(this.bgColor).drawRect(0,0,this.width,this.height),this._stage.addChild(t)}this._stage.update()}},{key:"update",value:function(){this._invalidate&&this.isReady()&&(this._stage.update(),this._invalidate=!1)}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}}]),t}(),Vt=Yt,Wt=(i("2397"),i("013f")),qt=i("4e2b"),$t=i("308d"),zt=i("2a88"),Jt=i("6bb5"),Qt=function(){function t(e){Object(Rt["a"])(this,t),this.offsetY=0,this.offsetX=0,this.offsetStep=1,this._maxOffsetY=parseInt(e.up||0),this._minOffsetY=-parseInt(e.down||0),this._maxOffsetX=parseInt(e.right||0),this._minOffsetX=-parseInt(e.left||0)}return Object(Lt["a"])(t,[{key:"transform",value:function(t,e){var i=t.action,n=t.offset;switch(i){case"up":this._moveUp(e);break;case"down":this._moveDown(e);break;case"left":this._moveLeft(e);break;case"right":this._moveRight(e);break;case"default":this._moveDefault(e);break;case"exact":this._moveExact(n,e);break}}},{key:"clone",value:function(){return new t({up:this._maxOffsetY,down:-this._minOffsetY,right:this._maxOffsetX,left:-this._minOffsetX})}},{key:"random",value:function(){return{y:parseInt(Math.random()*(this._maxOffsetY-this._minOffsetY)+this._minOffsetY),x:parseInt(Math.random()*(this._maxOffsetX-this._minOffsetX)+this._minOffsetX)}}},{key:"_moveExact",value:function(t,e){this._moveDefault(e),this.offsetY=parseInt(t.y),this.offsetX=parseInt(t.x),e.y+=this.offsetY,e.x+=this.offsetX}},{key:"_moveUp",value:function(t){this._minOffsetY!==this.offsetY&&(this.offsetY-=this.offsetStep,t.y-=this.offsetStep)}},{key:"_moveDown",value:function(t){this._maxOffsetY!==this.offsetY&&(this.offsetY+=this.offsetStep,t.y+=this.offsetStep)}},{key:"_moveRight",value:function(t){this._maxOffsetX!==this.offsetX&&(this.offsetX+=this.offsetStep,t.x+=this.offsetStep)}},{key:"_moveLeft",value:function(t){this._minOffsetX!==this.offsetX&&(this.offsetX-=this.offsetStep,t.x-=this.offsetStep)}},{key:"_moveDefault",value:function(t){t.x-=this.offsetX,t.y-=this.offsetY,this.offsetX=0,this.offsetY=0}}]),t}(),Zt=Qt,Kt=function(){function t(){Object(Rt["a"])(this,t),this._pendingCalls=[],this._onFlushOnceListeners=[]}return Object(Lt["a"])(t,[{key:"once",value:function(t,e){"function"===typeof e&&"flush"===t&&this._onFlushOnceListeners.push(e)}},{key:"reset",value:function(){this._pendingCalls=[],this._onFlushOnceListeners=[]}},{key:"push",value:function(t){return"function"===typeof t?this.pushCallback(t):"object"===Object(kt["a"])(t)?this.pushPromisse(t):void 0}},{key:"pushCallback",value:function(t){"function"===typeof t&&this._pendingCalls.push(t)}},{key:"pushPromisse",value:function(t){var e=t.resolve,i=t.reject;"function"===typeof e&&"function"===typeof i&&this._pendingCalls.push({resolve:e,reject:i})}},{key:"flushCalls",value:function(){this._pendingCalls.forEach((function(t){"function"===typeof t&&t()})),this.__flushListeners()}},{key:"clearCalls",value:function(){this._pendingCalls=[],this.__flushListeners()}},{key:"resolveAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._pendingCalls.forEach((function(e){"object"===Object(kt["a"])(e)&&"function"===typeof e.resolve&&e.resolve(t)})),this.__flushListeners()}},{key:"rejectAll",value:function(t){this._pendingCalls.forEach((function(e){"object"===Object(kt["a"])(e)&&"function"===typeof e.resolve&&e.reject(t)})),this.__flushListeners()}},{key:"__flushListeners",value:function(){this._onFlushOnceListeners.forEach((function(t){"function"===typeof t&&t()})),this.reset()}}]),t}(),te=Kt,ee=function(t,e,i,n){i[e]=i[t],i[t]=function(){this[e].apply(this,arguments);var i=Array.prototype.slice.call(arguments);ne.slaveCall(n,(function(e){e[t].apply(e,Object(c["a"])(i))}))}},ie=function(){function t(){Object(Rt["a"])(this,t),this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls=new te}return Object(Lt["a"])(t,[{key:"onFlushOnce",value:function(t){return this.pendingCalls.once("flush",t)}},{key:"reset",value:function(){this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls.reset()}},{key:"addMaster",value:function(t,e){-1===this.masterRefs.indexOf(t)&&this.masterRefs.push(t),ee("setVisible","___setVisible",e,t),ee("setProps","___setProps",e,t),ee("transform","___transform",e,t),this.masterObjects[t]=e}},{key:"addSlave",value:function(t,e){var i=this;this.pendingCalls.push((function(){if(-1!==i.masterRefs.indexOf(t)&&"object"===Object(kt["a"])(e)){i.slaveObjects[t]||(i.slaveObjects[t]=[]);var n=i.masterObjects[t];n._transformations&&(e._transformations=n._transformations.clone()),i.slaveObjects[t].push(e)}}))}},{key:"flushPendingCalls",value:function(){this.pendingCalls.flushCalls()}},{key:"slaveCall",value:function(t,e){-1!==this.masterRefs.indexOf(t)&&"function"===typeof e&&this.slaveObjects[t]&&this.slaveObjects[t].forEach(e)}}]),t}(),ne=new ie,re=ne,se=function(){function t(e){if(Object(Rt["a"])(this,t),this.width=e.width||0,this.height=e.height||0,this.__json=e,this._stageDisplay=new Gt,this._stageDisplay.mouseEnabled=!1,this._stageDisplay.x=e.x||0,this._stageDisplay.y=e.y||0,this._mirror=e.mirror,this._ref=e.ref,this._random={factor:.5},e.random)for(var i in e.random)this._random[i]=e.random[i];this._stage=null,this._mirror?re.addSlave(this._mirror,this):this._ref&&re.addMaster(this._ref,this),this._transformations=null,e.transform&&(this._transformations=new Zt(e.transform))}return Object(Lt["a"])(t,[{key:"getRef",value:function(){return this._ref}},{key:"getJsonBase",value:function(){return this.__json}},{key:"removeAllChildren",value:function(){this._stageDisplay.removeAllChildren()}},{key:"addChild",value:function(t){if("function"===typeof t.getStageDisplay)return t._stage=this._stage,void this._stageDisplay.addChild(t.getStageDisplay());this._stageDisplay.addChild(t)}},{key:"setPosition",value:function(t,e){this._stageDisplay.x=t||0,this._stageDisplay.y=e||0}},{key:"setVisible",value:function(t){this._stageDisplay.visible=!!t,this.__json.visible=!!t}},{key:"isVisible",value:function(){return this._stageDisplay.visible}},{key:"isMirrored",value:function(){return!!this._mirror}},{key:"transform",value:function(t){t&&this._transformations&&this._transformations.transform(t,this._stageDisplay)}},{key:"getStageDisplay",value:function(){return this._stageDisplay}},{key:"getStage",value:function(){return this._stage}},{key:"getRandomChance",value:function(){return this._random.factor}},{key:"isReady",value:function(){return!1}},{key:"setProps",value:function(t){}},{key:"update",value:function(){this._stageDisplay.visible!==this.__json.visible&&this.setVisible(this.__json.visible),this._stageDisplay.x===this.__json.x&&this._stageDisplay.y===this.__json.y||this.setPosition(this.__json.x,this.__json.y)}},{key:"random",value:function(){var t=Math.random(),e=t<=this._random.factor;return this.isVisible()!==e&&this.setVisible(e),e}},{key:"release",value:function(){}},{key:"x",get:function(){return this._stageDisplay.x}},{key:"y",get:function(){return this._stageDisplay.y}}]),t}(),ae=se,oe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(Rt["a"])(this,t),this.files={},this.baseURL=e,this._onDemandMode=!1,this._queueItems=[],this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,this._queues=[];for(var i=0;i<10;i++){var n=new jt(!0);n.id=i,n.on("fileload",this._handleFileLoad,this),n.on("fileerror",this._handleFileError,this),n.on("complete",this._handleComplete,this),0===i&&n.on("progress",this._handleProgress,this),this._queues.push(n)}this._events=new Pt}return Object(Lt["a"])(t,[{key:"_handleProgress",value:function(t){this._downloading&&(t.loaded=this._loadedFiles/this._totalFiles,t.progress=t.loaded,this._events.dispatchEvent(t))}},{key:"_handleFileLoad",value:function(t){var e=this;if(this._loadedFiles++,!this.files[t.item.id]){/^blob:/.test(t.item.id)?this.files[t.item.id]=t.item.id:this.files[t.item.id]=t.result;var i=this._queueItems.findIndex((function(e){return e.id===t.item.id}));-1!==i&&(this._queueItems[i].listeners.forEach((function(i){var n={id:t.item.id,result:e.getItem(t.item.id)};n.result.bitmapCache?i.resolve(n):n.result.on("cached",(function(){i.resolve(n)}))})),this._queueItems.splice(i,1)),this._events.dispatchEvent(this._eventFactory("fileload",{id:t.item.id}))}}},{key:"_handleFileError",value:function(t){if(this._loadedFiles++,this.files[t.item.id])return!1;this.files[t.item.id]=null;var e=this._queueItems.findIndex((function(e){return e.id===t.item.id}));-1!==e&&(this._queueItems[e].listeners.forEach((function(e){return e.reject(new Error(t.item.id))})),this._queueItems.splice(e,1))}},{key:"_eventFactory",value:function(t,e){var i=new Mt(t);return i.loadedCount=this._loadedFiles,i.total=this._totalFiles,e.id&&(i.fileId=e.id),i.result=e.result,i}},{key:"_handleComplete",value:function(t){var e=this;if(this._downloading)return 0===this._queueItems.length?(this._downloading=!1,this._loadedFiles=0,this._totalFiles=0,void this._events.dispatchEvent(this._eventFactory("complete",{}))):void this._queues.forEach((function(t){t._numItems===t._numItemsLoaded&&e._loadQueueItems(t)}))}},{key:"_loadQueueItems",value:function(t){t.removeAll();var e=this._queueItems.filter((function(e){return e.queueId===t.id}));0!==e.length&&t.loadManifest(e)}},{key:"setBaseUrl",value:function(t){this.baseURL=t}},{key:"setOnDemandMode",value:function(t){this._onDemandMode=t}},{key:"isOnDemandMode",value:function(){return this._onDemandMode}},{key:"addEventListener",value:function(t,e){this._events.on(t,e)}},{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"addToQueue",value:function(t){var e=this;return t?new Promise((function(i,n){var r=e._queueItems.find((function(e){return e.id===t}));r||(r={id:t,src:"".concat(e.baseURL||"").concat(t),crossOrigin:"Anonymous",listeners:[],queueId:e._queueItems.length%e._queues.length},e._queueItems.push(r)),r.listeners.push({resolve:i,reject:n})})):Promise.reject(new Error("Src is empty or exist"))}},{key:"hasItem",value:function(t){return!(!t||!this.files[t])}},{key:"getItem",value:function(t){return this.hasItem(t)?/^blob:/.test(t)?Ht(this.files[t]):Xt(this.files[t]):null}},{key:"releaseItem",value:function(t){return!!this.hasItem(t)&&(this.files[t]=null,delete this.files[t],!0)}},{key:"loadItems",value:function(){var t=this;!this._downloading&&this._queueItems.length>0&&(this._downloading=!0,this._loadedFiles=0,this._totalFiles=this._queueItems.length,this._queues.forEach((function(e){return t._loadQueueItems(e)})),this._events.dispatchEvent(this._eventFactory("start",{})))}},{key:"cleanOut",value:function(){this._queues.forEach((function(t){return t.removeAll()})),this._events.removeAllEventListeners(),this.files={},this._queueItems=[],this._downloading=!1,this._loadedFiles=0,this._totalFiles=0}}]),t}(),le=new oe,ce=le;function he(t){var e=ue();return function(){var i,n=Object(Jt["a"])(t);if(e){var r=Object(Jt["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object($t["a"])(this,i)}}function ue(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var de=function(t){Object(qt["a"])(i,t);var e=he(i);function i(t){var n,r,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(Rt["a"])(this,i),r=e.call(this,t),Object(zt["a"])((n=Object(Wt["a"])(r),Object(Jt["a"])(i.prototype)),"setVisible",n).call(n,!!t.visible),r.category=null,r.bmd=null,r.src=t.image,t.image="",r._pendingPromisses=new te,r._isImageAdded=!1,r._loaded=!1,ce.isOnDemandMode()?(/^(blob|data):/.test(r.src)||(t.image=(ce.baseURL||"./")+"thumbnails/"+r.src),!s&&r.isVisible()&&r.load()):s||r.load(),r}return Object(Lt["a"])(i,[{key:"update",value:function(){Object(zt["a"])(Object(Jt["a"])(i.prototype),"update",this).call(this),this.isVisible()&&this.updateBmdCache()}},{key:"updateBmdCache",value:function(){var t=this.getJsonBase();!t.image&&this.bmd&&this.bmd.bitmapCache&&!ce.isOnDemandMode()&&(t.image=this.bmd.bitmapCache.getCacheDataURL())}},{key:"setPosition",value:function(t,e){return this.__json.x=t||0,this.__json.y=e||0,Object(zt["a"])(Object(Jt["a"])(i.prototype),"setPosition",this).call(this,t,e)}},{key:"setVisible",value:function(t){Object(zt["a"])(Object(Jt["a"])(i.prototype),"setVisible",this).call(this,t),ce.hasItem(this.src)||this.release(),!this.bmd&&this.isVisible()&&ce.isOnDemandMode()&&this.load()}},{key:"release",value:function(){this.bmd&&this.bmd.uncache(),this.bmd=null,this._loaded=!1,this._isImageAdded=!1,this.removeAllChildren(),ce.releaseItem(this.src)}},{key:"load",value:function(){var t=this;if(this._loaded||this._isImageAdded)return Promise.reject(new Error("Image loaded"));this.bmd=ce.getItem(this.src);var e=function(){t._isImageAdded||(t.addChild(t.bmd),t._isImageAdded=!0),t._loaded=!0;var e=t.getStage();e&&(e.invalidate(),e.update()),t.updateBmdCache()};return this.bmd?(e(),Promise.resolve()):new Promise((function(i,n){if(!t.isVisible()&&ce.isOnDemandMode())return t._pendingPromisses.pushPromisse({resolve:i,reject:n});ce.addToQueue(t.src).then((function(n){t.bmd=n.result,e(),i(),t._pendingPromisses.resolveAll()})).catch((function(e){n(e),t._pendingPromisses.rejectAll(e)})),ce.isOnDemandMode()&&ce.loadItems()}))}},{key:"isReady",value:function(){return this._loaded}}]),i}(ae),fe=de;i("db97"),i("5df3");function pe(t){var e=me();return function(){var i,n=Object(Jt["a"])(t);if(e){var r=Object(Jt["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object($t["a"])(this,i)}}function me(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var _e=function(t){Object(qt["a"])(i,t);var e=pe(i);function i(t,n){var r,s,a;Object(Rt["a"])(this,i),a=e.call(this,t),Object(zt["a"])((r=Object(Wt["a"])(a),Object(Jt["a"])(i.prototype)),"setVisible",r).call(r,!!t.visible),Object(zt["a"])((s=Object(Wt["a"])(a),Object(Jt["a"])(i.prototype)),"setPosition",s).call(s,0,0),a.activeDisplay=-1,a.displays=[],a.colors=[],a._stage=n;var o=[],l=null;return t.children=t.children||[],t.children.forEach((function(t){if(t&&t.name&&t.image){l&&(t.visible=!1);var e=t.visible;e&&(l=t.name);var i=new fe(t,!0);a.addChild(i),a.displays.push(i),a.colors.push(t.name),ce.isOnDemandMode()||o.push(i.load())}})),l&&a._setActiveColor(l),-1===a.activeDisplay&&a._setActiveColor(a.colors[0]),Promise.all(o).then((function(){return a._setActiveColor(a.colors[a.activeDisplay])})),a.getRef()&&a.isVisible()&&re.onFlushOnce((function(){return a.setProps({color:a.colors[a.activeDisplay]})})),a}return Object(Lt["a"])(i,[{key:"getActiveColor",value:function(){return this.colors[this.activeDisplay]}},{key:"getActiveImage",value:function(){return this.displays[this.activeDisplay]}},{key:"getColors",value:function(){return this.colors}},{key:"_setActiveColor",value:function(t){var e=this,i=this.colors.indexOf(t);-1!==i&&(this.activeDisplay=i,this.displays.forEach((function(t,n){if(i===n)return t.setVisible(e.isVisible());t.isVisible()&&t.setVisible(!1)})),this.getJsonBase().image=this.displays[i].getJsonBase().image)}},{key:"setVisible",value:function(t){return this.displays[this.activeDisplay].setVisible(t),Object(zt["a"])(Object(Jt["a"])(i.prototype),"setVisible",this).call(this,t)}},{key:"setPosition",value:function(t,e){return Object(zt["a"])(Object(Jt["a"])(i.prototype),"setPosition",this).call(this,0,0)}},{key:"update",value:function(){var t=this.activeDisplay;this.displays[this.activeDisplay].update(),this.displays[this.activeDisplay].isVisible()||(this.activeDisplay=-1),-1===this.activeDisplay&&(this.activeDisplay=this.displays.findIndex((function(t){return t.update(),t.isVisible()}))),-1===this.activeDisplay&&(this.activeDisplay=t),t!==this.activeDisplay&&this.setProps({color:this.colors[this.activeDisplay]}),Object(zt["a"])(Object(Jt["a"])(i.prototype),"update",this).call(this)}},{key:"random",value:function(){var t=Math.random(),e=parseInt(t*this.colors.length);this.setProps({color:this.colors[e]});var i=t<=this.getRandomChance();return this.isVisible()!==i&&this.setVisible(i),i}},{key:"setProps",value:function(t){t&&t.color&&(this.category&&this.category.fireSetPropsEvent(t,this),this._setActiveColor(t.color))}},{key:"isReady",value:function(){return this.displays[this.activeDisplay].isReady()}}]),i}(ae),ve=_e,ge={FIXED:"fixed",OPTIONAL:"optional",MIXED:"mixed",ICON:"icon",COLORPIKER:"color-picker",MOVE:"move",REF:"ref",MIRROR:"mirror",COLORGLOBAL:"enable-color-global",RANDOM:"random",RANDOMCHILD:"random-c",RANDOMMAX:"random-max",RANDOMMIN:"random-min",toArray:function(){var t=[];for(var e in this)t.push(ge[e]);return t}},be=ge,ye=new Pt,we=function(){function t(e,i){var n,r=this;if(Object(Rt["a"])(this,t),this.id=e.id,this.isFixed=-1!==e.tags.indexOf(be.FIXED),this.isMixed=-1!==e.tags.indexOf(be.MIXED),this.isOptional=-1!==e.tags.indexOf(be.OPTIONAL),this.children=[],this._button=new fe(e),this.__useColorGlobal=-1!==e.tags.indexOf(be.COLORGLOBAL),this.__isBusy=!1,this.__scope=e.colorGlobalScope,this.__useColorGlobal&&ye.addEventListener(this.__scope,(function(t){var e=t.eventProps,i=t.eventTarget;r.__isBusy=!0,r.children.forEach((function(t){Object.is(i,t)||"function"!==typeof t.setProps||t.setProps(e)})),r.__isBusy=!1})),e.children=e.children||[],e.children.length>0&&(n=1/e.children.length),this._random={factor:1,childFactor:n,maxVisible:e.children.length},e.random)for(var s in e.random)this._random[s]=e.random[s];Object(c["a"])(e.children).reverse().forEach((function(t){if(t&&t.type){var e=null;switch("undefined"!==typeof r._random.childFactor&&(t.random&&"undefined"!==typeof t.random.factor||(t.random=t.random||{},t.random.factor=r._random.childFactor)),t.type){case"image":e=new fe(t);break;case"color-picker":e=new ve(t,i);break;default:return null}e&&(i.addChild(e),t.index=i.children.indexOf(e),e.category=r,r.children.push(e))}})),this.isFixed&&-1===this.children.findIndex((function(t){return t.isVisible()}))&&re.onFlushOnce((function(){return r.random()}));var a=this.children.find((function(t){return t.isVisible()}));this.__useColorGlobal&&a&&"function"===typeof a.getActiveColor&&re.onFlushOnce((function(){return a.setProps({color:a.getActiveColor()})}))}return Object(Lt["a"])(t,[{key:"preventSetPropsEventDefaults",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.__isBusy=t}},{key:"fireSetPropsEvent",value:function(t,e){if(this.__useColorGlobal&&this.__scope&&!this.__isBusy&&t&&t.color){var i=new Mt(this.__scope);i.eventProps=t,i.eventTarget=e,ye.dispatchEvent(i)}}},{key:"update",value:function(){0!==this.children.length&&(this.children.forEach((function(t){return t.update()})),this.isFixed&&-1===this.children.findIndex((function(t){return t.isVisible()}))&&this._randomDefault())}},{key:"getRandomChance",value:function(){return this._random.factor}},{key:"random",value:function(){if(0===this.children.length)return 0;var t=this.children.length,e=0,i=0;this.isOptional&&(e=0,t=1),this.isFixed&&(e=1,t=1),this._random.maxVisible>=0&&this.isMixed&&(t=this._random.maxVisible),this._random.minVisible>=0&&!this.isFixed&&(e=this._random.minVisible),t<e&&(e=t);var n=Math.random(),r=this.isFixed||n<=this.getRandomChance();r||(t=0,e=0);var s=Object(c["a"])(this.children).reverse(),a=s.length,o=0,l=a,h=function(){var t=Math.random();0===o&&s.forEach((function(t){o+=t.getRandomChance()}));var e=t*o,n=0,r=s.find((function(t){var i=t.getRandomChance();return n+=i,n>=e}));r.random(),r.isVisible()||r.setVisible(!0),o-=r.getRandomChance(),s.splice(s.indexOf(r),1),i++};while(i<e&&l-- >0)h();return s.forEach((function(e){if(t<=i)return e.setVisible(!1);e.random(),e.isVisible()&&i++})),this.isFixed&&0===i&&this.children[0].setVisible(!0),r}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}}]),t}(),xe=we;function Ee(t){var e=Ce();return function(){var i,n=Object(Jt["a"])(t);if(e){var r=Object(Jt["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object($t["a"])(this,i)}}function Ce(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Se=function(t){Object(qt["a"])(i,t);var e=Ee(i);function i(t,n){var r,s;return Object(Rt["a"])(this,i),s=e.call(this,t),Object(zt["a"])((r=Object(Wt["a"])(s),Object(Jt["a"])(i.prototype)),"setPosition",r).call(r,0,0),s._stage=n,s.children=[],t.children=t.children||[],Object(c["a"])(t.children).reverse().forEach((function(t){if(t&&t.type){var e=null;switch(t.type){case"image":e=new fe(t);break;case"color-picker":e=new ve(t,n);break;default:return null}e&&(s.addChild(e),s.children.push(e))}})),s}return Object(Lt["a"])(i,[{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"setPosition",value:function(t,e){return Object(zt["a"])(Object(Jt["a"])(i.prototype),"setPosition",this).call(this,0,0)}},{key:"setVisible",value:function(t){return Object(zt["a"])(Object(Jt["a"])(i.prototype),"setVisible",this).call(this,!0)}}]),i}(ae),Te=Se,Re=(i("ac4d"),i("8a81"),i("1c4c"),i("5df2"),i("04ff"),i("768b"));function Le(t,e){var i;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=ke(t))||e&&t&&"number"===typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}function ke(t,e){if(t){if("string"===typeof t)return Oe(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Oe(t,e):void 0}}function Oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Ie=[],Ae=[],De={},Pe=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("move")){if(!t._tagsProps||!t._tagsProps.move)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated move property"));var n=t._tagsProps.move.split(" ").map((function(t){return parseInt(t)||0})),r=Object(Re["a"])(n,4),s=r[0],a=r[1],o=r[2],l=r[3];if(s<0||a<0||o<0||l<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative move parameter"));(s||a||o||l)&&(i||(t.transform={up:s>0?s:0,right:a>0?a:0,down:o>0?o:0,left:l>0?l:0}))}},Me=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];-1!==t.tags.indexOf("enable-color-global")&&(i||(t.colorGlobalScope=t._tagsProps["enable-color-global"]||Math.random().toString(36).substr(2,10)))},je=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];["random","random-c","random-max","random-min"].forEach((function(n){if(-1!==t.tags.indexOf(n)){if(!t._tagsProps||"undefined"===typeof t._tagsProps[n])return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ").concat(n," property"));var r=t._tagsProps[n],s=/^[+-]?\d+(\.\d+)?$/;if(!s.test(r))return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a invalid number value"));var a="random-max"===n||"random-min"===n;if(r=a?Number.parseInt(r):Number.parseFloat(r),isNaN(r))return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ").concat(n," property"));if(r<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative ").concat(n," property"));if(!a&&r>1)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") property ").concat(n," must be between 0 and 1"));if(!i)switch(t.random=t.random||{},n){case"random":t.random.factor=r;break;case"random-c":t.random.childFactor=r;break;case"random-max":t.random.maxVisible=r;break;case"random-min":t.random.minVisible=r;break}}}))},Be=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("ref")){if(!t._tagsProps||!t._tagsProps.ref)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated ref property"));var n=t._tagsProps.ref;if(-1!==Ae.indexOf(n))return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a duplicate ref "').concat(n,'"'));i||(t.ref=n),Ae.push(n),De[n]=t}},Fe=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(-1!==t.tags.indexOf("mirror")){if(!t._tagsProps||!t._tagsProps.mirror)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a wrong formated mirror property"));var n=t._tagsProps.mirror;Ge((function(){return-1===Ae.indexOf(n)?e('Layer "'.concat(t.name,'"(#').concat(t.id,') try to use undefined ref "').concat(n,'"')):t.type!==De[n].type?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same type of mirror ref "').concat(n,'"')):t.children.length!==De[n].children.length?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same number of the children of mirror ref "').concat(n,'"')):void(i||(t.mirror=n,t.visible=De[n].visible))}))}},Ue=function(t){if(t&&t.tags&&!t._tags){var e={};t._tags=t.tags.map((function(t){return t})),t.tags=t.tags.map((function(t){if(!t.indexOf(":"))return t;var i=t.split(":"),n=Object(Re["a"])(i,2),r=n[0],s=n[1];return r=r.trim(),e[r]=s,r})),t._tagsProps=e}},Ne=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Be(t,e,i),Fe(t,e,i),Pe(t,e,i),Me(t,e,i),je(t,e,i),delete t._tagsProps},Ge=function(t){Ie.push(t)},Xe=function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=Le(Ie),t.prev=1,i.s();case 3:if((n=i.n()).done){t.next=13;break}if(r=n.value,"function"===typeof r){t.next=7;break}return t.abrupt("continue",11);case 7:if(s=r(e),!(s&&s instanceof Promise)){t.next=11;break}return t.next=11,s;case 11:t.next=3;break;case 13:t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](1),i.e(t.t0);case 18:return t.prev=18,i.f(),t.finish(18);case 21:Ie=[],Ae=[],De={};case 24:case"end":return t.stop()}}),t,null,[[1,15,18,21]])})));return function(e){return t.apply(this,arguments)}}();be.computeTagsProps=Ue,be.prepareCustomTags=Ne,be.flushPendingCalls=Xe,be.pushFunc=Ge;var He,Ye=be,Ve=function(){function t(e){Object(Rt["a"])(this,t),this.categories=[],this.stage=new Vt(e),this._events=new Pt,this.gameId=void 0,this.releaseId=void 0}return Object(Lt["a"])(t,[{key:"on",value:function(t,e){this._events.on(t,e)}},{key:"once",value:function(t,e){this._events.on(t,e,null,!0)}},{key:"restore",value:function(){this.categories=[],this.data=[],this.stage.restore(),this.manifest=null,ce.cleanOut()}},{key:"setData",value:function(t,e){if(!t||!t.length||!e)throw new Error("Invalid data");var i=function(){};this.__deepForEach(t,(function(t){t.tags&&(t.children=t.children||[],Ye.computeTagsProps(t),Ye.prepareCustomTags(t,i),delete t._tags)})),Ye.flushPendingCalls(i),this._events.dispatchEvent("loading"),this.stage.setManifest(e.gameWidth,e.gameHeight,e.bgColor),this.restore(),this.manifest=e,this.gameId=e.gameId,this.releaseId=e.releaseId,this.data=t,this._parseData({preventColorGlobalEventsOnLoad:!!e.preventColorGlobalEventsOnLoad})}},{key:"getData",value:function(){return this.data||[]}},{key:"getGameId",value:function(){return this.gameId}},{key:"getReleaseId",value:function(){return this.releaseId}},{key:"setBaseUrl",value:function(t){ce.setBaseUrl(t)}},{key:"setOnDemandMode",value:function(t){ce.setOnDemandMode(t)}},{key:"disableAllItems",value:function(t){var e=this.categories.find((function(e){return e.id===t}));if(e)return e.isMixed||e.isOptional?(e.children.forEach((function(t){return t.setVisible(!1)})),this.stage.invalidate(),this.update()):void 0}},{key:"activeItem",value:function(t){if(t&&t.index>=0)return this.activeItemIndex(t.index)}},{key:"transformItem",value:function(t,e){if(t&&t.index>=0)return this.transformItemIndex(t.index,e)}},{key:"updateItemProps",value:function(t,e){if(t&&t.index>=0)return this.updateItemPropsByIndex(t.index,e)}},{key:"activeItemIndex",value:function(t){var e=this._getItemByIndex(t);if(e&&e.category){var i=e.category,n=e.isVisible();return(i.isFixed||i.isOptional)&&i.children.forEach((function(t){return t.setVisible(!1)})),i.isMixed||i.isOptional?e.setVisible(!n):e.setVisible(!0),this.update(!0)}}},{key:"updateItemPropsByIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return e&&"function"===typeof i.setProps&&i.setProps(e),this.update(!0)}},{key:"transformItemIndex",value:function(t,e){var i=this._getItemByIndex(t);if(i)return i.transform(e),this.update(!0)}},{key:"update",value:function(t){t&&this.stage.invalidate(),this.stage.update()}},{key:"reload",value:function(){return this.categories.forEach((function(t){return t.update()})),this.update(!0)}},{key:"randomItems",value:function(){return this.categories.forEach((function(t){return t.random()})),this.update(!0)}},{key:"_getItemByIndex",value:function(t){if(t<0||t>=this.stage.children.length)return null;var e=this.stage.getChild(t);return e.isMirrored()?null:e}},{key:"_parseData",value:function(t){var e=this,i=t.preventColorGlobalEventsOnLoad;Object(c["a"])(this.data).reverse().forEach((function(t){if(t&&t.type){if("image"===t.type){var n=new fe(t);return e.stage.addChild(n),void(t.index=e.stage.children.indexOf(n))}if("category"===t.type){var r=new xe(t,e.stage);r.preventSetPropsEventDefaults(!!i),e.categories.push(r),t.index=e.categories.indexOf(r)}if("simple-layer"===t.type){var s=new Te(t,e.stage);e.stage.addChild(s),t.index=e.categories.indexOf(s)}}})),ce.on("complete",(function(){e.update(!0),e._events.dispatchEvent("done"),e.categories.forEach((function(t){return t.preventSetPropsEventDefaults(!1)}))})),ce.on("progress",(function(t){return e._events.dispatchEvent(t)})),ce.on("start",(function(){return e._events.dispatchEvent("loading")})),ce.loadItems(),re.flushPendingCalls()}},{key:"__deepForEach",value:function(t,e){var i=this;Array.isArray(t)?t.forEach((function(t){return i.__deepForEach(t,e)})):(e(t),t.children&&t.children.length>0&&t.children.forEach((function(t){return i.__deepForEach(t,e)})))}}]),t}(),We=Ve,qe=We;function $e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ze(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(i),!0).forEach((function(e){Object(h["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Je={name:"Player",components:{GameWrapper:pt,GameCanvas:yt,ScrollDiv:k,WelcomeScreen:Tt},data:function(){return{manifest:{gameWidth:0,gameHeight:0,bgColor:null},ops:{vuescroll:{mode:"slide",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1},scrollPanel:{scrollingX:!0,scrollingY:!1},bar:{disable:!0}},categories:[],selectedCategoryIndex:-1,selectedItem:null,loadingStatus:null,welcomeScreenData:null,gameStarted:!1,saveImage:null}},mounted:function(){var t=this,e=this.$refs.display.getCanvas();He=new qe(e),He.on("loading",(function(){t.loadingStatus="loading"})),He.on("done",(function(){t.loadingStatus=null,t.gameStarted||(t.selectedCategoryIndex=0,t.gameStarted=!0)})),He.once("done",(function(){return t.$emit("done")}))},computed:{selectedCategory:function(){return this.categories?this.selectedCategoryIndex>=0&&this.categories.length>this.selectedCategoryIndex?this.categories[this.selectedCategoryIndex]:this.categories.length>0?this.categories[0]:{}:{}},selectedItemColors:function(){if(this.selectedItem&&"color-picker"===this.selectedItem.type){var t=[];return this.selectedItem.children&&this.selectedItem.children.forEach((function(e){return t.push(e.name)})),t}return[]},selectedItemMoveButtons:function(){if(this.selectedItem&&this.selectedItem.transform){var t=[];return(this.selectedItem.transform.up>0||this.selectedItem.transform.down>0)&&t.push("up","down"),(this.selectedItem.transform.left>0||this.selectedItem.transform.right>0)&&t.push("left","right"),t}return[]},siteHomeLink:function(){return this.welcomeScreenData&&this.welcomeScreenData.resolvers&&"function"===typeof this.welcomeScreenData.resolvers.siteHomeLink?this.welcomeScreenData.resolvers.siteHomeLink():null}},methods:{showWelcomeScreen:function(t,e){var i=t.name,n=t.description,r=t.tags,s=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:n,tags:r,owner:s,icon:a},e){var o=e.tagLinkResolver,l=e.ownerLinkResolver,c=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:l,siteHomeLink:c}}},startLoadingGame:function(){this.$emit("play",ze({},this.welcomeScreenData)),this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(t,e,i){var n=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.welcomeScreenData&&!this.welcomeScreenData.onPlay)return new Promise((function(s,a){n.welcomeScreenData.onPlay=function(){n.setData(t,e,i,r).then(s).catch(a),n.welcomeScreenData.onPlay=null}}));this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.manifest.gameWidth=e,this.manifest.gameHeight=i,this.manifest.bgColor=r,Object(c["a"])(t).reverse().forEach((function(t){"category"===t.type&&(t.tags instanceof Array&&(-1!==t.tags.indexOf("optional")||-1!==t.tags.indexOf("mixed"))&&(t.children=[{delete:!0,categoryId:t.id}].concat(Object(c["a"])(t.children))),n.categories.push(t))})),He.setData(t,this.manifest);var s=new Promise((function(t,e){He.once("done",(function(){t()}))}));return He.update(),s},setBaseUrl:function(t){He.setBaseUrl(t)},setOnDemandMode:function(t){He.setOnDemandMode(t)},getDataImage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",e=this.$refs.display.getCanvas(),i=e.toDataURL(t);this.$nextTick((function(){He.update(!0)}));for(var n=atob(i.split(",")[1]),r=[],s=0;s<n.length;s++)r.push(n.charCodeAt(s));var a=new Blob([new Uint8Array(r)],{type:t});return(window.URL||window.webkitURL).createObjectURL(a)},restore:function(){this.gameStarted=!1,this.welcomeScreenData=null,this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.loadingStatus=null,He.restore()},handleCategoryClick:function(t,e){this.$refs.wrapper.$emit("update",{opened:!0}),this.selectedCategoryIndex=e,this.selectedItem=null},handleImageClick:function(t){t.delete?(this.selectedItem=null,He.disableAllItems(t.categoryId)):(this.selectedItem=t,He.activeItemIndex(t.index),this.selectedItem.visible||(this.selectedItem=null))},handlePrepareSave:function(t){var e=this;setTimeout((function(){return e.$nextTick((function(){return e.$emit("save-image")}))}),1500),this.selectedItem=null,this.saveImage={name:"my-meiker-".concat((new Date).getTime()+""+parseInt(1e3*Math.random()),".png"),link:this.getDataImage("image/png")}},handleRandomClick:function(t){this.selectedItem=null,He.randomItems()},handleSelectColorClick:function(t){He.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){He.transformItem(this.selectedItem,{action:t.source})}}},Qe=Je,Ze=(i("936b"),Object(f["a"])(Qe,o,l,!1,null,"21ef8cd6",null)),Ke=(Ze.exports,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Theme",{ref:"wrapper",attrs:{state:t.gameState,buttons:t.selectedItemMoveButtons,colors:t.selectedItemColors,loading:t.loading,fullPageLoading:t.saveFile&&t.saveFile.saving,showSaveButton:!!t.saveAction,saveImage:t.saveImage,poweredByHref:t.siteHomeLink,transparent:t.transparent},on:{"prepare-save":t.handlePrepareSave,"cancel-save":t.handleCancelSave,"save-game":t.handleSaveOnline,random:t.handleRandomClick,reset:t.handleResetClick,color:t.handleSelectColorClick,gamepad:t.handleGamePadClick},scopedSlots:t._u([{key:"welcomescreen",fn:function(){return[t.welcomeScreenData?i("WelcomeScreen",{attrs:{data:t.welcomeScreenData,showPlayButton:!t.loading},on:{"click-play":t.startLoadingGame}}):t._e()]},proxy:!0},{key:"canvas",fn:function(){return[i("GameCanvas",{ref:"display",attrs:{canvasWidth:t.manifest.gameWidth,canvasHeight:t.manifest.gameHeight}})]},proxy:!0},{key:"items",fn:function(){return[i("ScrollableList",{attrs:{items:t.selectedCategory.children,"highlight-active-items":!0},on:{select:t.handleImageClick},scopedSlots:t._u([{key:"default",fn:function(t){return[t.item.delete?i("RemoveItemsButton"):i("span",{style:{"background-image":t.item.image?"url("+t.item.image+")":""}})]}}])})]},proxy:!0},{key:"categories",fn:function(){return[i("ScrollableList",{attrs:{items:t.categories},on:{select:t.handleCategoryClick},scopedSlots:t._u([{key:"default",fn:function(t){return[i("span",{style:{"background-image":t.item.image?"url("+t.item.image+")":""}})]}}])})]},proxy:!0}])})}),ti=[],ei=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"g-theme",style:{backgroundColor:t.transparent?"":t.backgroundColor}},[i("div",{class:"g-theme-container "+t.columnsClass,style:{backgroundColor:t.backgroundColor}},[i("div",{style:{display:t.hideAdContainer?"none":"block"},attrs:{id:"ad-container"}}),t.fullPageLoading?i("div",{style:{backgroundColor:"rgba(0,0,0,0.3)"},attrs:{id:"full-overlay"}},[i("LoadingEllipsis")],1):t._e(),t.onWelcomeScreen?i("div",{staticClass:"g-loading",style:{backgroundColor:t.backgroundColor}},[i("div",{class:["progress-div",t.isLoadingGame?"":"hidden"]},[i("LoadingEllipsis")],1),t._t("welcomescreen")],2):t._e(),i("OverlayAnimation",{attrs:{visible:t.onSaveScreen,color:t.saveAnimationColor}}),t.onSaveScreen?i("SaveGameOverlay",{attrs:{image:t.saveImage,showSaveButton:t.showSaveButton},on:{"click-cancel":t.exitSaveMode,"click-save":t.handleSaveGameFile}}):t._e(),i("div",{ref:"container",staticClass:"g-content noselect",style:{backgroundColor:t.canvasBackgroundColor}},[t._t("canvas",[i("canvas",{attrs:{width:"9px",height:"16px"}})]),i("ScrollableColorList",{ref:"colorPicker",staticClass:"color-picker",attrs:{visible:!t.onSaveScreen,colors:t.colors},on:{color:t.handleColor,open:function(e){return t.$refs.gamePad.close()}}}),i("GamePad",{ref:"gamePad",staticClass:"game-pad",attrs:{visible:!t.onSaveScreen,buttons:t.buttons},on:{buttonclick:t.handleMove,open:function(e){return t.$refs.colorPicker.close()}}}),i("SaveButton",{class:"enter-save-mode "+t.hideSaveAndRandomButtons,on:{click:t.enterSaveMode}}),i("RandomButton",{class:"random-items "+t.hideSaveAndRandomButtons,on:{click:t.handleClickRandom}}),i("ResetButton",{class:"reset-items "+t.hideSaveAndRandomButtons,on:{click:t.handleClickReset}}),t.poweredByHref?i("PoweredBy",{attrs:{href:t.poweredByHref,by:"meiker.io"}}):t._e(),t.isLoadingGame?i("LoadingOverlay"):t._e()],2),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],class:"g-items g-scroll-container noselect push-right-sm "+(t.canExpandItems?"visible":"")},[i("a",{staticClass:"g-btn-back-overlay",on:{click:function(e){return e.preventDefault(),t.handleClickClose(e)}}}),i("div",{staticClass:"g-scroll",style:{backgroundColor:t.itemsScrollBackgroundColor,backgroundImage:t.itemsScrollBackgroundGradient}},[t._t("items",[i("ScrollableList",{attrs:{items:[1,2,3,4,5,6,7,8,9,10],"highlight-active-items":!0}})])],2),i("ItemsBackButton",{staticClass:"g-btn-back",on:{click:t.handleClickClose}})],1),i("div",{directives:[{name:"wheelblock",rawName:"v-wheelblock",value:!0,expression:"true"}],staticClass:"g-categories g-scroll-container noselect"},[i("div",{staticClass:"g-scroll",style:{backgroundColor:t.categoriesScrollBackgroundColor,backgroundImage:t.categoriesScrollBackgroundGradient}},[t._t("categories",[i("ScrollableList",{attrs:{items:[1,2,3,4,5,6,7,8,9,10]}})])],2)])],1),i("ResizeObserver",{on:{notify:t.handleResize}})],1)},ii=[],ni=i("252c"),ri=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.items instanceof Array?i("Scrollable",{ref:"scrollable",attrs:{horizontal:t.horizontal}},[[i("div",{class:"scrollable-item empty-item first "+t.orientation})],t._l(t.items,(function(e,n){return[i("ScrollableItem",{key:t.itemId+"-"+n,attrs:{selected:n===t.selectedIndex,active:t.highlightActiveItems&&e.visible},on:{click:function(i){return t.handleClick(e,n)}}},[t._t("default",[i("span",[t._v(t._s(e))])],{item:e,index:n})],2)]})),[i("div",{class:"scrollable-item empty-item latest "+t.orientation})]],2):t._e()},si=[],ai=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"scrollable"},[i("vuescroll",{ref:"scroll",attrs:{ops:t.ops},on:{"handle-scroll":t.handleScroll,"handle-scroll-complete":t.handleScrollComplete}},[i("div",{staticClass:"scrollable-content"},[t._t("default")],2)])],1)},oi=[],li={name:"Scrollable",components:{vuescroll:E.a},data:function(){return{scrolling:!1,ops:{vuescroll:{mode:"slide",detectResize:!0,sizeStrategy:"percent",paging:!1,zooming:!1,wheelScrollDuration:0},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:this.horizontal,scrollingY:!this.horizontal,speed:200,easing:"easeOutCubic"},bar:{disable:!1,showDelay:200,keepShow:!0,background:"#c1c1c1",opacity:.5,hoverStyle:!1,specifyBorderRadius:!1,minSize:0,size:"5px"}}}},watch:{horizontal:function(t){this.ops.scrollPanel.scrollingX=t,this.ops.scrollPanel.scrollingY=!t}},props:{horizontal:{type:Boolean,default:!1}},mounted:function(){var t=this;C(this.$el,(function(e){e.preventDefault(),t.handleMouseWhell(e)})),this.$nextTick((function(){t.scrolling=!1}))},methods:{handleMouseWhell:function(t){var e=Math.abs(Math.round(t.deltaY)),i=Math.round(t.deltaY)/e;this.$refs["scroll"].scrollBy({dy:(e>20?e:20)*i}),this.scrolling=!1,this.$emit("scroll",this.scrolling)},handleScrollUp:function(){this.$refs["scroll"].scrollBy({dy:"-200"},200,"easeOutCubic")},handleScrollDown:function(){this.$refs["scroll"].scrollBy({dy:"200"},200,"easeOutCubic")},handleScroll:function(){this.scrolling||(this.scrolling=!0)},handleScrollComplete:function(){var t=this;this.$nextTick((function(){t.scrolling=!1}))}}},ci=li,hi=(i("ffb4"),Object(f["a"])(ci,ai,oi,!1,null,null,null)),ui=hi.exports,di=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes,on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("click")}}},[t._t("default")],2)},fi=[],pi={name:"ScrollableItem",computed:{classes:function(){return["scrollable-item","noselect",this.active?"active":"",this.selected?"selected":""]}},props:{active:{type:Boolean,default:!1},selected:{type:Boolean,default:!1}}},mi=pi,_i=(i("4a4b"),Object(f["a"])(mi,di,fi,!1,null,null,null)),vi=_i.exports,gi={name:"ScrollableList",components:{ScrollableItem:vi,Scrollable:ui},data:function(){return{itemId:1e4*Math.random(),scrolling:!1,selectedIndex:-1}},computed:{orientation:function(){return this.horizontal?"horizontal":"vertical"}},watch:{items:function(){this.selectedIndex=-1}},props:{horizontal:{type:Boolean,default:!1},items:{type:Array,default:null},highlightActiveItems:{type:Boolean,default:!1}},methods:{isScrolling:function(){return this.$refs["scrollable"].scrolling},handleClick:function(t,e){this.isScrolling()||(this.selectedIndex=e,this.$emit("select",t,e))}}},bi=gi,yi=(i("2f77"),Object(f["a"])(bi,ri,si,!1,null,null,null)),wi=yi.exports,xi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("span",{staticClass:"color overlay--a",style:{background:"#f9f9f9"}}),i("span",{staticClass:"color overlay--b",style:{background:t.colorB}}),i("span",{staticClass:"color overlay--c",style:{background:t.colorC}}),i("span",{staticClass:"color overlay--d",style:{background:t.colorD}})])},Ei=[],Ci={name:"OverlayAnimation",data:function(){return{hidden:!1,mouseThrough:!1}},watch:{visible:function(t){var e=this;this.hidden=!t,this.mouseThrough=!t,t&&(setTimeout((function(){e.mouseThrough=!0}),1500),setTimeout((function(){e.hidden=!0}),2500))}},computed:{classes:function(){return["overlay",this.visible?"expanded":"",this.hidden?"hide":"",this.mouseThrough?"pointer-none":""]},colorB:function(){return this.colorToRGBA(.33)},colorC:function(){return this.colorToRGBA(.66)},colorD:function(){return this.colorToRGBA(1)}},props:{visible:{type:Boolean,default:!1},color:{type:String,default:"#f69bc5"}},methods:{colorToRGBA:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.color.replace(/^#/,"");3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=parseInt(e,16),n=[i>>16,i>>8&255,255&i,t];return"rgba(".concat(n.join(","),")")}}},Si=Ci,Ti=(i("521a"),Object(f["a"])(Si,xi,Ei,!1,null,"dce3890a",null)),Ri=Ti.exports,Li=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"btn-default powered-by"},[i("i",{staticClass:"svg-icon svg-logo",on:{click:t.toggleClick}}),t.opened?i("span",[t._v("\n powered by\n "),i("a",{attrs:{href:t.href,target:t.target}},[t._v(t._s(t.by))])]):t._e()])},ki=[],Oi={name:"PoweredBy",data:function(){return{opened:!1,target:"_self"}},computed:{classes:function(){return["color-picker",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{href:{type:String,default:"#"},by:{type:String,default:"meiker.io"}},methods:{toggleClick:function(){this.opened=!this.opened}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")}},Ii=Oi,Ai=(i("0577"),Object(f["a"])(Ii,Li,ki,!1,null,"59631dbe",null)),Di=Ai.exports,Pi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-anim"},[i("LoadingEllipsis")],1)},Mi=[],ji=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},Bi=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-ellipsis"},[i("div"),i("div"),i("div"),i("div")])}],Fi={name:"LoadingEllipsis"},Ui=Fi,Ni=(i("3305"),Object(f["a"])(Ui,ji,Bi,!1,null,"6fbf8469",null)),Gi=Ni.exports,Xi={name:"LoadingOverlay",components:{LoadingEllipsis:Gi},props:{label:{type:String,default:""}}},Hi=Xi,Yi=(i("a770"),Object(f["a"])(Hi,Pi,Mi,!1,null,"dc965734",null)),Vi=Yi.exports,Wi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"g-save-screen",style:{backgroundColor:t.backgroundColor,display:t.display}},[i("img",{staticClass:"float-image",attrs:{src:t.image&&t.image.link}}),i("SaveImageButton",{staticClass:"btn-save",attrs:{image:t.image,target:t.saveImageTarget}}),i("SaveCancelButton",{staticClass:"btn-save-cancel",on:{click:function(e){return t.$emit("click-cancel")}}}),t.showSaveButton?i("SaveGameOnlineButton",{staticClass:"btn-save-online",on:{click:function(e){return t.$emit("click-save")}}}):t._e()],1)},qi=[],$i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("a",{staticClass:"btn-default btn-shadow image-save-button",style:{backgroundColor:t.backgroundColor,color:t.color},attrs:{target:t.target,href:t.image?t.image.link:"",download:t.image?t.image.name:""}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 14 19",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14,6 L10,6 L10,0 L4,0 L4,6 L0,6 L7,13 L14,6 L14,6 Z M0,15 L0,17 L14,17 L14,15 L0,15 L0,15 Z"}})]),i("span",[t._v("Download")])])},zi=[],Ji=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default",style:{backgroundColor:t.backgroundColor,color:t.color}},[t._t("default")],2)},Qi=[],Zi={name:"DefaultButton",computed:{color:function(){return"#ffffff"}},props:{backgroundColor:{type:String,default:"rgba(190, 190, 190, 1)"}}},Ki=Zi,tn=(i("721f"),Object(f["a"])(Ki,Ji,Qi,!1,null,null,null)),en=(tn.exports,i("1ab9")),nn=i.n(en),rn={isDark:function(t){var e=nn.a.get.rgb(t),i=(299*e[0]+587*e[1]+114*e[2])/1e3;return i<128},isLight:function(t){return!this.isDark()}},sn=rn,an={name:"SaveImageButton",props:{target:{type:String,default:null},image:{type:Object,default:function(){return{link:"",name:""}}}},inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSaveImage||"#f69bc5"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},on=an,ln=(i("7482"),Object(f["a"])(on,$i,zi,!1,null,"59fe3a84",null)),cn=ln.exports,hn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow cancel-save-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 46.02 46.02",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14.757,46.02c-1.412,0-2.825-0.521-3.929-1.569c-2.282-2.17-2.373-5.78-0.204-8.063l12.758-13.418L10.637,9.645\n C8.46,7.37,8.54,3.76,10.816,1.582c2.277-2.178,5.886-2.097,8.063,0.179l16.505,17.253c2.104,2.2,2.108,5.665,0.013,7.872\n L18.893,44.247C17.77,45.424,16.267,46.02,14.757,46.02z"}})]),i("span",[t._v("Back")])])},un=[],dn={name:"SaveCancelButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnCancelSave||"#b0a9f9"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},fn=dn,pn=(i("9fbd"),Object(f["a"])(fn,hn,un,!1,null,"4a0b90ea",null)),mn=pn.exports,_n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow save-game-online-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 24 16",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M19.4,6 C18.7,2.6 15.7,0 12,0 C9.1,0 6.6,1.6 5.4,4 C2.3,4.4 0,6.9 0,10 C0,13.3 2.7,16 6,16 L19,16 C21.8,16 24,13.8 24,11 C24,8.4 21.9,6.2 19.4,6 L19.4,6 Z M10,13 L6.5,9.5 L7.9,8.1 L10,10.2 L15.2,5 L16.6,6.4 L10,13 L10,13 Z"}})]),i("span",[t._v("Save Online")])])},vn=[],gn={name:"SaveGameOnlineButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSaveImage||"#f69bc5"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},bn=gn,yn=(i("f0d3"),Object(f["a"])(bn,_n,vn,!1,null,"60695f87",null)),wn=yn.exports,xn={name:"SaveGameOverlay",data:function(){return{display:"flex"}},mounted:function(){var t=this;this.display="none",setTimeout((function(){return t.$nextTick((function(){t.display="flex"}))}),1e3)},components:{SaveImageButton:cn,SaveCancelButton:mn,SaveGameOnlineButton:wn},inject:["theme"],computed:{saveImageTarget:function(){return this.isInAppBrowsing()?"_self":"_blank"},backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.canvasBg||"#000000"}},props:{image:{type:Object,default:function(){return{link:"",name:""}}},showSaveButton:{type:Boolean,default:!1}},methods:{isInAppBrowsing:function(){try{var t=navigator.userAgent||navigator.vendor||window.opera;return t.indexOf("FBAN")>-1||t.indexOf("FBAV")>-1||t.indexOf("Instagram")>-1}catch(e){return!1}}}},En=xn,Cn=(i("d287"),Object(f["a"])(En,Wi,qi,!1,null,"21e4c914",null)),Sn=Cn.exports,Tn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("ColorPickerButton",{staticClass:"color-items",on:{click:t.toggleColor}}),t.colors?i("div",{staticClass:"selector"},[t.colors?i("ScrollableList",{attrs:{items:t.colors},on:{select:t.handleColor},scopedSlots:t._u([{key:"default",fn:function(t){return[i("span",{staticClass:"color btn-shadow no-filter",style:{"background-color":t.item}})]}}],null,!1,2985978270)}):t._e()],1):t._e()],1)},Rn=[],Ln=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow color-picker-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M3,1V12.23a5,5,0,0,0,3.24,4.68l4.81,1.8.72,8.62a4,4,0,0,0,4,3.67h.48a4,4,0,0,0,4-3.67l.72-8.62,4.81-1.8A5,5,0,0,0,29,12.23V1ZM27,3v8H5V3ZM25.05,15l-5.9,2.25-.92,10.08a2,2,0,0,1-2,1.83h-.48a2,2,0,0,1-2-1.83l-.92-10.08L6.95,15a3,3,0,0,1-1.84-2H26.89A3,3,0,0,1,25.05,15Z"}})])])},kn=[],On={name:"ColorPickerButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnColorPicker||"#ffffff"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},In=On,An=(i("c7c9"),Object(f["a"])(In,Ln,kn,!1,null,"65ebf5ce",null)),Dn=An.exports,Pn={name:"ScrollableColorList",components:{ScrollableList:wi,ColorPickerButton:Dn},data:function(){return{opened:!1}},computed:{classes:function(){return["scrollable-color-list",this.opened&&this.visible?"opened":"",0!==this.colors.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},size:{type:String,default:"40px"},colors:{type:Array,default:function(){return[]}}},methods:{toggleColor:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleColor:function(t){this.$emit("color",t)}}},Mn=Pn,jn=(i("b57a"),Object(f["a"])(Mn,Tn,Rn,!1,null,null,null)),Bn=jn.exports,Fn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:t.classes},[i("GamePadButton",{staticClass:"btn-gamepad",on:{click:t.toggleGamePad}}),i("div",{staticClass:"game-pad-wrapper"},[i("div",{staticClass:"game-pad-buttons"},[i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("up")},expression:"() => handleClick('up')"}],staticClass:"btn-default btn-shadow btn-top",attrs:{disabled:-1===t.buttons.indexOf("up")},on:{click:function(e){return t.handleClick("up")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("right")},expression:"() => handleClick('right')"}],staticClass:"btn-default btn-shadow btn-right",attrs:{disabled:-1===t.buttons.indexOf("right")},on:{click:function(e){return t.handleClick("right")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("down")},expression:"() => handleClick('down')"}],staticClass:"btn-default btn-shadow btn-bottom",attrs:{disabled:-1===t.buttons.indexOf("down")},on:{click:function(e){return t.handleClick("down")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})]),i("button",{directives:[{name:"clickandhold",rawName:"v-clickandhold",value:function(){return t.handleClick("left")},expression:"() => handleClick('left')"}],staticClass:"btn-default btn-shadow btn-left",attrs:{disabled:-1===t.buttons.indexOf("left")},on:{click:function(e){return t.handleClick("left")}}},[i("i",{staticClass:"svg-icon svg-arrow-right"})])]),i("div",{staticClass:"game-pad-rotate"},[i("button",{staticClass:"btn-default btn-shadow btn-cancel",on:{click:function(e){return t.handleClick("default")}}},[t._v("\n Default\n ")])])])],1)},Un=[],Nn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow game-pad-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"}},[i("polygon",{attrs:{points:"18,20 18,26 22,26 16,32 10,26 14,26 14,20 "}}),i("polygon",{attrs:{points:"14,12 14,6 10,6 16,0 22,6 18,6 18,12 "}}),i("polygon",{attrs:{points:"12,18 6,18 6,22 0,16 6,10 6,14 12,14 "}}),i("polygon",{attrs:{points:"20,14 26,14 26,10 32,16 26,22 26,18 20,18 "}})])])},Gn=[],Xn={name:"GamePadButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnGamePad||"#ffffff"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Hn=Xn,Yn=(i("4d5c"),Object(f["a"])(Hn,Nn,Gn,!1,null,"63335e31",null)),Vn=Yn.exports,Wn={name:"GamePad",components:{GamePadButton:Vn},data:function(){return{opened:!1}},computed:{classes:function(){return["game-pad",this.opened&&this.visible?"opened":"",0!==this.buttons.length&&this.visible?"":"hidden"]}},props:{visible:{type:Boolean,default:!0},buttons:{type:Array,default:function(){return[]}}},methods:{toggleGamePad:function(){this.opened=!this.opened,this.opened&&this.$emit("open")},close:function(){this.opened=!1},handleClick:function(t){this.$emit("buttonclick",{source:t})}}},qn=Wn,$n=(i("96e8"),Object(f["a"])(qn,Fn,Un,!1,null,"4b463b97",null)),zn=$n.exports,Jn=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow save-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 26 26",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m.3,14c-0.2-0.2-0.3-0.5-0.3-0.7s0.1-0.5 0.3-0.7l1.4-1.4c0.4-0.4 1-0.4 1.4,0l.1,.1 5.5,5.9c0.2,0.2 0.5,0.2 0.7,0l13.4-13.9h0.1v-8.88178e-16c0.4-0.4 1-0.4 1.4,0l1.4,1.4c0.4,0.4 0.4,1 0,1.4l0,0-16,16.6c-0.2,0.2-0.4,0.3-0.7,0.3-0.3,0-0.5-0.1-0.7-0.3l-7.8-8.4-.2-.3z"}})])])},Qn=[],Zn={name:"SaveButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSave||"#b0a9f9"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Kn=Zn,tr=(i("6be4"),Object(f["a"])(Kn,Jn,Qn,!1,null,"cbcb9814",null)),er=tr.exports,ir=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow random-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64"}},[i("g",[i("path",{attrs:{d:" M 32.121 28.852 C 30.488 28.852 28.917 28.485 27.81 27.847 L 7.867 16.331 C 7.009 15.835 6.516 15.234 6.516 14.681 C 6.516 14.13 7.009 13.528 7.867 13.033 L 27.81 1.518 C 28.917 0.879 30.488 0.513 32.121 0.513 C 33.755 0.513 35.326 0.879 36.433 1.518 L 56.376 13.033 C 57.234 13.528 57.727 14.13 57.727 14.681 C 57.727 15.234 57.234 15.835 56.376 16.331 L 36.433 27.845 C 35.326 28.485 33.755 28.852 32.121 28.852 Z M 32.121 16.743 C 30.281 16.743 28.728 15.8 28.728 14.683 C 28.728 13.566 30.283 12.622 32.121 12.622 C 33.96 12.622 35.515 13.566 35.515 14.683 C 35.515 15.8 33.961 16.743 32.121 16.743 Z ","fill-rule":"evenodd"}}),i("path",{attrs:{d:" M 55.909 47.096 C 54.792 47.096 53.849 45.713 53.849 44.076 C 53.849 42.44 54.792 41.055 55.909 41.055 C 57.026 41.055 57.969 42.439 57.969 44.076 C 57.969 45.714 57.026 47.096 55.909 47.096 L 55.909 47.096 Z M 34.921 63 C 33.707 63 33.576 61.506 33.576 60.863 L 33.576 37.833 C 33.576 35.135 35.55 31.716 37.887 30.366 L 57.831 18.852 C 58.383 18.532 58.907 18.363 59.342 18.363 C 60.556 18.363 60.687 19.858 60.687 20.501 L 60.687 43.529 C 60.687 46.228 58.713 49.649 56.376 50.997 L 36.433 62.513 C 35.88 62.831 35.358 63 34.921 63 L 34.921 63 L 34.921 63 Z M 39.335 40.914 C 38.217 40.914 37.275 39.531 37.275 37.893 C 37.275 36.255 38.217 34.872 39.335 34.872 C 40.452 34.872 41.396 36.255 41.396 37.893 C 41.394 39.531 40.45 40.914 39.335 40.914 Z ","fill-rule":"evenodd"}}),i("path",{attrs:{d:" M 7.607 47.096 C 6.489 47.096 5.547 45.713 5.547 44.076 C 5.547 42.44 6.489 41.055 7.607 41.055 C 8.724 41.055 9.666 42.439 9.666 44.076 C 9.666 45.714 8.722 47.096 7.607 47.096 L 7.607 47.096 L 7.607 47.096 L 7.607 47.096 Z M 7.607 29.733 C 6.489 29.733 5.547 28.35 5.547 26.713 C 5.547 25.076 6.489 23.692 7.607 23.692 C 8.724 23.692 9.666 25.076 9.666 26.713 C 9.666 28.35 8.722 29.733 7.607 29.733 L 7.607 29.733 L 7.607 29.733 Z M 24.728 40.914 C 23.611 40.914 22.668 39.531 22.668 37.893 C 22.668 36.255 23.611 34.872 24.728 34.872 C 25.845 34.872 26.789 36.255 26.789 37.893 C 26.788 39.531 25.845 40.914 24.728 40.914 L 24.728 40.914 Z M 29.08 63 C 28.644 63 28.121 62.831 27.569 62.513 L 7.624 50.997 C 5.287 49.649 3.313 46.229 3.313 43.529 L 3.313 20.501 C 3.313 19.858 3.444 18.363 4.658 18.363 C 5.093 18.363 5.617 18.532 6.169 18.852 L 26.113 30.366 C 28.449 31.716 30.424 35.135 30.424 37.833 L 30.424 60.863 C 30.424 61.615 30.261 62.232 29.966 62.601 C 29.748 62.873 29.465 63 29.08 63 L 29.08 63 L 29.08 63 L 29.08 63 L 29.08 63 Z M 24.728 56.945 C 23.611 56.945 22.668 55.561 22.668 53.924 C 22.668 52.286 23.611 50.903 24.728 50.903 C 25.845 50.903 26.789 52.286 26.789 53.924 C 26.789 55.561 25.845 56.945 24.728 56.945 Z ","fill-rule":"evenodd"}})])])])},nr=[],rr={name:"RandomButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRandom||"#6eefd2"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},sr=rr,ar=(i("db9b"),Object(f["a"])(sr,ir,nr,!1,null,"7e4371b2",null)),or=ar.exports,lr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default btn-shadow reset-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{stroke:t.color},attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 264 250"}},[i("defs",[i("path",{attrs:{id:"Layer1_0_1_STROKES","stroke-width":"28.05","stroke-linejoin":"round","stroke-linecap":"round",fill:"none",d:"\nM 235.35 179\nQ 234.6490234375 180.213671875 233.95 181.4 234.9755859375 179.7302734375 235.925 178.025 235.63359375 178.5087890625 235.35 179 Z\nM 233.95 181.4\nQ 231.8041015625 184.94375 229.425 188.3 226.67265625 192.1640625 223.6 195.775 217.5568359375 203.0517578125 210.45 208.95 192.807421875 223.623046875 168.85 230.05 125 241.75 85.75 219.05 46.45 196.4 34.7 152.6\nM 16 30.5\nL 16.05 100.5 32.7 100.5\nQ 39.25 70.9 62.1 48.05 94.2 16 139.55 16 184.9 16 216.95 48.05 249.05 80.15 249.05 125.5 249.05 149.26953125 240.275 169.4 238.98828125 172.2501953125 237.525 175.05 236.74921875 176.5447265625 235.925 178.025\nM 32.7 100.5\nL 86.05 100.5\nM 223.6 195.775\nQ 220.4498046875 199.405859375 216.95 202.9 213.7673828125 206.0876953125 210.45 208.95"}})]),i("g",{attrs:{transform:"matrix( 1, 0, 0, 1, 0,0) "}},[i("use",{attrs:{"xlink:href":"#Layer1_0_1_STROKES"}})])])])},cr=[],hr={name:"ResetButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRandom||"#f69bc5"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},ur=hr,dr=(i("4d8a"),Object(f["a"])(ur,lr,cr,!1,null,"82634c36",null)),fr=dr.exports,pr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("a",{staticClass:"items-back-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 46.02 46.02",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"M14.757,46.02c-1.412,0-2.825-0.521-3.929-1.569c-2.282-2.17-2.373-5.78-0.204-8.063l12.758-13.418L10.637,9.645\n C8.46,7.37,8.54,3.76,10.816,1.582c2.277-2.178,5.886-2.097,8.063,0.179l16.505,17.253c2.104,2.2,2.108,5.665,0.013,7.872\n L18.893,44.247C17.77,45.424,16.267,46.02,14.757,46.02z"}})])])},mr=[],_r={name:"ItemsBackButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnItemsBack||"#6a615c"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},vr=_r,gr=(i("1f0d"),Object(f["a"])(vr,pr,mr,!1,null,"191b8a0d",null)),br=gr.exports,yr={WelcomeScreen:"welcome-screen",SaveScreen:"save-screen",Playng:"playng"},wr={components:{ResizeObserver:ni["a"],ScrollableList:wi,LoadingEllipsis:Gi,OverlayAnimation:Ri,LoadingOverlay:Vi,PoweredBy:Di,SaveGameOverlay:Sn,SaveButton:er,RandomButton:or,ResetButton:fr,ItemsBackButton:br,ScrollableColorList:Bn,GamePad:zn},data:function(){return{expand:!1,columnsClass:"",columnsWidth:80,offsetBounds:{width:0,height:0},debug:{isLoadingGame:!1,onWelcomeScreen:!1,onSaveScreen:!1}}},inject:["theme"],computed:{canExpandItems:function(){return this.expand&&!this.onSaveScreen},hideAdContainer:function(){return this.state===yr.WelcomeScreen||this.isLoadingGame},isLoadingGame:function(){return this.loading||this.debug.isLoadingGame},onWelcomeScreen:function(){return this.state===yr.WelcomeScreen||this.debug.onWelcomeScreen},onSaveScreen:function(){return this.state===yr.SaveScreen||this.debug.onSaveScreen},hideSaveAndRandomButtons:function(){return this.onSaveScreen?"hide":this.expand?"hide-sm":""},backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.mainBg||"#bebebe"},saveAnimationColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.saveAnimation||"#f69bc5"},canvasBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.canvasBg||"#000000"},itemsScrollBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.itemsBg||"#ffffff"},itemsScrollBackgroundGradient:function(){if(this.theme&&this.theme.colors&&this.theme.colors.itemsBgGradient){var t=this.theme.colors.itemsBgGradient;return"".concat(t.type||"linear","-gradient(").concat(t.deg||0,"deg, ").concat(t.from,", ").concat(t.to,");")}return"none"},categoriesScrollBackgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.categoriesBg||"#f3f3f3"},categoriesScrollBackgroundGradient:function(){if(this.theme&&this.theme.colors&&this.theme.colors.categoriesBgGradient){var t=this.theme.colors.categoriesBgGradient;return"".concat(t.type||"linear","-gradient(").concat(t.deg||0,"deg, ").concat(t.from,", ").concat(t.to,");")}return"none"}},props:{colors:{type:Array,default:function(){return[]}},buttons:{type:Array,default:function(){return[]}},state:{type:String,default:yr.WelcomeScreen},loading:{type:Boolean,default:!1},fullPageLoading:{type:Boolean,default:!1},saveImage:{type:Object,default:function(){return null}},poweredByHref:{type:String,default:null},transparent:{type:Boolean,default:!0},showSaveButton:{type:Boolean,default:!1}},methods:{handleClickClose:function(){this.$emit("expanded",!1)},handleClickRandom:function(){this.$emit("random")},handleClickReset:function(){this.$emit("reset")},handleColor:function(t){this.$emit("color",t)},handleMove:function(t){this.$emit("gamepad",t)},handleSaveGameFile:function(t){this.$emit("save-game",t)},enterSaveMode:function(t){this.$emit("prepare-save",t)},exitSaveMode:function(t){this.$emit("cancel-save",t)},onClickSave:function(t){this.$emit("save-online",t)},handleResize:function(t){var e=t.width,i=t.height;this.offsetBounds.width=e-this.$refs["container"].offsetWidth,this.offsetBounds.height=i-this.$refs["container"].offsetHeight,this.offsetBounds.width>=5*this.columnsWidth?this.columnsClass="columns-3x2":this.offsetBounds.width>=4*this.columnsWidth?this.columnsClass="columns-2x2":this.offsetBounds.width>=3*this.columnsWidth?this.columnsClass="columns-2x1":(this.columnsClass="columns-1x1",e<480&&(this.columnsClass+=" push-right-sm"))}},mounted:function(){var t=this;this.$on("expanded",(function(e){t.expand=e})),this.handleResize({width:this.$el.offsetWidth,height:this.$el.offsetHeight})}},xr=wr,Er=(i("3ca1"),i("319f"),i("e218"),i("0c68"),i("cbe5"),Object(f["a"])(xr,ei,ii,!1,null,"e0540e7c",null)),Cr=Er.exports,Sr=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("button",{staticClass:"btn-default remove-items-button",style:{backgroundColor:t.backgroundColor,color:t.color},on:{click:function(e){return e.preventDefault(),t.$emit("click")}}},[i("svg",{staticClass:"svg-icon",style:{fill:t.color},attrs:{viewBox:"0 0 408.483 408.483",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{attrs:{d:"M87.748,388.784c0.461,11.01,9.521,19.699,20.539,19.699h191.911c11.018,0,20.078-8.689,20.539-19.699l13.705-289.316\n H74.043L87.748,388.784z M247.655,171.329c0-4.61,3.738-8.349,8.35-8.349h13.355c4.609,0,8.35,3.738,8.35,8.349v165.293\n c0,4.611-3.738,8.349-8.35,8.349h-13.355c-4.61,0-8.35-3.736-8.35-8.349V171.329z M189.216,171.329\n c0-4.61,3.738-8.349,8.349-8.349h13.355c4.609,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.737,8.349-8.349,8.349h-13.355\n c-4.61,0-8.349-3.736-8.349-8.349V171.329L189.216,171.329z M130.775,171.329c0-4.61,3.738-8.349,8.349-8.349h13.356\n c4.61,0,8.349,3.738,8.349,8.349v165.293c0,4.611-3.738,8.349-8.349,8.349h-13.356c-4.61,0-8.349-3.736-8.349-8.349V171.329z"}}),i("path",{attrs:{d:"M343.567,21.043h-88.535V4.305c0-2.377-1.927-4.305-4.305-4.305h-92.971c-2.377,0-4.304,1.928-4.304,4.305v16.737H64.916\n c-7.125,0-12.9,5.776-12.9,12.901V74.47h304.451V33.944C356.467,26.819,350.692,21.043,343.567,21.043z"}})])])])},Tr=[],Rr={name:"RemoveItemsButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRemoveItems||"#f69bc5"},color:function(){return sn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Lr=Rr,kr=(i("8f35"),Object(f["a"])(Lr,Sr,Tr,!1,null,"9893c578",null)),Or=kr.exports,Ir=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"display"},[i("canvas",{staticClass:"size-slot",attrs:{width:t.canvasWidth+"px",height:t.canvasHeight+"px"}}),i("canvas",{ref:"display",attrs:{id:"game",width:t.canvasWidth+"px",height:t.canvasHeight+"px"}})])},Ar=[],Dr={name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs["display"]}}},Pr=Dr,Mr=(i("07e9"),Object(f["a"])(Pr,Ir,Ar,!1,null,"22bd89f0",null)),jr=Mr.exports,Br=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"w-creen"},[t.resolveHomeHref()?i("PoweredBy",{attrs:{href:t.resolveHomeHref(),by:"meiker.io"}}):t._e(),i("div",{staticClass:"floating-box"},[i("div",{staticClass:"content"},[i("h2",{staticClass:"name"},[t._v(t._s(t.data.name))]),t.data.owner?i("p",{staticClass:"owner"},[t._v("by "),i("a",{attrs:{href:t.resolveOwnerHref(t.data.owner.id),target:t.target}},[t._v(t._s(t.data.owner.nickname))])]):t._e(),i("div",{staticClass:"description can-select"},[t.data.tags&&t.data.tags.length>0?i("div",{staticClass:"tags"},[i("svg",{attrs:{height:"24px",width:"24px",version:"1.1",viewBox:"0 0 32 32"}},[i("g",{attrs:{"fill-rule":"evenodd",stroke:"none"}},[i("g",{attrs:{stroke:"none"}},[i("path",{attrs:{d:"M12,4 L3.99961498,4 C2.89525812,4 2,4.88743329 2,5.99961498 L2,14 L15.3809027,27.3809027 C16.1646418,28.1646418 17.433119,28.1668566 18.2115341,27.3884415 L25.3884415,20.2115341 C26.168017,19.4319586 26.1640508,18.1640508 25.3809027,17.3809027 L12,4 L12,4 Z M7.5,11 C8.32842717,11 9,10.3284272 9,9.5 C9,8.67157283 8.32842717,8 7.5,8 C6.67157283,8 6,8.67157283 6,9.5 C6,10.3284272 6.67157283,11 7.5,11 L7.5,11 Z"}})])])]),t._l(t.data.tags||[],(function(e,n){return i("a",{key:n,staticClass:"tag",attrs:{href:t.resolveTagHref(e),target:t.target}},[t._v("\n "+t._s(e)+"\n ")])}))],2):t._e(),i("p",[t._v(t._s(t.data.description||"No description"))])])])]),i("div",{staticClass:"floating-icon-wrapper"},[i("img",{staticClass:"float-game-icon",attrs:{src:t.data.icon,alt:t.data.name}})]),t.showPlayButton?i("div",{staticClass:"floating-button-wrapper"},[i("a",{class:["button",t.showPlayButton?"":"hidden"],on:{click:t.onClickPlay}},[t._v("Play")])]):t._e()],1)},Fr=[],Ur={name:"WelcomeScreen",components:{PoweredBy:Di},data:function(){return{target:"_self"}},props:{showPlayButton:{type:Boolean,default:!1},data:{type:Object,default:function(){return{}}}},created:function(){"function"===typeof this.$ENV&&this.$ENV().embedded&&(this.target="_blank")},methods:{onClickPlay:function(){this.$emit("click-play")},resolveOwnerHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.ownerLinkResolver?this.data.resolvers.ownerLinkResolver(t):"javascript:;"},resolveTagHref:function(t){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.tagLinkResolver?this.data.resolvers.tagLinkResolver(t):"javascript:;"},resolveHomeHref:function(){return this.data&&this.data.resolvers&&"function"===typeof this.data.resolvers.siteHomeLink?this.data.resolvers.siteHomeLink():""}}},Nr=Ur,Gr=(i("276d"),Object(f["a"])(Nr,Br,Fr,!1,null,"2dced4e4",null)),Xr=Gr.exports,Hr=(i("0d6d"),i("7b1c")),Yr=i("9b4d"),Vr=function(){function t(){Object(Rt["a"])(this,t),this.version=0,this.split=0,this.gameId=0,this.releaseId=0}return Object(Lt["a"])(t,[{key:"parse",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=s.length>1&&void 0!==s[1]?s[1]:0,e&&!(e.byteLength<8)){t.next=3;break}throw new Error("Invalid save file.");case 3:if(n=String.fromCharCode.apply(null,new Uint8Array(e,i,6)),"MEIKER"===n){t.next=6;break}throw new Error("Invalid save file signature.");case 6:if(i+=6,r=new Uint8Array(e,i,2),this.version=r[0],this.split=r[1],0===this.split){t.next=12;break}return t.abrupt("return");case 12:if(!(e.byteLength<18)){t.next=14;break}throw new Error("Invalid save file.");case 14:return i+=2,this.gameId=Object(Yr["a"])(new Uint8Array(e,i,5)),this.releaseId=Object(Yr["a"])(new Uint8Array(e,i+5,5)),t.abrupt("return",i+10);case 18:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"toArrayBuffer",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=new Uint8Array(this.byteLength),e.set("MEIKER".split("").map((function(t){return t.charCodeAt(0)})),0),e.set([this.version||1,this.split],6),this.gameId&&this.releaseId&&0===this.split&&(i=8,e.set(Object(Yr["b"])(this.gameId.toString(16),5),i),e.set(Object(Yr["b"])(this.releaseId.toString(16),5),i+5)),t.abrupt("return",e.buffer);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"byteLength",get:function(){return this.gameId&&this.releaseId?18:8}}]),t}(),Wr=Vr,qr=function(){function t(){Object(Rt["a"])(this,t),this.header=new Wr}return Object(Lt["a"])(t,[{key:"toBlobURL",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.toBlob();case 2:return e=t.sent,t.abrupt("return",(window.URL||window.webkitURL).createObjectURL(e));case 4:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"toBlob",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.toArrayBuffer();case 2:return e=t.sent,i=new Blob([new Uint8Array(e)],{type:"application/octet-binary"}),t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"parseFromDroppedFile",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(Yr["c"])(e);case 2:return i=t.sent,t.next=5,this.parseFromArrayBuffer(i);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"parseFromURL",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(Yr["d"])(e);case 2:return i=t.sent,t.next=5,this.parseFromArrayBuffer(i);case 5:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),t}(),$r=qr,zr=i("f28b");function Jr(t){var e=Qr();return function(){var i,n=Object(Jt["a"])(t);if(e){var r=Object(Jt["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object($t["a"])(this,i)}}function Qr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var Zr=function(t){Object(qt["a"])(i,t);var e=Jr(i);function i(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:268435455;return Object(Rt["a"])(this,i),t=e.call(this),t.maxLength=n,t.byteLength=0,t}return Object(Lt["a"])(i,[{key:"push",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof Hr["b"]){t.next=2;break}throw new Error("Invalid item type");case 2:return t.abrupt("return",Object(zt["a"])(Object(Jt["a"])(i.prototype),"push",this).call(this,e));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"parse",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s,a,o,l=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:0,!(i+4>e.byteLength)){t.next=3;break}throw new Error("Offset buffer overflow.");case 3:if(n=new Uint8Array(e,i,4),r=Object(Yr["a"])(n),this.byteLength=4+r,i+=4,!(i+r>e.byteLength)){t.next=10;break}throw this.byteLength-=r,new Error("Offset buffer overflow.");case 10:if(0!==r){t.next=12;break}return t.abrupt("return");case 12:s=this.maxLength-this.length,a=0;case 14:if(!(--s>0&&a<r)){t.next=21;break}return o=Hr["b"].parseItem(e,i+a),a+=o.byteLength,t.next=19,this.push(o);case 19:t.next=14;break;case 21:return t.abrupt("return",i+a);case 22:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"toArrayBuffer",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,i,n,r,s,a,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=4,i=0,n=this.length,r=0;case 4:if(!(r<n)){t.next=12;break}if(this[r]&&this[r].enabled){t.next=7;break}return t.abrupt("continue",9);case 7:this[r].updateData&&this[r].updateData(),i+=this[r].byteLength;case 9:r++,t.next=4;break;case 12:if(!(this.maxLength*Hr["a"]<i)){t.next=14;break}throw new Error("Max data length error.");case 14:this.byteLength=e+i,s=new Uint8Array(this.byteLength),s.set(Object(Yr["b"])(i.toString(16),e),0),a=e,o=0;case 19:if(!(o<n)){t.next=26;break}if(this[o]&&this[o].enabled){t.next=22;break}return t.abrupt("continue",23);case 22:a+=this[o].writeIn(s,a);case 23:o++,t.next=19;break;case 26:return t.abrupt("return",s.buffer);case 27:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"writeIn",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n,r,s,a,o,l,c=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=c.length>1&&void 0!==c[1]?c[1]:0,n=4,r=0,s=this.length,a=0;case 5:if(!(a<s)){t.next=13;break}if(this[a]&&this[a].enabled){t.next=8;break}return t.abrupt("continue",10);case 8:this[a].updateData&&this[a].updateData(),r+=this[a].byteLength;case 10:a++,t.next=5;break;case 13:if(!(this.maxLength*Hr["a"]<r)){t.next=15;break}throw new Error("Max data length error.");case 15:e.set(Object(Yr["b"])(r.toString(16),n),0),o=n,l=0;case 18:if(!(l<s)){t.next=25;break}if(this[l]&&this[l].enabled){t.next=21;break}return t.abrupt("continue",22);case 21:o+=this[l].writeIn(e,i+o);case 22:l++,t.next=18;break;case 25:return t.abrupt("return",o);case 26:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()}]),i}(Object(zr["a"])(Array)),Kr=Zr;function ts(t){var e=es();return function(){var i,n=Object(Jt["a"])(t);if(e){var r=Object(Jt["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object($t["a"])(this,i)}}function es(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var is=function(t){Object(qt["a"])(i,t);var e=ts(i);function i(){var t;return Object(Rt["a"])(this,i),t=e.call(this),t.finalState=new Kr(16777215),t}return Object(Lt["a"])(i,[{key:"toArrayBuffer",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,i,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.header.gameId&&this.header.releaseId){t.next=2;break}throw new Error("GameID or ReleaseId not found");case 2:return t.next=4,this.header.toArrayBuffer();case 4:return e=t.sent,t.next=7,this.finalState.toArrayBuffer();case 7:return i=t.sent,n=new Uint8Array(e.byteLength+i.byteLength),n.set(new Uint8Array(e),0),n.set(new Uint8Array(i),e.byteLength),t.abrupt("return",n.buffer);case 12:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"parseFromArrayBuffer",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e instanceof ArrayBuffer){t.next=2;break}throw new Error("buffer not is a ArrayBuffer");case 2:return i=0,t.t0=i,t.next=6,this.header.parse(e,i);case 6:return i=t.t0+=t.sent,t.t1=i,t.next=10,this.finalState.parse(e,i);case 10:return i=t.t1+=t.sent,t.abrupt("return",i);case 12:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"byteLength",get:function(){return this.header.byteLength+this.finalState.byteLength}}]),i}($r),ns=is,rs=function(){function t(e){var i=e.gameId,n=e.releaseId;Object(Rt["a"])(this,t),this.layers=[],this.layersById={},this.baseSave=new ns,this.baseSave.header.gameId=i,this.baseSave.header.releaseId=n,this.baseSave.header.version=1}return Object(Lt["a"])(t,[{key:"pushLayer",value:function(t){if(!t||"object"!==Object(kt["a"])(t)||"undefined"===typeof t.id)return-1;if("category"===t.type)return-1;var e=null;return"undefined"===typeof this.layersById[t.id]&&(this.layers.push(t),this.layersById[t.id]=this.layers.indexOf(t),e=Hr["b"].factory(1),this.baseSave.finalState[this.layersById[t.id]]=e),e||(e=this.baseSave.finalState[this.layersById[t.id]]),e.id=t.id,e.enabled=t.visible,"undefined"===typeof t.original&&Object.defineProperty(t,"original",{value:Object.freeze({x:t.x,y:t.y,visible:!!t.visible}),enumerable:!0}),this.layersById[t.id]}},{key:"loadDataJson",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e&&Array.isArray(e)&&e.length){t.next=2;break}throw new Error("Invalid json data");case 2:ss(e,(function(t){i.pushLayer(t)}));case 3:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"loadSaveFile",value:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Empty save file");case 2:if(i=null,i||!(e instanceof File)){t.next=7;break}return i=new ns,t.next=7,i.parseFromDroppedFile(e);case 7:if(i||!(e instanceof ArrayBuffer)){t.next=11;break}return i=new ns,t.next=11,i.parseFromArrayBuffer(e);case 11:if(i||"string"!==typeof e){t.next=15;break}return i=new ns,t.next=15,i.parseFromURL(e);case 15:if(i){t.next=17;break}throw new Error("Can not load saved game file now.");case 17:if(this.baseSave.gameId===i.gameId&&this.baseSave.releaseId===i.releaseId){t.next=19;break}throw new Error("Invalid save file gameId or releaseId.");case 19:this.layers.forEach((function(t){"undefined"!==typeof t.id&&(t.visible=!1)})),i.finalState.forEach((function(t){if("undefined"!==typeof t.id){var e=n.layersById[t.id];if("undefined"!==typeof e){var i=n.layers[e];i.visible=!!t.enabled,i.x=i.original.x+t.offsetX,i.y=i.original.y+t.offsetY,n.baseSave.finalState[e].enabled=!!t.enabled,n.baseSave.finalState[e].offsetX=t.offsetX,n.baseSave.finalState[e].offsetY=t.offsetY}}}));case 21:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"exportSaveFile",value:function(){var t=this;if(0===this.layers.length)throw new Error("Empty");return this.layers.forEach((function(e,i){if("undefined"!==typeof t.baseSave.finalState[i]){var n=t.baseSave.finalState[i];n.enabled=!!e.visible,"image"!==e.type&&"image-color"!==e.type||(n.offsetX=e.x-e.original.x,n.offsetY=e.y-e.original.y)}})),this.baseSave}},{key:"length",get:function(){return this.layers.length}}]),t}();function ss(t,e){Array.isArray(t)?t.forEach((function(t){return ss(t,e)})):(e(t),t.children&&t.children.length>0&&t.children.forEach((function(t){return ss(t,e)})))}var as=rs;var os,ls;function cs(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function hs(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?cs(Object(i),!0).forEach((function(e){Object(h["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):cs(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var us={name:"Player",components:{Theme:Cr,ScrollableList:wi,GameCanvas:jr,WelcomeScreen:Xr,RemoveItemsButton:Or},data:function(){return{loading:!1,gameState:yr.WelcomeScreen,manifest:{gameWidth:9,gameHeight:16,bgColor:null,gameId:null,releaseId:null},categories:[],selectedCategoryIndex:-1,selectedItem:null,welcomeScreenData:null,saveImage:null,saveFile:null,saveAction:null,loadSaveGameUrl:null,resetGameSave:null}},provide:function(){return{theme:this.theme}},mounted:function(){var t=this,e=this.$refs.display.getCanvas();os=new qe(e),os.on("loading",(function(){t.loading=!0})),os.on("done",(function(){t.loading=!1,t.gameState!==yr.Playng&&(t.selectedCategoryIndex=0,t.gameState=yr.Playng)})),os.once("done",(function(){return t.$emit("done")}))},props:{theme:{type:Object,default:function(){return{colors:{}}}},transparent:{type:Boolean,default:!0}},computed:{selectedCategory:function(){return this.categories?this.selectedCategoryIndex>=0&&this.categories.length>this.selectedCategoryIndex?this.categories[this.selectedCategoryIndex]:this.categories.length>0?this.categories[0]:{}:{}},selectedItemColors:function(){if(this.selectedItem&&"color-picker"===this.selectedItem.type){var t=[];return this.selectedItem.children&&this.selectedItem.children.forEach((function(e){return t.push(e.name)})),t}return[]},selectedItemMoveButtons:function(){if(this.selectedItem&&this.selectedItem.transform){var t=[];return(this.selectedItem.transform.up>0||this.selectedItem.transform.down>0)&&t.push("up","down"),(this.selectedItem.transform.left>0||this.selectedItem.transform.right>0)&&t.push("left","right"),t}return[]},siteHomeLink:function(){return this.welcomeScreenData&&this.welcomeScreenData.resolvers&&"function"===typeof this.welcomeScreenData.resolvers.siteHomeLink?this.welcomeScreenData.resolvers.siteHomeLink():null}},methods:{showWelcomeScreen:function(t,e){var i=t.name,n=t.description,r=t.tags,s=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:n,tags:r,owner:s,icon:a},e){var o=e.tagLinkResolver,l=e.ownerLinkResolver,c=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:l,siteHomeLink:c}}},startLoadingGame:function(){this.$emit("play",hs({},this.welcomeScreenData)),this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e,i,n){var r,s,a,o,l=this,h=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=h.length>3&&void 0!==h[3]?h[3]:null,s=h.length>4&&void 0!==h[4]?h[4]:null,a=h.length>5&&void 0!==h[5]?h[5]:null,this.manifest.gameWidth=i,this.manifest.gameHeight=n,this.manifest.gameId=s,this.manifest.releaseId=a,!this.welcomeScreenData||this.welcomeScreenData.onPlay){t.next=9;break}return t.abrupt("return",new Promise((function(t,o){l.welcomeScreenData.onPlay=function(){l.setData(e,i,n,r,s,a).then(t).catch(o),l.welcomeScreenData.onPlay=null}})));case 9:return ls=new as({gameId:this.manifest.gameId,releaseId:this.manifest.releaseId}),t.next=12,ls.loadDataJson(e);case 12:if(!this.loadSaveGameUrl){t.next=16;break}return this.manifest.preventColorGlobalEventsOnLoad=!0,t.next=16,ls.loadSaveFile(this.loadSaveGameUrl);case 16:return this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,Object(c["a"])(e).reverse().forEach((function(t){"category"===t.type&&(t.tags instanceof Array&&(-1!==t.tags.indexOf("optional")||-1!==t.tags.indexOf("mixed"))&&(t.children=[{delete:!0,categoryId:t.id}].concat(Object(c["a"])(t.children))),l.categories.push(t))})),os.setData(e,this.manifest),o=new Promise((function(t,e){os.once("done",(function(){t()}))})),os.update(),t.next=25,o;case 25:ls.exportSaveFile().toArrayBuffer().then((function(t){l.resetGameSave=t})).catch((function(){}));case 26:case"end":return t.stop()}}),t,this)})));function e(e,i,n){return t.apply(this,arguments)}return e}(),setDataSaveGame:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.loadSaveGameUrl=e;case 1:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),setBaseUrl:function(t){os.setBaseUrl(t)},setOnDemandMode:function(t){os.setOnDemandMode(t)},setSaveGameAction:function(t){var e=this;"function"===typeof t&&this.$nextTick((function(){e.saveAction=t}))},getDataImage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",e=this.$refs.display.getCanvas(),i=e.toDataURL(t);this.$nextTick((function(){os.update(!0)}));for(var n=atob(i.split(",")[1]),r=[],s=0;s<n.length;s++)r.push(n.charCodeAt(s));var a=new Blob([new Uint8Array(r)],{type:t});return(window.URL||window.webkitURL).createObjectURL(a)},restore:function(){this.gameState=yr.WelcomeScreen,this.welcomeScreenData=null,this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.loading=!1,os.restore()},handleCategoryClick:function(t,e){this.$refs.wrapper.$emit("expanded",!0),this.selectedCategoryIndex=e,this.selectedItem=null},handleImageClick:function(t){t.delete?(this.selectedItem=null,os.disableAllItems(t.categoryId)):(this.selectedItem=t,os.activeItemIndex(t.index),this.selectedItem.visible||(this.selectedItem=null))},handlePrepareSave:function(t){var e=this;setTimeout((function(){return e.$nextTick((function(){return e.$emit("save-image")}))}),1500);var i=(new Date).getTime()+""+parseInt(1e3*Math.random());this.selectedItem=null,this.gameState=yr.SaveScreen,this.saveImage={sufix:i,name:"my-meiker-".concat(i,".png"),link:this.getDataImage("image/png")}},handleSaveOnline:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){var i,n=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("function"===typeof this.saveAction&&ls){t.next=2;break}return t.abrupt("return");case 2:if(this.saveFile||(this.saveFile={name:"my-meiker-".concat(this.saveImage.sufix,".mksv"),link:null,saving:!1}),!this.saveFile.saving){t.next=5;break}return t.abrupt("return");case 5:return this.saveFile.saving=!0,t.next=8,ls.exportSaveFile().toBlobURL();case 8:if(this.saveFile.link=t.sent,i=this.saveAction({gameId:this.manifest.gameId,releaseId:this.manifest.releaseId,saveFile:this.saveFile.link,savePreviewImage:this.saveImage.link}),!(i instanceof Promise)){t.next=12;break}return t.abrupt("return",i.then((function(t){n.handleCancelSave(e)})).catch((function(t){n.saveFile.saving=!1})));case 12:this.handleCancelSave(e);case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleCancelSave:function(t){this.gameState=yr.Playng,this.saveImage&&this.saveImage.link&&(window.URL||window.webkitURL).revokeObjectURL(this.saveImage.link),this.saveFile&&this.saveFile.link&&(window.URL||window.webkitURL).revokeObjectURL(this.saveFile.link),this.selectedItem=null,this.saveImage=null,this.saveFile=null},handleRandomClick:function(t){this.selectedItem=null,os.randomItems()},handleResetClick:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.resetGameSave){t.next=2;break}return t.abrupt("return");case 2:return this.selectedItem=null,t.next=5,ls.loadSaveFile(this.resetGameSave);case 5:os.reload(!0);case 6:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),handleSelectColorClick:function(t){os.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){os.transformItem(this.selectedItem,{action:t.source})}}},ds=us,fs=Object(f["a"])(ds,Ke,ti,!1,null,null,null),ps=fs.exports,ms=function(t){var e=t.delay,i=void 0===e?400:e,n=t.interval,r=void 0===n?50:n;return{bind:function(t,e,n){if("function"!==typeof e.value){var s=n.context.name,a="[longclick:] provided expression '".concat(e.expression,"' is not a function, but has to be");s&&(a+="Found in component '".concat(s,"' ")),console.warn(a)}var o=null,l=null,c=function(t){"click"===t.type&&0!==t.button||null===o&&(o=setTimeout((function(){r&&r>0&&(l=setInterval((function(){u()}),r)),u()}),i))},h=function(){null!==o&&(clearTimeout(o),o=null),l&&(clearInterval(l),l=null)},u=function(t){e.value(t)};["mousedown","touchstart"].forEach((function(e){return t.addEventListener(e,c)})),["click","mouseout","touchend","touchcancel"].forEach((function(e){return t.addEventListener(e,h)}))}}},_s=ms({delay:100,interval:50});n["default"].directive("clickandhold",_s);var vs=S();n["default"].directive("wheelblock",vs);var gs=ps,bs=gs,ys={},ws=function(){function t(){Object(Rt["a"])(this,t)}return Object(Lt["a"])(t,[{key:"pushMethod",value:function(t,e){return ys[t]=e,this}},{key:"call",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=null;return"function"===typeof ys[t]&&(i=ys[t].apply(null,e||[])),i instanceof Promise?i:Promise.resolve(i)}}]),t}(),xs={mm:void 0};"function"!==typeof window.mmload&&(window.mmload=function(t){t.mm=this},window.mmload=window.mmload.bind(new ws)),window.mmload(xs);var Es=xs.mm,Cs=i("bc3a"),Ss=i.n(Cs),Ts="meiker.io",Rs={name:"app",components:{Player:bs},data:function(){return{visible:!1,scrollToTimeOut:null,manifest:{},events:{},dataJson:[],error:"",theme:{}}},methods:{checkSite:function(){return!0},validate:function(t){var e=(window.parent||window).location,i=e.hostname.toString();return i.endsWith(t)||"localhost"===i||i.endsWith(Ts)},evtProxy:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.events&&"function"===typeof this.events[t])try{this.events[t](e)}catch(i){}},scrollGameToCenter:function(){clearTimeout(this.scrollToTimeOut);var t=this.getBodyElement();if(!t)return!1;var e=this.$el.getBoundingClientRect().top+window.pageYOffset;this.scrollToTimeOut=setTimeout((function(){return window.scrollTo({top:e,behavior:"smooth"})}),300)},getBodyElement:function(){if(!document||!window)return null;var t=null,e=document.getElementsByTagName("body");return e.length>0&&(t=e[0]),t}},mounted:function(){var t=Object(a["a"])(regeneratorRuntime.mark((function t(){var e,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(window.screen&&window.screen.orientation&&"function"===typeof window.screen.orientation.lock&&window.screen.orientation.lock("portrait").catch((function(){})),"function"===typeof window.meikerioLoader){t.next=4;break}return this.error="We're sorry, the game you requested could not be found or not yet published.",t.abrupt("return");case 4:if(this.manifest=window.meikerioLoader(),this.events="function"===typeof window.meikerioEvents?window.meikerioEvents():{},this.checkSite()){t.next=9;break}return this.error="We're sorry, the game you requested could not be found or not yet published.",t.abrupt("return");case 9:return this.manifest&&this.manifest.theme&&(this.theme=this.manifest.theme,delete this.manifest.theme),this.visible=!0,t.next=13,Es.call("saves.loadFromUrl");case 13:e=t.sent,Ss.a.get(this.manifest.data_url).then((function(t){i.dataJson=t.data;var n=i.manifest.owner.site&&i.manifest.owner.site.length>0&&i.manifest.owner.site[0]||null,r=i.manifest.game_id||null,s="utm_source=meiker_".concat(r),a="https";i.$refs.game.showWelcomeScreen(i.manifest,{tagLinkResolver:function(t){return"".concat(a,"://").concat(Ts,"/games/tag/").concat(t,"?").concat(s)},ownerLinkResolver:function(t){return n?"".concat(a,"://").concat(n,"/?").concat(s):"".concat(a,"://").concat(Ts,"/games/creator/").concat(t,"?").concat(s)},siteHomeLink:function(){return"".concat(a,"://").concat(Ts,"/?").concat(s)}}),i.$refs.game.setOnDemandMode(!!i.manifest.thumbnails),i.$refs.game.setBaseUrl(i.manifest.base_url),i.$refs.game.setDataSaveGame(e),i.$refs.game.setData(i.dataJson,i.manifest.canvas_width,i.manifest.canvas_height,"#000000",i.manifest.game_id,i.manifest.release_id||1),i.manifest.hideSaveBtn||i.$refs.game.setSaveGameAction((function(t){return Es.call("saves.doSave",[t])}))})).catch((function(){i.error="We had a problem to load the game, please refresh this page to try again."}));case 15:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},Ls=Rs,ks=(i("034f"),Object(f["a"])(Ls,r,s,!1,null,null,null)),Os=ks.exports;n["default"].config.productionTip=!1,n["default"].prototype.$ENV="function"===typeof window.ENV?window.ENV:null,new n["default"]({render:function(t){return t(Os)}}).$mount("#app")},"57ea":function(t,e,i){"use strict";var n=i("3111"),r=i.n(n);r.a},"5bb9":function(t,e,i){"use strict";var n=i("cd20"),r=i.n(n);r.a},"5fa9":function(t,e,i){"use strict";var n=i("085b"),r=i.n(n);r.a},"5fb1":function(t,e,i){"use strict";var n=i("4c0d"),r=i.n(n);r.a},"6be4":function(t,e,i){"use strict";var n=i("4165"),r=i.n(n);r.a},"721f":function(t,e,i){"use strict";var n=i("468d"),r=i.n(n);r.a},7482:function(t,e,i){"use strict";var n=i("122b"),r=i.n(n);r.a},7495:function(t,e,i){},"78ab":function(t,e,i){"use strict";var n=i("7f10"),r=i.n(n);r.a},"7b1c":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));i("34ef");var n=i("d225"),r=i("b0b4"),s={1:function(){return i("4762").default},2:function(){return i("4762").default},3:function(){return i("e465").default}},a=12,o=function(){function t(){Object(n["a"])(this,t),this.type=0,this.byteLength=0,this.enabled=!0,this.data=null,this.dataByteLength=0}return Object(r["a"])(t,[{key:"setData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.data=t,this.dataByteLength=e||t.byteLength||0,this.byteLength=2+this.dataByteLength}},{key:"toArrayBuffer",value:function(){this.updateData&&this.updateData();var t=2+this.dataByteLength;this.enabled||(t=0);var e=new Uint8Array(t);return this.writeIn(e),e.buffer}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!this.enabled)return 0;t.set([this.type,this.dataByteLength],e),e+=2;for(var i=0;i<this.dataByteLength;i++)t[e+i]=this.data.getUint8&&this.data.getUint8(i)||this.data[i];return 2+this.dataByteLength}}]),t}();o.factory=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if("undefined"===typeof s[t])throw new Error("Type not found.");var e=new(s[t]());return e.data=new DataView(new ArrayBuffer(a)),e.type=t,e.byteLength=2,e},o.parseItem=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e+2>t.byteLength)throw new Error("Offset buffer overflow.");var i=new Uint8Array(t,e,2),n=i[1],r=i[0];if("undefined"===typeof s[r])throw new Error("Type not found.");var a=new(s[r]());if(a.type=i[0],a.byteLength=2+n,e+=2,e+n>t.byteLength)throw a.byteLength-=n,new Error("Offset buffer overflow.");return 0===n?(a.setData(new Uint8Array),a):(a.setData(new DataView(t,e,n)),"function"===typeof a.parse&&a.parse(),a)},e["b"]=o},"7f10":function(t,e,i){},8291:function(t,e,i){},"843f":function(t,e,i){},"846e":function(t,e,i){},"89ab":function(t,e,i){},"8f35":function(t,e,i){"use strict";var n=i("9206"),r=i.n(n);r.a},"8ff9":function(t,e,i){},9206:function(t,e,i){},"936b":function(t,e,i){"use strict";var n=i("a558"),r=i.n(n);r.a},"96e8":function(t,e,i){"use strict";var n=i("bddc"),r=i.n(n);r.a},"9b4d":function(t,e,i){"use strict";i.d(e,"d",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return a}));i("96cf"),i("3b8d"),i("f576"),i("6b54"),i("28a5"),i("34ef");var n=function(t){return new Promise((function(e,i){if(!("XMLHttpRequest"in window))return i(new Error("XMLHttpRequest not supported!"));var n=new XMLHttpRequest;return n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){var t=new Uint8Array(n.response||n.mozResponseArrayBuffer);return e(t.buffer)},n.onerror=i,n.send(null)}))},r=function(t){return new Promise((function(e,i){var n=new FileReader;return n.onload=function(t){return e(t.target.result)},n.onerror=i,n.readAsArrayBuffer(t)}))},s=function(t){if(!t||t.length>8)throw new Error("Only max 64bits numbers allowed");return parseInt(t.toString().split(",").map((function(t){return parseInt(t).toString(16).padStart(2,"0")})).join(""),16)},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("string"!==typeof t||e<=0)throw new Error("Input error.");t=t.trim().padStart(2*e,"0").substring(0,2*e);for(var i=new Uint8Array(e),n=0;n<t.length;n+=2)i[n/2]=parseInt(t.substring(n,n+2),16);return i}},"9cac":function(t,e,i){},"9fbd":function(t,e,i){"use strict";var n=i("7495"),r=i.n(n);r.a},a558:function(t,e,i){},a770:function(t,e,i){"use strict";var n=i("2d1d"),r=i.n(n);r.a},ae02:function(t,e,i){},ae13:function(t,e,i){"use strict";var n=i("560f"),r=i.n(n);r.a},aedf:function(t,e,i){},b244:function(t,e,i){},b57a:function(t,e,i){"use strict";var n=i("fad0"),r=i.n(n);r.a},bddc:function(t,e,i){},c7c9:function(t,e,i){"use strict";var n=i("8ff9"),r=i.n(n);r.a},cbe5:function(t,e,i){"use strict";var n=i("e66f"),r=i.n(n);r.a},cd20:function(t,e,i){},cff5:function(t,e,i){},cfff:function(t,e,i){},d287:function(t,e,i){"use strict";var n=i("aedf"),r=i.n(n);r.a},d404:function(t,e,i){},d7db:function(t,e,i){"use strict";var n=i("cff5"),r=i.n(n);r.a},db9b:function(t,e,i){"use strict";var n=i("01ac"),r=i.n(n);r.a},dde5:function(t,e,i){},e218:function(t,e,i){"use strict";var n=i("cfff"),r=i.n(n);r.a},e465:function(t,e,i){"use strict";i.r(e);i("2397"),i("6b54"),i("34ef");var n=i("d225"),r=i("b0b4"),s=i("2a88"),a=i("4e2b"),o=i("308d"),l=i("6bb5"),c=i("7b1c"),h=i("9b4d");function u(t){var e=d();return function(){var i,n=Object(l["a"])(t);if(e){var r=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(o["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}var f=function(t){Object(a["a"])(i,t);var e=u(i);function i(){var t;return Object(n["a"])(this,i),t=e.call(this),t.id=0,t.offsetX=0,t.offsetY=0,t.activeColorRGB=[0,0,0],t}return Object(r["a"])(i,[{key:"parse",value:function(){this.id=Object(h["a"])(new Uint8Array(this.data.buffer,this.data.byteOffset,5)),this.activeColorRGB=[this.data.getUint8(5),this.data.getUint8(6),this.data.getUint8(7)],12===this.data.byteLength&&(this.offsetX=this.data.getInt16(8,!0),this.offsetY=this.data.getInt16(10,!0))}},{key:"updateData",value:function(){(!this.data||this.data.byteLength<12&&(this.offsetX||this.offsetY))&&this.setData(new DataView(new ArrayBuffer(12))),this.offsetX||this.offsetY?this.dataByteLength=12:this.dataByteLength=8,this.byteLength=2+this.dataByteLength}},{key:"writeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.updateData();for(var n=Object(h["b"])(this.id||0,5),r=0;r<5;r++)this.data.setInt8(r,n[r]);return this.data.setUint8(5,this.activeColorRGB[0],!1),this.data.setUint8(6,this.activeColorRGB[1],!1),this.data.setUint8(7,this.activeColorRGB[2],!1),(this.offsetX||this.offsetY)&&(this.data.setInt16(8,this.offsetX||0,!1),this.data.setInt16(10,this.offsetY||0,!1)),Object(s["a"])(Object(l["a"])(i.prototype),"writeIn",this).call(this,t,e)}},{key:"activeColorHex",get:function(){return"#"+this.activeColorRGB.map((function(t){return t.toString(16)})).map((function(t){return 1===t.length?"0"+t:t})).join("")}}]),i}(c["b"]);e["default"]=f},e66f:function(t,e,i){},e9b5:function(t,e,i){},eebb:function(t,e,i){"use strict";var n=i("0663"),r=i.n(n);r.a},f0d3:function(t,e,i){"use strict";var n=i("24b4"),r=i.n(n);r.a},fad0:function(t,e,i){},fc31:function(t,e,i){"use strict";var n=i("e9b5"),r=i.n(n);r.a},ffb4:function(t,e,i){"use strict";var n=i("9cac"),r=i.n(n);r.a}});