mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
22 lines
444 KiB
JavaScript
22 lines
444 KiB
JavaScript
|
!function(a,b){function c(a){var b=oa[a]={};return $.each(a.split(ba),function(a,c){b[c]=!0}),b}function d(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(qa,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:pa.test(d)?$.parseJSON(d):d}catch(f){}$.data(a,c,d)}else d=b}return d}function e(a){var b;for(b in a)if(("data"!==b||!$.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function f(){return!1}function g(){return!0}function h(a){return!a||!a.parentNode||11===a.parentNode.nodeType}function i(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function j(a,b,c){if(b=b||0,$.isFunction(b))return $.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return $.grep(a,function(a,d){return a===b===c});if("string"==typeof b){var d=$.grep(a,function(a){return 1===a.nodeType});if(Ka.test(b))return $.filter(b,d,!c);b=$.filter(b,d)}return $.grep(a,function(a,d){return $.inArray(a,b)>=0===c})}function k(a){var b=Na.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function l(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function m(a,b){if(1===b.nodeType&&$.hasData(a)){var c,d,e,f=$._data(a),g=$._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)$.event.add(b,c,h[c][d])}g.data&&(g.data=$.extend({},g.data))}}function n(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),$.support.html5Clone&&a.innerHTML&&!$.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Xa.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text),b.removeAttribute($.expando))}function o(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function p(a){Xa.test(a.type)&&(a.defaultChecked=a.checked)}function q(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=qb.length;e--;)if(b=qb[e]+c,b in a)return b;return d}function r(a,b){return a=b||a,"none"===$.css(a,"display")||!$.contains(a.ownerDocument,a)}function s(a,b){for(var c,d,e=[],f=0,g=a.length;g>f;f++)c=a[f],c.style&&(e[f]=$._data(c,"olddisplay"),b?(e[f]||"none"!==c.style.display||(c.style.display=""),""===c.style.display&&r(c)&&(e[f]=$._data(c,"olddisplay",w(c.nodeName)))):(d=cb(c,"display"),e[f]||"none"===d||$._data(c,"olddisplay",d)));for(f=0;g>f;f++)c=a[f],c.style&&(b&&"none"!==c.style.display&&""!==c.style.display||(c.style.display=b?e[f]||"":"none"));return a}function t(a,b,c){var d=jb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function u(a,b,c,d){for(var e=c===(d?"border":"content")?4:"width"===b?1:0,f=0;4>e;e+=2)"margin"===c&&(f+=$.css(a,c+pb[e],!0)),d?("content"===c&&(f-=parseFloat(cb(a,"padding"+pb[e]))||0),"margin"!==c&&(f-=parseFloat(cb(a,"border"+pb[e]+"Width"))||0)):(f+=parseFloat(cb(a,"padding"+pb[e]))||0,"padding"!==c&&(f+=parseFloat(cb(a,"border"+pb[e]+"Width"))||0));return f}function v(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e=!0,f=$.support.boxSizing&&"border-box"===$.css(a,"boxSizing");if(0>=d){if(d=cb(a,b),(0>d||null==d)&&(d=a.style[b]),kb.test(d))return d;e=f&&($.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+u(a,b,c||(f?"border":"content"),e)+"px"}function w(a){if(mb[a])return mb[a];var b=$("<"+a+">").appendTo(P.body),c=b.css("display");return b.remove(),("none"===c||""===c)&&(db=P.body.appendChild(db||$.extend(P.createElement("iframe"),{frameBorder:0,width:0,height:0})),eb&&db.createElement||(eb=(db.contentWindow||db.contentDocument).document,eb.write("<!doctype html><html><body>"),eb.close()),b=eb.body.appendChild(eb.createElement(a)),c=cb(b,"display"),P
|
||
|
c):void 0}})}),$.attrHooks.contenteditable={get:ra.get,set:function(a,b,c){""===b&&(b="false"),ra.set(a,b,c)}}),$.support.hrefNormalized||$.each(["href","src","width","height"],function(a,c){$.attrHooks[c]=$.extend($.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null===d?b:d}})}),$.support.style||($.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),$.support.optSelected||($.propHooks.selected=$.extend($.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),$.support.enctype||($.propFix.enctype="encoding"),$.support.checkOn||$.each(["radio","checkbox"],function(){$.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),$.each(["radio","checkbox"],function(){$.valHooks[this]=$.extend($.valHooks[this],{set:function(a,b){return $.isArray(b)?a.checked=$.inArray($(a).val(),b)>=0:void 0}})});var Ba=/^(?:textarea|input|select)$/i,Ca=/^([^\.]*|)(?:\.(.+)|)$/,Da=/(?:^|\s)hover(\.\S+|)\b/,Ea=/^key/,Fa=/^(?:mouse|contextmenu)|click/,Ga=/^(?:focusinfocus|focusoutblur)$/,Ha=function(a){return $.event.special.hover?a:a.replace(Da,"mouseenter$1 mouseleave$1")};$.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;if(3!==a.nodeType&&8!==a.nodeType&&c&&d&&(g=$._data(a))){for(d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=$.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return"undefined"==typeof $||a&&$.event.triggered===a.type?b:$.event.dispatch.apply(h.elem,arguments)},h.elem=a),c=$.trim(Ha(c)).split(" "),j=0;j<c.length;j++)k=Ca.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),q=$.event.special[l]||{},l=(f?q.delegateType:q.bindType)||l,q=$.event.special[l]||{},n=$.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),p=i[l],p||(p=i[l]=[],p.delegateCount=0,q.setup&&q.setup.call(a,e,m,h)!==!1||(a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h))),q.add&&(q.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?p.splice(p.delegateCount++,0,n):p.push(n),$.event.global[l]=!0;a=null}},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=$.hasData(a)&&$._data(a);if(q&&(m=q.events)){for(b=$.trim(Ha(b||"")).split(" "),f=0;f<b.length;f++)if(g=Ca.exec(b[f])||[],h=i=g[1],j=g[2],h){for(n=$.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l=0;l<o.length;l++)p=o[l],!e&&i!==p.origType||c&&c.guid!==p.guid||j&&!j.test(p.namespace)||d&&d!==p.selector&&("**"!==d||!p.selector)||(o.splice(l--,1),p.selector&&o.delegateCount--,n.remove&&n.remove.call(a,p));0===o.length&&k!==o.length&&(n.teardown&&n.teardown.call(a,j,q.handle)!==!1||$.removeEvent(a,h,q.handle),delete m[h])}else for(h in m)$.event.remove(a,h+b[f],c,d,!0);$.isEmptyObject(m)&&(delete q.handle,$.removeData(a,"events",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,f){if(!e||3!==e.nodeType&&8!==e.nodeType){var g,h,i,j,k,l,m,n,o,p,q=c.type||c,r=[];if(!Ga.test(q+$.event.triggered)&&(q.indexOf("!")>=0&&(q=q.slice(0,-1),h=!0),q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),e&&!$.event.customEvent[q]||$.event.global[q]))if(c="object"==typeof c?c[$.expando]?c:new $.Event(q,c):new $.Event(q),c.type=q,c.isTrigger=!0,c.exclusive=h,c.namespace=r.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l=q.indexOf(":")<0?"on"+q:"",e){if(c.result=b,c.target||(c.target=e),d=null!=d?$.makeArray(d):[],d.unshift(c),m=$.event.special[q]||{},!m.trigger||m.trigger.apply(e,d)!==!1){if(o=[[e,m.bindType||q]],!f&&!m.noBubble&&!$.isWindow(e)){for(p=m.delegateType||q,j=Ga.test(p+q)?e:e.parentNode,k=e;j;j=j.parentNode)o.push([j,p]),k=j;k===(e.ownerDocument||P)&&o.push([k.defaultView||k.parentWindow||a,p])}for(i=0;i<o.length&&!c.isPropagationStopped();i++)j=o[i][0],c.type=o[i][1],n=($._data(j,"events")|
|
||
|
|
||
|
_a.optgroup=_a.option,_a.tbody=_a.tfoot=_a.colgroup=_a.caption=_a.thead,_a.th=_a.td,$.support.htmlSerialize||(_a._default=[1,"X<div>","</div>"]),$.fn.extend({text:function(a){return $.access(this,function(a){return a===b?$.text(this):this.empty().append((this[0]&&this[0].ownerDocument||P).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if($.isFunction(a))return this.each(function(b){$(this).wrapAll(a.call(this,b))});if(this[0]){var b=$(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each($.isFunction(a)?function(b){$(this).wrapInner(a.call(this,b))}:function(){var b=$(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=$.isFunction(a);return this.each(function(c){$(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){$.nodeName(this,"body")||$(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!h(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=$.clean(arguments);return this.pushStack($.merge(a,this),"before",this.selector)}},after:function(){if(!h(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=$.clean(arguments);return this.pushStack($.merge(this,a),"after",this.selector)}},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||$.filter(a,[c]).length)&&(b||1!==c.nodeType||($.cleanData(c.getElementsByTagName("*")),$.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)for(1===a.nodeType&&$.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return $.clone(this,a,b)})},html:function(a){return $.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Oa,""):b;if(!("string"!=typeof a||Ua.test(a)||!$.support.htmlSerialize&&Wa.test(a)||!$.support.leadingWhitespace&&Pa.test(a)||_a[(Ra.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Qa,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&($.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return h(this[0])?this.length?this.pushStack($($.isFunction(a)?a():a),"replaceWith",a):this:$.isFunction(a)?this.each(function(b){var c=$(this),d=c.html();c.replaceWith(a.call(this,b,d))}):("string"!=typeof a&&(a=$(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;$(this).remove(),b?$(b).before(a):$(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],m=this.length;if(!$.support.checkClone&&m>1&&"string"==typeof j&&Ya.test(j))return this.each(function(){$(this).domManip(a,c,d)});if($.isFunction(j))return this.each(function(e){var f=$(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){if(e=$.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,1===g.childNodes.length&&(g=f),f)for(c=c&&$.nodeName(f,"tr"),h=e.cacheable||m-1;m>i;i++)d.call(c&&$.nodeName(this[i],"table")?l(this[i],"tbody"):this[i],i===h?g:$.clone(g,!0,!0));g=f=null,k.length&&$.each(k,function(a,b){b.src?$.ajax?$.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):$.error("no ajax"):$.globalEval((b.text||b.textContent||b.innerHTML||"").replace($a,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),$.bu
|
||
|
|
||
|
var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)}})}(jQuery),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c,d=0;null!=(c=b[d]);d++)try{a(c).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){for(var e,f,g=d.call(arguments,1),h=0,i=g.length;i>h;h++)for(e in g[h])f=g[h][e],g[h].hasOwnProperty(e)&&f!==b&&(a.isPlainObject(f)?c[e]=a.isPlainObject(c[e])?a.widget.extend({},c[e],f):a.widget.extend({},f):c[e]=f);return c},a.widget.bridge=function(c,e){var f=e.prototype.widgetFullName||c;a.fn[c]=function(g){var h="string"==typeof g,i=d.call(arguments,1),j=this;return g=!h&&i.length?a.widget.extend.apply(null,[g].concat(i)):g,this.each(h?function(){var d,e=a.data(this,f);return e?a.isFunction(e[g])&&"_"!==g.charAt(0)?(d=e[g].apply(e,i),d!==e&&d!==b?(j=d&&d.jquery?j.pushStack(d.get()):d,!1):void 0):a.error("no such method '"+g+"' for "+c+" widget instance"):a.error("cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'")}:function(){var b=a.data(this,f);b?b.option(g||{})._init():a.data(this,f,new e(g,this))}),j}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var e,f,g,h=c;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof c)if(h={},e=c.split("."),c=e.shift(),e.length){for(f=h[c]=a.widget.extend({},this.options[c]),g=0;g<e.length-1;g++)f[e[g]]=f[e[g]]||{},f=f[e[g]];if(c=e.pop(),d===b)return f[c]===b?null:f[c];f[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];h[c]=d}return this._setOptions(h),this},_setOptions:function(a){var b;f
|
||
|
|
||
|
}}.call(this,this.containers[c])),this.containers[c].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!b){for(this._trigger("beforeStop",a,this._uiHash()),c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!1}if(b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!b){for(c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})}(jQuery),function(a){var b=a({});a.subscribe=function(){b.on.apply(b,arguments)},a.unsubscribe=function(){b.off.apply(b,arguments)},a.publish=function(){b.trigger.apply(b,arguments)}}(jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(e="hover"==this.options.trigger?"mouseenter":"focus",f="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){switch(a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight,b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var c=this.tip();return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.remove(),this},fixTitle:function(){var a=this.$element;(a.attr("title")|
|
||
|
this.delay=Math.round(100/a)},g.prototype.setDispose=function(a){a>=0&&(this.dispose=a)},g.prototype.setRepeat=function(a){this.repeat=a},g.prototype.setTransparent=function(a){this.transparent=a},g.prototype.addFrame=function(a){this.image=a,this.getImagePixels(),this.analyzePixels(),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.writePixels(),this.firstFrame=!1},g.prototype.finish=function(){this.out.writeByte(59)},g.prototype.setQuality=function(a){1>a&&(a=1),this.sample=a},g.prototype.setPreserveColors=function(a){this.preserveColors=a},g.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},g.prototype.analyzePixels=function(){var a=this.pixels.length,b=a/3;this.indexedPixels=new Uint8Array(b);var c;c=this.preserveColors?new i(this.pixels,this.sample):new h(this.pixels,this.sample),c.buildColormap(),this.colorTab=c.getColormap();for(var d=0,e=0;b>e;e++){var f=c.lookupRGB(255&this.pixels[d++],255&this.pixels[d++],255&this.pixels[d++]);this.usedEntry[f]=!0,this.indexedPixels[e]=f}this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent))},g.prototype.findClosest=function(a){if(null===this.colorTab)return-1;for(var b=(16711680&a)>>16,c=(65280&a)>>8,d=255&a,e=0,f=16777216,g=this.colorTab.length,h=0;g>h;){var i=b-(255&this.colorTab[h++]),j=c-(255&this.colorTab[h++]),k=d-(255&this.colorTab[h]),l=i*i+j*j+k*k,m=parseInt(h/3);this.usedEntry[m]&&f>l&&(f=l,e=m),h++}return e},g.prototype.getImagePixels=function(){var a=this.width,b=this.height;this.pixels=new Uint8Array(a*b*3);for(var c=this.image,d=0,e=0;b>e;e++)for(var f=0;a>f;f++){var g=e*a*4+4*f;this.pixels[d++]=c[g],this.pixels[d++]=c[g+1],this.pixels[d++]=c[g+2]}},g.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4);var a,b;null===this.transparent?(a=0,b=0):(a=1,b=2),this.dispose>=0&&(b=7&dispose),b<<=2,this.out.writeByte(0|b|0|a),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},g.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(this.firstFrame?0:128|this.palSize)},g.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},g.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},g.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var a=768-this.colorTab.length,b=0;a>b;b++)this.out.writeByte(0)},g.prototype.writeShort=function(a){this.out.writeByte(255&a),this.out.writeByte(a>>8&255)},g.prototype.writePixels=function(){var a=new j(this.width,this.height,this.indexedPixels,this.colorDepth);a.encode(this.out)},g.prototype.stream=function(){return this.out},a.exports=g}),b.define("/LZWEncoder.js",function(a,b,c,d){function e(a,b,c,d){function e(a,b){y[s++]=a,s>=254&&n(b)}function j(a){k(h),C=v+2,D=!0,q(v,a)}function k(a){for(var b=0;a>b;++b)z[b]=-1}function l(a,b){var c,d,e,i,l,m,n;for(u=a,D=!1,n_bits=u,t=o(n_bits),v=1<<a-1,w=v+1,C=v+2,s=0,i=p(),n=0,c=h;65536>c;c*=2)++n;n=8-n,m=h,k(m),q(v,b);a:for(;(d=p())!=f;)if(c=(d<<g)+i,e=d<<n^i,z[e]!==c){if(z[e]>=0){l=m-e,0===e&&(l=1);do if((e-=l)<0&&(e+=m),z[e]===c){i=A[e];continue a}while(z[e]>=0)}q(i,b),i=d,1<<g>C?(A[e]=C++,z[e]=c):j(b)}else i=A[e];q(i,b),q(w,b)}function m(c){c.writeByte(x),remaining=a*b,curPixel=0,l(x+1,c),c.writeByte(0)}function n(a){s>0&&(a.writeByte(s),a.writeBytes(y,0,s),s=0)}function o(a){return(1<<a)-1}function p(){if(0===remaining)return f;--remaining;var a=c[curPixel++];return 255&a}function q(a,b){for(r&=i[B],B>0?r|=a<<B:r=a,B+=n_bits;B>=8;)e(255&r,b),r>>=8,
|
||
|
b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];else delete this.files[a];return this},generate:function(a){a=r(a||{},{base64:!0,compression:"STORE",type:"base64"}),f.checkSupport(a.type);var b,c,d=[],e=0,h=0;for(var k in this.files)if(this.files.hasOwnProperty(k)){var l=this.files[k],m=l.options.compression||a.compression.toUpperCase(),n=j[m];if(!n)throw new Error(m+" is not a valid compression method !");var o=w.call(this,l,n),p=x.call(this,k,l,o,e);e+=p.fileRecord.length+o.compressedSize,h+=p.dirRecord.length,d.push(p)}var s="";s=g.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+q(d.length,2)+q(d.length,2)+q(h,4)+q(e,4)+"\x00\x00";var t=a.type.toLowerCase();for(b="uint8array"===t||"arraybuffer"===t||"blob"===t||"nodebuffer"===t?new z(e+h+s.length):new y(e+h+s.length),c=0;c<d.length;c++)b.append(d[c].fileRecord),b.append(d[c].compressedObject.compressedContent);for(c=0;c<d.length;c++)b.append(d[c].dirRecord);b.append(s);var u=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return f.transformTo(a.type.toLowerCase(),u);case"blob":return f.arrayBuffer2Blob(f.transformTo("arraybuffer",u));case"base64":return a.base64?i.encode(u):u;default:return u}},crc32:function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==f.getTypeOf(a),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965
|
||
|
var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0<r[h]&&(j+=d(this,r[h])),g=e(this,b),i=t[g],0<v[g]&&(i+=d(this,v[g])),f>=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.t=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0<r[h]&&(j+=d(this,r[h])),g=e(this,b),i=t[g],0<v[g]&&(i+=d(this,v[g])),f+j>k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.v=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.r&&(f+=a.r)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=e<i.length?i.length+e:i.length<<1):d=i.length*f,h?(b=new Uint8Array(d),b.set(i)):b=i,this.b=b},c.prototype.m=function(){var a,b,c,d,e,f=0,g=this.b,i=this.g,j=new(h?Uint8Array:Array)(this.k+(this.a-32768));if(0===i.length)return h?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(b=0,c=i.length;c>b;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.s=function(){var a,b=this.a;return h?this.q?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.u);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),function(a,b,c){function d(a,b,c){for(var d=[],e=0;e<a.length;e++){var f=u(a[e]),g=f.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";g+=u.equals(b,a[e])?" sp-thumb-active":"";var h=q?"background-color:"+f.toRgbString():"filter:"+f.toFilter();d.push('<span title="'+f.toRgbString()+'" data-color="'+f.toRgbString()+'" class="'+g+'"><span class="sp-thumb
|
||
|
|
||
|
}function i(a){b.notify({index:f,value:a})}var j=a[f];c++,p(j,g,h,i)},void 0),b.promise}function L(a){return p(a,function(a){return a=$(a,k),p(J($(a,function(a){return p(a,U,U)})),function(){return a})})}function M(a){return k(a).allSettled()}function N(a,b){return k(a).then(void 0,void 0,b)}function O(a,b){return k(a).nodeify(b)}var P=!1;try{throw new Error}catch(Q){P=!!Q.stack}var R,S,T=i(),U=function(){},V=function(){function a(){for(;b.next;){b=b.next;var c=b.task;b.task=void 0;var e=b.domain;e&&(b.domain=void 0,e.enter());try{c()}catch(g){if(f)throw e&&e.exit(),setTimeout(a,0),e&&e.enter(),g;setTimeout(function(){throw g},0)}e&&e.exit()}d=!1}var b={task:void 0,next:null},c=b,d=!1,e=void 0,f=!1;if(V=function(a){c=c.next={task:a,domain:f&&process.domain,next:null},d||(d=!0,e())},"undefined"!=typeof process&&process.nextTick)f=!0,e=function(){process.nextTick(a)};else if("function"==typeof setImmediate)e="undefined"!=typeof window?setImmediate.bind(window,a):function(){setImmediate(a)};else if("undefined"!=typeof MessageChannel){var g=new MessageChannel;g.port1.onmessage=function(){e=h,g.port1.onmessage=a,a()};var h=function(){g.port2.postMessage(0)};e=function(){setTimeout(a,0),h()}}else e=function(){setTimeout(a,0)};return V}(),W=Function.call,X=a(Array.prototype.slice),Y=a(Array.prototype.reduce||function(a,b){var c=0,d=this.length;if(1===arguments.length)for(;;){if(c in this){b=this[c++];break}if(++c>=d)throw new TypeError}for(;d>c;c++)c in this&&(b=a(b,this[c],c));return b}),Z=a(Array.prototype.indexOf||function(a){for(var b=0;b<this.length;b++)if(this[b]===a)return b;return-1}),$=a(Array.prototype.map||function(a,b){var c=this,d=[];return Y(c,function(e,f,g){d.push(a.call(b,f,g,c))},void 0),d}),_=Object.create||function(a){function b(){}return b.prototype=a,new b},aa=a(Object.prototype.hasOwnProperty),ba=Object.keys||function(a){var b=[];for(var c in a)aa(a,c)&&b.push(c);return b},ca=a(Object.prototype.toString);S="undefined"!=typeof ReturnValue?ReturnValue:function(a){this.value=a};var da="From previous event:";k.resolve=k,k.nextTick=V,k.longStackSupport=!1,"object"==typeof process&&process&&process.env&&process.env.Q_DEBUG&&(k.longStackSupport=!0),k.defer=l,l.prototype.makeNodeResolver=function(){var a=this;return function(b,c){b?a.reject(b):a.resolve(arguments.length>2?X(arguments,1):c)}},k.Promise=m,k.promise=m,m.race=n,m.all=J,m.reject=z,m.resolve=k,k.passByCopy=function(a){return a},o.prototype.passByCopy=function(){return this},k.join=function(a,b){return k(a).join(b)},o.prototype.join=function(a){return k([this,a]).spread(function(a,b){if(a===b)return a;throw new Error("Can't join: not the same: "+a+" "+b)})},k.race=n,o.prototype.race=function(){return this.then(k.race)},k.makePromise=o,o.prototype.toString=function(){return"[object Promise]"},o.prototype.then=function(a,b,c){function e(b){try{return"function"==typeof a?a(b):b}catch(c){return z(c)}}function f(a){if("function"==typeof b){d(a,h);try{return b(a)}catch(c){return z(c)}}return z(a)}function g(a){return"function"==typeof c?c(a):a}var h=this,i=l(),j=!1;return k.nextTick(function(){h.promiseDispatch(function(a){j||(j=!0,i.resolve(e(a)))},"when",[function(a){j||(j=!0,i.resolve(f(a)))}])}),h.promiseDispatch(void 0,"when",[void 0,function(a){var b,c=!1;try{b=g(a)}catch(d){if(c=!0,!k.onerror)throw d;k.onerror(d)}c||i.notify(b)}]),i.promise},k.tap=function(a,b){return k(a).tap(b)},o.prototype.tap=function(a){return a=k(a),this.then(function(b){return a.fcall(b).thenResolve(b)})},k.when=p,o.prototype.thenResolve=function(a){return this.then(function(){return a})},k.thenResolve=function(a,b){return k(a).thenResolve(b)},o.prototype.thenReject=function(a){return this.then(function(){throw a})},k.thenReject=function(a,b){return k(a).thenReject(b)},k.nearer=q,k.isPromise=r,k.isPromiseAlike=s,k.isPending=t,o.prototype.isPending=function(){return"pending"===this.inspect().state},k.isFulfilled=u,o.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},k.isRejected=v,o.prototype.isRejected=function(){return"rejected"===this.inspect().state};
|
||
|
|
||
|
e&&a.push(e);var f=b+1,g=c.getFrameAt(f);return g&&a.push(g),a},a.OnionSkinRenderer.prototype.computeHash_=function(a){var b=this.getOffset(),c=this.getDisplaySize(),d=this.piskelController.getLayers();return[this.getZoom(),this.getGridWidth(),b.x,b.y,c.width,c.height,a.map(function(a){return a.getHash()}).join("-"),d.length].join("-")},a.OnionSkinRenderer.prototype.setDisplaySize=function(a,b){var c=this.getDisplaySize();(c.width!==a||c.height!==b)&&this.superclass.setDisplaySize.call(this,a,b)},a.OnionSkinRenderer.prototype.flush=function(){this.hash=""}}(),function(){var a=$.namespace("pskl.rendering.frame");a.TiledFrameRenderer=function(a,b){this.container=a,this.setZoom(b);var c=a.get(0),d=c.ownerDocument;this.displayContainer=d.createElement("div"),this.displayContainer.classList.add("tiled-frame-container"),a.get(0).appendChild(this.displayContainer),this.cachedFrameProcessor=new pskl.model.frame.CachedFrameProcessor,this.cachedFrameProcessor.setFrameProcessor(this.frameToDataUrl_.bind(this))},a.TiledFrameRenderer.prototype.frameToDataUrl_=function(a){var b=new pskl.utils.FrameUtils.toImage(a,this.zoom);return b.toDataURL("image/png")},a.TiledFrameRenderer.prototype.render=function(a){var b=this.cachedFrameProcessor.get(a,this.zoom);this.displayContainer.style.backgroundImage="url("+b+")"},a.TiledFrameRenderer.prototype.show=function(){this.displayContainer&&(this.displayContainer.style.display="block")},a.TiledFrameRenderer.prototype.setZoom=function(a){this.zoom=a},a.TiledFrameRenderer.prototype.getZoom=function(){return this.zoom}}(),function(){var a=$.namespace("pskl.rendering.frame");a.CachedFrameRenderer=function(a,b,c){pskl.rendering.frame.FrameRenderer.call(this,a,b,c),this.serializedFrame=""},pskl.utils.inherit(pskl.rendering.frame.CachedFrameRenderer,pskl.rendering.frame.FrameRenderer),a.CachedFrameRenderer.prototype.setDisplaySize=function(a,b){(this.displayWidth!==a||this.displayHeight!==b)&&this.superclass.setDisplaySize.call(this,a,b)},a.CachedFrameRenderer.prototype.render=function(a){var b=this.getOffset(),c=this.getDisplaySize(),d=[this.getZoom(),this.getGridWidth(),b.x,b.y,c.width,c.height,a.getHash()].join("-");this.serializedFrame!=d&&(this.serializedFrame=d,this.superclass.render.call(this,a))}}(),function(){var a=$.namespace("pskl.rendering");a.CanvasRenderer=function(a,b){this.frame=a,this.zoom=b,this.transparentColor_="white"},a.CanvasRenderer.prototype.drawTransparentAs=function(a){this.transparentColor_=a},a.CanvasRenderer.prototype.render=function(){for(var a=this.createCanvas_(),b=a.getContext("2d"),c=0,d=this.frame.getWidth();d>c;c++)for(var e=0,f=this.frame.getHeight();f>e;e++){for(var g=this.frame.getPixel(c,e),h=1;g===this.frame.getPixel(c,e+h);)h++;this.renderLine_(g,c,e,h,b),e=e+h-1}var i=this.createCanvas_(this.zoom),j=i.getContext("2d");return pskl.utils.CanvasUtils.disableImageSmoothing(i),j.scale(this.zoom,this.zoom),j.drawImage(a,0,0),i},a.CanvasRenderer.prototype.renderPixel_=function(a,b,c,d){a==Constants.TRANSPARENT_COLOR&&(a=this.transparentColor_),d.fillStyle=a,d.fillRect(b,c,1,1)},a.CanvasRenderer.prototype.renderLine_=function(a,b,c,d,e){a==Constants.TRANSPARENT_COLOR&&(a=this.transparentColor_),e.fillStyle=a,e.fillRect(b,c,1,d)},a.CanvasRenderer.prototype.createCanvas_=function(a){a=a||1;var b=this.frame.getWidth()*a,c=this.frame.getHeight()*a;return pskl.utils.CanvasUtils.createCanvas(b,c)}}(),function(){var a=$.namespace("pskl.rendering");a.FramesheetRenderer=function(a){if(!(a.length>0))throw"FramesheetRenderer : Invalid argument : frames is empty";this.frames=a},a.FramesheetRenderer.prototype.renderAsCanvas=function(){for(var a=this.createCanvas_(),b=0;b<this.frames.length;b++){var c=this.frames[b];this.drawFrameInCanvas_(c,a,b*c.getWidth(),0)}return a},a.FramesheetRenderer.prototype.drawFrameInCanvas_=function(a,b,c,d){var e=b.getContext("2d");a.forEachPixel(function(a,b,f){a!=Constants.TRANSPARENT_COLOR&&(e.fillStyle=a,e.fillRect(b+c,f+d,1,1))})},a.FramesheetRenderer.prototype.createCanvas_=function(){var a=this.frames[0],b=this.frames.length,c=b*a.getWidth(),d
|
||
|
|
||
|
},a.LayersListController.prototype.onClick_=function(a){var b,c=a.target||a.srcElement;c.classList.contains("button")?this.onButtonClick_(c):c.classList.contains("layer-item")&&(b=c.dataset.layerIndex,this.piskelController.setCurrentLayerIndex(parseInt(b,10)))},a.LayersListController.prototype.renameCurrentLayer_=function(){var a=this.piskelController.getCurrentLayer(),b=window.prompt("Please enter the layer name",a.getName());if(b){var c=this.piskelController.getCurrentLayerIndex();this.piskelController.renameLayerAt(c,b),this.renderLayerList_()}},a.LayersListController.prototype.mergeDownCurrentLayer_=function(){var a=this.piskelController.getCurrentLayerIndex();this.piskelController.mergeDownLayerAt(a),this.renderLayerList_()},a.LayersListController.prototype.onButtonClick_=function(a){var b=a.getAttribute("data-action");"up"==b?this.piskelController.moveLayerUp():"down"==b?this.piskelController.moveLayerDown():"add"==b?this.piskelController.createLayer():"delete"==b?this.piskelController.removeCurrentLayer():"merge"==b?this.mergeDownCurrentLayer_():"edit"==b&&this.renameCurrentLayer_()},a.LayersListController.prototype.toggleLayerPreview_=function(){var a=pskl.UserSettings.get(pskl.UserSettings.LAYER_PREVIEW);pskl.UserSettings.set(pskl.UserSettings.LAYER_PREVIEW,!a)}}(),function(){var a=$.namespace("pskl.controller.preview"),b="Piskel - preview";a.PopupPreviewController=function(a){this.piskelController=a,this.popup=null,this.renderer=null,this.renderFlag=!1},a.PopupPreviewController.prototype.init=function(){pskl.utils.Event.addEventListener(window,"unload",this.onMainWindowUnload_,this)},a.PopupPreviewController.prototype.isOpen=function(){return!!this.popup},a.PopupPreviewController.prototype.open=function(){this.isOpen()?this.popup.focus():(this.popup=window.open("about:blank","","width=320,height=320"),this.popup.document.body.innerHTML=pskl.utils.Template.get("popup-preview-partial"),window.setTimeout(this.onPopupLoaded.bind(this),500))},a.PopupPreviewController.prototype.onPopupLoaded=function(){this.popup.document.title=b,pskl.utils.Event.addEventListener(this.popup,"resize",this.onWindowResize_,this),pskl.utils.Event.addEventListener(this.popup,"unload",this.onPopupClosed_,this);var a=this.popup.document.querySelector(".preview-container");this.renderer=new pskl.rendering.frame.TiledFrameRenderer($(a)),this.updateZoom_(),this.renderFlag=!0},a.PopupPreviewController.prototype.render=function(a){this.isOpen()&&this.renderer&&(this.renderer.render(a),this.renderFlag=!1)},a.PopupPreviewController.prototype.onWindowResize_=function(a){this.updateZoom_(),this.renderFlag=!0},a.PopupPreviewController.prototype.updateZoom_=function(){var a=this.popup.document.documentElement,b=a.clientWidth/this.piskelController.getWidth(),c=a.clientHeight/this.piskelController.getHeight(),d=Math.min(b,c);this.renderer.setZoom(d);var e=this.piskelController.getHeight()*d,f=this.piskelController.getWidth()*d,g=this.popup.document.querySelector(".preview-container");g.style.height=e+"px",g.style.width=f+"px";var h=(a.clientHeight-e)/2;g.style.marginTop=h+"px",g.style.marginBottom=h+"px";var i=(a.clientWidth-f)/2;g.style.marginLeft=i+"px",g.style.marginRight=i+"px"},a.PopupPreviewController.prototype.onPopupClosed_=function(){this.popup;this.popup=null},a.PopupPreviewController.prototype.onMainWindowUnload_=function(){this.isOpen()&&this.popup.close()}}(),function(){var a=$.namespace("pskl.controller.preview"),b=200;a.PreviewController=function(b,c){this.piskelController=b,this.container=c,this.elapsedTime=0,this.currentIndex=0,this.renderFlag=!0,this.fpsRangeInput=$("#preview-fps"),this.fpsCounterDisplay=$("#display-fps"),this.setFPS(Constants.DEFAULT.FPS);this.piskelController.getCurrentFrame();this.renderer=new pskl.rendering.frame.TiledFrameRenderer(this.container),this.popupPreviewController=new a.PopupPreviewController(b)},a.PreviewController.prototype.init=function(){this.fpsRangeInput.on("input change",this.onFPSSliderChange.bind(this)),document.querySelector(".right-column").style.width=Constants.ANIMATED_PREVIEW_WIDTH+"px",th
|
||
|
|
||
|
},a.GifExportController.prototype.onImageUploadCompleted_=function(a){this.updatePreview_(a),this.updateStatus_(a),this.previewContainerEl.classList.remove("preview-upload-ongoing")},a.GifExportController.prototype.onImageUploadFailed_=function(a,b){500===b.status&&$.publish(Events.SHOW_NOTIFICATION,[{content:"Upload failed : "+b.responseText,hideDelay:5e3}])},a.GifExportController.prototype.updatePreview_=function(a){this.previewContainerEl.innerHTML='<div><img style="max-width:32px;"src="'+a+'"/></div>'},a.GifExportController.prototype.getZoom_=function(){return parseInt(this.widthInput.value,10)/this.piskelController.getWidth()},a.GifExportController.prototype.renderAsImageDataAnimatedGIF=function(a,b,d){for(var e=pskl.app.currentColorsService.getCurrentColors(),f=e.length<c,g=this.getTransparentColor(e),h=new window.GIF({workers:5,quality:1,width:this.piskelController.getWidth()*a,height:this.piskelController.getHeight()*a,preserveColors:f,transparent:parseInt(g.substring(1),16)}),i=0;i<this.piskelController.getFrameCount();i++){var j=this.piskelController.getFrameAt(i),k=new pskl.rendering.CanvasRenderer(j,a);k.drawTransparentAs(g);var l=k.render();h.addFrame(l.getContext("2d"),{delay:1e3/b})}$.publish(Events.SHOW_PROGRESS,[{name:"Building animated GIF ..."}]),h.on("progress",function(a){$.publish(Events.UPDATE_PROGRESS,[{progress:(100*a).toFixed(1)}])}.bind(this)),h.on("finished",function(a){$.publish(Events.HIDE_PROGRESS),pskl.utils.FileUtils.readFile(a,d)}.bind(this)),h.render()},a.GifExportController.prototype.getTransparentColor=function(a){var b=pskl.utils.ColorUtils.getUnusedColor(a);return b||(console.error("Unable to find unused color to use as transparent color in the current sprite"),b=e),b},a.GifExportController.prototype.updateStatus_=function(a,c){if(a){var d='<a class="image-link" href="{{link}}" target="_blank">{{shortLink}}</a>',e=pskl.utils.Template.replace(d,{link:a,shortLink:this.shorten_(a,b,"...")});this.uploadStatusContainerEl.innerHTML="Your image is now available at : "+e}},a.GifExportController.prototype.shorten_=function(a,b,c){if(a.length>b){var d=Math.round((b-c.length)/2),e=a.substring(0,d),f=a.substring(a.length-d,a.length);a=e+c+f}return a}}(),function(){var a=$.namespace("pskl.controller.settings.exportimage"),b=60;a.PngExportController=function(a){this.piskelController=a},pskl.utils.inherit(a.PngExportController,pskl.controller.settings.AbstractSettingController),a.PngExportController.prototype.init=function(){this.pngFilePrefixInput=document.getElementById("zip-prefix-name"),this.pngFilePrefixInput.value="sprite_";var a=document.querySelector(".png-download-button");this.addEventListener(a,"click",this.onPngDownloadButtonClick_);var b=document.querySelector(".zip-generate-button");this.addEventListener(b,"click",this.onZipButtonClick_)},a.PngExportController.prototype.onPngDownloadButtonClick_=function(a){var b=this.getPiskelName_()+".png";pskl.utils.BlobUtils.canvasToBlob(this.getFramesheetAsCanvas(),function(a){pskl.utils.FileUtils.downloadAsFile(a,b)})},a.PngExportController.prototype.onZipButtonClick_=function(){for(var a=new window.JSZip,b=0;b<this.piskelController.getFrameCount();b++){var c=this.piskelController.getFrameAt(b),d=this.getFrameAsCanvas_(c),e=this.pngFilePrefixInput.value,f=e+(b+1)+".png";a.file(f,pskl.utils.CanvasUtils.getBase64FromCanvas(d)+"\n",{base64:!0})}var g=this.getPiskelName_()+".zip",h=a.generate({type:"blob"});pskl.utils.FileUtils.downloadAsFile(h,g)},a.PngExportController.prototype.getFrameAsCanvas_=function(a){var b=new pskl.rendering.CanvasRenderer(a,1);return b.drawTransparentAs(Constants.TRANSPARENT_COLOR),b.render()},a.PngExportController.prototype.getPiskelName_=function(){return this.piskelController.getPiskel().getDescriptor().name},a.PngExportController.prototype.getFramesheetAsCanvas=function(){var a=new pskl.rendering.PiskelRenderer(this.piskelController);return a.renderAsCanvas()},a.PngExportController.prototype.updateStatus_=function(a,c){if(a){var d='<a class="image-link" href="{{link}}" target="_blank">{{shortLink}}</a>',e=pskl.utils.
|
||
|
var a=this.currentDialog_;if(a){a.controller.destroy();var b=this.currentDialog_.id;window.setTimeout(function(){this.dialogContainer_.classList.remove(b)}.bind(this),800)}this.hideDialogWrapper_(),this.currentDialog_=null},a.DialogsController.prototype.hideDialogWrapper_=function(){pskl.app.shortcutService.removeShortcut("ESC"),this.dialogWrapper_.classList.remove("show")},a.DialogsController.prototype.isDisplayed=function(){return null!==this.currentDialog_}}(),function(){var a=$.namespace("pskl.widgets"),b="#000000";a.ColorsList=function(a){this.selectedIndex=-1,this.palette=new pskl.model.Palette("tmp","tmp",[]),this.container=a,this.colorsList=this.container.querySelector(".colors-list"),this.colorPreviewEl=this.container.querySelector(".color-preview"),$(a).sortable({placeholder:"colors-list-drop-proxy",update:this.onColorDrop_.bind(this),items:".create-palette-color"}),this.colorsList.addEventListener("click",this.onColorContainerClick_.bind(this));var b=a.querySelector(".color-picker-container");this.hslRgbColorPicker=new pskl.widgets.HslRgbColorPicker(b,this.onColorUpdated_.bind(this)),this.hslRgbColorPicker.init()},a.ColorsList.prototype.setColors=function(a){0===a.length&&a.push(b),this.palette.setColors(a),this.selectColor_(0),this.refresh_()},a.ColorsList.prototype.getColors=function(){return this.palette.getColors()},a.ColorsList.prototype.destroy=function(){this.hslRgbColorPicker.destroy(),this.container=null,this.colorsList=null,this.colorPreviewEl=null},a.ColorsList.prototype.refreshColorElement_=function(a){var b=this.palette.get(this.selectedIndex),c=document.querySelector('[data-palette-index="'+a+'"]');c&&(c.style.background=b,c.classList.toggle("light-color",this.isLight_(b)))},a.ColorsList.prototype.onColorContainerClick_=function(a){var b=a.target;b.classList.contains("create-palette-color")?this.onPaletteColorClick_(a,b):b.classList.contains("create-palette-new-color")?this.onNewColorClick_(a,b):b.classList.contains("create-palette-remove-color")&&this.onRemoveColorClick_(a,b),this.refresh_()},a.ColorsList.prototype.onColorUpdated_=function(a){var b=a.toRgbString();this.colorPreviewEl.style.background=b,this.palette&&(this.palette.set(this.selectedIndex,b),this.refreshColorElement_(this.selectedIndex))},a.ColorsList.prototype.onPaletteColorClick_=function(a,b){var c=parseInt(b.dataset.paletteIndex,10);this.selectColor_(c)},a.ColorsList.prototype.onRemoveColorClick_=function(a,b){var c=b.parentNode,d=parseInt(c.dataset.paletteIndex,10);this.removeColor_(d)},a.ColorsList.prototype.onNewColorClick_=function(a,b){var c=this.palette.get(this.selectedIndex)||"#000000";this.palette.add(c),this.selectColor_(this.palette.size()-1)},a.ColorsList.prototype.refresh_=function(){var a="",b=pskl.utils.Template.get("create-palette-color-template"),c=this.palette.getColors();c.forEach(function(c,d){var e=d===this.selectedIndex;a+=pskl.utils.Template.replace(b,{color:c,index:d,":selected":e,":light-color":this.isLight_(c)})}.bind(this)),a+='<li class="create-palette-new-color">+</li>',this.colorsList.innerHTML=a},a.ColorsList.prototype.selectColor_=function(a){this.selectedIndex=a,this.hslRgbColorPicker.setColor(this.palette.get(a))},a.ColorsList.prototype.removeColor_=function(a){this.palette.removeAt(a),this.refresh_()},a.ColorsList.prototype.isLight_=function(a){var b=window.tinycolor(a).toRgb();return b.r+b.b+b.g>384},a.ColorsList.prototype.onColorDrop_=function(a,b){var c=b.item.get(0),d=parseInt(c.dataset.paletteIndex,10),e=$(".create-palette-color").index(b.item);this.palette.move(d,e),this.selectedIndex=e,this.refresh_()}}(),function(){var a=$.namespace("pskl.widgets");a.HslRgbColorPicker=function(a,b){this.container=a,this.colorUpdatedCallback=b,this.tinyColor=null,this.hsvColor=null,this.rgbColor=null,this.lastInputTimestamp_=0},a.HslRgbColorPicker.prototype.init=function(){var a=pskl.utils.UserAgent.isChrome||pskl.utils.UserAgent.isFirefox,b=a?"input":"change";this.container.addEventListener(b,this.onPickerChange_.bind(this)),this.container.addEventListener("keydown",this.onKeydown_.bind(this)),this.co
|
||
|
pskl.app.shortcutService.addShortcut("ESC",this.hideCheatsheet_.bind(this)),this.cheatsheetEl.style.display="block",this.isDisplayed=!0},a.CheatsheetService.prototype.hideCheatsheet_=function(){pskl.app.shortcutService.removeShortcut("ESC"),this.cheatsheetEl.style.display="none",this.isDisplayed=!1},a.CheatsheetService.prototype.initMarkup_=function(){this.initMarkupForTools_(),this.initMarkupForMisc_(),this.initMarkupForSelection_()},a.CheatsheetService.prototype.initMarkupForTools_=function(){var a=pskl.app.toolController.tools.map(function(a){return this.toDescriptor_(a.shortcut,a.instance.getHelpText(),"tool-icon "+a.instance.toolId)}.bind(this)),b=this.cheatsheetEl.querySelector(".cheatsheet-tool-shortcuts");this.initMarkupForDescriptors_(a,b)},a.CheatsheetService.prototype.initMarkupForMisc_=function(){var a=[this.toDescriptor_("0","Reset zoom level"),this.toDescriptor_("+/-","Zoom in/Zoom out"),this.toDescriptor_("X","Swap primary/secondary colors"),this.toDescriptor_("D","Reset default colors"),this.toDescriptor_("ctrl + Z","Undo"),this.toDescriptor_("ctrl + Y","Redo"),this.toDescriptor_("↑","Select previous frame"),this.toDescriptor_("↓","Select next frame"),this.toDescriptor_("N","Create new frame"),this.toDescriptor_("shift + N","Duplicate selected frame"),this.toDescriptor_("shift + ?","Open/Close this popup"),this.toDescriptor_("alt + P","Create a Palette"),this.toDescriptor_("</>","Select previous/next palette color"),this.toDescriptor_("alt + O","Toggle Onion Skin"),this.toDescriptor_("alt + L","Toggle Layer Preview")],b=this.cheatsheetEl.querySelector(".cheatsheet-misc-shortcuts");this.initMarkupForDescriptors_(a,b)},a.CheatsheetService.prototype.initMarkupForSelection_=function(){var a=[this.toDescriptor_("ctrl + X","Cut selection"),this.toDescriptor_("ctrl + C","Copy selection"),this.toDescriptor_("ctrl + V","Paste selection"),this.toDescriptor_("del","Delete selection")],b=this.cheatsheetEl.querySelector(".cheatsheet-selection-shortcuts");this.initMarkupForDescriptors_(a,b)},a.CheatsheetService.prototype.toDescriptor_=function(a,b,c){return pskl.utils.UserAgent.isMac&&(a=a.replace("ctrl","cmd")),{shortcut:a,description:b,icon:c}},a.CheatsheetService.prototype.initMarkupForDescriptors_=function(a,b){a.forEach(function(a){var c=this.getDomFromDescriptor_(a);b.appendChild(c)}.bind(this))},a.CheatsheetService.prototype.getDomFromDescriptor_=function(a){var b=pskl.utils.Template.get("cheatsheet-shortcut-template"),c=pskl.utils.Template.replace(b,{shortcutIcon:a.icon,shortcutDescription:a.description,shortcutKey:a.shortcut});return pskl.utils.Template.createFromHTML(c)}}(),function(){var a=$.namespace("pskl.service");a.ImageUploadService=function(){},a.ImageUploadService.prototype.init=function(){},a.ImageUploadService.prototype.upload=function(a,b,c){var d={data:a},e=function(a){b(Constants.IMAGE_SERVICE_GET_URL+a.responseText)};pskl.utils.Xhr.post(Constants.IMAGE_SERVICE_UPLOAD_URL,d,e,c)}}(),function(){var a=$.namespace("pskl.service");a.CurrentColorsService=function(a){this.piskelController=a,this.cache={},this.currentColors=[],this.cachedFrameProcessor=new pskl.model.frame.AsyncCachedFrameProcessor,this.cachedFrameProcessor.setFrameProcessor(this.getFrameColors_.bind(this)),this.paletteService=pskl.app.paletteService},a.CurrentColorsService.prototype.init=function(){$.subscribe(Events.HISTORY_STATE_SAVED,this.updateCurrentColors_.bind(this)),$.subscribe(Events.HISTORY_STATE_LOADED,this.loadColorsFromCache_.bind(this))},a.CurrentColorsService.prototype.getCurrentColors=function(){return this.currentColors},a.CurrentColorsService.prototype.setCurrentColors=function(a){var b=pskl.app.historyService.currentIndex;this.cache[b]=a,a.join("")!==this.currentColors.join("")&&(this.currentColors=a,$.publish(Events.CURRENT_COLORS_UPDATED))},a.CurrentColorsService.prototype.isCurrentColorsPaletteSelected_=function(){var a=pskl.UserSettings.get(pskl.UserSettings.SELECTED_PALETTE),b=this.paletteService.getPaletteById(a);return b.id===Constants.CURRENT_COLORS_PALETTE_ID},a.CurrentColorsService.prot
|
||
|
this.corePiskelController.init(),this.piskelController=new pskl.controller.piskel.PublicPiskelController(this.corePiskelController),this.piskelController.init(),this.paletteImportService=new pskl.service.palette.PaletteImportService,this.paletteService=new pskl.service.palette.PaletteService,this.paletteService.addDynamicPalette(new pskl.service.palette.CurrentColorsPalette),this.paletteController=new pskl.controller.PaletteController,this.paletteController.init(),this.currentColorsService=new pskl.service.CurrentColorsService(this.piskelController),this.currentColorsService.init(),this.palettesListController=new pskl.controller.PalettesListController(this.paletteController,this.currentColorsService),this.palettesListController.init(),this.cursorCoordinatesController=new pskl.controller.CursorCoordinatesController(this.piskelController),this.cursorCoordinatesController.init(),this.drawingController=new pskl.controller.DrawingController(this.piskelController,this.paletteController,$("#drawing-canvas-container")),this.drawingController.init(),this.previewController=new pskl.controller.preview.PreviewController(this.piskelController,$("#animated-preview-canvas-container")),this.previewController.init(),this.minimapController=new pskl.controller.MinimapController(this.piskelController,this.previewController,this.drawingController,$(".minimap-container")),this.minimapController.init(),this.framesListController=new pskl.controller.FramesListController(this.piskelController,$("#preview-list")),this.framesListController.init(),this.layersListController=new pskl.controller.LayersListController(this.piskelController),this.layersListController.init(),this.settingsController=new pskl.controller.settings.SettingsController(this.piskelController),this.settingsController.init(),this.dialogsController=new pskl.controller.dialogs.DialogsController(this.piskelController),this.dialogsController.init(),this.toolController=new pskl.controller.ToolController,this.toolController.init(),this.selectionManager=new pskl.selection.SelectionManager(this.piskelController),this.selectionManager.init(),this.historyService=new pskl.service.HistoryService(this.corePiskelController),this.historyService.init(),this.notificationController=new pskl.controller.NotificationController,this.notificationController.init(),this.transformationsController=new pskl.controller.TransformationsController,this.transformationsController.init(),this.progressBarController=new pskl.controller.ProgressBarController,this.progressBarController.init(),this.canvasBackgroundController=new pskl.controller.CanvasBackgroundController,this.canvasBackgroundController.init(),this.localStorageService=new pskl.service.LocalStorageService(this.piskelController),this.localStorageService.init(),this.desktopStorageService=new pskl.service.DesktopStorageService(this.piskelController),this.desktopStorageService.init(),this.imageUploadService=new pskl.service.ImageUploadService,this.imageUploadService.init(),this.cheatsheetService=new pskl.service.keyboard.CheatsheetService,this.cheatsheetService.init(),this.savedStatusService=new pskl.service.SavedStatusService(this.piskelController),this.savedStatusService.init(),this.backupService=new pskl.service.BackupService(this.piskelController),this.backupService.init(),this.beforeUnloadService=new pskl.service.BeforeUnloadService(this.piskelController),this.beforeUnloadService.init(),this.fileDropperService=new pskl.service.FileDropperService(this.piskelController,document.querySelector("#drawing-canvas-container")),this.fileDropperService.init(),this.isAppEngineVersion?this.storageService=new pskl.service.AppEngineStorageService(this.piskelController):this.storageService=new pskl.service.GithubStorageService(this.piskelController),this.storageService.init();var f=new pskl.rendering.DrawingLoop;f.addCallback(this.render,this),f.start(),this.initTooltips_();var g=this.getPiskelInitData_();if(g&&g.piskel&&this.loadPiskel_(g.piskel,g.descriptor,g.fps),pskl.devtools&&pskl.devtools.init(),pskl.utils.Environment.detectNodeWebkit()&&pskl.utils.UserAgent.isMac
|