OwlCyberSecurity - MANAGER
Edit File: app.7250e50b.js
(function(t){function e(e){for(var n,a,o=e[0],l=e[1],h=e[2],u=0,d=[];u<o.length;u++)a=o[u],Object.prototype.hasOwnProperty.call(s,a)&&s[a]&&d.push(s[a][0]),s[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(t[n]=l[n]);c&&c(e);while(d.length)d.shift()();return r.push.apply(r,h||[]),i()}function i(){for(var t,e=0;e<r.length;e++){for(var i=r[e],n=!0,o=1;o<i.length;o++){var l=i[o];0!==s[l]&&(n=!1)}n&&(r.splice(e--,1),t=a(a.s=i[0]))}return t}var n={},s={app:0},r=[];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 h=0;h<o.length;h++)e(o[h]);var c=l;r.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"),s=i.n(n);s.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 s in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(s)&&"function"==typeof n[s]&&(i[e+s]=n[s]);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 s=n[t];return s&&this.removeEventListener(t,e,i),s=n[t],s?s.push(e):n[t]=[e],e},e.on=function(t,e,i,n,s,r){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,s),n&&t.remove()}),r)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var s=n[t];if(s)for(var r=0,a=s.length;r<a;r++)if(s[r]==e){1==a?delete n[t]:s.splice(r,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(h){}if(t.bubbles&&this.parent){var s=this,r=[s];while(s.parent)r.push(s=s.parent);var a,l=r.length;for(a=l-1;a>=0&&!t.propagationStopped;a--)r[a]._dispatchEvent(t,1+(0==a));for(a=1;a<l&&!t.propagationStopped;a++)r[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,s=e<=2?this._captureListeners:this._listeners;if(t&&s&&(n=s[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 r=0;r<i&&!t.immediatePropagationStopped;r++){var a=n[r];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 h(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"],c=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,g=a.prototype,v=g.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]!==m)return y[t];var s;if("bug-string-char-index"==t)s="a"!="a"[0];else if("json"==t)s=y("json-stringify")&&y("json-parse");else{var r,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var o=e.stringify,h="function"==typeof o&&b;if(h){(r=function(){return 1}).toJSON=r;try{h="0"===o(0)&&"0"===o(new i)&&'""'==o(new n)&&o(v)===m&&o(m)===m&&o()===m&&"1"===o(r)&&"[1]"==o([r])&&"[null]"==o([m])&&"null"==o(null)&&"[null,null,null]"==o([m,v,null])&&o({a:[r,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===o(null,r)&&"[\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){h=!1}}s=h}if("json-parse"==t){var c=e.parse;if("function"==typeof c)try{if(0===c("0")&&!c(!1)){r=c(a);var u=5==r["a"].length&&1===r["a"][0];if(u){try{u=!c('"\t"')}catch(W){}if(u)try{u=1!==c("01")}catch(W){}if(u)try{u=1!==c("1.")}catch(W){}}}}catch(W){u=!1}s=u}}return y[t]=!!s}if(!y("json")){var w="[object Function]",x="[object Date]",E="[object Number]",C="[object String]",T="[object Array]",S="[object Boolean]",R=y("bug-string-char-index");if(!b)var L=d.floor,I=[0,31,59,90,120,151,181,212,243,273,304,334],O=function(t,e){return I[e]+365*(t-1970)+L((t-1969+(e=+(e>1)))/4)-L((t-1901+e)/100)+L((t-1601+e)/400)};if((p=g.hasOwnProperty)||(p=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?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)}),_=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?_=2==l?function(t,e){var i,n={},s=v.call(t)==w;for(i in t)s&&"prototype"==i||p.call(n,i)||!(n[i]=1)||!p.call(t,i)||e(i)}:function(t,e){var i,n,s=v.call(t)==w;for(i in t)s&&"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"],_=function(t,e){var i,o,l=v.call(t)==w,h=!l&&"function"!=typeof t.constructor&&s[a(r["a"])(t.hasOwnProperty)]&&t.hasOwnProperty||p;for(i in t)l&&"prototype"==i||!h.call(t,i)||e(i);for(o=n.length;i=n[--o];h.call(t,i)&&e(i));}),_(t,e)},!y("json-stringify")){var A={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},k="000000",D=function(t,e){return(k+(e||0)).slice(-t)},P="\\u00",M=function(t){for(var e='"',i=0,n=t.length,s=!R||n>10,r=s&&(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+=A[a];break;default:if(a<32){e+=P+D(2,a.toString(16));break}e+=s?r[i]:t.charAt(i)}}return e+'"'},B=function t(e,i,n,s,o,l,h){var c,d,f,g,b,y,w,R,I,A,k,P,B,j,F,N;try{c=i[e]}catch(W){}if("object"==a(r["a"])(c)&&c)if(d=v.call(c),d!=x||p.call(c,"toJSON"))"function"==typeof c.toJSON&&(d!=E&&d!=C&&d!=T||p.call(c,"toJSON"))&&(c=c.toJSON(e));else if(c>-1/0&&c<1/0){if(O){for(b=L(c/864e5),f=L(b/365.2425)+1970-1;O(f+1,0)<=b;f++);for(g=L((b-O(f,0))/30.42);O(f,g+1)<=b;g++);b=1+b-O(f,g),y=(c%864e5+864e5)%864e5,w=L(y/36e5)%24,R=L(y/6e4)%60,I=L(y/1e3)%60,A=y%1e3}else f=c.getUTCFullYear(),g=c.getUTCMonth(),b=c.getUTCDate(),w=c.getUTCHours(),R=c.getUTCMinutes(),I=c.getUTCSeconds(),A=c.getUTCMilliseconds();c=(f<=0||f>=1e4?(f<0?"-":"+")+D(6,f<0?-f:f):D(4,f))+"-"+D(2,g+1)+"-"+D(2,b)+"T"+D(2,w)+":"+D(2,R)+":"+D(2,I)+"."+D(3,A)+"Z"}else c=null;if(n&&(c=n.call(i,e,c)),null===c)return"null";if(d=v.call(c),d==S)return""+c;if(d==E)return c>-1/0&&c<1/0?""+c:"null";if(d==C)return M(""+c);if("object"==a(r["a"])(c)){for(j=h.length;j--;)if(h[j]===c)throw u();if(h.push(c),k=[],F=l,l+=o,d==T){for(B=0,j=c.length;B<j;B++)P=t(B,c,n,s,o,l,h),k.push(P===m?"null":P);N=k.length?o?"[\n"+l+k.join(",\n"+l)+"\n"+F+"]":"["+k.join(",")+"]":"[]"}else _(s||c,(function(e){var i=t(e,c,n,s,o,l,h);i!==m&&k.push(M(e)+":"+(o?" ":"")+i)})),N=k.length?o?"{\n"+l+k.join(",\n"+l)+"\n"+F+"}":"{"+k.join(",")+"}":"{}";return h.pop(),N}};e.stringify=function(t,e,i){var n,o,l,h;if(s[a(r["a"])(e)]&&e)if((h=v.call(e))==w)o=e;else if(h==T){l={};for(var c,u=0,d=e.length;u<d;c=e[u++],h=v.call(c),(h==C||h==E)&&(l[c]=1));}if(i)if((h=v.call(i))==E){if((i-=i%1)>0)for(n="",i>10&&(i=10);n.length<i;n+=" ");}else h==C&&(n=i.length<=10?i:i.slice(0,10));return B("",(c={},c[""]=t,c),o,l,n,"",[])}}if(!y("json-parse")){var j,F,N=n.fromCharCode,U={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},G=function(){throw j=F=null,c()},X=function(){var t,e,i,n,s,r=F,a=r.length;while(j<a)switch(s=r.charCodeAt(j),s){case 9:case 10:case 13:case 32:j++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=R?r.charAt(j):r[j],j++,t;case 34:for(t="@",j++;j<a;)if(s=r.charCodeAt(j),s<32)G();else if(92==s)switch(s=r.charCodeAt(++j),s){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=U[s],j++;break;case 117:for(e=++j,i=j+4;j<i;j++)s=r.charCodeAt(j),s>=48&&s<=57||s>=97&&s<=102||s>=65&&s<=70||G();t+=N("0x"+r.slice(e,j));break;default:G()}else{if(34==s)break;s=r.charCodeAt(j),e=j;while(s>=32&&92!=s&&34!=s)s=r.charCodeAt(++j);t+=r.slice(e,j)}if(34==r.charCodeAt(j))return j++,t;G();default:if(e=j,45==s&&(n=!0,s=r.charCodeAt(++j)),s>=48&&s<=57){for(48==s&&(s=r.charCodeAt(j+1),s>=48&&s<=57)&&G(),n=!1;j<a&&(s=r.charCodeAt(j),s>=48&&s<=57);j++);if(46==r.charCodeAt(j)){for(i=++j;i<a&&(s=r.charCodeAt(i),s>=48&&s<=57);i++);i==j&&G(),j=i}if(s=r.charCodeAt(j),101==s||69==s){for(s=r.charCodeAt(++j),43!=s&&45!=s||j++,i=j;i<a&&(s=r.charCodeAt(i),s>=48&&s<=57);i++);i==j&&G(),j=i}return+r.slice(e,j)}if(n&&G(),"true"==r.slice(j,j+4))return j+=4,!0;if("false"==r.slice(j,j+5))return j+=5,!1;if("null"==r.slice(j,j+4))return j+=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===m?delete t[e]:t[e]=n},V=function(t,e,i){var n,s=t[e];if("object"==a(r["a"])(s)&&s)if(v.call(s)==T)for(n=s.length;n--;)Y(s,n,i);else _(s,(function(t){Y(s,t,i)}));return i.call(t,e,s)};e.parse=function(t,e){var i,n;return j=0,F=""+t,i=H(X()),"$"!=X()&&G(),j=F=null,e&&v.call(e)==w?V((n={},n[""]=i,n),"",e):i}}}return e["runInContext"]=h,e}if(!l||l["global"]!==l&&l["window"]!==l&&l["self"]!==l||(o=l),a&&!e)h(o,a);else{var c=o.JSON,u=o["JSON3"],d=!1,f=h(o,o["JSON3"]={noConflict:function(){return d||(d=!0,o.JSON=c,o["JSON3"]=u,c=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 s in n.href=e,i)s in n&&(i[s]=n[s]);var r,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),(r=e.match(t.EXTENSION_PATT))&&(i.extension=r[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 s=t.slice(n+1);i=i.concat(s.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 h=null;if(h=t.method==o.Methods.GET?o.URLUtils.buildURI(t.src,t.values):t.src,n.open(t.method||o.Methods.GET,h,!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 c in t.headers)i[c]=t.headers[c];for(c in i)n.setRequestHeader(c,i[c]);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(),s=this.getResult(n);for(r=this._loadQueue.length-1;r>=0;r--)if(a=this._loadQueue[r].getItem(),a.id==n||a.src==n){this._loadQueue.splice(r,1)[0].cancel();break}for(r=this._loadQueueBackup.length-1;r>=0;r--)if(a=this._loadQueueBackup[r].getItem(),a.id==n||a.src==n){this._loadQueueBackup.splice(r,1)[0].cancel();break}if(s)this._disposeItem(this.getItem(n));else for(var r=this._currentLoads.length-1;r>=0;r--){var a=this._currentLoads[r].getItem();if(a.id==n||a.src==n){this._currentLoads.splice(r,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 h=0,c=s.length;h<c;h++)this._addItem(s[h],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],s=this.getResult(i);!0===t&&null==s||e.push({item:n,result:s,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 s=this._createLoader(n);null!=s&&("plugins"in s&&(s.plugins=this._plugins),n._loader=s,this._loadQueue.push(s),this._loadQueueBackup.push(s),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 s="",r=i||this._basePath;if(n.src instanceof Object){if(!n.type)return null;if(e){s=e;var a=o.URLUtils.parseURI(e);null==r||a.absolute||a.relative||(s=r+s)}else null!=r&&(s=r)}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 h=n.src;if(!l.absolute&&!l.relative)if(e){s=e;a=o.URLUtils.parseURI(e);h=e+h,null==r||a.absolute||a.relative||(s=r+s)}else null!=r&&(s=r);n.src=s+n.src}n.path=s,void 0!==n.id&&null!==n.id&&""!==n.id||(n.id=h);var c=this._typeCallbacks[n.type]||this._extensionCallbacks[n.ext];if(c){var u=c.callback.call(c.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 s=e.getResult(!0);null!=s&&s!==n&&(this._loadedRawResults[i.id]=s),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 s=i._loader;this._processFinishedLoad(i,s),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 s=this._loadedScripts[n];if(null==s)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,s=this._currentLoads.length;n<s;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 s=e[n];t="string"===typeof s?this._defFromSrc(s):this._defFromObj(s),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,s=n-1;s>=0;s--)for(var r=e[s],a=r.refs,l=a.length-1;l>=0;l--){var h=this._getTextWidth(r.family+","+i[l],r.weight,r.style);if(h!=a[l]){var c=new o.Event("fileload");r.type="font-family",c.item=r,this.dispatchEvent(c),e.splice(s,1);break}}if(n!==e.length){c=new o.ProgressEvent(this._count-e.length,this._count);this.dispatchEvent(c)}0===n&&(this._stopWatching(),this._sendComplete())},e._calculateReferenceSizes=function(e){for(var i=t._referenceFonts,n=e.refs=[],s=0;s<i.length;s++)n[s]=this._getTextWidth(i[s],e.weight,e.style)},e._defFromSrc=function(e){var i,n=/[- ._]+/g,s=e,r=null;i=s.search(/[?#]/),-1!==i&&(s=s.substr(0,i)),i=s.lastIndexOf("."),-1!==i&&(r=s.substr(i+1),s=s.substr(0,i)),i=s.lastIndexOf("/"),-1!==i&&(s=s.substr(i+1));var a=s,o=a.match(t.WEIGHT_REGEX);o&&(o=o[0],a=a.replace(o,""),o=o.replace(n,"").toLowerCase());var l=s.match(t.STYLE_REGEX);l&&(a=a.replace(l[0],""),l="italic"),a=a.replace(n,"");var h="local('"+s.replace(n," ")+"'), url('"+e+"')",c=t.FONT_FORMAT[r];return c&&(h+=" format('"+c+"')"),this._defFromObj({family:a,weight:t.FONT_WEIGHT[o]||o,style:l,src:h})},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 s=t._ctx;return s.font=n+" "+i+" 72px "+e,s.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 s=n.createObjectURL(this.getResult(!0));i.src=s,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"),s=i.n(n);s.a},"07e9":function(t,e,i){"use strict";var n=i("ae02"),s=i.n(n);s.a},"085b":function(t,e,i){},"087c":function(t,e,i){"use strict";var n=i("3096"),s=i.n(n);s.a},"09a2":function(t,e,i){},"0c56":function(t,e,i){},"0c68":function(t,e,i){"use strict";var n=i("8291"),s=i.n(n);s.a},1412:function(t,e,i){},"1f0d":function(t,e,i){"use strict";var n=i("b244"),s=i.n(n);s.a},"1fe5":function(t,e,i){"use strict";var n=i("5da8"),s=i.n(n);s.a},2050:function(t,e,i){},"276d":function(t,e,i){"use strict";var n=i("0c56"),s=i.n(n);s.a},"279f":function(t,e,i){"use strict";var n=i("846e"),s=i.n(n);s.a},"27fb":function(t,e,i){},"2d1d":function(t,e,i){},"2f77":function(t,e,i){"use strict";var n=i("2050"),s=i.n(n);s.a},3096:function(t,e,i){},3111:function(t,e,i){},"319f":function(t,e,i){"use strict";var n=i("1412"),s=i.n(n);s.a},3305:function(t,e,i){"use strict";var n=i("d404"),s=i.n(n);s.a},"3ca1":function(t,e,i){"use strict";var n=i("567d"),s=i.n(n);s.a},4165:function(t,e,i){},"468d":function(t,e,i){},"4a4b":function(t,e,i){"use strict";var n=i("dde5"),s=i.n(n);s.a},"4c0d":function(t,e,i){},"4d5c":function(t,e,i){"use strict";var n=i("843f"),s=i.n(n);s.a},"557b":function(t,e,i){},"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"),s=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)},r=[],a=(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}])})}),o=[],l=(i("8e6e"),i("456d"),i("34ef"),i("28a5"),i("75fc")),h=i("bd86"),c=(i("7f7f"),i("ac6a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div")}),u=[],d=(i("5fa9"),i("2877")),f={},p=Object(d["a"])(f,c,u,!1,null,null,null),_=(p.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)])}),m=[],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()])}),v=[],b=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)},y=[],w=i("c67f"),x=i.n(w),E=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)}))},C=function(){return{bind:function(t,e,i){E(t,(function(t){t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()}))}}},T={name:"ScrollDiv",components:{vuescroll:x.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;E(this.$el,(function(e){e.preventDefault(),t.handleMouseWhell(e)})),this.$nextTick((function(){t.scrolling=!1}))}},S=T,R=(i("d7db"),Object(d["a"])(S,b,y,!1,null,"f5224da4",null)),L=R.exports,I={name:"ColorPicker",components:{ScrollDiv:L},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(){}},O=I,A=(i("087c"),Object(d["a"])(O,g,v,!1,null,"e46b8694",null)),k=A.exports,D=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 ")])])])])},P=[],M={DEFAULT:"default",ROTATE_RIGHT:"rotate-right",ROTATE_LEFT:"rotate-left",LEFT:"left",DOWN:"down",RIGHT:"right",UP:"up"},B={Buttons:M,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(){}},j=B,F=(i("5fb1"),Object(d["a"])(j,D,P,!1,null,"1d2edbe0",null)),N=F.exports,U=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"})])},G=[],X={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}}},H=X,Y=(i("fc31"),Object(d["a"])(H,U,G,!1,null,"35b310fe",null)),V=Y.exports,W=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()])},q=[],$={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")}},z=$,J=(i("ae13"),Object(d["a"])(z,W,q,!1,null,"18197f20",null)),Q=J.exports,Z=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-anim"},[i("LoadingEllipsis")],1)},K=[],tt=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},et=[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")])}],it={name:"LoadingEllipsis"},nt=it,st=(i("78ab"),Object(d["a"])(nt,tt,et,!1,null,"8cf97e42",null)),rt=st.exports,at={name:"LoadingOverlay",components:{LoadingEllipsis:rt},data:function(){return{}},computed:{},props:{label:{type:String,default:""}},methods:{},created:function(){}},ot=at,lt=(i("5bb9"),Object(d["a"])(ot,Z,K,!1,null,"66b4214a",null)),ht=lt.exports,ct={name:"GameWrapper",components:{ColorPicker:k,GamePad:N,OverlayAnimation:V,PoweredBy:Q,LoadingOverlay:ht,LoadingEllipsis:rt},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)}))}},ut=ct,dt=(i("1fe5"),Object(d["a"])(ut,_,m,!1,null,"4c8b5ae7",null)),ft=dt.exports,pt=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=[],mt=(i("c5f6"),{name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs.display}}}),gt=mt,vt=(i("279f"),Object(d["a"])(gt,pt,_t,!1,null,"4b0af933",null)),bt=vt.exports,yt=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)},wt=[],xt={name:"WelcomeScreen",components:{PoweredBy:Q},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():""}}},Et=xt,Ct=(i("57ea"),Object(d["a"])(Et,yt,wt,!1,null,"01de2544",null)),Tt=Ct.exports,St=(i("7514"),i("d225")),Rt=i("b0b4"),Lt=(i("20d6"),i("7618")),It=i("03ff"),Ot=(i("a481"),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 s in i[(e+="_")+"constructor"]=n.constructor,n)i.hasOwnProperty(s)&&"function"==typeof n[s]&&(i[e+s]=n[s]);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 s=n[t];return s&&this.removeEventListener(t,e,i),s=n[t],s?s.push(e):n[t]=[e],e},e.on=function(t,e,i,n,s,r){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,(function(t){e.call(i,t,s),n&&t.remove()}),r)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var s=n[t];if(s)for(var r=0,a=s.length;r<a;r++)if(s[r]==e){1==a?delete n[t]:s.splice(r,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 s=this,r=[s];while(s.parent)r.push(s=s.parent);var a,o=r.length;for(a=o-1;a>=0&&!t.propagationStopped;a--)r[a]._dispatchEvent(t,1+(0==a));for(a=1;a<o&&!t.propagationStopped;a++)r[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,s=e<=2?this._captureListeners:this._listeners;if(t&&s&&(n=s[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 r=0;r<i&&!t.immediatePropagationStopped;r++){var a=n[r];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 s=0;s<e;s++)i+=n[s];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 s=new At.Event("tick"),r=t.maxDelta;s.delta=r&&n>r?r:n,s.paused=e,s.time=i,s.runTime=i-t._pausedTime,t.dispatchEvent(s)}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,s,r,a,o,l,h,c){this.Event_constructor(t,e,i),this.stageX=n,this.stageY=s,this.rawX=null==l?n:l,this.rawY=null==h?s:h,this.nativeEvent=r,this.pointerID=a,this.primary=!!o,this.relatedTarget=c}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,s,r){this.setValues(t,e,i,n,s,r)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,n,s,r){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==n?1:n,this.tx=s||0,this.ty=r||0,this},e.append=function(t,e,i,n,s,r){var a=this.a,o=this.b,l=this.c,h=this.d;return 1==t&&0==e&&0==i&&1==n||(this.a=a*t+l*e,this.b=o*t+h*e,this.c=a*i+l*n,this.d=o*i+h*n),this.tx=a*s+l*r+this.tx,this.ty=o*s+h*r+this.ty,this},e.prepend=function(t,e,i,n,s,r){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+s,this.ty=e*l+n*this.ty+r,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,s,r,a,o,l,h){if(r%360)var c=r*t.DEG_TO_RAD,u=Math.cos(c),d=Math.sin(c);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*s,u*s,0,0)):this.append(u*n,d*n,-d*s,u*s,e,i),(l||h)&&(this.tx-=l*this.a+h*this.c,this.ty-=l*this.b+h*this.d),this},e.prependTransform=function(e,i,n,s,r,a,o,l,h){if(r%360)var c=r*t.DEG_TO_RAD,u=Math.cos(c),d=Math.sin(c);else u=1,d=0;return(l||h)&&(this.tx-=l,this.ty-=h),a||o?(a*=t.DEG_TO_RAD,o*=t.DEG_TO_RAD,this.prepend(u*n,d*n,-d*s,u*s,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*s,u*s,e,i),this},e.rotate=function(e){e*=t.DEG_TO_RAD;var i=Math.cos(e),n=Math.sin(e),s=this.a,r=this.b;return this.a=s*i+this.c*n,this.b=r*i+this.d*n,this.c=-s*n+this.c*i,this.d=-r*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,s=this.tx,r=t*n-e*i;return this.a=n/r,this.b=-e/r,this.c=-i/r,this.d=t/r,this.tx=(i*this.ty-n*s)/r,this.ty=-(t*this.ty-e*s)/r,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),s=Math.abs(1-i/n);return s<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,s){this.setValues(t,e,i,n,s)}var e=t.prototype;e.setValues=function(t,e,i,n,s){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=n,this.matrix=s||this.matrix&&this.matrix.identity()||new At.Matrix2D,this},e.append=function(t,e,i,n,s){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=n||this.compositeOperation,this.visible=this.visible&&t,s&&this.matrix.appendMatrix(s),this},e.prepend=function(t,e,i,n,s){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||n,this.visible=this.visible&&t,s&&this.matrix.prependMatrix(s),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,s=i+e.width,r=n+e.height;return this.x>i&&(i=this.x),this.y>n&&(n=this.y),this.x+this.width<s&&(s=this.x+this.width),this.y+this.height<r&&(r=this.y+this.height),s<=i||r<=n?null:new t(i,n,s-i,r-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,s,r,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=s,this._isPressed=!1,this._isOver=!1,this._enabled=!1,t.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),r&&(a&&(r.actionsEnabled=!1,r.gotoAndStop&&r.gotoAndStop(a)),t.hitArea=r))}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,s;if(null!=t){if(this.framerate=t.framerate||0,t.images&&(i=t.images.length)>0)for(s=this._images=[],e=0;e<i;e++){var r=t.images[e];if("string"==typeof r){var a=r;r=document.createElement("img"),r.src=a}s.push(r),r.getContext||r.naturalWidth||(this._loadCount++,this.complete=!1,function(t,e){r.onload=function(){t._handleImageLoad(e)}}(this,a),function(t,e){r.onerror=function(){t._handleImageError(e)}}(this,a))}if(null==t.frames);else if(Array.isArray(t.frames))for(this._frames=[],s=t.frames,e=0,i=s.length;e<i;e++){var o=s[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 h={name:l},c=n[l];if("number"==typeof c)s=h.frames=[c];else if(Array.isArray(c))if(1==c.length)h.frames=[c[0]];else for(h.speed=c[3],h.next=c[2],s=h.frames=[],e=c[0];e<=c[1];e++)s.push(e);else{h.speed=c.speed,h.next=c.next;var u=c.frames;s=h.frames="number"==typeof u?[u]:u.slice(0)}!0!==h.next&&void 0!==h.next||(h.next=l),(!1===h.next||s.length<2&&h.next==l)&&(h.next=null),h.speed||(h.speed=1),this._animations.push(l),this._data[l]=h}}},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,s=this._spacing,r=this._margin;t:for(var a=0,o=this._images;a<o.length;a++){var l=o[a],h=l.width||l.naturalWidth,c=l.height||l.naturalHeight,u=r;while(u<=c-r-n){var d=r;while(d<=h-r-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+s}u+=n+s}}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(s){}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,s=i.length;n<s;n++)i[n].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,n=this._storeIndex,s=i.length;n<s;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,s,r){return this.append(new i.ArcTo(t,e,n,s,r))},e.arc=function(t,e,n,s,r,a){return this.append(new i.Arc(t,e,n,s,r,a))},e.quadraticCurveTo=function(t,e,n,s){return this.append(new i.QuadraticCurveTo(t,e,n,s))},e.bezierCurveTo=function(t,e,n,s,r,a){return this.append(new i.BezierCurveTo(t,e,n,s,r,a))},e.rect=function(t,e,n,s){return this.append(new i.Rect(t,e,n,s))},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,s,r,a){return this._setFill((new i.Fill).linearGradient(t,e,n,s,r,a))},e.beginRadialGradientFill=function(t,e,n,s,r,a,o,l){return this._setFill((new i.Fill).radialGradient(t,e,n,s,r,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,s,r){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,n,s,r),this._stroke&&(this._stroke.ignoreScale=r),this._strokeIgnoreScale=r,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,s,r,a){return this._setStroke((new i.Stroke).linearGradient(t,e,n,s,r,a))},e.beginRadialGradientStroke=function(t,e,n,s,r,a,o,l){return this._setStroke((new i.Stroke).radialGradient(t,e,n,s,r,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,s){return this.drawRoundRectComplex(t,e,i,n,s,s,s,s)},e.drawRoundRectComplex=function(t,e,n,s,r,a,o,l){return this.append(new i.RoundRect(t,e,n,s,r,a,o,l))},e.drawCircle=function(t,e,n){return this.append(new i.Circle(t,e,n))},e.drawEllipse=function(t,e,n,s){return this.append(new i.Ellipse(t,e,n,s))},e.drawPolyStar=function(t,e,n,s,r,a){return this.append(new i.PolyStar(t,e,n,s,r,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],s=0,r=e.length,a=[],o=0,l=0,h=t.BASE_64;while(s<r){var c=e.charAt(s),u=h[c],d=u>>3,f=i[d];if(!f||3&u)throw"bad path data (@"+s+"): "+c;var p=n[d];d||(o=l=0),a.length=0,s++;for(var _=2+(u>>2&1),m=0;m<p;m++){var g=h[e.charAt(s)],v=g>>5?-1:1;g=(31&g)<<6|h[e.charAt(s+1)],3==_&&(g=g<<6|h[e.charAt(s+2)]),g=v*g/10,m%2?o=g+=o:l=g+=l,a[m]=g,s+=_}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,s=this._commitIndex;if(this._dirty&&n.length){i.length=s,i.push(t.beginCmd);var r=n.length,a=i.length;i.length=a+r;for(var o=0;o<r;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,s){this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.radius=s}).prototype.exec=function(t){t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(i.Arc=function(t,e,i,n,s,r){this.x=t,this.y=e,this.radius=i,this.startAngle=n,this.endAngle=s,this.anticlockwise=!!r}).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,s,r){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=n,this.x=s,this.y=r}).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,s,r,a){for(var o=this.style=t._ctx.createLinearGradient(n,s,r,a),l=0,h=e.length;l<h;l++)o.addColorStop(i[l],e[l]);return o.props={colors:e,ratios:i,x0:n,y0:s,x1:r,y1:a,type:"linear"},this},e.radialGradient=function(e,i,n,s,r,a,o,l){for(var h=this.style=t._ctx.createRadialGradient(n,s,r,a,o,l),c=0,u=e.length;c<u;c++)h.addColorStop(i[c],e[c]);return h.props={colors:e,ratios:i,x0:n,y0:s,r0:r,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,s){this.width=t,this.caps=e,this.joints=i,this.miterLimit=n,this.ignoreScale=s}).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,s,r,a,o){this.x=t,this.y=e,this.w=i,this.h=n,this.radiusTL=s,this.radiusTR=r,this.radiusBR=a,this.radiusBL=o}).prototype.exec=function(t){var e=(l<h?l:h)/2,i=0,n=0,s=0,r=0,a=this.x,o=this.y,l=this.w,h=this.h,c=this.radiusTL,u=this.radiusTR,d=this.radiusBR,f=this.radiusBL;c<0&&(c*=i=-1),c>e&&(c=e),u<0&&(u*=n=-1),u>e&&(u=e),d<0&&(d*=s=-1),d>e&&(d=e),f<0&&(f*=r=-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+h-d),t.arcTo(a+l+d*s,o+h+d*s,a+l-d,o+h,d),t.lineTo(a+f,o+h),t.arcTo(a-f*r,o+h+f*r,a,o+h-f,f),t.lineTo(a,o+c),t.arcTo(a-c*i,o-c*i,a+c,o,c),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,s=this.h,r=.5522848,a=n/2*r,o=s/2*r,l=e+n,h=i+s,c=e+n/2,u=i+s/2;t.moveTo(e,u),t.bezierCurveTo(e,u-o,c-a,i,c,i),t.bezierCurveTo(c+a,i,l,u-o,l,u),t.bezierCurveTo(l,u+o,c+a,h,c,h),t.bezierCurveTo(c-a,h,e,u+o,e,u)},(i.PolyStar=function(t,e,i,n,s,r){this.x=t,this.y=e,this.radius=i,this.sides=n,this.pointSize=s,this.angle=r}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.radius,s=(this.angle||0)/180*Math.PI,r=this.sides,a=1-(this.pointSize||0),o=Math.PI/r;t.moveTo(e+Math.cos(s)*n,i+Math.sin(s)*n);for(var l=0;l<r;l++)s+=o,1!=a&&t.lineTo(e+Math.cos(s)*n*a,i+Math.sin(s)*n*a),s+=o,t.lineTo(e+Math.cos(s)*n,i+Math.sin(s)*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,s=i._props.matrix;n&&n.graphics&&!n.graphics.isEmpty()&&(n.getMatrix(s),e.transform(s.a,s.b,s.c,s.d,s.tx,s.ty),n.graphics.drawAsPath(e),e.clip(),s.invert(),e.transform(s.a,s.b,s.c,s.d,s.tx,s.ty)),this.getMatrix(s);var r=s.tx,a=s.ty;t._snapToPixelEnabled&&i.snapToPixel&&(r=r+(r<0?-.5:.5)|0,a=a+(a<0?-.5:.5)|0),e.transform(s.a,s.b,s.c,s.d,r,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,s,r){this.bitmapCache||(this.bitmapCache=new At.BitmapCache),this.bitmapCache.define(this,t,e,i,n,s,r)},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,s,r,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=s||0,this.skewX=r||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 s=this._testHit(n);return n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,2,2),s},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,s=t.y,r=t.width,a=t.height,o=this._props.matrix;o=i?o.identity():this.getMatrix(o),(n||s)&&o.appendTransform(0,0,1,1,0,0,0,-n,-s),e&&o.prependMatrix(e);var l=r*o.a,h=r*o.b,c=a*o.c,u=a*o.d,d=o.tx,f=o.ty,p=d,_=d,m=f,g=f;return(n=l+d)<p?p=n:n>_&&(_=n),(n=l+c+d)<p?p=n:n>_&&(_=n),(n=c+d)<p?p=n:n>_&&(_=n),(s=h+f)<m?m=s:s>g&&(g=s),(s=h+u+f)<m?m=s:s>g&&(g=s),(s=u+f)<m?m=s:s>g&&(g=s),t.setValues(p,m,_-p,g-m)},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,s=i.length;n<s;n++){var r=i[n];r.isVisible()&&(t.save(),r.updateContext(t),r.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,s=n===this;return n&&n._removeChildAt(At.indexOf(n.children,t),s),t.parent=this,this.children.push(t),s||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 s=0;s<i-1;s++)this.addChildAt(arguments[s],n+s);return arguments[i-2]}var r=t.parent,a=r===this;return r&&r._removeChildAt(At.indexOf(r.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 s=!0;for(n=0;n<e;n++)s=s&&this._removeChildAt(i[n]);return s}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],s=i[e];n&&s&&(i[t]=s,i[e]=n)},e.swapChildren=function(t,e){for(var i,n,s=this.children,r=0,a=s.length;r<a;r++)if(s[r]==t&&(i=r),s[r]==e&&(n=r),null!=i&&null!=n)break;r!=a&&(s[i]=e,s[n]=t)},e.setChildIndex=function(t,e){var i=this.children,n=i.length;if(!(t.parent!=this||e<0||e>=n)){for(var s=0;s<n;s++)if(i[s]==t)break;s!=n&&s!=e&&(i.splice(s,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=[],s=this.localToGlobal(t,e);return this._getObjectsUnderPoint(s.x,s.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 s=this.children[i].clone(!0);s.parent=t,e.push(s)}},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,s,r,a){if(a=a||0,!a&&!this._testMask(this,e,i))return null;var o,l=At.DisplayObject._hitTestContext;r=r||s&&this._hasMouseEventListener();for(var h=this.children,c=h.length,u=c-1;u>=0;u--){var d=h[u],f=d.hitArea;if(d.visible&&(f||d.isVisible())&&(!s||d.mouseEnabled)&&(f||this._testMask(d,e,i)))if(!f&&d instanceof t){var p=d._getObjectsUnderPoint(e,i,n,s,r,a+1);if(!n&&p)return s&&!this.mouseChildren?this:p}else{if(s&&!r&&!d._hasMouseEventListener())continue;var _=d.getConcatenatedDisplayProps(d._props);if(o=_.matrix,f&&(o.appendMatrix(f.getMatrix(f._props.matrix)),_.alpha=f.alpha),l.globalAlpha=_.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 s&&!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 s=this._props.matrix,r=t.parent;s=r?r.getConcatenatedMatrix(s):s.identity(),s=n.getMatrix(n._props.matrix).prependMatrix(s);var a=At.DisplayObject._hitTestContext;return a.setTransform(s.a,s.b,s.c,s.d,s.tx-e,s.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 s=this.children.length,r=null,a=0;a<s;a++){var o=this.children[a];o.visible&&(i=o._getBounds(n))&&(r?r.extend(i.x,i.y,i.width,i.height):r=i.clone())}return r},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"),s=this.canvas.width,r=this.canvas.height;if(t){i=n.getImageData(0,0,s,r);var a=n.globalCompositeOperation;n.globalCompositeOperation="destination-over",n.fillStyle=t,n.fillRect(0,0,s,r)}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 s=window.addEventListener?window:document,r=this;for(e in n=this._eventListeners={},n["mouseup"]={t:s,f:function(t){r._handleMouseUp(t)}},n["mousemove"]={t:s,f:function(t){r._handleMouseMove(t)}},n["dblclick"]={t:this.canvas,f:function(t){r._handleDoubleClick(t)}},n["mousedown"]={t:this.canvas,f:function(t){r._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(h){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),s=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,r=parseInt(s.paddingLeft)+parseInt(s.borderLeftWidth),a=parseInt(s.paddingTop)+parseInt(s.borderTopWidth),o=parseInt(s.paddingRight)+parseInt(s.borderRightWidth),l=parseInt(s.paddingBottom)+parseInt(s.borderBottomWidth);return{left:e.left+i+r,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,s){if((!this._prevStage||void 0!==s)&&this.canvas){var r=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)),r&&r._handlePointerMove(t,e,i,n,null)}},e._updatePointerPosition=function(t,e,i,n){var s=this._getElementRect(this.canvas);i-=s.left,n-=s.top;var r=this.canvas.width,a=this.canvas.height;i/=(s.right-s.left)/r,n/=(s.bottom-s.top)/a;var o=this._getPointerData(t);(o.inBounds=i>=0&&n>=0&&i<=r-1&&n<=a-1)?(o.x=i,o.y=n):this.mouseMoveOutside&&(o.x=i<0?0:i>r-1?r-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 s=this._nextStage,r=this._getPointerData(t);if(!this._prevStage||void 0!==n){var a=null,o=r.target;n||!o&&!s||(a=this._getObjectsUnderPoint(r.x,r.y,null,!0)),r.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,t,r,e,a),r.down=!1),a==o&&this._dispatchMouseEvent(o,"click",!0,t,r,e),this._dispatchMouseEvent(o,"pressup",!0,t,r,e),i?(t==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[t]):r.target=null,s&&s._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,s){this.preventSelection&&e.preventDefault(),null!=this._primaryPointerID&&-1!==t||(this._primaryPointerID=t),null!=n&&this._updatePointerPosition(t,e,i,n);var r=null,a=this._nextStage,o=this._getPointerData(t);s||(r=o.target=this._getObjectsUnderPoint(o.x,o.y,null,!0)),o.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,t,o,e,r),o.down=!0),this._dispatchMouseEvent(r,"mousedown",!0,t,o,e),a&&a._handlePointerDown(t,e,i,n,s||r&&this)},e._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var n=this._nextStage;if(this._mouseOverIntervalID){var s=this._getPointerData(-1);if(s&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var r,a,o,l=s.posEvtObj,h=i||l&&l.target==this.canvas,c=null,u=-1,d="";!e&&(t||this.mouseInBounds&&h)&&(c=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],_=this._mouseOverTarget=[];r=c;while(r)_.unshift(r),d||(d=r.cursor),r=r.parent;for(this.canvas.style.cursor=d,!e&&i&&(i.canvas.style.cursor=d),a=0,o=_.length;a<o;a++){if(_[a]!=f[a])break;u=a}for(p!=c&&this._dispatchMouseEvent(p,"mouseout",!0,-1,s,l,c),a=f.length-1;a>u;a--)this._dispatchMouseEvent(f[a],"rollout",!1,-1,s,l,c);for(a=_.length-1;a>u;a--)this._dispatchMouseEvent(_[a],"rollover",!1,-1,s,l,p);p!=c&&this._dispatchMouseEvent(c,"mouseover",!0,-1,s,l,p),n&&n._testMouseOver(t,e||c&&this,i||h&&this)}}else n&&n._testMouseOver(t,e,i)}},e._handleDoubleClick=function(t,e){var i=null,n=this._nextStage,s=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(s.x,s.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,s,t)),n&&n._handleDoubleClick(t,e||i&&this)},e._dispatchMouseEvent=function(t,e,i,n,s,r,a){if(t&&(i||t.hasEventListener(e))){var o=new At.MouseEvent(e,i,!1,s.x,s.y,r,n,n===this._primaryPointerID||-1===n,s.rawX,s.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(Lt["a"])(i))throw"Invalid options object";var n=i.premultiply,s=i.transparent,r=i.antialias,a=i.preserveBuffer,o=i.autoPurge}this.vocalDebug=!1,this._preserveBuffer=a||!1,this._antialias=r||!1,this._transparent=s||!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,s=-1!=e&&i?e+1:t._frames.length,r=n;r<s;r++){var a=t._frames[r];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 s=this._webGLContext;return this._cacheDraw(s,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,s=!1,r=this._webGLContext;if(void 0!==t.__lastRT&&t.__lastRT===t.__rtA&&(s=!0),s?(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(r)),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(r)),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 s=e[n];s&&(s._drawID+t<=this._drawID&&this._killTextureObject(s))}},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,s=this._webGLContext,r=s.createTexture();return this.resizeTexture(r,i,n),this.setTextureParams(s,!1),r},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 s=i.createFramebuffer();return s?(n.width=t,n.height=e,i.bindFramebuffer(i.FRAMEBUFFER,s),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,n,0),s._renderTexture=n,n._frameBuffer=s,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,s,r;"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,s=Number("0x"+t.slice(7,9))/255):0==t.indexOf("rgba(")&&(r=t.slice(5,-1).split(","),e=Number(r[0])/255,i=Number(r[1])/255,n=Number(r[2])/255,s=Number(r[3])):(e=((4278190080&t)>>>24)/255,i=((16711680&t)>>>16)/255,n=((65280&t)>>>8)/255,s=(255&t)/255),this._clearColor.r=e||0,this._clearColor.g=i||0,this._clearColor.b=n||0,this._clearColor.a=s||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 s="Could not initialize WebGL";console.error?console.error(s):console.log(s)}return n},e._fetchShaderProgram=function(e,i,n,s,r){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+(s||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+(s||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),h=this._createShader(e,e.FRAGMENT_SHADER,a),c=e.createProgram();if(e.attachShader(c,l),e.attachShader(c,h),e.linkProgram(c),c._type=i,!e.getProgramParameter(c,e.LINK_STATUS))throw e.useProgram(this._activeShader),e.getProgramInfoLog(c);switch(e.useProgram(c),i){case"filter":c.vertexPositionAttribute=e.getAttribLocation(c,"vertexPosition"),e.enableVertexAttribArray(c.vertexPositionAttribute),c.uvPositionAttribute=e.getAttribLocation(c,"uvPosition"),e.enableVertexAttribArray(c.uvPositionAttribute),c.samplerUniform=e.getUniformLocation(c,"uSampler"),e.uniform1i(c.samplerUniform,0),c.uprightUniform=e.getUniformLocation(c,"uUpright"),e.uniform1f(c.uprightUniform,0),r&&r(e,this,c);break;case"override":case"particle":case"regular":default:c.vertexPositionAttribute=e.getAttribLocation(c,"vertexPosition"),e.enableVertexAttribArray(c.vertexPositionAttribute),c.uvPositionAttribute=e.getAttribLocation(c,"uvPosition"),e.enableVertexAttribArray(c.uvPositionAttribute),c.textureIndexAttribute=e.getAttribLocation(c,"textureIndex"),e.enableVertexAttribArray(c.textureIndexAttribute),c.alphaAttribute=e.getAttribLocation(c,"objectAlpha"),e.enableVertexAttribArray(c.alphaAttribute);for(var u=[],d=0;d<this._batchTextureCount;d++)u[d]=d;c.samplerData=u,c.samplerUniform=e.getUniformLocation(c,"uSampler"),e.uniform1iv(c.samplerUniform,u),c.pMatrixUniform=e.getUniformLocation(c,"pMatrix");break}return e.useProgram(this._activeShader),c},e._createShader=function(e,i,n){n=n.replace(/{{count}}/g,this._batchTextureCount);for(var s="",r=1;r<this._batchTextureCount;r++)s+="} else if (indexPicker <= "+r+".5) { color = texture2D(uSampler["+r+"], vTextureCoord);";n=n.replace(/{{alternates}}/g,s),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,s,r=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(r*i);for(n=0,s=o.length;n<s;n+=i)o[n]=o[n+1]=0;e.bufferData(e.ARRAY_BUFFER,o,e.DYNAMIC_DRAW),a.itemSize=i,a.numItems=r;var l=this._uvPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),i=2;var h=this._uvs=new Float32Array(r*i);for(n=0,s=h.length;n<s;n+=i)h[n]=h[n+1]=0;e.bufferData(e.ARRAY_BUFFER,h,e.DYNAMIC_DRAW),l.itemSize=i,l.numItems=r;var c=this._textureIndexBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,c),i=1;var u=this._indices=new Float32Array(r*i);for(n=0,s=u.length;n<s;n++)u[n]=0;e.bufferData(e.ARRAY_BUFFER,u,e.DYNAMIC_DRAW),c.itemSize=i,c.numItems=r;var d=this._alphaBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),i=1;var f=this._alphas=new Float32Array(r*i);for(n=0,s=f.length;n<s;n++)f[n]=1;e.bufferData(e.ARRAY_BUFFER,f,e.DYNAMIC_DRAW),d.itemSize=i,d.numItems=r},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 s=this._textureDictionary[n];if(s)s._batchID=this._batchID,s._storeID=n,s._imageData=e,this._insertTextureInBatch(t,s),e._storeID=n,e.complete||e.naturalWidth||e._isCanvas?this._updateTextureImageData(t,e):e.addEventListener("load",this._updateTextureImageData.bind(this,t,e));else{var r="Problem creating desired texture, known causes include using too much VRAM by not releasing WebGL texture instances";console.error&&console.error(r)||console.log(r),s=this._baseTextures[0],s._batchID=this._batchID,s._storeID=-1,s._imageData=s,this._insertTextureInBatch(t,s)}return s},e._updateTextureImageData=function(t,e){var n=e.width&e.width-1||e.height&e.height-1,s=this._textureDictionary[e._storeID];t.activeTexture(t.TEXTURE0+s._activeIndex),t.bindTexture(t.TEXTURE_2D,s),s.isPOT=!n,this.setTextureParams(t,s.isPOT);try{t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}catch(i){var r="\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(r),console.error(i)):console&&(console.log(r),console.log(i))}e._invalid=!1,s._w=e.width,s._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,s=n;do{if(this._batchTextures[s]._batchID!=this._batchID&&!this._slotBlacklist[s]){i=s;break}s=(s+1)%this._batchTextureCount}while(s!==n);-1===i&&(this.batchReason="textureOverflow",this._drawBuffers(t),this.batchCardCount=0,i=n),this._batchTextures[i]=e,e._activeIndex=i;var r=e._imageData;r&&r._invalid&&void 0!==e._drawID?this._updateTextureImageData(t,r):(t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e),this.setTextureParams(t)),this._lastTextureInsert=i}else{r=e._imageData;void 0!=e._storeID&&r&&r._invalid&&this._updateTextureImageData(t,r)}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 s,r=this._activeShader,a=this._slotBlacklist,o=this._maxTextureSlots-1,l=this._viewportWidth,h=this._viewportHeight;this.protectTextureSlot(o,!0);var c=e.getMatrix();c=c.clone(),c.scale(1/n.scale,1/n.scale),c=c.invert(),c.translate(-n.offX/n.scale*e.scaleX,-n.offY/n.scale*e.scaleY);var u=this._cacheContainer;u.children=[e],u.transformMatrix=c,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),s=e.cacheCanvas,t.bindFramebuffer(t.FRAMEBUFFER,s._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,h)),this._backupBatchTextures(!0),this.protectTextureSlot(o,!1),this._activeShader=r,this._slotBlacklist=a},e._drawFilters=function(t,e,i){var n,s=this._webGLContext,r=this._maxTextureSlots-1,a=this._viewportWidth,o=this._viewportHeight,l=this._cacheContainer,h=e.length;s.activeTexture(s.TEXTURE0+r),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),s.bindFramebuffer(s.FRAMEBUFFER,n._frameBuffer),this.updateViewport(i._drawWidth,i._drawHeight),s.clear(s.COLOR_BUFFER_BIT),this._batchDraw(l,s,!0),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,n),this.setTextureParams(s);var c=!1,u=0,d=e[u];do{this._activeShader=this.getFilterShader(d),this._activeShader&&(s.activeTexture(s.TEXTURE0+r),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),s.bindFramebuffer(s.FRAMEBUFFER,n._frameBuffer),s.viewport(0,0,i._drawWidth,i._drawHeight),s.clear(s.COLOR_BUFFER_BIT),this._drawCover(s,c),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,n),this.setTextureParams(s),(h>1||e[0]._multiPass)&&(c=!c),d=null!==d._multiPass?d._multiPass:e[++u])}while(d);this.isCacheControlled?(s.bindFramebuffer(s.FRAMEBUFFER,null),this.updateViewport(a,o),this._activeShader=this.getFilterShader(this),s.clear(s.COLOR_BUFFER_BIT),this._drawCover(s,c)):(c&&(s.activeTexture(s.TEXTURE0+r),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),s.bindFramebuffer(s.FRAMEBUFFER,n._frameBuffer),this._activeShader=this.getFilterShader(this),s.viewport(0,0,i._drawWidth,i._drawHeight),s.clear(s.COLOR_BUFFER_BIT),this._drawCover(s,!c)),s.bindFramebuffer(s.FRAMEBUFFER,null),this.updateViewport(a,o),t.cacheCanvas=n)},e._appendToBatchGroup=function(e,i,n,s,r){e._glMtx||(e._glMtx=new At.Matrix2D);var a,o,l,h,c=e._glMtx;c.copy(n),e.transformMatrix?c.appendMatrix(e.transformMatrix):c.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&&s)if(f.cacheCanvas&&!r||(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,g,v,b,y=f._glMtx;y.copy(c),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&&!r;if(2===f._webGLRenderStyle||w)m=!r&&f.cacheCanvas||f.image;else{if(1!==f._webGLRenderStyle)continue;if(g=f.spriteSheet.getFrame(f.currentFrame),null===g)continue;m=g.image}var x=this._uvs,E=this._vertices,C=this._indices,T=this._alphas;if(m){if(void 0===m._storeID)v=this._loadTextureImage(i,m),this._insertTextureInBatch(i,v);else{if(v=this._textureDictionary[m._storeID],!v){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}v._batchID!==this._batchID&&this._insertTextureInBatch(i,v)}if(_=v._activeIndex,2===f._webGLRenderStyle||w)!w&&f.sourceRect?(f._uvRect||(f._uvRect={}),b=f.sourceRect,p=f._uvRect,p.t=b.y/m.height,p.l=b.x/m.width,p.b=(b.y+b.height)/m.height,p.r=(b.x+b.width)/m.width,a=0,o=0,l=b.width+a,h=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,h=b._drawHeight/b.scale+o):(a=0,o=0,l=m.width+a,h=m.height+o));else if(1===f._webGLRenderStyle){var S=g.rect;p=g.uvRect,p||(p=t.buildUVRects(f.spriteSheet,f.currentFrame,!1)),a=-g.regX,o=-g.regY,l=S.width-g.regX,h=S.height-g.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+h*y.c+y.tx,E[L+3]=a*y.b+h*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+h*y.c+y.tx,E[L+11]=l*y.b+h*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]=_,T[R]=T[R+1]=T[R+2]=T[R+3]=T[R+4]=T[R+5]=f.alpha*s,this.batchCardCount++}}else this._appendToBatchGroup(f,i,c,f.alpha*s)}},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,s=this._textureIndexBuffer,r=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,s),e.vertexAttribPointer(i.textureIndexAttribute,s.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._indices),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(i.uvPositionAttribute,r.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,s=this._vertexPositionBuffer,r=this._uvPositionBuffer;e.clear(e.COLOR_BUFFER_BIT),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,s),e.vertexAttribPointer(n.vertexPositionAttribute,s.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,t.COVER_VERT),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(n.uvPositionAttribute,r.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 s=n.x,r=n.y,a=s+n.width,o=r+n.height,l=0,h=0,c=i.width,u=i.height;s<0&&(l-=s,s=0),a>c&&(a=c),r<0&&(h-=r,r=0),o>u&&(o=u),t.drawImage(i,s,r,a-s,o-r,l,h,a-s,o-r)}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,s=this._currentFrame;if(i){var r=i.speed||1,a=this.currentAnimationFrame;if(e=i.frames.length,a+t*r>=e){var o=i.next;if(this._dispatchAnimationEnd(i,s,n,o,e-1))return;if(o)return this._goto(o,t-(e-a)/r);this.paused=!0,a=i.frames.length-1}else a+=t*r;this.currentAnimationFrame=a,this._currentFrame=i.frames[0|a]}else if(s=this._currentFrame+=t,e=this.spriteSheet.getNumFrames(),s>=e&&e>0&&!this._dispatchAnimationEnd(i,s,n,e-1)&&(this._currentFrame-=e)>=e)return this._normalizeFrame();s=0|this._currentFrame,this.currentFrame!=s&&(this.currentFrame=s,this.dispatchEvent("change"))},e._dispatchAnimationEnd=function(t,e,i,n,s){var r=t?t.name:null;if(this.hasEventListener("animationend")){var a=new At.Event("animationend");a.name=r,a.next=n,this.dispatchEvent(a)}var o=this._animation!=t||this._currentFrame!=e;return o||i||!this.paused||(this.currentAnimationFrame=s,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,s=n*t.H_OFFSETS[this.textAlign||"left"],r=this.lineHeight||this.getMeasuredLineHeight(),a=r*t.V_OFFSETS[this.textBaseline||"top"];return this._rectangle.setValues(s,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 s=!!e;s||(e=t._workingContext,e.save(),this._prepContext(e));for(var r=this.lineHeight||this.getMeasuredLineHeight(),a=0,o=0,l=String(this.text).split(/(?:\r\n|\r|\n)/),h=0,c=l.length;h<c;h++){var u=l[h],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,_=f.length;p<_;p+=2){var m=e.measureText(f[p]+f[p+1]).width;d+m>this.lineWidth?(s&&this._drawTextLine(e,u,o*r),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+=m)}}s&&this._drawTextLine(e,u,o*r),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*r),s||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,s=this._oldProps,r=!1,a=this.spaceWidth,o=this.lineHeight,l=this.spriteSheet,h=t._spritePool,c=this.children,u=0,d=c.length;for(var f in s)s[f]!=this[f]&&(s[f]=this[f],r=!0);if(r){var p=!!this._getFrame(" ",l);p||a||(a=this._getSpaceWidth(l)),o||(o=this._getLineHeight(l));for(var _=0,m=this.text.length;_<m;_++){var g=this.text.charAt(_);if(" "!=g||p)if("\n"!=g&&"\r"!=g){var v=this._getFrameIndex(g,l);null!=v&&(u<d?e=c[u]:(c.push(e=h.length?h.pop():new At.Sprite),e.parent=this,d++),e.spriteSheet=l,e.gotoAndStop(v),e.x=i,e.y=n,u++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==g&&"\n"==this.text.charAt(_+1)&&_++,i=0,n+=o;else i+=a}while(d>u)h.push(e=c.pop()),e.parent=null,d--;h.length>t.maxPoolSize&&(h.length=t.maxPoolSize)}},At.BitmapText=At.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){function t(e){var i,n,s,r;this.Container_constructor(),!t.inited&&t.init(),e instanceof String||arguments.length>1?(i=e,n=arguments[1],s=arguments[2],r=arguments[3],null==s&&(s=-1),e=null):e&&(i=e.mode,n=e.startPosition,s=e.loop,r=e.labels),e||(e={labels:r}),this.mode=i||t.INDEPENDENT,this.startPosition=n||0,this.loop=!0===s?-1:s||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,s=n.framerate;while((n=n.parent)&&null===s)n.mode===i&&(s=n._framerate);if(this._framerate=s,!this.paused){var r=null!==s&&-1!==s&&null!==e?e/(1e3/s)+this._t:1,a=0|r;this._t=r-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,s=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,s.loop=this.loop,s.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,s=i.length;n<s;n++){var r=i[n],a=r.target;if(a!==this&&!r.passive){var o=r._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 h=l[n].id;1===this._managed[h]&&(this.removeChildAt(n),delete this._managed[h])}},e._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var n=t[i],s=n.t,r=n.p;for(var a in r)s[a]=r[a];this._addManagedChild(s,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,s){"startPosition"===n&&e.target instanceof t&&e._addPlugin(i)},i.step=function(t,e,i){},i.change=function(t,e,i,n,s,r){if("startPosition"===i)return 1===s?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 s=n.rect,r=t._workingCanvas;r.width=s.width,r.height=s.height,t._workingContext.drawImage(n.image,s.x,s.y,s.width,s.height,0,0,s.width,s.height);var a=document.createElement("img");return a.src=r.toDataURL("image/png"),a},t.addFlippedFrames=At.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),t.mergeAlpha=At.deprecate(null,"SpriteSheetUtils.mergeAlpha"),t._flip=function(e,i,n,s){for(var r=e._images,a=t._workingCanvas,o=t._workingContext,l=r.length/i,h=0;h<l;h++){var c=r[h];c.__tmp=h,o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width+1,a.height+1),a.width=c.width,a.height=c.height,o.setTransform(n?-1:1,0,0,s?-1:1,n?c.width:0,s?c.height:0),o.drawImage(c,0,0);var u=document.createElement("img");u.src=a.toDataURL("image/png"),u.width=c.width||c.naturalWidth,u.height=c.height||c.naturalHeight,r.push(u)}var d=e._frames,f=d.length/i;for(h=0;h<f;h++){c=d[h];var p=c.rect.clone();u=r[c.image.__tmp+l*i];var _={image:u,rect:p,regX:c.regX,regY:c.regY};n&&(p.x=(u.width||u.naturalWidth)-p.x-p.width,_.regX=p.width-c.regX),s&&(p.y=(u.height||u.naturalHeight)-p.y-p.height,_.regY=p.height-c.regY),d.push(_)}var m="_"+(n?"h":"")+(s?"v":""),g=e._animations,v=e._data,b=g.length/i;for(h=0;h<b;h++){var y=g[h];c=v[y];var w={name:y+m,speed:c.speed,next:c.next,frames:[]};c.next&&(w.next+=m),d=c.frames;for(var x=0,E=d.length;x<E;x++)w.frames.push(d[x]+f*i);v[w.name]=w,g.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,s,r){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:s,data:r,index:this._frames.length,height:a.height*n})-1):null},e.addAnimation=function(e,i,n,s){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:n,speed:s}},e.addMovieClip=function(e,i,n,s,r,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 h,c,u=this._frames.length,d=e.timeline.duration;for(h=0;h<d;h++){var f=o&&o[h]?o[h]:l;this.addFrame(e,f,n,this._setupMovieClipFrame,{i:h,f:s,d:r})}var p=e.timeline._labels,_=[];for(var m in p)_.push({index:p[m],label:m});if(_.length)for(_.sort((function(t,e){return t.index-e.index})),h=0,c=_.length;h<c;h++){for(var g=_[h].label,v=u+_[h].index,b=u+(h==c-1?d:_[h+1].index),y=[],w=v;w<b;w++)y.push(w);a&&(g=a(g,e,v,b),!g)||this.addAnimation(g,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 s=0,r=0,a=0;while(n.length){var o=this._fillRow(n,s,a,i,e);if(o.w>r&&(r=o.w),s+=o.h,!o.h||!n.length){var l=At.createCanvas?At.createCanvas():document.createElement("canvas");l.width=this._getSize(r,this.maxWidth),l.height=this._getSize(s,this.maxHeight),this._data.images[a]=l,o.h||(r=s=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,s,r){var a=this.maxWidth,o=this.maxHeight;i+=r;for(var l=o-i,h=r,c=0,u=e.length-1;u>=0;u--){var d=e[u],f=this._scale*d.scale,p=d.sourceRect,_=d.source,m=Math.floor(f*p.x-r),g=Math.floor(f*p.y-r),v=Math.ceil(f*p.height+2*r),b=Math.ceil(f*p.width+2*r);if(b>a)throw t.ERR_DIMENSIONS;v>l||h+b>a||(d.img=n,d.rect=new At.Rectangle(h,i,b,v),c=c||v,e.splice(u,1),s[d.index]=[h,i,b,v,n,Math.round(-m+f*_.regX-r),Math.round(-g+f*_.regY-r)],h+=b)}return{w:h,h:c}},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 s=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var r=new At.Event("progress");r.progress=s,this.dispatchEvent(r)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,n=t.sourceRect,s=this._data.images[t.img],r=s.getContext("2d");return t.funct&&t.funct(t.source,t.data),r.save(),r.beginPath(),r.rect(i.x,i.y,i.width,i.height),r.clip(),r.translate(Math.ceil(i.x-n.x*e),Math.ceil(i.y-n.y*e)),r.scale(e,e),t.source.draw(r),r.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),s=n.matrix,r=n.visible?"visible":"hidden";if(r!=i.visibility&&(i.visibility=r),n.visible){var a=this._oldProps,o=a&&a.matrix,l=1e4;if(!o||!o.equals(s)){var h="matrix("+(s.a*l|0)/l+","+(s.b*l|0)/l+","+(s.c*l|0)/l+","+(s.d*l|0)/l+","+(s.tx+.5|0);i.transform=i.WebkitTransform=i.OTransform=i.msTransform=h+","+(s.ty+.5|0)+")",i.MozTransform=h+"px,"+(s.ty+.5|0)+"px)",a||(a=this._oldProps=new At.DisplayProps(!0,null)),a.matrix.copy(s)}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,s,r,a,o){r=r||t,null==a&&(a=e),null==o&&(o=i);try{var l=t.getImageData(e,i,n,s)}catch(h){return!1}return!!this._applyFilter(l)&&(r.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 s=0;s<n;s++){var r=i[s];if(r&&r.getBounds){var a=r.getBounds();a&&(0==s?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,s,r,a){if(!t)throw"No symbol to cache";this._options=a,this.target=t,this.width=n>=1?n:1,this.height=s>=1?s:1,this.x=e||0,this.y=i||0,this.scale=r||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 s=e.getContext("2d");t||s.clearRect(0,0,this._drawWidth+1,this._drawHeight+1),s.save(),s.globalCompositeOperation=t,s.setTransform(this.scale,0,0,this.scale,-this._filterOffX,-this._filterOffY),s.translate(-this.x,-this.y),i.draw(s,!0),s.restore(),i.filters&&i.filters.length&&this._applyFilters(s)}e._invalid=!0},e._applyFilters=function(t){var e,i=this.target.filters,n=this._drawWidth,s=this._drawHeight,r=0,a=i[r];do{a.usesContext?(e&&(t.putImageData(e,0,0),e=null),a.applyFilter(t,0,0,n,s)):(e||(e=t.getImageData(0,0,n,s)),a._applyFilter(e)),a=null!==a._multiPass?a._multiPass:i[++r]}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 s=n/2|0,r=-s;r<=s;r++){var a=r/s*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 s=this.quality;(isNaN(s)||s<1)&&(s=1),s|=0,s>3&&(s=3),s<1&&(s=1);var r=e.data,a=0,o=0,l=0,h=0,c=0,u=0,d=0,f=0,p=0,_=0,m=0,g=0,v=0,b=0,y=0,w=i+i+1|0,x=n+n+1|0,E=0|e.width,C=0|e.height,T=E-1|0,S=C-1|0,R=i+1|0,L=n+1|0,I={r:0,b:0,g:0,a:0},O=I;for(l=1;l<w;l++)O=O.n={r:0,b:0,g:0,a:0};O.n=I;var A={r:0,b:0,g:0,a:0},k=A;for(l=1;l<x;l++)k=k.n={r:0,b:0,g:0,a:0};k.n=A;var D=null,P=0|t.MUL_TABLE[i],M=0|t.SHG_TABLE[i],B=0|t.MUL_TABLE[n],j=0|t.SHG_TABLE[n];while(s-- >0){d=u=0;var F=P,N=M;for(o=C;--o>-1;){for(f=R*(g=r[0|u]),p=R*(v=r[u+1|0]),_=R*(b=r[u+2|0]),m=R*(y=r[u+3|0]),O=I,l=R;--l>-1;)O.r=g,O.g=v,O.b=b,O.a=y,O=O.n;for(l=1;l<R;l++)h=u+((T<l?T:l)<<2)|0,f+=O.r=r[h],p+=O.g=r[h+1],_+=O.b=r[h+2],m+=O.a=r[h+3],O=O.n;for(D=I,a=0;a<E;a++)r[u++]=f*F>>>N,r[u++]=p*F>>>N,r[u++]=_*F>>>N,r[u++]=m*F>>>N,h=d+((h=a+i+1)<T?h:T)<<2,f-=D.r-(D.r=r[h]),p-=D.g-(D.g=r[h+1]),_-=D.b-(D.b=r[h+2]),m-=D.a-(D.a=r[h+3]),D=D.n;d+=E}for(F=B,N=j,a=0;a<E;a++){for(u=a<<2|0,f=L*(g=r[u])|0,p=L*(v=r[u+1|0])|0,_=L*(b=r[u+2|0])|0,m=L*(y=r[u+3|0])|0,k=A,l=0;l<L;l++)k.r=g,k.g=v,k.b=b,k.a=y,k=k.n;for(c=E,l=1;l<=n;l++)u=c+a<<2,f+=k.r=r[u],p+=k.g=r[u+1],_+=k.b=r[u+2],m+=k.a=r[u+3],k=k.n,l<S&&(c+=E);if(u=a,D=A,s>0)for(o=0;o<C;o++)h=u<<2,r[h+3]=y=m*F>>>N,y>0?(r[h]=f*F>>>N,r[h+1]=p*F>>>N,r[h+2]=_*F>>>N):r[h]=r[h+1]=r[h+2]=0,h=a+((h=o+L)<S?h:S)*E<<2,f-=D.r-(D.r=r[h]),p-=D.g-(D.g=r[h+1]),_-=D.b-(D.b=r[h+2]),m-=D.a-(D.a=r[h+3]),D=D.n,u+=E;else for(o=0;o<C;o++)h=u<<2,r[h+3]=y=m*F>>>N,y>0?(y=255/y,r[h]=(f*F>>>N)*y,r[h+1]=(p*F>>>N)*y,r[h+2]=(_*F>>>N)*y):r[h]=r[h+1]=r[h+2]=0,h=a+((h=o+L)<S?h:S)*E<<2,f-=D.r-(D.r=r[h]),p-=D.g-(D.g=r[h+1]),_-=D.b-(D.b=r[h+2]),m-=D.a-(D.a=r[h+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,s=e.length;n<s;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(s){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,s,r,a,o){return!this.mask||(r=r||t,null==a&&(a=e),null==o&&(o=i),r.save(),t==r&&(r.globalCompositeOperation="destination-in",r.drawImage(this.mask,a,o),r.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,s,r,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=s||0,this.greenOffset=r||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,s=.082;return this._multiplyMatrix([i*(1-e)+e,n*(1-e),s*(1-e),0,0,i*(1-e),n*(1-e)+e,s*(1-e),0,0,i*(1-e),n*(1-e),s*(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,s=.715,r=.072;return this._multiplyMatrix([n+e*(1-n)+i*-n,s+e*-s+i*-s,r+e*-r+i*(1-r),0,0,n+e*-n+.143*i,s+e*(1-s)+.14*i,r+e*-r+-.283*i,0,0,n+e*-n+i*-(1-n),s+e*-s+i*s,r+e*(1-r)+i*r,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,s=[];for(e=0;e<5;e++){for(i=0;i<5;i++)s[i]=this[i+5*e];for(i=0;i<5;i++){var r=0;for(n=0;n<5;n++)r+=t[i+5*n]*s[n];this[i+5*e]=r}}},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,s=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,s),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,s,r=t.data,a=r.length,o=this.matrix,l=o[0],h=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],_=o[7],m=o[8],g=o[9],v=o[10],b=o[11],y=o[12],w=o[13],x=o[14],E=o[15],C=o[16],T=o[17],S=o[18],R=o[19],L=0;L<a;L+=4)e=r[L],i=r[L+1],n=r[L+2],s=r[L+3],r[L]=e*l+i*h+n*c+s*u+d,r[L+1]=e*f+i*p+n*_+s*m+g,r[L+2]=e*v+i*b+n*y+s*w+x,r[L+3]=e*E+i*C+n*T+s*S+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,s=0,r=i.length;s<r;s++){var a=i[s],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,s=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;s[n]=!0,this._handleStart(t,n,e,e.pageX,e.pageY)}else s[n]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,n,e,e.pageX,e.pageY):"MSPointerUp"!=i&&"MSPointerCancel"!=i&&"pointerup"!=i&&"pointercancel"!=i||(delete s[n],this._handleEnd(t,n,e)))}},t._handleStart=function(t,e,i,n,s){var r=t.__touch;if(r.multitouch||!r.count){var a=r.pointers;a[e]||(a[e]=!0,r.count++,t._handlePointerDown(e,i,n,s))}},t._handleMove=function(t,e,i,n,s){t.__touch.pointers[e]&&t._handlePointerMove(e,i,n,s)},t._handleEnd=function(t,e,i){var n=t.__touch,s=n.pointers;s[e]&&(n.count--,t._handlePointerUp(e,i,!0),delete s[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||{};Ot.call(window);var kt=At,Dt=It["a"].EventDispatcher,Pt=It["a"].Event,Mt=It["a"].LoadQueue,Bt=kt.Bitmap,jt=kt.BitmapCache,Ft=kt.Stage,Nt=kt.Shape,Ut=kt.Container,Gt=function(t){if("object"!==Object(Lt["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 jt,e.bitmapCache.define(e,0,0,t.width,t.height)):(e.cache(0,0,t.width,t.height),t.canvasCache=e.cacheCanvas),e},Xt=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},Ht=function(){function t(e){Object(St["a"])(this,t);var i="string"===typeof e?document.getElementById(e):e;this._stage=new Ft(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(Rt["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.children.forEach((function(t){t.isVisible()&&t.update()})),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}(),Yt=Ht,Vt=(i("2397"),i("013f")),Wt=i("4e2b"),qt=i("308d"),$t=i("2a88"),zt=i("6bb5"),Jt=function(){function t(e){Object(St["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(Rt["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}(),Qt=Jt,Zt=function(){function t(){Object(St["a"])(this,t),this._pendingCalls=[],this._onFlushOnceListeners=[]}return Object(Rt["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(Lt["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:"resolveAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._pendingCalls.forEach((function(e){"object"===Object(Lt["a"])(e)&&"function"===typeof e.resolve&&e.resolve(t)})),this.__flushListeners()}},{key:"rejectAll",value:function(t){this._pendingCalls.forEach((function(e){"object"===Object(Lt["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}(),Kt=Zt,te=function(t,e,i,n){i[e]=i[t],i[t]=function(){this[e].apply(this,arguments);var i=Array.prototype.slice.call(arguments);ie.slaveCall(n,(function(e){e[t].apply(e,Object(l["a"])(i))}))}},ee=function(){function t(){Object(St["a"])(this,t),this.masterRefs=[],this.masterObjects={},this.slaveObjects={},this.pendingCalls=new Kt}return Object(Rt["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),te("setVisible","___setVisible",e,t),te("setProps","___setProps",e,t),te("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(Lt["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}(),ie=new ee,ne=ie,se=function(){function t(e){Object(St["a"])(this,t),this.width=e.width||0,this.height=e.height||0,this.__json=e,this._stageDisplay=new Ut,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._stage=null,this._mirror?ne.addSlave(this._mirror,this):this._ref&&ne.addMaster(this._ref,this),this._transformations=null,e.transform&&(this._transformations=new Qt(e.transform))}return Object(Rt["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:"isReady",value:function(){return!1}},{key:"setProps",value:function(t){}},{key:"update",value:function(){}},{key:"random",value:function(){}},{key:"release",value:function(){}},{key:"x",get:function(){return this._stageDisplay.x}},{key:"y",get:function(){return this._stageDisplay.y}}]),t}(),re=se,ae=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(St["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 Mt(!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 Dt}return Object(Rt["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 Pt(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 s=e._queueItems.find((function(e){return e.id===t}));s||(s={id:t,src:"".concat(e.baseURL||"").concat(t),crossOrigin:"Anonymous",listeners:[],queueId:e._queueItems.length%e._queues.length},e._queueItems.push(s)),s.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)?Xt(this.files[t]):Gt(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}(),oe=new ae,le=oe;function he(t){var e=ce();return function(){var i,n=Object(zt["a"])(t);if(e){var s=Object(zt["a"])(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Object(qt["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 ue=function(t){Object(Wt["a"])(i,t);var e=he(i);function i(t){var n,s,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(St["a"])(this,i),s=e.call(this,t),Object($t["a"])((n=Object(Vt["a"])(s),Object(zt["a"])(i.prototype)),"setVisible",n).call(n,!!t.visible),s.category=null,s.bmd=null,s.src=t.image,t.image="",s._pendingPromisses=new Kt,s._isImageAdded=!1,s._loaded=!1,le.isOnDemandMode()?(t.image=(le.baseURL||"./")+"thumbnails/"+s.src,!r&&s.isVisible()&&s.load()):r||s.load(),s}return Object(Rt["a"])(i,[{key:"update",value:function(){var t=this.getJsonBase();!t.image&&this.bmd&&this.bmd.bitmapCache&&!le.isOnDemandMode()&&(t.image=this.bmd.bitmapCache.getCacheDataURL())}},{key:"setVisible",value:function(t){Object($t["a"])(Object(zt["a"])(i.prototype),"setVisible",this).call(this,t),le.hasItem(this.src)||this.release(),!this.bmd&&this.isVisible()&&le.isOnDemandMode()&&this.load()}},{key:"release",value:function(){this.bmd&&this.bmd.uncache(),this.bmd=null,this._loaded=!1,this._isImageAdded=!1,this.removeAllChildren(),le.releaseItem(this.src)}},{key:"load",value:function(){var t=this;if(this._loaded||this._isImageAdded)return Promise.reject(new Error("Image loaded"));this.bmd=le.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.update()};return this.bmd?(e(),Promise.resolve()):new Promise((function(i,n){if(!t.isVisible()&&le.isOnDemandMode())return t._pendingPromisses.pushPromisse({resolve:i,reject:n});le.addToQueue(t.src).then((function(n){t.bmd=n.result,e(),i(),t._pendingPromisses.resolveAll()})).catch((function(e){n(e),t._pendingPromisses.rejectAll(e)})),le.isOnDemandMode()&&le.loadItems()}))}},{key:"isReady",value:function(){return this._loaded}}]),i}(re),de=ue;i("db97"),i("5df3");function fe(t){var e=pe();return function(){var i,n=Object(zt["a"])(t);if(e){var s=Object(zt["a"])(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Object(qt["a"])(this,i)}}function pe(){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(Wt["a"])(i,t);var e=fe(i);function i(t,n){var s,r,a;Object(St["a"])(this,i),a=e.call(this,t),Object($t["a"])((s=Object(Vt["a"])(a),Object(zt["a"])(i.prototype)),"setVisible",s).call(s,!!t.visible),Object($t["a"])((r=Object(Vt["a"])(a),Object(zt["a"])(i.prototype)),"setPosition",r).call(r,0,0),a.activeDisplay=-1,a.displays=[],a.colors=[],a._stage=n;var o=[];return t.children=t.children||[],t.children.forEach((function(t){if(t&&t.name&&t.image){var e=t.visible,i=new de(t,!0);i.setVisible(!1),a.addChild(i),a.displays.push(i),a.colors.push(t.name),e&&a._setActiveColor(t.name),le.isOnDemandMode()||o.push(i.load())}})),-1===a.activeDisplay&&a._setActiveColor(a.colors[0]),Promise.all(o).then((function(){return a.setProps({color:a.colors[a.activeDisplay]})})),a.getRef()&&ne.onFlushOnce((function(){return a.setProps({color:a.colors[a.activeDisplay]})})),a}return Object(Rt["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.colors.indexOf(t);-1!==e&&(this.displays.forEach((function(t){return t.setVisible(!1)})),this.displays[e].setVisible(this.isVisible()),this.activeDisplay=e,this.getJsonBase().image=this.displays[e].getJsonBase().image)}},{key:"setVisible",value:function(t){Object($t["a"])(Object(zt["a"])(i.prototype),"setVisible",this).call(this,t),this.displays[this.activeDisplay].setVisible(t)}},{key:"random",value:function(){Object($t["a"])(Object(zt["a"])(i.prototype),"random",this).call(this);var t=parseInt(Math.random()*this.colors.length);this.setProps({color:this.colors[t]})}},{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}(re),me=_e,ge={FIXED:"fixed",OPTIONAL:"optional",MIXED:"mixed",ICON:"icon",COLORPIKER:"color-picker",MOVE:"move",REF:"ref",MIRROR:"mirror",COLORGLOBAL:"enable-color-global",toArray:function(){var t=[];for(var e in this)t.push(ge[e]);return t}},ve=ge,be=new Dt,ye=function(){function t(e,i){var n=this;Object(St["a"])(this,t),this.id=e.id,this.isFixed=-1!==e.tags.indexOf(ve.FIXED),this.isMixed=-1!==e.tags.indexOf(ve.MIXED),this.isOptional=-1!==e.tags.indexOf(ve.OPTIONAL),this.children=[],this._button=new de(e),this.__useColorGlobal=-1!==e.tags.indexOf(ve.COLORGLOBAL),this.__isBusy=!1,this.__scope=e.colorGlobalScope,this.__useColorGlobal&&be.addEventListener(this.__scope,(function(t){var e=t.eventProps,i=t.eventTarget;n.__isBusy=!0,n.children.forEach((function(t){Object.is(i,t)||"function"!==typeof t.setProps||t.setProps(e)})),n.__isBusy=!1})),e.children=e.children||[],Object(l["a"])(e.children).reverse().forEach((function(t){if(t&&t.type){var e=null;switch(t.type){case"image":e=new de(t);break;case"color-picker":e=new me(t,i);break;default:return null}e&&(i.addChild(e),t.index=i.children.indexOf(e),e.category=n,n.children.push(e))}})),this.isFixed&&-1===this.children.findIndex((function(t){return t.isVisible()}))&&ne.onFlushOnce((function(){return n.random()}));var s=this.children.find((function(t){return t.isVisible()}));this.__useColorGlobal&&s&&"function"===typeof s.getActiveColor&&ne.onFlushOnce((function(){return s.setProps({color:s.getActiveColor()})}))}return Object(Rt["a"])(t,[{key:"fireSetPropsEvent",value:function(t,e){if(this.__useColorGlobal&&this.__scope&&!this.__isBusy&&t&&t.color){var i=new Pt(this.__scope);i.eventProps=t,i.eventTarget=e,be.dispatchEvent(i)}}},{key:"random",value:function(){if(0!==this.children.length){this.children.forEach((function(t){return t.setVisible(!1)}));var t=1;this.isMixed&&(t=this._randIndex());for(var e=0;e<t;e++){var i=this._randIndex()-1;this.isFixed&&-1===i&&(i=0),-1!==i&&this._setChildVisible(i)}}}},{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}},{key:"_setChildVisible",value:function(t){if(!(t>=this.children.length)){var e=this.children[t];e.setVisible(!0),"function"===typeof e.random&&e.random()}}},{key:"_randIndex",value:function(){return parseInt(Math.random()*(this.children.length+1))}}]),t}(),we=ye;function xe(t){var e=Ee();return function(){var i,n=Object(zt["a"])(t);if(e){var s=Object(zt["a"])(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return Object(qt["a"])(this,i)}}function Ee(){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 Ce=function(t){Object(Wt["a"])(i,t);var e=xe(i);function i(t,n){var s,r;return Object(St["a"])(this,i),r=e.call(this,t),Object($t["a"])((s=Object(Vt["a"])(r),Object(zt["a"])(i.prototype)),"setPosition",s).call(s,0,0),r._stage=n,r.children=[],t.children=t.children||[],Object(l["a"])(t.children).reverse().forEach((function(t){if(t&&t.type){var e=null;switch(t.type){case"image":e=new de(t);break;case"color-picker":e=new me(t,n);break;default:return null}e&&(r.addChild(e),r.children.push(e))}})),r}return Object(Rt["a"])(i,[{key:"isReady",value:function(){return-1===this.children.findIndex((function(t){return t.isVisible()&&!t.isReady()}))}}]),i}(re),Te=Ce,Se=i("768b"),Re=[],Le=[],Ie={},Oe=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})),s=Object(Se["a"])(n,4),r=s[0],a=s[1],o=s[2],l=s[3];if(r<0||a<0||o<0||l<0)return e('Layer "'.concat(t.name,'"(#').concat(t.id,") has a not allowed negative move parameter"));(r||a||o||l)&&(i||(t.transform={up:r>0?r:0,right:a>0?a:0,down:o>0?o:0,left:l>0?l:0}))}},Ae=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)))},ke=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!==Le.indexOf(n))return e('Layer "'.concat(t.name,'"(#').concat(t.id,') has a duplicate ref "').concat(n,'"'));i||(t.ref=n),Le.push(n),Ie[n]=t}},De=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;Be((function(){return-1===Le.indexOf(n)?e('Layer "'.concat(t.name,'"(#').concat(t.id,') try to use undefined ref "').concat(n,'"')):t.type!==Ie[n].type?e('Layer "'.concat(t.name,'"(#').concat(t.id,') need to be the same type of mirror ref "').concat(n,'"')):t.children.length!==Ie[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=Ie[n].visible))}))}},Pe=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(Se["a"])(i,2),s=n[0],r=n[1];return s=s.trim(),e[s]=r,s})),t._tagsProps=e}},Me=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];ke(t,e,i),De(t,e,i),Oe(t,e,i),Ae(t,e,i),delete t._tagsProps},Be=function(t){Re.push(t)},je=function(t){Re.forEach((function(e){"function"===typeof e&&e(t)})),Re=[],Le=[],Ie={}};ve.computeTagsProps=Pe,ve.prepareCustomTags=Me,ve.flushPendingCalls=je;var Fe,Ne=ve,Ue=function(){function t(e){Object(St["a"])(this,t),this.categories=[],this.stage=new Yt(e),this._events=new Dt}return Object(Rt["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,le.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||[],Ne.computeTagsProps(t),Ne.prepareCustomTags(t,i),delete t._tags)})),Ne.flushPendingCalls(i),this._events.dispatchEvent("loading"),this.stage.setManifest(e.gameWidth,e.gameHeight,e.bgColor),this.restore(),this.manifest=e,this.data=t,this._parseData()}},{key:"setBaseUrl",value:function(t){le.setBaseUrl(t)}},{key:"setOnDemandMode",value:function(t){le.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:"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(){var t=this;Object(l["a"])(this.data).reverse().forEach((function(e){if(e&&e.type){if("image"===e.type){var i=new de(e);return t.stage.addChild(i),void(e.index=t.stage.children.indexOf(i))}if("category"===e.type){var n=new we(e,t.stage);t.categories.push(n),e.index=t.categories.indexOf(n)}if("simple-layer"===e.type){var s=new Te(e,t.stage);t.stage.addChild(s),e.index=t.categories.indexOf(s)}}})),le.on("complete",(function(){t.update(!0),t._events.dispatchEvent("done")})),le.on("progress",(function(e){return t._events.dispatchEvent(e)})),le.on("start",(function(){return t._events.dispatchEvent("loading")})),le.loadItems(),ne.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}(),Ge=Ue,Xe=Ge;function He(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 Ye(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?He(Object(i),!0).forEach((function(e){Object(h["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ve,We={name:"Player",components:{GameWrapper:ft,GameCanvas:bt,ScrollDiv:L,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();Fe=new Xe(e),Fe.on("loading",(function(){t.loadingStatus="loading"})),Fe.on("done",(function(){t.loadingStatus=null,t.gameStarted||(t.selectedCategoryIndex=0,t.gameStarted=!0)})),Fe.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,s=t.tags,r=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:n,tags:s,owner:r,icon:a},e){var o=e.tagLinkResolver,l=e.ownerLinkResolver,h=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:l,siteHomeLink:h}}},startLoadingGame:function(){this.$emit("play",Ye({},this.welcomeScreenData)),this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(t,e,i){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.welcomeScreenData&&!this.welcomeScreenData.onPlay)return new Promise((function(r,a){n.welcomeScreenData.onPlay=function(){n.setData(t,e,i,s).then(r).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=s,Object(l["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(l["a"])(t.children))),n.categories.push(t))})),Fe.setData(t,this.manifest);var r=new Promise((function(t,e){Fe.once("done",(function(){t()}))}));return Fe.update(),r},setBaseUrl:function(t){Fe.setBaseUrl(t)},setOnDemandMode:function(t){Fe.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(){Fe.update(!0)}));for(var n=atob(i.split(",")[1]),s=[],r=0;r<n.length;r++)s.push(n.charCodeAt(r));var a=new Blob([new Uint8Array(s)],{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,Fe.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,Fe.disableAllItems(t.categoryId)):(this.selectedItem=t,Fe.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,Fe.randomItems()},handleSelectColorClick:function(t){Fe.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){Fe.transformItem(this.selectedItem,{action:t.source})}}},qe=We,$e=(i("936b"),Object(d["a"])(qe,a,o,!1,null,"21ef8cd6",null)),ze=($e.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,saveImage:t.saveImage,poweredByHref:t.siteHomeLink,transparent:t.transparent},on:{"prepare-save":t.handlePrepareSave,"cancel-save":t.handleCancelSave,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:!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}])})}),Je=[],Qe=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.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},on:{"click-cancel":t.exitSaveMode}}):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}}),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)},Ze=[],Ke=i("252c"),ti=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()},ei=[],ii=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)},ni=[],si={name:"Scrollable",components:{vuescroll:x.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;E(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}))}}},ri=si,ai=(i("ffb4"),Object(d["a"])(ri,ii,ni,!1,null,null,null)),oi=ai.exports,li=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)},hi=[],ci={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}}},ui=ci,di=(i("4a4b"),Object(d["a"])(ui,li,hi,!1,null,null,null)),fi=di.exports,pi={name:"ScrollableList",components:{ScrollableItem:fi,Scrollable:oi},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))}}},_i=pi,mi=(i("2f77"),Object(d["a"])(_i,ti,ei,!1,null,null,null)),gi=mi.exports,vi=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}})])},bi=[],yi={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":""]},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(","),")")}}},wi=yi,xi=(i("9668"),Object(d["a"])(wi,vi,bi,!1,null,"c3f49d50",null)),Ei=xi.exports,Ci=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()])},Ti=[],Si={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")}},Ri=Si,Li=(i("0577"),Object(d["a"])(Ri,Ci,Ti,!1,null,"59631dbe",null)),Ii=Li.exports,Oi=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loading-anim"},[i("LoadingEllipsis")],1)},Ai=[],ki=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},Di=[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")])}],Pi={name:"LoadingEllipsis"},Mi=Pi,Bi=(i("3305"),Object(d["a"])(Mi,ki,Di,!1,null,"6fbf8469",null)),ji=Bi.exports,Fi={name:"LoadingOverlay",components:{LoadingEllipsis:ji},props:{label:{type:String,default:""}}},Ni=Fi,Ui=(i("a770"),Object(d["a"])(Ni,Oi,Ai,!1,null,"dc965734",null)),Gi=Ui.exports,Xi=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")}}})],1)},Hi=[],Yi=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 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"}})]),i("span",[t._v("Save")])])},Vi=[],Wi=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=[],$i={name:"DefaultButton",computed:{color:function(){return"#ffffff"}},props:{backgroundColor:{type:String,default:"rgba(190, 190, 190, 1)"}}},zi=$i,Ji=(i("721f"),Object(d["a"])(zi,Wi,qi,!1,null,null,null)),Qi=(Ji.exports,i("1ab9")),Zi=i.n(Qi),Ki={isDark:function(t){var e=Zi.a.get.rgb(t),i=(299*e[0]+587*e[1]+114*e[2])/1e3;return i<128},isLight:function(t){return!this.isDark()}},tn=Ki,en={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 tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},nn=en,sn=(i("de9d"),Object(d["a"])(nn,Yi,Vi,!1,null,"a7d173f2",null)),rn=sn.exports,an=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")])])},on=[],ln={name:"SaveCancelButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnCancelSave||"#b0a9f9"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},hn=ln,cn=(i("9fbd"),Object(d["a"])(hn,an,on,!1,null,"4a0b90ea",null)),un=cn.exports,dn={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:rn,SaveCancelButton:un},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:""}}}},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}}}},fn=dn,pn=(i("e998"),Object(d["a"])(fn,Xi,Hi,!1,null,"56d844b4",null)),_n=pn.exports,mn=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)},gn=[],vn=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"}})])])},bn=[],yn={name:"ColorPickerButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnColorPicker||"#ffffff"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},wn=yn,xn=(i("c7c9"),Object(d["a"])(wn,vn,bn,!1,null,"65ebf5ce",null)),En=xn.exports,Cn={name:"ScrollableColorList",components:{ScrollableList:gi,ColorPickerButton:En},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)}}},Tn=Cn,Sn=(i("b57a"),Object(d["a"])(Tn,mn,gn,!1,null,null,null)),Rn=Sn.exports,Ln=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)},In=[],On=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 "}})])])},An=[],kn={name:"GamePadButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnGamePad||"#ffffff"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Dn=kn,Pn=(i("4d5c"),Object(d["a"])(Dn,On,An,!1,null,"63335e31",null)),Mn=Pn.exports,Bn={name:"GamePad",components:{GamePadButton:Mn},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})}}},jn=Bn,Fn=(i("96e8"),Object(d["a"])(jn,Ln,In,!1,null,"4b463b97",null)),Nn=Fn.exports,Un=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"}})])])},Gn=[],Xn={name:"SaveButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnSave||"#b0a9f9"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},Hn=Xn,Yn=(i("6be4"),Object(d["a"])(Hn,Un,Gn,!1,null,"cbcb9814",null)),Vn=Yn.exports,Wn=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"}})])])])},qn=[],$n={name:"RandomButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRandom||"#6eefd2"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},zn=$n,Jn=(i("db9b"),Object(d["a"])(zn,Wn,qn,!1,null,"7e4371b2",null)),Qn=Jn.exports,Zn=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"}})])])},Kn=[],ts={name:"ItemsBackButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnItemsBack||"#6a615c"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},es=ts,is=(i("1f0d"),Object(d["a"])(es,Zn,Kn,!1,null,"191b8a0d",null)),ns=is.exports,ss={WelcomeScreen:"welcome-screen",SaveScreen:"save-screen",Playng:"playng"},rs={components:{ResizeObserver:Ke["a"],ScrollableList:gi,LoadingEllipsis:ji,OverlayAnimation:Ei,LoadingOverlay:Gi,PoweredBy:Ii,SaveGameOverlay:_n,SaveButton:Vn,RandomButton:Qn,ItemsBackButton:ns,ScrollableColorList:Rn,GamePad:Nn},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===ss.WelcomeScreen||this.isLoadingGame},isLoadingGame:function(){return this.loading||this.debug.isLoadingGame},onWelcomeScreen:function(){return this.state===ss.WelcomeScreen||this.debug.onWelcomeScreen},onSaveScreen:function(){return this.state===ss.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:ss.WelcomeScreen},loading:{type:Boolean,default:!1},saveImage:{type:Object,default:function(){return null}},poweredByHref:{type:String,default:null},transparent:{type:Boolean,default:!0}},methods:{handleClickClose:function(){this.$emit("expanded",!1)},handleClickRandom:function(){this.$emit("random")},handleColor:function(t){this.$emit("color",t)},handleMove:function(t){this.$emit("gamepad",t)},enterSaveMode:function(t){this.$emit("prepare-save",t)},exitSaveMode:function(t){this.$emit("cancel-save",t)},onClickSave:function(t){this.$emit("save",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})}},as=rs,os=(i("3ca1"),i("319f"),i("e218"),i("0c68"),i("bc8f"),Object(d["a"])(as,Qe,Ze,!1,null,"cdda41ea",null)),ls=os.exports,hs=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"}})])])])},cs=[],us={name:"RemoveItemsButton",inject:["theme"],computed:{backgroundColor:function(){return this.theme&&this.theme.colors&&this.theme.colors.btnRemoveItems||"#f69bc5"},color:function(){return tn.isDark(this.backgroundColor)?"#f2f3f4":"#31393C"}}},ds=us,fs=(i("8f35"),Object(d["a"])(ds,hs,cs,!1,null,"9893c578",null)),ps=fs.exports,_s=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"}})])},ms=[],gs={name:"GameCanvas",props:{canvasWidth:{type:Number,default:0},canvasHeight:{type:Number,default:0}},methods:{getCanvas:function(){return this.$refs["display"]}}},vs=gs,bs=(i("07e9"),Object(d["a"])(vs,_s,ms,!1,null,"22bd89f0",null)),ys=bs.exports,ws=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)},xs=[],Es={name:"WelcomeScreen",components:{PoweredBy:Ii},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():""}}},Cs=Es,Ts=(i("276d"),Object(d["a"])(Cs,ws,xs,!1,null,"2dced4e4",null)),Ss=Ts.exports;function Rs(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 Ls(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Rs(Object(i),!0).forEach((function(e){Object(h["a"])(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Rs(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Is={name:"Player",components:{Theme:ls,ScrollableList:gi,GameCanvas:ys,WelcomeScreen:Ss,RemoveItemsButton:ps},data:function(){return{loading:!1,gameState:ss.WelcomeScreen,manifest:{gameWidth:9,gameHeight:16,bgColor:null},categories:[],selectedCategoryIndex:-1,selectedItem:null,welcomeScreenData:null,saveImage:null}},provide:function(){return{theme:this.theme}},mounted:function(){var t=this,e=this.$refs.display.getCanvas();Ve=new Xe(e),Ve.on("loading",(function(){t.loading=!0})),Ve.on("done",(function(){t.loading=!1,t.gameState!==ss.Playng&&(t.selectedCategoryIndex=0,t.gameState=ss.Playng)})),Ve.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,s=t.tags,r=t.owner,a=t.icon;if(this.welcomeScreenData={name:i,description:n,tags:s,owner:r,icon:a},e){var o=e.tagLinkResolver,l=e.ownerLinkResolver,h=e.siteHomeLink;this.welcomeScreenData.resolvers={tagLinkResolver:o,ownerLinkResolver:l,siteHomeLink:h}}},startLoadingGame:function(){this.$emit("play",Ls({},this.welcomeScreenData)),this.welcomeScreenData&&this.welcomeScreenData.onPlay&&this.welcomeScreenData.onPlay()},setData:function(t,e,i){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.manifest.gameWidth=e,this.manifest.gameHeight=i,this.manifest.bgColor=s,this.welcomeScreenData&&!this.welcomeScreenData.onPlay)return new Promise((function(r,a){n.welcomeScreenData.onPlay=function(){n.setData(t,e,i,s).then(r).catch(a),n.welcomeScreenData.onPlay=null}}));this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,Object(l["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(l["a"])(t.children))),n.categories.push(t))})),Ve.setData(t,this.manifest);var r=new Promise((function(t,e){Ve.once("done",(function(){t()}))}));return Ve.update(),r},setBaseUrl:function(t){Ve.setBaseUrl(t)},setOnDemandMode:function(t){Ve.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(){Ve.update(!0)}));for(var n=atob(i.split(",")[1]),s=[],r=0;r<n.length;r++)s.push(n.charCodeAt(r));var a=new Blob([new Uint8Array(s)],{type:t});return(window.URL||window.webkitURL).createObjectURL(a)},restore:function(){this.gameState=ss.WelcomeScreen,this.welcomeScreenData=null,this.categories=[],this.selectedItem=null,this.selectedCategoryIndex=-1,this.loading=!1,Ve.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,Ve.disableAllItems(t.categoryId)):(this.selectedItem=t,Ve.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.gameState=ss.SaveScreen,this.saveImage={name:"my-meiker-".concat((new Date).getTime()+""+parseInt(1e3*Math.random()),".png"),link:this.getDataImage("image/png")}},handleCancelSave:function(t){this.gameState=ss.Playng,this.saveImage&&(window.URL||window.webkitURL).revokeObjectURL(this.saveImage.link),this.selectedItem=null,this.saveImage=null},handleRandomClick:function(t){this.selectedItem=null,Ve.randomItems()},handleSelectColorClick:function(t){Ve.updateItemProps(this.selectedItem,{color:t})},handleGamePadClick:function(t){Ve.transformItem(this.selectedItem,{action:t.source})}}},Os=Is,As=Object(d["a"])(Os,ze,Je,!1,null,null,null),ks=As.exports,Ds=function(t){var e=t.delay,i=void 0===e?400:e,n=t.interval,s=void 0===n?50:n;return{bind:function(t,e,n){if("function"!==typeof e.value){var r=n.context.name,a="[longclick:] provided expression '".concat(e.expression,"' is not a function, but has to be");r&&(a+="Found in component '".concat(r,"' ")),console.warn(a)}var o=null,l=null,h=function(t){"click"===t.type&&0!==t.button||null===o&&(o=setTimeout((function(){s&&s>0&&(l=setInterval((function(){u()}),s)),u()}),i))},c=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,h)})),["click","mouseout","touchend","touchcancel"].forEach((function(e){return t.addEventListener(e,c)}))}}},Ps=Ds({delay:100,interval:50});n["default"].directive("clickandhold",Ps);var Ms=C();n["default"].directive("wheelblock",Ms);var Bs=ks,js=Bs,Fs=i("bc3a"),Ns=i.n(Fs),Us="meiker.io",Gs={name:"app",components:{Player:js},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(Us)},evtProxy:function(t){this.events&&"function"===typeof this.events[t]&&this.events[t]()},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=this;window.screen&&window.screen.orientation&&"function"===typeof window.screen.orientation.lock&&window.screen.orientation.lock("portrait").catch((function(){})),"function"===typeof window.meikerioLoader?(this.manifest=window.meikerioLoader(),this.events="function"===typeof window.meikerioEvents?window.meikerioEvents():{},this.checkSite()?(this.manifest&&this.manifest.theme&&(this.theme=this.manifest.theme,delete this.manifest.theme),this.visible=!0,Ns.a.get(this.manifest.data_url).then((function(e){t.dataJson=e.data;var i=t.manifest.owner.site&&t.manifest.owner.site.length>0&&t.manifest.owner.site[0]||null,n=t.manifest.game_id||null,s="utm_source=meiker_".concat(n),r="https";t.$refs.game.showWelcomeScreen(t.manifest,{tagLinkResolver:function(t){return"".concat(r,"://").concat(Us,"/games/tag/").concat(t,"?").concat(s)},ownerLinkResolver:function(t){return i?"".concat(r,"://").concat(i,"/?").concat(s):"".concat(r,"://").concat(Us,"/games/creator/").concat(t,"?").concat(s)},siteHomeLink:function(){return"".concat(r,"://").concat(Us,"/?").concat(s)}}),t.$refs.game.setOnDemandMode(!!t.manifest.thumbnails),t.$refs.game.setBaseUrl(t.manifest.base_url),t.$refs.game.setData(t.dataJson,t.manifest.canvas_width,t.manifest.canvas_height,"#000000")})).catch((function(){t.error="We had a problem to load the game, please refresh this page to try again."}))):this.error="We're sorry, the game you requested could not be found or not yet published."):this.error="We're sorry, the game you requested could not be found or not yet published."}},Xs=Gs,Hs=(i("034f"),Object(d["a"])(Xs,s,r,!1,null,null,null)),Ys=Hs.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(Ys)}}).$mount("#app")},"57ea":function(t,e,i){"use strict";var n=i("3111"),s=i.n(n);s.a},"5bb9":function(t,e,i){"use strict";var n=i("cd20"),s=i.n(n);s.a},"5da8":function(t,e,i){},"5fa9":function(t,e,i){"use strict";var n=i("085b"),s=i.n(n);s.a},"5fb1":function(t,e,i){"use strict";var n=i("4c0d"),s=i.n(n);s.a},"6be4":function(t,e,i){"use strict";var n=i("4165"),s=i.n(n);s.a},7094:function(t,e,i){},"721f":function(t,e,i){"use strict";var n=i("468d"),s=i.n(n);s.a},7495:function(t,e,i){},"78ab":function(t,e,i){"use strict";var n=i("7f10"),s=i.n(n);s.a},"7f10":function(t,e,i){},8291:function(t,e,i){},"843f":function(t,e,i){},"846e":function(t,e,i){},"8f35":function(t,e,i){"use strict";var n=i("9206"),s=i.n(n);s.a},"8ff9":function(t,e,i){},9206:function(t,e,i){},"936b":function(t,e,i){"use strict";var n=i("a558"),s=i.n(n);s.a},"964f":function(t,e,i){},9668:function(t,e,i){"use strict";var n=i("964f"),s=i.n(n);s.a},"96e8":function(t,e,i){"use strict";var n=i("bddc"),s=i.n(n);s.a},"9cac":function(t,e,i){},"9fbd":function(t,e,i){"use strict";var n=i("7495"),s=i.n(n);s.a},a558:function(t,e,i){},a770:function(t,e,i){"use strict";var n=i("2d1d"),s=i.n(n);s.a},ae02:function(t,e,i){},ae13:function(t,e,i){"use strict";var n=i("560f"),s=i.n(n);s.a},b244:function(t,e,i){},b57a:function(t,e,i){"use strict";var n=i("fad0"),s=i.n(n);s.a},bae3:function(t,e,i){},bc8f:function(t,e,i){"use strict";var n=i("bae3"),s=i.n(n);s.a},bddc:function(t,e,i){},c7c9:function(t,e,i){"use strict";var n=i("8ff9"),s=i.n(n);s.a},cd20:function(t,e,i){},cff5:function(t,e,i){},cfff:function(t,e,i){},d404:function(t,e,i){},d7db:function(t,e,i){"use strict";var n=i("cff5"),s=i.n(n);s.a},db9b:function(t,e,i){"use strict";var n=i("01ac"),s=i.n(n);s.a},dde5:function(t,e,i){},de9d:function(t,e,i){"use strict";var n=i("7094"),s=i.n(n);s.a},e218:function(t,e,i){"use strict";var n=i("cfff"),s=i.n(n);s.a},e998:function(t,e,i){"use strict";var n=i("557b"),s=i.n(n);s.a},e9b5:function(t,e,i){},fad0:function(t,e,i){},fc31:function(t,e,i){"use strict";var n=i("e9b5"),s=i.n(n);s.a},ffb4:function(t,e,i){"use strict";var n=i("9cac"),s=i.n(n);s.a}});